set shp

set shp <-type> <-fmt n m > fnameroot

Sets the filename root for shapefile output and has additional arguments to control the type of shapefile created and the formatting of numerical values in the dBase file. This command is used in conjunction with set gxout shp and display to create four complementary files:

Where type may be one of the following:

Usage Notes

This command is available in GrADS v2.0.a9 or later. The -poly option is available in version 2.0.0 or later.

The files fnameroot.* will be replaced if they exist.

When creating a shapefile with contour lines, the cterp setting is ignored -- contours are written out as if cterp is set to off (i.e. no spline fitting).

Use the q shpopts command to get information on the status of the shapefile options; use the clear shp command to reset shapefile options to their default values.

The output in shapefile format is intended for use with GIS tools, and can also be drawn with GrADS. Please see the documentation page on shapefiles for more information.

Examples

set gxout shp
set shp -ln -fmt 8 3 my_shapefile_name
d my_var

set shp -poly mypolyfile
set shpattr author string your_name
d my_var

Note: The GrADS expression my_var must be a 2-dimensional grid that varies in X and Y (longitude and latitude). In this example, GrADS will use the format string %8.3f to write out double precision numbers to the dBase file.