Possible bug with check_multifile.F changeset 713

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
MaximeDebert

Possible bug with check_multifile.F changeset 713

#1 Unread post by MaximeDebert »

In revision 713 there is an improvement in check_multifile.F to report when the input data time records from NetCDF files is not enough to finish the simulation.

I encounter a problem when using a restart file with the time end check.

In my simulation NTIMES*DT = 2 days with a restart file with an oceantime at 1 day since I want to run the model from day 1 0h00 to day 2 0h00

The end time calculate by check_multifile.F is day 3 0h00. I guess this come from line 54 Tfinal=time(ng)+ntimes(ng)*dt(ng)

User avatar
arango
Site Admin
Posts: 1350
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Possible bug with check_multifile.F changeset 713

#2 Unread post by arango »

Yes, good catch :!: We need to use dstart instead:

Code: Select all

!
!  Get final time string for simulation.
!
      Tfinal=dstart*day2sec+ntimes(ng)*dt(ng)
      CALL time_string(tfinal, F_code)
Thank you for reporting this problem. Please update.

johnluick

Re: Possible bug with check_multifile.F changeset 713

#3 Unread post by johnluick »

Just updated to 724M. Wouldn't run until I added a line
Tmax=Tmax*day2sec
to check_multifile.F right after Tmax is defined (approx line 117).
Puzzling because this should have been a problem for others long before today, at least since 713M. My apologies if this is a false lead.

User avatar
arango
Site Admin
Posts: 1350
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Possible bug with check_multifile.F changeset 713

#4 Unread post by arango »

Around line 117, we have the following code:

Code: Select all

        IF (Lcheck) THEN
          Tmax=Tscale*BRY(ng)%time_max(Nfiles)
          IF (Tfinal.gt.Tmax) THEN
            CALL time_string(Tmax, Tmax_code)
            IF (Master) THEN
              WRITE (stdout,30) 'Lateral Boundary',                     &
     &                          TRIM(BRY(ng)%files(Nfiles)),            &
     &                          Tmax_code, F_code
            END IF
            exit_flag=4
          END IF
        END IF
This implies that the call to function check_file gave the wrong value to Tscale:

Code: Select all

        DO ifile=1,Nfiles
          ncname=BRY(ng)%files(ifile)
          foundit=check_file(ng, model, ncname, Tmin, Tmax, Tscale,     &
     &                       Lcheck)
          IF (exit_flag.ne.NoError) RETURN
          BRY(ng)%time_min(ifile)=Tmin
          BRY(ng)%time_max(ifile)=Tmax
        END DO
Well, something is wrong with the units attribute for the time variable. Do you have such attribute? Your fix indicates to me that you don't have the units attribute because Tscale was initialized to one and it was not over written or either the function check_file failed to decode your time units. If not found it, ROMS assume that input time axis is in seconds. There is no other way for us to know your units. ROMS assumes that all input NetCDF files are CF compliant.

Your fix is incorrect. We need to know what do you have in the NetCDF file for the time attribute.

johnluick

Re: Possible bug with check_multifile.F changeset 713

#5 Unread post by johnluick »

Thanks for the prompt response, Hernan.

Well here is the error message:
CHECK_MULTIFILE - Error while checking input Lateral Boundary file:
../DATA/bry_AD_1_Nsig3_01Mar14_09Mar14.nc
last data time record available is for day: 0 04:38:46
but data is needed to finish run until day: 16726 00:00:00

Here are some lines from the netCDF input boundary file header:

double zeta_time(zeta_time), shape = [9]
:long_name = "zeta time"
:units = "modified Julian day"
The actual times in the boundary file run from 16718 to 16726.

Here are some values from Runtimeville (values while in check_multifile.F):
dstart: 16720
Tfinal: 1445126400
Tmax: 16726
Tscale=1

The final time in the boundary file was deliberately set identical to the finish time for this test simulation.

User avatar
arango
Site Admin
Posts: 1350
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Possible bug with check_multifile.F changeset 713

#6 Unread post by arango »

OK, I improved the decoding of the units attribute. Please check the following :arrow: trac ticket. Please update. Thank you for providing enough information for tracking this.

Post Reply