Grid Generation

From WikiROMS
Jump to: navigation, search
Grid Generation

To create a grid, you must understand how the variables are placed on it and where the boundaries lie relative to it. Here is a diagram of it:

Whole grid.png

The thick lines denote the outer boundary of the grid, though some tools may draw the boundary through the rho points lying outside the box. If your domain has walls, the walls will be where the thick line is. If your domain is periodic, the periodicity is from one thick line to the next.

Note Note that there are Lm by Mm computational points. If you want to create a grid that's neatly divisible by powers of 2, make sure Lm and Mm have those factors.

Grid Generation Software

Several software packages are available to generate the orthogonal curvilinear grids that ROMS requires.

SEAGRID by Chuck Denham

A GUI-based Matlab program for creating curvilinear orthogonal grids with 4 corners SEAGRID includes tools to create ROMS NetCDF grid files. See seagrid for more information.

GRIDGEN by Pavel Sakov

A C program for creating curvilinear orthogonal grids with an arbitrary number of corners.


The bathymetry for ROMS is measured positive downwards, from a datum such as mean sea level (MSL). For a 'typical' ROMS application, the bathymetry would consist of all positive values. Also, for a 'typical' application, the bathymetry can not have values of 0 or any negative values. Most users would set some minimum 'clipping' depth and not allow the values of h to be less than that depth. However, if an application requires land, i.e. values of h that are negative, then the user is required to activate the WET_DRY CPP option.

Land/Sea Masking