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:
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.
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.
- http://www.marine.csiro.au/~sakov/ (scroll down Pavel's page to the section on "orthogonal grid generation")
- Rob Hetland has a nice movie about how to make a ROMS grid using GRIDGEN with Python
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.