Opened 15 years ago

Closed 15 years ago

#300 closed bug (Fixed)

Correction to NAT check

Reported by: m.hadfield Owned by: arango
Priority: minor Milestone: Release ROMS/TOMS 3.2
Component: Nonlinear Version: 3.2
Keywords: Cc:

Description (last modified by arango)

In ROMS/Utility/inp_par.F, lines 1031-1036, the value of NAT is checked:

            IF ((NAT.lt.0).or.(NAT.gt.2)) THEN
              IF (Master) WRITE (out,290) 'NAT = ', NAT,                &
     &                          'make sure that NAT is either 1 or 2.'
              exit_flag=5
              RETURN
            END IF

The logical expression does not match the message. This code is failing to catch cases where I set NAT=0 for a 3D run (because I am adapting input files from a 2D run); the model then fails with an out-of-bounds error or segmentation fault in mod_ncparam.

The check should be

            IF ((NAT.lt.1).or.(NAT.gt.2)) THEN
            ...

Change History (1)

comment:1 by arango, 15 years ago

Description: modified (diff)
Resolution: Fixed
Status: newclosed

Yes, good catch. I also corrected the file Data/ROMS/CDL/grd_sherical.cdl and removed the _FillValue attribute. It is not recommended for the masking arrays to have a _FillValue.

Note: See TracTickets for help on using tickets.