- Timestamp:
- 2014-09-17T19:19:59+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO7_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r4162 r4772 84 84 IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' ) 85 85 86 ! If we are starting at 00Z then need to wind back to previous day for calendar initialisation 87 IF( nn_time0 .eq. 0 ) ndastp = ndastp - 1 88 86 89 ! set the calandar from ndastp (read in restart file and namelist) 87 90 … … 90 93 nday = ndastp - (nyear * 10000) - ( nmonth * 100 ) 91 94 92 CALL ymds2ju( nyear, nmonth, nday, 0.0, fjulday ) ! we assume that we start run at 00:0095 CALL ymds2ju( nyear, nmonth, nday, nn_time0*3600._wp, fjulday ) ! we assume that we start run at 00:00 93 96 IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < 0.1 / rday ) fjulday = REAL(NINT(fjulday),wp) ! avoid truncation error 94 fjulday = fjulday + 1.! move back to the day at nit000 (and not at nit000 - 1)97 IF( nn_time0 == 0 ) fjulday = fjulday + 1. ! move back to the day at nit000 (and not at nit000 - 1) 95 98 96 99 nsec1jan000 = 0 … … 117 120 118 121 ! number of seconds since the beginning of current year/month/week/day at the middle of the time-step 119 nsec_year = nday_year * nsecd - ndt05 ! 1 time step before the middle of the first time step 120 nsec_month = nday * nsecd - ndt05 ! because day will be called at the beginning of step 121 nsec_week = idweek * nsecd - ndt05 122 nsec_day = nsecd - ndt05 123 122 nsec_year = nday_year * nsecd + nn_time0*3600._wp - ndt05 ! 1 time step before the middle of the first time step 123 nsec_month = nday * nsecd + nn_time0*3600._wp - ndt05 ! because day will be called at the beginning of step 124 nsec_week = idweek * nsecd + nn_time0*3600._wp - ndt05 125 nsec_day = nsecd + nn_time0*3600._wp - ndt05 126 IF( nsec_day .lt. 0 ) nsec_day = nsec_day + nsecd 127 124 128 ! control print 125 129 IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i6)')' ==============>> 1/2 time step before the start of the run DATE Y/M/D = ', & … … 327 331 ! define ndastp and adatrj 328 332 IF ( nrstdt == 2 ) THEN 329 ! read the parameters correspond ting to nit000 - 1 (last time step of previous run)333 ! read the parameters corresponding to nit000 - 1 (last time step of previous run) 330 334 CALL iom_get( numror, 'ndastp', zndastp ) 331 335 ndastp = NINT( zndastp ) 332 336 CALL iom_get( numror, 'adatrj', adatrj ) 333 337 ELSE 334 ! parameters correspond ting to nit000 - 1 (as we start the step loop with a call to day)335 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00338 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 339 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 336 340 adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 337 341 ! note this is wrong if time step has changed during run 338 342 ENDIF 339 343 ELSE 340 ! parameters correspond ting to nit000 - 1 (as we start the step loop with a call to day)341 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00344 ! parameters corresponding to nit000 - 1 (as we start the step loop with a call to day) 345 ndastp = ndate0 ! ndate0 read in the namelist in dom_nam 342 346 adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 343 347 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.