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 1192 for trunk – NEMO

Changeset 1192 for trunk


Ignore:
Timestamp:
2008-09-18T10:34:40+02:00 (16 years ago)
Author:
smasson
Message:

fix ticket #252

Location:
trunk/NEMO/OPA_SRC
Files:
2 edited

Legend:

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

    r1191 r1192  
    140140               ! to the NEW year/month. If it is the case, we are at the beginning of the year/month when calling fld_rec 
    141141               ! so sd(jf)%rec_a(1) = 1 
    142                IF( sd(jf)%rec_a(1) == 1 )   CALL fld_clopn( sd(jf), nyear, nmonth ) 
     142               IF( sd(jf)%rec_a(1) == 1 .AND. .NOT. sd(jf)%ln_clim )   CALL fld_clopn( sd(jf), nyear, nmonth ) 
    143143            ENDIF 
    144144 
     
    301301         irec = nmonth + INT( ztmp ) 
    302302 
    303          IF( sdjf%ln_tint ) THEN   ;   sdjf%swap_sec = rmonth_half(irec)   ! swap at the middle of the month 
    304          ELSE                      ;   sdjf%swap_sec = rmonth_end( irec)   ! swap at the end    of the month 
    305          ENDIF 
    306  
    307          sdjf%rec_a(:) = (/ REAL( irec, wp ), rmonth_half(irec) /)   ! define after  record number and time 
     303         IF( sdjf%ln_tint ) THEN   ;   sdjf%swap_sec = rmonth_half(irec) + sec1jan000   ! swap at the middle of the month 
     304         ELSE                      ;   sdjf%swap_sec = rmonth_end( irec) + sec1jan000   ! swap at the end    of the month 
     305         ENDIF 
     306 
     307         sdjf%rec_a(:) = (/ REAL( irec, wp ), rmonth_half(irec) + sec1jan000 /)   ! define after  record number and time 
    308308         irec = irec - 1                                                          ! move back to previous record 
    309          sdjf%rec_b(:) = (/ REAL( irec, wp ), rmonth_half(irec) /)   ! define before record number and time 
     309         sdjf%rec_b(:) = (/ REAL( irec, wp ), rmonth_half(irec) + sec1jan000 /)   ! define before record number and time 
    310310         ! 
    311311      ELSE                          ! higher frequency mean (in hours) 
  • trunk/NEMO/OPA_SRC/daymod.F90

    r1191 r1192  
    173173         rmonth_half(jm) = rmonth_half(jm-1) + 0.5 * rday * REAL( nmonth_len(jm-1) + nmonth_len(jm), wp ) 
    174174      END DO 
    175       rmonth_half(:) = rmonth_half(:) + sec1jan000 
    176175 
    177176      rmonth_end(0) = 0. 
Note: See TracChangeset for help on using the changeset viewer.