Problems after updating to latest version of ROMS

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
nirnimesh
Posts: 27
Joined: Tue Sep 11, 2007 6:57 pm
Location: University of Washington
Contact:

Problems after updating to latest version of ROMS

#1 Unread post by nirnimesh »

Hello Everybody

I am using ROMS with SWAN for a surf zone application and I had been using ROMS Revision (240). Today I updated my ROMS code to Revision 305 and tried to use it for same application

The application which used to work fine using Revision (240), doesn't work for Revision (305) because of 2 reasons:

(a) The maximum X-grid spacing, DXmax which initially used to be 10 meters, now displays a value of Inf km, similarly maximum Y-grid spacing, DYmax also shows a value of Inf km.

(b) The tidal netcdf forcing file I use has a minimum tide_period of 2.61 hours. The error I get states,

Code: Select all

GET_CYCLE - starting time for variable: tide_period
                    is greater than current model time.
                    TMIN=        2.6101   TDAYS=            0.0000


 Minimum X-grid spacing, DXmin =  1.00000000E-02 km
 Maximum X-grid spacing, DXmax =             Inf km
 Minimum Y-grid spacing, DYmin =  2.50000000E-02 km
 Maximum Y-grid spacing, DYmax =             Inf km
 Minimum Z-grid spacing, DZmin = -3.62332311E-01 m
 Maximum Z-grid spacing, DZmax =  9.07500000E-01 m

 Minimum barotropic Courant Number =  3.58942782E-02
 Maximum barotropic Courant Number =  4.54466434E-01
 Maximum Coriolis   Courant Number =  1.45800000E-03


 NLM: GET_STATE - Read state initial conditions,             t =     0 00:00:00
                   (File: mbcoupled_init3_1126.nc, Rec=0001, Index=1)
                - free-surface
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - vertically integrated u-momentum component
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - vertically integrated v-momentum component
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - u-momentum component
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - v-momentum component
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - potential temperature
                   (Min =  1.00000000E+01 Max =  1.00000000E+01)

 GET_CYCLE - starting time for variable: tide_period
             is greater than current model time. 
             TMIN =          2.6101  TDAYS =          0.0000
 Elapsed CPU time (seconds):

 Node   #  0 CPU:       0.053
 Total:                 0.053

 Nonlinear model elapsed time profile:

  Reading of input data ............................         0.000  ( 0.0131 %)
  2D/3D coupling, vertical metrics .................         0.000  ( 0.7723 %)
  Omega vertical velocity ..........................         0.000  ( 0.3968 %)
  Equation of state for seawater ...................         0.000  ( 0.7895 %)
                                              Total:         0.001    1.9717

 Nonlinear model message Passage profile:

  Message Passage: 2D halo exchanges ...............         0.000  ( 0.1570 %)
  Message Passage: 3D halo exchanges ...............         0.000  ( 0.0656 %)
  Message Passage: data broadcast ..................         0.000  ( 0.8791 %)
  Message Passage: data reduction ..................         0.000  ( 0.0737 %)
  Message Passage: data scattering..................         0.001  ( 1.4116 %)
                                              Total:         0.001    2.5871

 All percentages are with respect to total time =            0.053

 ROMS/TOMS - Output NetCDF summary for Grid 01:

 ROMS/TOMS - Input error ............. exit_flag:   2


 ERROR: Abnormal termination: NetCDF INPUT.
 REASON: No error                                                                        
p0_5997: (3.539062) net_send: could not write to fd=4, errno = 32
I am not very sure about what is wrong. It would be very nice if someone could help me resolving these issues.

Thanks
Nirnimesh

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

Re: Problems after updating to latest version of ROMS

#2 Unread post by arango »

OK. I will have to check that. The newer version is more strict in CF compliance of the input NetCDF files. Can you post an ncdump -h tide.nc so I can check what do you have in the tide forcing NetCDF file? The cycling is only activated when we have the cycle_length attribute. It seems that tide_period has such attribute. Why?

I don't know why are you getting Inf in the grid spacing. That may indicates that we are dividing by zero. Your pm and pn are zero in you input grid NetCDF. Check those variables. Did you applied land/sea masking to the inverse grid spacing?. The grid spacing always is a finite number (never zero) regardless if you have land/sea masking or not.

Why are you getting the GET_CYCLE message twice? Are you really using revision 305?

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

Re: Problems after updating to latest version of ROMS

#3 Unread post by arango »

I modified get_cycle.F to avoid checking time-frequency variables, see following :arrow: ticket. Please update your code again.

nirnimesh
Posts: 27
Joined: Tue Sep 11, 2007 6:57 pm
Location: University of Washington
Contact:

Re: Problems after updating to latest version of ROMS

#4 Unread post by nirnimesh »

Hernan

Sorry for the delay in replying. I was having issues in connecting to the cluster. To answer your questions:
(a) I was using revision 305 as I checked my version after posting the message
The GET_CYCLE message comes twice as I did a mistake while copying and pasting it, when posting the last message. Sorry for that.

(b) I updated my code to revision 306 and now I don't get an error due to tidal period. The screen output from my latest run is shown below:

Code: Select all

 Minimum X-grid spacing, DXmin =  1.00000000E-02 km
 Maximum X-grid spacing, DXmax =             Inf km
 Minimum Y-grid spacing, DYmin =  2.50000000E-02 km
 Maximum Y-grid spacing, DYmax =             Inf km
 Minimum Z-grid spacing, DZmin = -3.62332311E-01 m
 Maximum Z-grid spacing, DZmax =  9.07500000E-01 m

 Minimum barotropic Courant Number =  3.58942782E-02
 Maximum barotropic Courant Number =  4.54466434E-01
 Maximum Coriolis   Courant Number =  1.45800000E-03


 NLM: GET_STATE - Read state initial conditions,             t =     0 00:00:00
                   (File: mbcoupled_init3_1126.nc, Rec=0001, Index=1)
                - free-surface
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - vertically integrated u-momentum component
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - vertically integrated v-momentum component
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - u-momentum component
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - v-momentum component
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
                - potential temperature
                   (Min =  1.00000000E+01 Max =  1.00000000E+01)
    GET_NGFLD   - tidal period
                   (Min =  9.39642864E+03 Max =  2.63100002E+05)
    GET_2DFLD   - tidal elevation amplitude
                   (Min =  3.38429047E-03 Max =  7.86509474E-01)
    GET_2DFLD   - tidal elevation phase angle
                   (Min =  6.75731530E-01 Max =  6.25860515E+00)
    GET_2DFLD   - tidal current inclination angle
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
    GET_2DFLD   - tidal current phase angle
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
    GET_2DFLD   - maximum tidal current, ellipse major axis
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
    GET_2DFLD   - minimum tidal current, ellipse minor axis
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)
    GET_2DFLD   - surface u-momentum stress,                 t =     0 00:00:00
                   (Rec=0001, Index=1, File: mbcoupled_wind3_1126.nc)
                   (Tmin=          0.0000 Tmax=     262800.0000)
                   (Min =  0.00000000E+00 Max =  7.42828407E-06)
    GET_2DFLD   - surface v-momentum stress,                 t =     0 00:00:00
                   (Rec=0001, Index=1, File: mbcoupled_wind3_1126.nc)
                   (Tmin=          0.0000 Tmax=     262800.0000)
                   (Min = -5.80016702E-06 Max =  0.00000000E+00)

 Maximum grid stiffness ratios:  rx0 =   2.029424E+00 (Beckmann and Haidvogel)
                                 rx1 =   3.044136E+01 (Haney)


 Initial basin volumes: TotVolume =  7.18938804333472E+05 m3
                        MinVolume = -8.25361851958021E+01 m3
                        MaxVolume =  2.17812500000000E+02 m3
                          Max/Min = -2.63899403011273E+00

      OCN2WAV   - (07) imported and (05) exported fields,    t =     0 00:00:00
                - ROMS coupling exchanges wait clock (s):
                   (Recv= 3.18984032E-01 Send= 1.27077103E-04)
                - ROMS Import: wave direction
                   (Min=  0.00000000E+00 Max=  0.00000000E+00)
                - ROMS Import: significant wave height
                   (Min=  0.00000000E+00 Max=  2.00687870E-02)
                - ROMS Import: average wave length
                   (Min=  0.00000000E+00 Max=  3.11992955E+00)
                - ROMS Import: surface wave relative peak period
                   (Min=  0.00000000E+00 Max=  1.90365362E+00)
                - ROMS Import: bottom wave period
                   (Min=  0.00000000E+00 Max=  0.00000000E+00)
                - ROMS Import: wave energy dissipation
                   (Min=  0.00000000E+00 Max=  0.00000000E+00)
                - ROMS Import: percent wave breaking
                   (Min=  0.00000000E+00 Max=  0.00000000E+00)
                - ROMS Import: wave bottom orbital velocity
                   (Min=  0.00000000E+00 Max=  0.00000000E+00)
                - ROMS Export: bathymetry
                   (Min= -2.89865849E+00 Max=  7.26000000E+00)
                - ROMS Export: free-surface
                   (Min=  0.00000000E+00 Max=  0.00000000E+00)
                - ROMS Export: vertically integrated u-momentum component
                   (Min=  0.00000000E+00 Max=  0.00000000E+00)
                - ROMS Export: vertically integrated v-momentum component
                   (Min=  0.00000000E+00 Max=  0.00000000E+00)
           


 SWAN is preparing computation ...

      WAV2OCN   - (05) imported and (07) exported fields,    t = 20000101.000000
                - SWAN coupling exchanges wait clock (s):
                   (Recv= 1.07121468E-03 Send= 3.58104706E-04)
     - ROMS Export: bottom roughness
                   (Min=  3.00000000E-03 Max=  3.00000000E-03)


NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00026400)
    GET_2DFLD   - surface u-momentum stress,                 t =  3600 00:00:00
                   (Rec=0002, Index=2, File: mbcoupled_wind3_1126.nc)
                   (Tmin=          0.0000 Tmax=     262800.0000)
                   (Min =  0.00000000E+00 Max =  1.18598557E-05)
    GET_2DFLD   - surface v-momentum stress,                 t =  3600 00:00:00
                   (Rec=0002, Index=2, File: mbcoupled_wind3_1126.nc)
                   (Tmin=          0.0000 Tmax=     262800.0000)
                   (Min =  0.00000000E+00 Max =  2.30452172E-06)

   STEP   Day HH:MM:SS  KINETIC_ENRG   POTEN_ENRG    TOTAL_ENRG    NET_VOLUME

      0     0 00:00:00           NaN           NaN           NaN           Inf
I am not posting the ncdump -h tide.nc as "-h" option for ncdump doesn't seem to be working for my MATLAB and NETCDF configuration. I checked the tidal parameters being considered and they match with my inputs in the tide.nc file


(c) I checked my pm and pn values for my grid*.nc file and they are not zero at any grid point. I didn't apply land sea masking to inverse grid spacing. My masking is 1(WET) at all the grid points and I use WET_DRY cppdefs.h option to determine if a grid point is dry or wet.

I am also sure that the grid spacing which I used while creating this netcdf file is not zero.

I will dig a bit deep into the ROMS code and maybe post a more detailed message as to what is causing the error.

Thanks a lot for helping me out

Nirnimesh

bronwyn
Posts: 26
Joined: Sun Nov 27, 2005 10:54 pm
Location: Free University Berlin

Re: Problems after updating to latest version of ROMS

#5 Unread post by bronwyn »

I had a similar problem when I updated to revision 294. I tried to rerun a biotoys application which worked fine in previous revision but failed trying to read in time variable with r294 as follows:

Code: Select all

    GET_2DFLD   - surface u-wind component,                  t =     0 00:00:00
                   (File: frc_biotoys_era4010yrsall.nc, Rec=0000, Index=1)
                   (Tmin= *************** Tmax= ***************)
                   (Min =  0.00000000E+00 Max =  0.00000000E+00)

etc ... same for all forcing variables

 Maximum grid stiffness ratios:  rx0 =   0.000000E+00 (Beckmann and Haidvogel)
                                rx1 =   0.000000E+00 (Haney)


 Initial basin volumes: TotVolume =  2.76460644294440E+11 m3
                        MinVolume =  1.68603785954766E+08 m3
                        MaxVolume =  1.36456038303323E+09 m3
                          Max/Min =  8.09329621696230E+00

NL ROMS/TOMS: started time-stepping: (Grid: 01 TimeSteps: 00000001 - 00584000)

 SET_2DFLD  - current model time exceeds ending value for variable: Tair
              TDAYS     =          0.0000
              Data Tmin = ***************  Data Tmax = ***************
              Data Tstr = ***************  Data Tend =          0.0000
              TINTRP1   =          0.0000  TINTRP2   =             NaN
              FAC1      =             NaN  FAC2      =          0.0000

etc ... same again for all variables

 ROMS/TOMS - Input error ............. exit_flag:   2


 ERROR: Abnormal termination: NetCDF INPUT.
 REASON: No error

I've just updated my code to revision 306 and this seems to have fixed the problem, application is running fine.

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

Re: Problems after updating to latest version of ROMS

#6 Unread post by arango »

I think that now I understand the problem that you are having. You application is periodic and there is a problem when reading fields (like grid variables) from NetCDF files. I corrected this bug. See the following :arrow: trac ticket for more details.

Please update :!:

Post Reply