Changeset 2059 for branches/dev_1784_WEEK/NEMO/OPA_SRC/DOM/daymod.F90
- Timestamp:
- 2010-08-18T11:44:33+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev_1784_WEEK/NEMO/OPA_SRC/DOM/daymod.F90
r1730 r2059 67 67 !! - nmonth_len, nyear_len, nmonth_half, nmonth_end through day_mth 68 68 !!---------------------------------------------------------------------- 69 INTEGER :: inbday, irest 70 REAL(wp) :: zjul 71 !!---------------------------------------------------------------------- 69 72 70 73 ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0 … … 105 108 ! day since january 1st 106 109 nday_year = nday + SUM( nmonth_len(1:nmonth - 1) ) 107 110 111 !compute number of days between last monday and today 112 IF( nn_leapy==1 )THEN 113 CALL ymds2ju( 1900, 01, 01, 0.0, zjul ) ! compute julian day value of 01.01.1900 (monday) 114 inbday = INT(fjulday) - NINT(zjul) ! compute nb day between 01.01.1900 and current day fjulday 115 irest = MOD(inbday,7) ! compute nb day between last monday and current day fjulday 116 IF(irest==0 )irest = 7 117 ENDIF 118 108 119 ! number of seconds since the beginning of current year/month at the middle of the time-step 109 120 nsec_year = nday_year * nsecd - ndt05 ! 1 time step before the middle of the first time step 110 121 nsec_month = nday * nsecd - ndt05 ! because day will be called at the beginning of step 111 122 nsec_day = nsecd - ndt05 123 nsec_week = 0 124 IF( nn_leapy==1 ) nsec_week = irest * nsecd - ndt05 112 125 113 126 ! control print 114 127 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 = ', & 115 & nyear, '/', nmonth, '/', nday, ' nsec_day:', nsec_day 128 & nyear, '/', nmonth, '/', nday, ' nsec_day:', nsec_day, ' nsec_week:', nsec_week 116 129 117 130 ! Up to now, calendar parameters are related to the end of previous run (nit000-1) … … 200 213 nsec_year = nsec_year + ndt 201 214 nsec_month = nsec_month + ndt 215 IF( nn_leapy==1 ) nsec_week = nsec_week + ndt 202 216 nsec_day = nsec_day + ndt 203 217 adatrj = adatrj + rdttra(1) / rday … … 228 242 ndastp = nyear * 10000 + nmonth * 100 + nday ! NEW date 229 243 ! 244 !compute first day of the year in julian days 245 CALL ymds2ju( nyear, 01, 01, 0.0, fjulstartyear ) 246 ! 230 247 IF(lwp) WRITE(numout,'(a,i8,a,i4.4,a,i2.2,a,i2.2,a,i3.3)') '======>> time-step =', kt, & 231 248 & ' New day, DATE Y/M/D = ', nyear, '/', nmonth, '/', nday, ' nday_year = ', nday_year 232 249 IF(lwp) WRITE(numout,'(a,i8,a,i7,a,i5)') ' nsec_year = ', nsec_year, & 233 & ' nsec_month = ', nsec_month, ' nsec_day = ', nsec_day 234 ENDIF 250 & ' nsec_month = ', nsec_month, ' nsec_day = ', nsec_day, ' nsec_week = ', nsec_week 251 ENDIF 252 253 IF( nsec_week .GT. 7*86400 ) nsec_week = ndt05 235 254 236 255 IF(ln_ctl) THEN
Note: See TracChangeset
for help on using the changeset viewer.