Many of you are not familiar with the SeaGrid tool for generating ROMS grid NetCDF. SeaGrid is powerful interactive Matlab tool for generating orthogonal grids, interpolating bathymetry, and computing Land/Sea masking. This tool was developed by Charles Denham (USGS). For information check the following link:
http://woodshole.er.usgs.gov/staffpages ... agrid.html
Before using this tool for any specific application, the user needs to build three files:
- 1) Bathymetry (Matlab .mat file)
2) Coastlines (Matlab .mat file)
3) Boundary (ASCII file)
The coastline file is a Matlab file (.mat) containing the coastline (lat,lon) coordinate pairs. It is used to generate the Land/Sea masking fields for the model. Usually, this mask requires further editing and tunning. We have a separate Land/Sea masking editing tool. See below for further details.
The boundary file defines the corner points of the grid. It also contains the data pairs for the coastlines edges. The coastline edges are not as important as the corner points. The positions of the coast edge points can be added or edited by clicking and dragging the mouse. The corner points can be added and edited in similar fashion. However, it is very difficult to mouse click the positions of the corner points in any accurate way. It is much better to type the (lon,lat) corners exactly in the boundary file. Recall that the corner points are very important for the orthogonality properties of the transformation.
In my experience, SeaGrid works correctly when the bathymetry file is loaded first, followed by the coasline file, and the boundary file.
I have several Matlab scripts to extract bathymetry, coastlines data, and post-processing the grid NetCDF. They are located in my Matlab directory tree:
Code: Select all
matlat/bath bathymetry extraction scritps
matlat/coastlines coastlines extraction scripts
matlab/rmask land/sea mask editing scripts
http://www.myroms.org/software/Processi ... lab.tar.gz
There is an extract.m script in the bath directory to extract the bathymetry at the specified box corners from the default global ETOPO5 NetCDF file. This NetCDF file is also located in this directory. You just need to edit this script and provide the appropiate filename and (lon,lat) corners.
Similarly, there is an extract.m script in the coastlines directory to extract the coastline data at the specified box corners from the GSHHS (Global Self-consistent Hierarchical, High-resolution Shoreline) database. You need to edit this script and select the appropriate GSHHS resolution, provide output filename and (lon,lat) corners.
The GSHHS data set can be downloaded from:
http://www.myroms.org/software/datasets/gshhs.tar.gz
A sample of the boundary file boundary.dat can be found in the coastlines directory. This is a simple three columns (lon,lat,corner_flag) ASCII file. The corner_flag is one if the boundary point is a corner and zero otherwise.
Finally, the Land/Sea masking interactive tool editmask is found in the rmask directory. We highly recommend to use this tool to check the Land/Sea masking of your grid.
Good luck,
Hernan G. Arango
arango@imcs.rutgers.edu