- Timestamp:
- 2010-11-04T12:18:58+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r2288 r2353 67 67 !! - nmonth_len, nyear_len, nmonth_half, nmonth_end through day_mth 68 68 !!---------------------------------------------------------------------- 69 INTEGER :: inbday, i rest69 INTEGER :: inbday, idweek 70 70 REAL(wp) :: zjul 71 71 !!---------------------------------------------------------------------- … … 110 110 111 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 119 ! number of seconds since the beginning of current year/month at the middle of the time-step 112 CALL ymds2ju( 1900, 01, 01, 0.0, zjul ) ! compute julian day value of 01.01.1900 (our reference that was a Monday) 113 inbday = NINT(fjulday - zjul) ! compute nb day between 01.01.1900 and current day 114 idweek = MOD(inbday, 7) ! compute nb day between last monday and current day 115 116 ! number of seconds since the beginning of current year/month/week/day at the middle of the time-step 120 117 nsec_year = nday_year * nsecd - ndt05 ! 1 time step before the middle of the first time step 121 118 nsec_month = nday * nsecd - ndt05 ! because day will be called at the beginning of step 119 nsec_week = idweek * nsecd - ndt05 122 120 nsec_day = nsecd - ndt05 123 nsec_week = 0124 IF( nn_leapy==1 ) nsec_week = irest * nsecd - ndt05125 121 126 122 ! control print … … 213 209 nsec_year = nsec_year + ndt 214 210 nsec_month = nsec_month + ndt 215 IF( nn_leapy==1 )nsec_week = nsec_week + ndt211 nsec_week = nsec_week + ndt 216 212 nsec_day = nsec_day + ndt 217 213 adatrj = adatrj + rdttra(1) / rday … … 220 216 IF( ABS(adatrj - REAL(NINT(adatrj ),wp)) < zprec ) adatrj = REAL(NINT(adatrj ),wp) ! avoid truncation error 221 217 222 IF( nsec_day > nsecd ) THEN ! NEWday218 IF( nsec_day > nsecd ) THEN ! New day 223 219 ! 224 220 nday = nday + 1 … … 226 222 nsec_day = ndt05 227 223 ! 228 IF( nday == nmonth_len(nmonth) + 1 ) THEN ! N EWmonth224 IF( nday == nmonth_len(nmonth) + 1 ) THEN ! New month 229 225 nday = 1 230 226 nmonth = nmonth + 1 231 227 nsec_month = ndt05 232 IF( nmonth == 13 ) THEN ! N EWyear228 IF( nmonth == 13 ) THEN ! New year 233 229 nyear = nyear + 1 234 230 nmonth = 1 … … 240 236 ENDIF 241 237 ! 242 ndastp = nyear * 10000 + nmonth * 100 + nday ! N EWdate238 ndastp = nyear * 10000 + nmonth * 100 + nday ! New date 243 239 ! 244 240 !compute first day of the year in julian days … … 251 247 ENDIF 252 248 253 IF( nsec_week .GT. 7*86400 ) nsec_week = ndt05249 IF( nsec_week > 7*nsecd ) nsec_week = ndt05 ! New week 254 250 255 251 IF(ln_ctl) THEN
Note: See TracChangeset
for help on using the changeset viewer.