ROMS using Rectangular grids, at an angle.

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

ROMS using Rectangular grids, at an angle.

#1 Unread post by sankaras »

Hello,

I generated a non-rectangular grid ( rectangular grid inclined at an angle) using seagrid and ran a simple estuarine application in ROMS. The 10-day simulation using the grid ran, but the results do not look right.

I have put the figures in the form of pdf in the following website.

http://sankaranarayanans.tripod.com/ROM ... output.pdf

(1) Figure 1 shows the generated grid as seen in Seagrid.

I used minimum depth as 2m and maximum depth as NaN in the seagrid setup. Then I converted the seagrid in the mat format to a .nc file using seagrid2roms. Then, used a editmask to mask the water cells upper left corner and the right side to make them as land. I saw NaNs in the .mat file, but did not see them in the NC file, for depths on land.

(2) Figure 2 shows the flags pcolor(lon_rho,lat_rho,mask_rho) for the grid after edit masking. (This looks fine to me).

(3) Figure 3 shows the depths using pcolor(lon_rho,lat_rho,h.*mask_rho). The bathymetry does not look like the original bathymetry.

(4) Figure 4 shows the bathymetry using pcolor(lon_rho,lat_rho,h), without multiplying the depths by mask_rho. Looks like a serious problem here.

I ran the model (without being aware of the problems in 1-4). A simple baroclinic model with tide and river forcing was run for 10 days. But the model results also exhibit the same pattern seen in the bathymetry.

(5) The model bathymetry as seen in Rslice is shown Figure 5 (same problem as in Figure 4)


My C-processing options were:

Activated C-preprocessing Options:

ESTUARY_TEST Suspended Sediment Test in an Estuary
ANA_BSFLUX Analytical kinematic bottom salinity flux.
ANA_BTFLUX Analytical kinematic bottom temperature flux.
ANA_SMFLUX Analytical kinematic surface momentum flux.
ANA_SSFLUX Analytical kinematic surface salinity flux.
ANA_STFLUX Analytical kinematic surface temperature flux.
AVERAGES Writing out time-averaged fields.
AVERAGES_AKS Writing out time-averaged vertical S-diffusion.
CURVGRID Orthogonal curvilinear grid.
DOUBLE_PRECISION Double precision arithmetic.
EASTERN_WALL Wall boundary at Eastern edge.
GLS_MIXING Generic Length-Scale turbulence closure.
KANTHA_CLAYSON Kantha and Clayson stability function formulation.
NONLINEAR Nonlinear Model.
!NONLIN_EOS Linear Equation of State for seawater.
NORTHERN_WALL Wall boundary at Northern edge.
N2S2_HORAVG Horizontal smoothing of buoyancy and shear.
POWER_LAW Power-law shape time-averaging barotropic filter.
PRSGRD31 Standard density Jacobian formulation (Song, 1998).
PROFILE Time profiling activated .
K_GSCHEME Third-order upstream bias advection of TKE fields.
RHO_SURF Include difference between rho0 and surface density.
!RST_SINGLE Double precision fields in restart NetCDF file.
SALINITY Using salinity.
SOLVE3D Solving 3D Primitive Equations.
SOUTH_FSCLAMPED Southern edge, free-surface, Clamped condition.
SOUTH_M2REDUCED Southern edge, 2D momentum, reduced-physics condition.
SOUTH_M3RADIATION Southern edge, 3D momentum, radiation condition.
SOUTH_TCLAMPED Southern edge, tracers, Clamped condition.
SPLINES Conservative parabolic spline reconstruction.
TS_U3HADVECTION Third-order upstream bias horizontal advection of tracers.
TS_C4VADVECTION Fourth-order centered vertical advection of tracers.
UV_ADV Advection of momentum.
UV_U3HADVECTION Third-order upstream bias advection of momentum.
UV_LOGDRAG Logarithmic bottom stress.
VAR_RHO_2D Variable density barotropic mode.
WESTERN_WALL Wall boundary at Western edge.


Any suggestions would be very much appreciated.


Thanks,

Sankar

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

#2 Unread post by sankaras »

Hello,

As a follow up to my last post, grid and mat files are available at

http://sankaranarayanans.tripod.com/prov_river_grid.nc
http://sankaranarayanans.tripod.com/prov_river_grid.mat

I would go ahead with a rectangular grid (with no inclination) and see what happens.

Thanks,

Sankar

jcwarner
Posts: 1188
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#3 Unread post by jcwarner »

you need to get the grid correct before you run the code.
looks to me like there is a rows-columns kind of thing.
That sometimes gives the striping like that.
I would not recomend to use nans anywhere in matlab or seagrid or any roms i/o.
I do not use that version of edit mask, so i am not familiar if anything is wrong there.
So first check the grid netcdf file from seagrid, and then the grid after edit mask ing.

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

Computations in land cells

#4 Unread post by sankaras »

Thanks, John for the response. It was a great hint. I fixed the problem in the grid. Otherwise, I would be going through all seagrid code.

Earlier, I had smoothed the bathymetry and while writing the smoothed bathymetry, had not followed nc format for writing the arrays.

I have put the results in the following site for discussing the problems in this post.
http://sankaranarayanans.tripod.com/ROMS_results1.pdf

The land cells seem to have depth values (since I had chosen 2 m as minimum depth in seagrid). Otherwise, the grid and the bathymetry looks fine (Figure 1). The masks also look fine.

I find that computations in land cells are carried out for all the variables with time, as seen from the animations.

Figures 2 and 3 show respectively the surface elevation and u-bar after 4 hours. Figure 4 shows the masks for the grid.

Now, I have a couple of questions:

(1) I forcing the model with tides on the southern boundary (time series of surface elevations at 6 minute time steps). I have about 40 water cells and 20 land cells on the southern boundary. I used the .cdl format in the bdry_limited. The surface elevations do not spatially vary on the southern boundary. What do I do for the land cells on the southern boundary? zero or the values same as in water boundary cells. In the simulations I report here, I used the same values as in water cells for the southern boundary forcing.

(2) This simple boundary forcing file becomes too large, since I am storing the values for all the cells in the southern boundary, eventhough they are spatially invariant. Is there a simple way out?

(3) I am forcing the model with the river flows along the northern boundary.

(4) The ROMS model output (ocean_his.nc) does not seem to have masks in the file. I used rslice for the animations.

(5) Are my CPP options given in my previous posting ok for the simulation I am trying to do?

Thanks for your time.

Sankar

jcwarner
Posts: 1188
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#5 Unread post by jcwarner »

1) you need to add
#define MASKING

2) don't worry about the land cells, the masking will take care of it.

3) 6 minute time step in a forcing file is rather frequent for a tide. Maybe use 20 minute ?

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

open boundary tidal forcing

#6 Unread post by sankaras »

Thanks for the suggestion John. #define Masking was all that it needed:

Now, I seem to have a problem with the tidal forcing. I ran the model for 10 days. But the current vectors are in all directions especially near the open boundary.

(1) The maximum courant number is 0.227
(2) grid stiffness ratio is 0.199. I have a very smoothed bathymetry.
(3) My boundary forcing consists of of tidal forcing (sea surface heights at 6 minutes) along the southern boundary.
(4) My cpp definition for the southern boundary are:
SOUTH_FSCLAMPED Southern edge, free-surface, Clamped condition.
SOUTH_M2REDUCED Southern edge, 2D momentum, reduced-physics condition.
SOUTH_M3RADIATION Southern edge, 3D momentum, radiation condition.

Any suggestions would be appreciated.


Sankar

My other options were:


NORTHERN_WALL Wall boundary at Northern edge.
N2S2_HORAVG Horizontal smoothing of buoyancy and shear.
POWER_LAW Power-law shape time-averaging barotropic filter.
PRSGRD31 Standard density Jacobian formulation (Song, 1998).
PROFILE Time profiling activated .
SOLVE3D Solving 3D Primitive Equations.
SOUTH_FSCLAMPED Southern edge, free-surface, Clamped condition.
SOUTH_M2REDUCED Southern edge, 2D momentum, reduced-physics condition.
SOUTH_M3RADIATION Southern edge, 3D momentum, radiation condition.
SOUTH_TCLAMPED Southern edge, tracers, Clamped condition.
UV_ADV Advection of momentum.
UV_U3HADVECTION Third-order upstream bias advection of momentum.
UV_LOGDRAG Logarithmic bottom stress.
VAR_RHO_2D Variable density barotropic mode.
WESTERN_WALL Wall boundary at Western edge.
EASTERN_WALL Wall boundary at Eastern edge.

sankaras
Posts: 33
Joined: Mon Nov 27, 2006 6:02 pm
Location: Stanford University.

South_M3RADIATION

#7 Unread post by sankaras »

Hello,

I undefined the following CPP options and the 10 day 3D barotropic tidal simulation looks fine.

#undef SALINITY
#undef SOUTH_M3RADIATION

When turn on SALINITY and SOUTH_M3RADIATION, I see large eddies near the southern boundary and the model blows up after 10 hours.

The problem is with either the baroclinic part (SALINITY) or with the South_M3RADIATION.

What does SOUTH_M3RADIATION do to the 3D momentum equations? Any references would be useful.

Thanks,

Sankar

Post Reply