Difference between revisions of "Grid Generation"

From WikiROMS
Jump to navigationJump to search
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Grid Generation =
<div class="title">Grid Generation</div>


ROMS uses an Arakawa "C" Grid. The grid can be specified using analytical functions or with a netcdf file. To create a netcdf grid file, there are several grid generation tools.  
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:


[[Image:Whole_grid.png]]


== SEAGRID ==
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.


A GUI-based Matlab program for creating curvilinear orthogonal grids with 4 corners
==Grid Generation Software==
Several software packages are available to generate the orthogonal curvilinear grids that ROMS requires. 


http://woodshole.er.usgs.gov/operations/modeling/seagrid/seagrid.html


SEAGRID creates Matlab .mat files that can be converted into ROMS grid files using the "seagrid2roms.m"
===SEAGRID by Chuck Denham===
routine.
A GUI-based Matlab program for creating curvilinear orthogonal grids with 4 corners <span class="red">SEAGRID</span> includes tools to create ROMS NetCDF grid files. See [[seagrid]] for more information.


Some useful additional m-files for working with SEAGRID are


* join_cst.m: Turn coastline segments (e.g. from the [http://rimmer.ngdc.noaa.gov/coast/ Coastline Extractor]) into coastline polygons that will then mask land when used in SEAGRID.
===GRIDGEN by Pavel Sakov===
* read_srtm30plus.m: Read SRTM30+ worldwide 30sec (~1km) topography via Web Mapping Service.
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")


These tools are part of the RPSstuff Matlab toolbox available via SVN:
*Rob Hetland has a nice movie about how to [http://pong.tamu.edu/~rob/python/tutorials/making_grids_with_python.mov make a ROMS grid using GRIDGEN with Python]
<nowiki> svn co https://svn1.hosted-projects.com/cmgsoft/m_cmg/trunk/RPSstuff  rps_stuff </nowiki>


== GRIDGEN by Pavel Sakov ==


==Bathymetry==
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 [[Variables#h|h]] to be less than that depth. However, if an application requires land, ''i.e.'' values of [[Variables#h|h]] that are negative, then the user is required to activate the [[Options#WET_DRY|WET_DRY]] CPP option.


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


http://www.marine.csiro.au/~sakov/
==Land/Sea Masking==
(scroll down Pavel's page to the section on "orthogonal grid generation")

Latest revision as of 23:06, 20 June 2008

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.


Bathymetry

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