Changeset 9390
- Timestamp:
- 2018-03-09T14:41:46+01:00 (7 years ago)
- Location:
- branches/UKMO/dev_r8864_restart_date/NEMOGCM/NEMO
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r8864_restart_date/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
r9235 r9390 23 23 USE in_out_manager ! I/O manager 24 24 USE iom ! I/O library 25 USE ioipsl, ONLY : ju2ymds ! for calendar 25 26 USE lib_mpp ! MPP library 26 27 USE wrk_nemo ! work arrays … … 53 54 INTEGER, INTENT(in) :: kt ! number of iteration 54 55 ! 56 INTEGER :: iyear, imonth, iday 57 REAL (wp) :: zsec 58 REAL (wp) :: zfjulday 55 59 CHARACTER(len=20) :: clkt ! ocean time-step define as a character 56 60 CHARACTER(len=50) :: clname ! ice output restart file name … … 67 71 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 68 72 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 69 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 70 ELSE ; WRITE(clkt, '(i8.8)') nitrst 73 IF ( ln_rstdate ) THEN 74 zfjulday = fjulday + rdttra(1) / rday 75 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 76 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 77 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 78 ELSE 79 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 80 ELSE ; WRITE(clkt, '(i8.8)') nitrst 81 ENDIF 71 82 ENDIF 72 83 ! create the file -
branches/UKMO/dev_r8864_restart_date/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r9235 r9390 285 285 & nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , & 286 286 & nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, nn_euler , & 287 & ln_cfmeta, ln_iscpl 287 & ln_cfmeta, ln_iscpl, ln_rstdate 288 288 NAMELIST/namdom/ ln_linssh, nn_closea, nn_msh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs 289 289 #if defined key_netcdf4 … … 329 329 WRITE(numout,*) ' frequency of output file nn_write = ', nn_write 330 330 WRITE(numout,*) ' mask land points ln_mskland = ', ln_mskland 331 WRITE(numout,*) ' date-stamp restart files ln_rstdate = ', ln_rstdate 331 332 WRITE(numout,*) ' additional CF standard metadata ln_cfmeta = ', ln_cfmeta 332 333 WRITE(numout,*) ' overwrite an existing file ln_clobber = ', ln_clobber -
branches/UKMO/dev_r8864_restart_date/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90
r9235 r9390 25 25 USE netcdf ! netcdf routines for IO 26 26 USE iom 27 USE ioipsl, ONLY : ju2ymds ! for calendar 27 28 USE icb_oce ! define iceberg arrays 28 29 USE icbutl ! iceberg utility routines … … 158 159 INTEGER :: jn ! dummy loop index 159 160 INTEGER :: ix_dim, iy_dim, ik_dim, in_dim 161 INTEGER :: iyear, imonth, iday 162 REAL (wp) :: zsec 163 REAL (wp) :: zfjulday 164 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 160 165 CHARACTER(len=256) :: cl_path 161 166 CHARACTER(len=256) :: cl_filename … … 167 172 cl_path = TRIM(cn_ocerst_outdir) 168 173 IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 174 IF ( ln_rstdate ) THEN 175 zfjulday = fjulday + rdttra(1) / rday 176 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 177 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 178 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 179 ELSE 180 IF( kt > 999999999 ) THEN ; WRITE(clkt, * ) kt 181 ELSE ; WRITE(clkt, '(i8.8)') kt 182 ENDIF 183 ENDIF 169 184 IF( lk_mpp ) THEN 170 WRITE(cl_filename,'(A,"_icebergs_", I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1185 WRITE(cl_filename,'(A,"_icebergs_",A,"_restart_",I4.4,".nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)), narea-1 171 186 ELSE 172 WRITE(cl_filename,'(A,"_icebergs_", I8.8,"_restart.nc")') TRIM(cexper), kt187 WRITE(cl_filename,'(A,"_icebergs_",A,"_restart.nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)) 173 188 ENDIF 174 189 IF (nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',TRIM(cl_path)//TRIM(cl_filename) -
branches/UKMO/dev_r8864_restart_date/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r9235 r9390 41 41 INTEGER, DIMENSION(10) :: nn_stocklist !: restart dump times 42 42 LOGICAL :: ln_mskland !: mask land points in NetCDF outputs (costly: + ~15%) 43 LOGICAL :: ln_rstdate !: T=> stamp output restart files with date instead of timestep 43 44 LOGICAL :: ln_cfmeta !: output additional data to netCDF files required for compliance with the CF metadata standard 44 45 LOGICAL :: ln_clobber !: clobber (overwrite) an existing file -
branches/UKMO/dev_r8864_restart_date/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r9235 r9390 27 27 USE in_out_manager ! I/O manager 28 28 USE iom ! I/O module 29 USE ioipsl, ONLY : ju2ymds ! for calendar 29 30 USE diurnal_bulk 30 31 … … 58 59 INTEGER, INTENT(in) :: kt ! ocean time-step 59 60 !! 61 INTEGER :: iyear, imonth, iday 62 REAL (wp) :: zsec 63 REAL (wp) :: zfjulday 60 64 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 61 65 CHARACTER(LEN=50) :: clname ! ocean output restart file name … … 85 89 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 86 90 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 87 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 88 ELSE ; WRITE(clkt, '(i8.8)') nitrst 91 IF ( ln_rstdate ) THEN 92 zfjulday = fjulday + rdttra(1) / rday 93 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 94 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 95 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 96 ELSE 97 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 98 ELSE ; WRITE(clkt, '(i8.8)') nitrst 99 ENDIF 89 100 ENDIF 90 101 ! create the file
Note: See TracChangeset
for help on using the changeset viewer.