Changeset 14437 for NEMO/trunk/src/OCE
- Timestamp:
- 2021-02-11T16:38:56+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/SBC/fldread.F90
r14436 r14437 211 211 ! 212 212 IF( sd(jf)%ln_tint ) THEN ! temporal interpolation 213 IF(lwp .AND. kt - nit000 <= 100) THEN213 IF(lwp .AND. ( kt - nit000 <= 20 .OR. nitend - kt <= 20 ) ) THEN 214 214 clfmt = "(' fld_read: var ', a, ' kt = ', i8, ' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," // & 215 215 & "', records b/a: ', i6.4, '/', i6.4, ' (days ', f9.4,'/', f9.4, ')')" … … 223 223 sd(jf)%fnow(:,:,:) = ztintb * sd(jf)%fdta(:,:,:,ibb) + ztinta * sd(jf)%fdta(:,:,:,iaa) 224 224 ELSE ! nothing to do... 225 IF(lwp .AND. kt - nit000 <= 100) THEN225 IF(lwp .AND. ( kt - nit000 <= 20 .OR. nitend - kt <= 20 ) ) THEN 226 226 clfmt = "(' fld_read: var ', a, ' kt = ', i8,' (', f9.4,' days), Y/M/D = ', i4.4,'/', i2.2,'/', i2.2," // & 227 227 & "', record: ', i6.4, ' (days ', f9.4, ' <-> ', f9.4, ')')" … … 251 251 !!--------------------------------------------------------------------- 252 252 ! 253 IF( nflag == 0 ) nflag = - ( HUGE(0) - 10)253 IF( nflag == 0 ) nflag = -HUGE(0) 254 254 ! 255 255 CALL fld_def( sdjf ) … … 908 908 TYPE(FLD) , INTENT(inout) :: sdjf ! input field related variables 909 909 ! 910 INTEGER , DIMENSION(2):: isave910 INTEGER :: isave 911 911 LOGICAL :: llprev, llnext, llstop 912 912 !!---------------------------------------------------------------------- 913 913 ! 914 llprev = sdjf%nrecsec(sdjf%nreclast) < 915 llnext = sdjf%nrecsec( 0 ) >=nsecend_1jan000 ! file begins after the end of the job -> file may not exist914 llprev = sdjf%nrecsec(sdjf%nreclast) < nsec000_1jan000 ! file ends before the beginning of the job -> file may not exist 915 llnext = sdjf%nrecsec( 1 ) > nsecend_1jan000 ! file begins after the end of the job -> file may not exist 916 916 917 917 llstop = sdjf%ln_clim .OR. .NOT. ( llprev .OR. llnext ) … … 926 926 IF( llprev ) THEN ! previous file does not exist : go back to current and accept to read only the first record 927 927 CALL ctl_warn('previous file: '//TRIM(sdjf%clname)//' not found -> go back to current year/month/week/day file') 928 isave(1:2) = sdjf%nrecsec(sdjf%nreclast-1:sdjf%nreclast) ! save previous file info 929 CALL fld_def( sdjf ) ! go back to current file 930 sdjf%nreclast = 1 ! force to use only the first record (do as if other were not existing...) 931 sdjf%nrecsec(0:1) = isave(1:2) 928 isave = sdjf%nrecsec(sdjf%nreclast) ! save previous file info 929 CALL fld_def( sdjf ) ! go back to current file 930 sdjf%nreclast = 1 ! force to use only the first record (do as if other were not existing...) 932 931 ENDIF 933 932 ! 934 933 IF( llnext ) THEN ! next file does not exist : go back to current and accept to read only the last record 935 934 CALL ctl_warn('next file: '//TRIM(sdjf%clname)//' not found -> go back to current year/month/week/day file') 936 isave (1:2) = sdjf%nrecsec(0:1)! save next file info937 CALL fld_def( sdjf ) ! go back to current file938 ! -> read last record but keep record info from the first record of next file939 sdjf%nrecsec(sdjf%nreclast-1:sdjf%nreclast) = isave(1:2)940 sdjf%nrecsec(0:sdjf%nreclast-2) = nflag941 ENDIF935 isave = sdjf%nrecsec(1) ! save next file info 936 CALL fld_def( sdjf ) ! go back to current file 937 ENDIF 938 ! -> read "last" record but keep record info from the first record of next file 939 sdjf%nrecsec( sdjf%nreclast ) = isave 940 sdjf%nrecsec(0:sdjf%nreclast-1) = nflag 942 941 ! 943 942 CALL iom_open( sdjf%clname, sdjf%num, ldiof = LEN_TRIM(sdjf%wgtname) > 0 )
Note: See TracChangeset
for help on using the changeset viewer.