- 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/TOP_SRC/trcrst.F90
r3294 r3594 66 66 ENDIF 67 67 68 IF ( MOD( kt - 1, nstock )== 0 ) THEN69 ! we use kt - 1 and not kt - nittrc000 to keep the same periodicity from the beginning of the experiment70 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing71 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run68 IF ( kt == 0 ) THEN 69 nrst = 1 70 nitrst = nn_stock( nrst ) 71 lrst_trc = .FALSE. 72 72 ENDIF 73 73 ELSE … … 77 77 ! to get better performances with NetCDF format: 78 78 ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 79 ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 180 IF( kt == nitrst - 2*nn_dttrc .OR. n stock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN79 ! except if we are at the first time step, or if the previous time step we outputted a restart 80 IF( kt == nitrst - 2*nn_dttrc .OR. nn_stock(nitrst) == nn_dttrc .OR. ( nn_stock(nrst)==nn_stock(nrst-1)+nn_dttrc ) ) THEN 81 81 ! beware of the format used to write kt (default is i8.8, that should be large enough) 82 82 IF( nitrst > 1.0e9 ) THEN ; WRITE(clkt,* ) nitrst … … 161 161 #if ! defined key_trdmld_trc 162 162 lrst_trc = .FALSE. 163 nrst = nrst + 1 164 nitrst = nn_stock(nrst) 163 165 #endif 164 166 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.