Changeset 6151
- Timestamp:
- 2015-12-21T16:08:15+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r6149 r6151 54 54 !!---------------------------------------------------------------------- 55 55 INTEGER, INTENT(in) :: kt ! ocean time-step 56 INTEGER :: iyear, imonth, iday57 REAL (wp) :: zsec58 56 !! 59 57 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 60 58 CHARACTER(LEN=50) :: clname ! ocean output restart file name 61 CHARACTER( LEN=150):: clpath ! full path to ocean output restart file59 CHARACTER(lc) :: clpath ! full path to ocean output restart file 62 60 !!---------------------------------------------------------------------- 63 61 ! 64 62 IF( kt == nit000 ) THEN ! default definitions 65 lrst_oce = .FALSE. 63 lrst_oce = .FALSE. 66 64 IF( ln_rst_list ) THEN 67 65 nrst_lst = 1 … … 73 71 74 72 ! frequency-based restart dumping (nn_stock) 75 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN 73 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN 76 74 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 77 75 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing 78 76 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 79 77 ENDIF 80 !!81 78 !! JPALM test - 82 79 IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN … … 96 93 ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 97 94 IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 98 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 99 IF ( ln_rstdate ) THEN 100 CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec ) 101 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 102 ELSE 103 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 104 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 105 ELSE ; WRITE(clkt, '(i8.8)') nitrst 106 ENDIF 95 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 96 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 97 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 98 ELSE ; WRITE(clkt, '(i8.8)') nitrst 107 99 ENDIF 108 100 ! create the file
Note: See TracChangeset
for help on using the changeset viewer.