New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 5748 – NEMO

Changeset 5748


Ignore:
Timestamp:
2015-09-16T09:16:44+02:00 (9 years ago)
Author:
jpaul
Message:

bug fix: see ticket #1598

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90

    r5407 r5748  
    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.