set kml

set kml <-img | -ln> fnameroot

Sets the filename root and output options for Keyhole Markup Language (KML) output.

The -img option (the default) is used for writing out an image file and a complementary KML file :

The -ln option is used for writing out contour lines in KML format. Only one file is written:

 

Usage Notes

This command is available in version 2.0.a5 or later. The -ln option for writing out contours in KML format is available in version 2.0.a9 or later. In order to use the -img option, GrADS must be linked with the TIFF and GeoTIFF libraries. Check the output from 'q config' for the message "GeoTIFF and KML/TIFF output ENABLED". The -ln option does not depend on the TIFF library, and is always enabled.

This command is used in conjunction with the set gxout kml command which sets the graphics output type; the display command will then create the output file(s) instead of drawing a plot. The display expression must be a 2-dimensional grid that varies in X and Y (longitude and latitude), and the projection must be latlon.

The files fnameroot.tif and fnameroot.kml will be replaced if they exist. If fnameroot provided by the user ends in ".kml", GrADS will not append an additional ".kml", and will change the extension to ".tif" for the image file (if necessary).

The output in KML format is intended for use with GIS tools such as Google Earth. Please note that Google Earth prefers longitudes to range from -180 to 180 instead of 0 to 360.

Examples

clear
set gxout kml
set kml myimg
d var

clear
set gxout kml
set kml -ln mycntr
d var