Changeset 15596
- Timestamp:
- 2021-12-13T17:28:47+01:00 (2 years ago)
- Location:
- NEMO/releases/r4.0/r4.0-HEAD/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/IOM/restart.F90
r11536 r15596 69 69 lrst_oce = .FALSE. 70 70 IF( ln_rst_list ) THEN 71 nrst_lst = 1 72 nitrst = nn_stocklist( nrst_lst ) 71 ! Protect against user requests outside of simulation period (#2735) 72 nitrst = MIN( nitend, MINVAL( nn_stocklist, MASK=nn_stocklist.ge.nit000) ) 73 nrst_lst = MAX( 1, FINDLOC( nn_stocklist, nitrst, DIM=1 ) ) 73 74 ELSE 74 75 nitrst = nitend … … 87 88 ! we open and define the ocean restart file one time step before writing the data (-> at nitrst - 1) 88 89 ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 89 IF( kt == nitrst - 1 .OR. nn_stock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 90 ! or if nit000 is requested in the nn_stocklist 91 IF( kt == nitrst - 1 .OR. nn_stock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) & 92 & .OR. ( kt == nit000 .AND. nitrst == nit000 ) ) THEN 90 93 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 91 94 ! beware of the format used to write kt (default is i8.8, that should be large enough...) … … 188 191 nrst_lst = MIN(nrst_lst + 1, SIZE(nn_stocklist,1)) 189 192 nitrst = nn_stocklist( nrst_lst ) 193 IF( nitrst == 0 ) nitrst = nitend ! Force a restart at the end of the run 190 194 ENDIF 191 195 ENDIF -
NEMO/releases/r4.0/r4.0-HEAD/src/TOP/trcrst.F90
r11536 r15596 57 57 lrst_trc = .FALSE. 58 58 IF( ln_rst_list ) THEN 59 nrst_lst = 1 60 nitrst = nn_stocklist( nrst_lst ) 59 ! Protect against user requests outside of simulation period (#2735) 60 nitrst = MIN( nitend, MINVAL( nn_stocklist, MASK=nn_stocklist.ge.nit000) ) 61 nrst_lst = MAX( 1, FINDLOC( nn_stocklist, nitrst, DIM=1 ) ) 61 62 ELSE 62 63 nitrst = nitend … … 78 79 ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 79 80 ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 80 IF( kt == nitrst - 2*nn_dttrc .OR. nn_stock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 81 ! or if nit000 is requested in the nn_stocklist 82 IF( kt == nitrst - 2*nn_dttrc .OR. nn_stock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) & 83 & .OR. ( kt == nit000 .AND. nitrst == nit000 ) ) THEN 81 84 ! beware of the format used to write kt (default is i8.8, that should be large enough) 82 85 IF( nitrst > 1.0e9 ) THEN ; WRITE(clkt,* ) nitrst
Note: See TracChangeset
for help on using the changeset viewer.