- Timestamp:
- 2019-03-15T13:14:30+01:00 (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/r8395_restart_datestamp/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r10758 r10765 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 31 33 IMPLICIT NONE … … 46 48 CONTAINS 47 49 48 SUBROUTINE rst_opn( kt )50 SUBROUTINE rst_opn( kt, ndastp ) 49 51 !!--------------------------------------------------------------------- 50 52 !! *** ROUTINE rst_opn *** … … 57 59 !!---------------------------------------------------------------------- 58 60 INTEGER, INTENT(in) :: kt ! ocean time-step 61 INTEGER, INTENT(in) :: ndastp ! ocean date 59 62 !! 63 64 INTEGER :: iyear, imonth, iday 65 REAL (wp) :: zsec 66 REAL (wp) :: zfjulday !! 60 67 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 61 68 CHARACTER(LEN=50) :: clname ! ocean output restart file name 62 CHARACTER( lc):: clpath ! full path to ocean output restart file69 CHARACTER(LEN=150) :: clpath ! full path to ocean output restart file 63 70 !!---------------------------------------------------------------------- 64 71 ! … … 85 92 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 86 93 ! 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 94 IF ( ln_rstdate ) THEN 95 zfjulday = fjulday + rdt / rday 96 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 97 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 98 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 99 ELSE 100 IF( nitrst > 999999999 ) THEN 101 WRITE(clkt, * ) nitrst 102 ELSE 103 WRITE(clkt, '(i8.8)') nitrst 104 ENDIF 89 105 ENDIF 90 106 ! create the file
Note: See TracChangeset
for help on using the changeset viewer.