set shp

set shp <-ln or -pt> <-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:

Usage Notes

This command is available in GrADS v2.0.a9 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 shp -ln -fmt 8 3 my_shapefile_name
set gxout shp
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.