- Timestamp:
- 2012-11-19T13:28:55+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_r3452_UKMO9_RESTART/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r3294 r3594 57 57 INTEGER, INTENT(in) :: kt ! ocean time-step 58 58 !! 59 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 60 CHARACTER(LEN=50) :: clname ! ice output restart file name 59 CHARACTER(LEN=20) :: clkt ! ocean time-step defined as a character 60 CHARACTER(LEN=50) :: clname ! ice output restart file name 61 INTEGER :: js ! dummy loop variable 61 62 !!---------------------------------------------------------------------- 62 63 ! 63 64 IF( kt == nit000 ) THEN ! default definitions 64 65 lrst_oce = .FALSE. 65 nitrst = nitend 66 ENDIF 67 IF( MOD( kt - 1, nstock ) == 0 ) THEN 68 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 69 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing 70 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 71 ENDIF 66 nrst = 1 67 nitrst = nn_stock( nrst ) 68 ENDIF 69 72 70 ! to get better performances with NetCDF format: 73 71 ! we open and define the ocean restart file one time step before writing the data (-> at nitrst - 1) 74 ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 175 IF ( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce )) THEN72 ! except if we are at the first time step, or if the previous time step we outputted a restart 73 IF ( kt == nitrst - 1 .OR. nn_stock(nrst) == 1 .OR. nn_stock(nrst)==nn_stock(nrst-1)+1 ) THEN 76 74 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 77 75 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst … … 135 133 #endif 136 134 IF( kt == nitrst ) THEN 137 CALL iom_close( numrow ) ! close the restart file (only at last time step) 138 IF( .NOT. lk_trdmld ) lrst_oce = .FALSE. 135 CALL iom_close( numrow ) ! close the restart file (only on the dump time step) 136 IF( .NOT. lk_trdmld ) THEN 137 lrst_oce = .FALSE. 138 nrst = nrst + 1 139 nitrst = nn_stock( nrst ) 140 ENDIF 139 141 ENDIF 140 142 !
Note: See TracChangeset
for help on using the changeset viewer.