Changeset 5538
- Timestamp:
- 2015-07-02T16:06:34+02:00 (9 years ago)
- Location:
- branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r5462 r5538 136 136 USE ioipsl 137 137 NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list, & 138 & nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl, &138 & nn_no , cn_exp , cn_ocerst_in, cn_ocerst_out, ln_rstart , ln_rstdate, nn_rstctl, & 139 139 & nn_it000, nn_itend , nn_date0 , nn_leapy , nn_istate , nn_stock , & 140 140 & nn_write, ln_dimgnnn, ln_mskland , ln_cfmeta , ln_clobber, nn_chunksz, nn_euler … … 173 173 WRITE(numout,*) ' file prefix restart output cn_ocerst_out= ', cn_ocerst_out 174 174 WRITE(numout,*) ' restart output directory cn_ocerst_outdir= ', cn_ocerst_outdir 175 WRITE(numout,*) ' restart logical ln_rstart = ', ln_rstart 175 WRITE(numout,*) ' restart logical ln_rstart = ' , ln_rstart 176 WRITE(numout,*) ' datestamping of restarts ln_rstdate = ', ln_rstdate 176 177 WRITE(numout,*) ' start with forward time step nn_euler = ', nn_euler 177 178 WRITE(numout,*) ' control of time step nn_rstctl = ', nn_rstctl -
branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90
r5462 r5538 18 18 !!---------------------------------------------------------------------- 19 19 USE par_oce ! NEMO parameters 20 USE phycst ! for rday 20 21 USE dom_oce ! NEMO domain 21 22 USE in_out_manager ! NEMO IO routines 23 USE ioipsl, ONLY : ju2ymds ! for calendar 22 24 USE lib_mpp ! NEMO MPI library, lk_mpp in particular 23 25 USE netcdf ! netcdf routines for IO … … 231 233 INTEGER :: jn ! dummy loop index 232 234 INTEGER :: ix_dim, iy_dim, ik_dim, in_dim 233 CHARACTER(len=256) :: cl_path 234 CHARACTER(len=256) :: cl_filename 235 INTEGER :: iyear, imonth, iday 236 REAL (wp) :: zsec 237 CHARACTER(len=256) :: cl_path 238 CHARACTER(len=256) :: cl_filename 239 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 235 240 TYPE(iceberg), POINTER :: this 236 241 TYPE(point) , POINTER :: pt … … 240 245 cl_path = TRIM(cn_ocerst_outdir) 241 246 IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 247 IF ( ln_rstdate ) THEN 248 CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec ) 249 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 250 ELSE 251 IF( kt > 999999999 ) THEN ; WRITE(clkt, * ) kt 252 ELSE ; WRITE(clkt, '(i8.8)') kt 253 ENDIF 254 ENDIF 242 255 IF( lk_mpp ) THEN 243 WRITE(cl_filename,'(A,"_icebergs_", I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1256 WRITE(cl_filename,'(A,"_icebergs_",A,"_restart_",I4.4,".nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)), narea-1 244 257 ELSE 245 WRITE(cl_filename,'(A,"_icebergs_", I8.8,"_restart.nc")') TRIM(cexper), kt258 WRITE(cl_filename,'(A,"_icebergs_",A,"_restart.nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)) 246 259 ENDIF 247 260 IF (nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',TRIM(cl_path)//TRIM(cl_filename) -
branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r5462 r5538 30 30 CHARACTER(lc) :: cn_ocerst_outdir !: restart output directory 31 31 LOGICAL :: ln_rstart !: start from (F) rest or (T) a restart file 32 LOGICAL :: ln_rstdate !: datestamping of restarts 32 33 LOGICAL :: ln_rst_list !: output restarts at list of times (T) or by frequency (F) 33 34 INTEGER :: nn_no !: job number -
branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r5462 r5538 21 21 USE in_out_manager ! I/O manager 22 22 USE iom ! I/O module 23 USE ioipsl, ONLY : ju2ymds ! for calendar 23 24 USE eosbn2 ! equation of state (eos bn2 routine) 24 25 USE trdmxl_oce ! ocean active mixed layer tracers trends variables … … 54 55 !!---------------------------------------------------------------------- 55 56 INTEGER, INTENT(in) :: kt ! ocean time-step 57 INTEGER :: iyear, imonth, iday 58 REAL (wp) :: zsec 56 59 !! 57 60 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 58 61 CHARACTER(LEN=50) :: clname ! ocean output restart file name 59 CHARACTER( lc):: clpath ! full path to ocean output restart file62 CHARACTER(LEN=150) :: clpath ! full path to ocean output restart file 60 63 !!---------------------------------------------------------------------- 61 64 ! … … 81 84 IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 82 85 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 83 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 84 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 85 ELSE ; WRITE(clkt, '(i8.8)') nitrst 86 IF ( ln_rstdate ) THEN 87 CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec ) 88 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 89 ELSE 90 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 91 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 92 ELSE ; WRITE(clkt, '(i8.8)') nitrst 93 ENDIF 86 94 ENDIF 87 95 ! create the file
Note: See TracChangeset
for help on using the changeset viewer.