- Timestamp:
- 2018-07-11T10:24:17+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2018/dev_r9838_ENHANCE04_MLF/src/OCE/SBC/fldread.F90
r9807 r9923 180 180 ! Note that shifting time to be centrered in the middle of sbc time step impacts only nsec_* variables of the calendar 181 181 IF( present(kit) ) THEN ! ignore kn_fsbc in this case 182 isecsbc = nsec_year + nsec1jan000 + (kit+it_offset)*NINT( r dt/REAL(nn_baro,wp) )182 isecsbc = nsec_year + nsec1jan000 + (kit+it_offset)*NINT( rn_Dt/REAL(nn_e,wp) ) 183 183 ELSE ! middle of sbc time step 184 isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * r dt) + it_offset * NINT(rdt)184 isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rn_Dt) + it_offset * NINT(rn_Dt) 185 185 ENDIF 186 186 imf = SIZE( sd ) … … 213 213 CALL fld_rec( kn_fsbc, sd(jf), kt_offset = it_offset, kit = kit ) ! update after record informations 214 214 215 ! if kn_fsbc*r dt is larger than nfreqh (which is kind of odd),215 ! if kn_fsbc*rn_Dt is larger than nfreqh (which is kind of odd), 216 216 ! it is possible that the before value is no more the good one... we have to re-read it 217 217 ! if before is not the last record of the file currently opened and after is the first record to be read … … 234 234 IF( sd(jf)%ln_tint ) THEN 235 235 236 ! if kn_fsbc*r dt is larger than nfreqh (which is kind of odd),236 ! if kn_fsbc*rn_Dt is larger than nfreqh (which is kind of odd), 237 237 ! it is possible that the before value is no more the good one... we have to re-read it 238 238 ! if before record is not just just before the after record... … … 267 267 ! year/month/week/day file to be not present. If the run continue further than the current 268 268 ! year/month/week/day, next year/month/week/day file must exist 269 isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(r dt) ! second at the end of the run270 llstop = isecend > sd(jf)%nrec_a(2) 269 isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rn_Dt) ! second at the end of the run 270 llstop = isecend > sd(jf)%nrec_a(2) ! read more than 1 record of next year 271 271 ! we suppose that the date of next file is next day (should be ok even for weekly files...) 272 272 CALL fld_clopn( sd(jf), nyear + COUNT((/llnxtyr /)) , & … … 485 485 ENDIF 486 486 IF( PRESENT(kt_offset) ) it_offset = kt_offset 487 IF( PRESENT(kit) ) THEN ; it_offset = ( kit + it_offset ) * NINT( r dt/REAL(nn_baro,wp) )488 ELSE ; it_offset = it_offset * NINT( rdt)487 IF( PRESENT(kit) ) THEN ; it_offset = ( kit + it_offset ) * NINT( rn_Dt / REAL(nn_e,wp) ) 488 ELSE ; it_offset = it_offset * NINT( rn_Dt ) 489 489 ENDIF 490 490 ! … … 563 563 ELSE ; ztmp = REAL(nsec_year ,wp) ! since 00h on Jan 1 of the current year 564 564 ENDIF 565 ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * r dt + REAL( it_offset, wp )! centrered in the middle of sbc time step566 ztmp = ztmp + 0.01 * r dt! avoid truncation error565 ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rn_Dt + REAL( it_offset, wp ) ! centrered in the middle of sbc time step 566 ztmp = ztmp + 0.01 * rn_Dt ! avoid truncation error 567 567 IF( sdjf%ln_tint ) THEN ! time interpolation, shift by 1/2 record 568 568 !
Note: See TracChangeset
for help on using the changeset viewer.