Changeset 5749


Ignore:
Timestamp:
2015-09-16T09:17:13+02:00 (5 years ago)
Author:
jpaul
Message:

bug fix: see ticket #1598

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90

    r5407 r5749  
    815815         imonth = kmonth 
    816816         iday = kday 
     817         IF ( sdjf%cltype(1:4) == 'week' ) THEN             ! find the day of 
     818         the beginning of the week 
     819            isec_week = ksec_week( sdjf%cltype(6:8) )- (86400 * 8 )   
     820            llprevmth  = isec_week > nsec_month             ! longer time since 
     821            beginning of the week than the month 
     822            llprevyr   = llprevmth .AND. nmonth == 1 
     823            iyear  = nyear  - COUNT((/llprevyr /)) 
     824            imonth = nmonth - COUNT((/llprevmth/)) + 12 * COUNT((/llprevyr /)) 
     825            iday   = nday   + nmonth_len(nmonth-1) * COUNT((/llprevmth/)) - 
     826            isec_week / NINT(rday) 
     827         ENDIF 
    817828      ELSE                                                  ! use current day values 
    818829         IF ( sdjf%cltype(1:4) == 'week' ) THEN             ! find the day of the beginning of the week 
Note: See TracChangeset for help on using the changeset viewer.