Changeset 783 for trunk/NEMO/OPA_SRC/TRD
- Timestamp:
- 2008-01-07T15:29:41+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/TRD/trdmld_rst.F90
r719 r783 46 46 !!-------------------------------------------------------------------------------- 47 47 48 IF( kt == nitrst-1 ) THEN 49 IF( nitrst > 1.0e9 ) THEN 50 WRITE(clkt,*) nitrst 51 ELSE 52 WRITE(clkt,'(i8.8)') nitrst 48 ! to get better performances with NetCDF format: 49 ! we open and define the ocean restart_mld file one time step before writing the data (-> at nitrst - 1) 50 ! except if we write ocean restart_mld files every time step or if an ocean restart_mld file was writen at nitend - 1 51 IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. MOD( nitend - 1, nstock ) == 0 ) ) THEN 52 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 53 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 54 ELSE ; WRITE(clkt, '(i8.8)') nitrst 53 55 ENDIF 56 ! create the file 54 57 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_restart_mld" 55 IF(lwp) WRITE(numout,*) ' open ocean restart_mld NetCDF file: '//clname 58 IF(lwp) THEN 59 WRITE(numout,*) 60 SELECT CASE ( jprstlib ) 61 CASE ( jprstdimg ) ; WRITE(numout,*) ' open ocean restart_mld binary file: '//clname 62 CASE DEFAULT ; WRITE(numout,*) ' open ocean restart_mld NetCDF file: '//clname 63 END SELECT 64 IF( kt == nitrst - 1 ) THEN ; WRITE(numout,*) ' kt = nitrst - 1 = ', kt,' date= ', ndastp 65 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 66 ENDIF 67 ENDIF 68 56 69 CALL iom_open( clname, nummldw, ldwrt = .TRUE., kiolib = jprstlib ) 57 70 ENDIF … … 59 72 IF( kt == nitrst .AND. lwp ) THEN 60 73 WRITE(numout,*) 61 WRITE(numout,*) 'trdmld_rst: output for ML diags. restart, with trd_mld_rst_write routine '74 WRITE(numout,*) 'trdmld_rst: output for ML diags. restart, with trd_mld_rst_write routine kt =', kt 62 75 WRITE(numout,*) '~~~~~~~~~~' 63 76 WRITE(numout,*) … … 81 94 CALL iom_rstput( kt, nitrst, nummldw, 'tml_sumb' , tml_sumb ) 82 95 DO jk = 1, jpltrd 83 IF( jk < 10 ) THEN 84 WRITE(charout,FMT="('tmltrd_csum_ub_', I1)") jk 85 ELSE 86 WRITE(charout,FMT="('tmltrd_csum_ub_', I2)") jk 96 IF( jk < 10 ) THEN ; WRITE(charout,FMT="('tmltrd_csum_ub_', I1)") jk 97 ELSE ; WRITE(charout,FMT="('tmltrd_csum_ub_', I2)") jk 87 98 ENDIF 88 99 CALL iom_rstput( kt, nitrst, nummldw, charout, tmltrd_csum_ub(:,:,jk) ) … … 94 105 CALL iom_rstput( kt, nitrst, nummldw, 'sml_sumb' , sml_sumb ) 95 106 DO jk = 1, jpltrd 96 IF( jk < 10 ) THEN 97 WRITE(charout,FMT="('smltrd_csum_ub_', I1)") jk 98 ELSE 99 WRITE(charout,FMT="('smltrd_csum_ub_', I2)") jk 107 IF( jk < 10 ) THEN ; WRITE(charout,FMT="('smltrd_csum_ub_', I1)") jk 108 ELSE ; WRITE(charout,FMT="('smltrd_csum_ub_', I2)") jk 100 109 ENDIF 101 110 CALL iom_rstput( kt, nitrst, nummldw, charout , smltrd_csum_ub(:,:,jk) )
Note: See TracChangeset
for help on using the changeset viewer.