- Timestamp:
- 2020-02-19T16:27:21+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/AMM15_v3_6_STABLE_package_collate_utils333/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r10162 r12410 24 24 !!---------------------------------------------------------------------- 25 25 USE oce_trc 26 USE dom_oce, ONLY: fjulday 27 USE phycst, ONLY: rday 28 USE in_out_manager, ONLY: ln_rstdate 26 29 USE trc 27 30 USE trcnam_trp 28 31 USE iom 32 USE ioipsl, ONLY: ju2ymds 29 33 USE daymod 30 34 ! +++>>> FABM … … 51 55 !!---------------------------------------------------------------------- 52 56 INTEGER, INTENT(in) :: kt ! number of iteration 57 INTEGER :: iyear, imonth, iday 58 REAL (wp) :: zsec 59 REAL (wp) :: zfjulday 53 60 ! 54 61 CHARACTER(LEN=20) :: clkt ! ocean time-step define as a character … … 80 87 ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 81 88 ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 82 IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 83 ! beware of the format used to write kt (default is i8.8, that should be large enough) 84 IF( nitrst > 1.0e9 ) THEN ; WRITE(clkt,* ) nitrst 85 ELSE ; WRITE(clkt,'(i8.8)') nitrst 89 IF( kt == nitrst - 2*nn_dttrc + 1 .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 90 if ( ln_rstdate ) THEN 91 zfjulday = fjulday + rdttrc(1) / rday 92 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 93 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 94 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 95 ELSE 96 ! beware of the format used to write kt (default is i8.8, that should be large enough) 97 IF( nitrst > 1.0e9 ) THEN ; WRITE(clkt,* ) nitrst 98 ELSE ; WRITE(clkt,'(i8.8)') nitrst 99 ENDIF 86 100 ENDIF 87 101 ! create the file
Note: See TracChangeset
for help on using the changeset viewer.