- Timestamp:
- 2020-02-27T13:20:58+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/r12083_restart_datestamp/src/OCE/IOM/restart.F90
r11715 r12477 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 31 USE sbc_oce ! for icesheet freshwater input variables 30 32 USE lib_mpp ! distribued memory computing library 31 33 … … 47 49 CONTAINS 48 50 49 SUBROUTINE rst_opn( kt )51 SUBROUTINE rst_opn( kt, ndastp ) 50 52 !!--------------------------------------------------------------------- 51 53 !! *** ROUTINE rst_opn *** … … 58 60 !!---------------------------------------------------------------------- 59 61 INTEGER, INTENT(in) :: kt ! ocean time-step 62 INTEGER, INTENT(in) :: ndastp ! ocean date 60 63 !! 64 INTEGER :: iyear, imonth, iday 65 REAL (wp) :: zsec 66 REAL (wp) :: zfjulday !! 61 67 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 62 68 CHARACTER(LEN=50) :: clname ! ocean output restart file name 63 CHARACTER( lc):: clpath ! full path to ocean output restart file69 CHARACTER(LEN=150) :: clpath ! full path to ocean output restart file 64 70 CHARACTER(LEN=52) :: clpname ! ocean output restart file name including prefix for AGRIF 65 71 CHARACTER(LEN=256) :: clinfo ! info character … … 90 96 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 91 97 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 92 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 93 ELSE ; WRITE(clkt, '(i8.8)') nitrst 98 IF ( ln_rstdate ) THEN 99 zfjulday = fjulday + rdt / rday 100 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 101 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 102 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 103 ELSE 104 IF( nitrst > 999999999 ) THEN 105 WRITE(clkt, * ) nitrst 106 ELSE 107 WRITE(clkt, '(i8.8)') nitrst 108 ENDIF 94 109 ENDIF 95 110 ! create the file
Note: See TracChangeset
for help on using the changeset viewer.