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 1824 for branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/fldread.F90 – NEMO

Ignore:
Timestamp:
2010-03-31T13:48:55+02:00 (14 years ago)
Author:
cbricaud
Message:

correction for the case monthly file and fre=-1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/fldread.F90

    r1806 r1824  
    356356               IF( sdjf%cltype == 'monthly' ) THEN   ! monthly file 
    357357                  sdjf%nrec_b(1) = 1                                                       ! force to read the unique record 
    358                   llprevmth = .NOT. sdjf%ln_clim                                           ! use previous month file? 
     358                  llprevmth = .TRUE.                                                       ! use previous month file? 
    359359                  llprevyr  = llprevmth .AND. nmonth == 1                                  ! use previous year  file? 
    360360               ELSE                                  ! yearly file 
     
    560560         IF( sdjf%cltype /= 'yearly' )    WRITE(sdjf%clname, '(a,"m" ,i2.2)' ) TRIM( sdjf%clname     ), kmonth   ! add month 
    561561         IF( sdjf%cltype == 'daily'  )    WRITE(sdjf%clname, '(a,"d" ,i2.2)' ) TRIM( sdjf%clname     ), kday     ! add day 
     562      ELSE 
     563         ! build the new filename if climatological data 
     564         IF( sdjf%cltype == 'monthly' )   WRITE(sdjf%clname, '(a,"m" ,i2.2)' ) TRIM( sdjf%clrootname ), kmonth   ! add month 
    562565      ENDIF 
    563566      CALL iom_open( sdjf%clname, sdjf%num, ldstop = ldstop, ldiof =  LEN(TRIM(sdjf%wgtname)) > 0 ) 
     
    590593         sdf(jf)%ln_tint    = sdf_n(jf)%ln_tint 
    591594         sdf(jf)%ln_clim    = sdf_n(jf)%ln_clim 
    592          IF( sdf(jf)%nfreqh == -1. ) THEN   ;   sdf(jf)%cltype = 'yearly' 
    593          ELSE                               ;   sdf(jf)%cltype = sdf_n(jf)%cltype 
    594          ENDIF 
     595         sdf(jf)%cltype     = sdf_n(jf)%cltype 
    595596         sdf(jf)%wgtname = " " 
    596597         IF( LEN( TRIM(sdf_n(jf)%wname) ) > 0 )   sdf(jf)%wgtname = TRIM( cdir )//TRIM( sdf_n(jf)%wname ) 
Note: See TracChangeset for help on using the changeset viewer.