Opened 10 years ago
Last modified 10 years ago
#668 closed bug
check_multifile picks wrong BRY and FRC file after restart — at Initial Version
| Reported by: | rtopper | Owned by: | arango |
|---|---|---|---|
| Priority: | major | Milestone: | Release ROMS/TOMS 3.7 |
| Component: | Nonlinear | Version: | 3.7 |
| Keywords: | Cc: |
Description
After a restart, check_multifile picks the wrong BRY and FRC input files if the first file does not contain the data for the starting time (time(ng))
Lines 74-88 of check_multifile.F in ROMS/Utilities:
! Set the appropriate file counter to use during initialization or
! restart.
!
Fcount=0
IF (Lcheck) THEN
DO ifile=1,Nfiles
Tmin=Tscale*BRY(i,ng)%time_min(ifile)
IF (time(ng).ge.Tmin) THEN
Fcount=ifile
EXIT
END IF
END DO
ELSE
Fcount=1
END IF
If the restart time is greater than the TMIN of the first input file, IF (time(ng).ge.Tmin) THEN is TRUE, and the EXIT statement is triggered after the first input file is set to be read. However, if first input file doesn't contain time(ng) the first file will still be set. The model will produce an error while trying to read the input files because it can't find the data corresponding to time(ng) in the input file.
If you remove the EXIT statement, the other input files will also be checked and the last file that still has time(ng).ge. TMIN will be used.
Remove the "EXIT" from line 83 (for boundary multifile input) and line 156 (for forcing multifile input) and the model will pick the right input file, even after a restart.
