restart fail multi-part file case

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
johnluick

restart fail multi-part file case

#1 Unread post by johnluick »

Restarts may fail with an error message like:
GET_CYCLE - ending time for multi-file variable: sms_time
is less than current model time.
TMAX = 15196.5000 TDAYS = 15862.0000
(could be srf_time, etc. rather than sms_time).
Multi-part files are when you break up forcing (or climatology or boundary) into multiple files. For example call them 1, 2, 3,...
The error only occurs if the restart time corresponds to a time in 2, 3, ....
Let's say the restart time is in 3. Then the error goes away if you delete 1 and 2 from the list in ocean.in.
And looking at get_cycle.F, I think the error may only arise if you have tides.

rtopper
Posts: 24
Joined: Fri Jul 04, 2014 2:32 pm
Location: MARUM, University of Bremen

Re: restart fail multi-part file case

#2 Unread post by rtopper »

I had exactly the same problem with COAWST a couple of weeks ago. The problem is however not the get_cycle routine but check_multifile.

Lines 74-88 of check_multifile.F in ROMS/Utilities:

Code: Select all

!  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 you break up your forcing file into multiple files, this bit of code checks which file contains the initial or restart timestep. If the first file contains the input corresponding to time(ng), i.e. the timestep your model starts from (first timestep of new run or restart), the second IF-statement is basically ignored and the right input file is set.

In your case the restart time is greater than the TMIN of your 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, your first input file doesn't contain time(ng).

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.

I'll report it as a bug.

johnluick

Re: restart fail multi-part file case

#3 Unread post by johnluick »

Great work! Thanks very much. Also a good example of how the forum can be helpful to many.

Post Reply