- Timestamp:
- 2015-12-15T10:46:14+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
r5836 r6051 166 166 isecsbc = nsec_year + nsec1jan000 + (kit+it_offset)*NINT( rdt/REAL(nn_baro,wp) ) 167 167 ELSE ! middle of sbc time step 168 isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdt tra(1)) + it_offset * NINT(rdttra(1))168 isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdt) + it_offset * NINT(rdt) 169 169 ENDIF 170 170 imf = SIZE( sd ) … … 193 193 CALL fld_rec( kn_fsbc, sd(jf), kt_offset = it_offset, kit = kit ) ! update after record informations 194 194 195 ! if kn_fsbc*rdt trais larger than nfreqh (which is kind of odd),195 ! if kn_fsbc*rdt is larger than nfreqh (which is kind of odd), 196 196 ! it is possible that the before value is no more the good one... we have to re-read it 197 197 ! if before is not the last record of the file currently opened and after is the first record to be read … … 214 214 IF( sd(jf)%ln_tint ) THEN 215 215 216 ! if kn_fsbc*rdt trais larger than nfreqh (which is kind of odd),216 ! if kn_fsbc*rdt is larger than nfreqh (which is kind of odd), 217 217 ! it is possible that the before value is no more the good one... we have to re-read it 218 218 ! if before record is not just just before the after record... … … 245 245 ! year/month/week/day file to be not present. If the run continue further than the current 246 246 ! year/month/week/day, next year/month/week/day file must exist 247 isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rdt tra(1)) ! second at the end of the run247 isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rdt) ! second at the end of the run 248 248 llstop = isecend > sd(jf)%nrec_a(2) ! read more than 1 record of next year 249 249 ! we suppose that the date of next file is next day (should be ok even for weekly files...) … … 459 459 IF( PRESENT(kt_offset) ) it_offset = kt_offset 460 460 IF( PRESENT(kit) ) THEN ; it_offset = ( kit + it_offset ) * NINT( rdt/REAL(nn_baro,wp) ) 461 ELSE ; it_offset = it_offset * NINT( rdt tra(1))461 ELSE ; it_offset = it_offset * NINT( rdt ) 462 462 ENDIF 463 463 ! … … 536 536 ELSE ; ztmp = REAL(nsec_year ,wp) ! since 00h on Jan 1 of the current year 537 537 ENDIF 538 ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdt tra(1) + REAL( it_offset, wp )! centrered in the middle of sbc time step539 ztmp = ztmp + 0.01 * rdt tra(1)! avoid truncation error538 ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdt + REAL( it_offset, wp ) ! centrered in the middle of sbc time step 539 ztmp = ztmp + 0.01 * rdt ! avoid truncation error 540 540 IF( sdjf%ln_tint ) THEN ! time interpolation, shift by 1/2 record 541 541 !
Note: See TracChangeset
for help on using the changeset viewer.