<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--> <html> <head> <title>GrADS Command: set kml</title> </head> <body bgcolor="e0f0ff" text="#000000"> <h2><b>set kml</b></h2> <p> <code>set kml <-<em>type</em>> <i>fnameroot</i></code> <p> Sets the filename root and output options for Keyhole Markup Language (KML) output. </p> <p>Where <code><em>type</em></code> may be one of the following:</p> <ul> <code>img | image </code>(default) For writing out an image file and complementary KML file<br> <code>ln | line </code>For writing out contour lines in a KML file<br> <code>poly </code>For writing out polygons from the shaded contouring algorithm in KML format. <br> </ul> <p>When using the <code>-img</code> or <code>-image</code> option (the default), two output files will be created: </p> <ul> <p><code><i>fnameroot</i>.tif </code>A TIFF image file with a pixel for each gridbox in the domain (default is <code>grads.tif</code>)<br> <code><i>fnameroot</i>.kml </code>A text file in the Keyhole Markup Language (KML) that contains <br> <code> </code>the georeferencing information for the TIFF image (default is <code>grads.kml</code>)<br> </ul> Otherwise, only one file is written:</p> <ul> <code><i>fnameroot</i>.kml </code>A text file in the KML format that contains the color, thickness, and <br> <code> </code>georeferencing information for the contour lines or polygons (default is <code>grads.kml</code>) </ul> <h3> </h3> <h3>Usage Notes</h3> <p> This command is available in version 2.0.a5 or later. The <code>-ln</code> option for writing out contours in KML format is available in version 2.0.a9 or later. The <code>-poly</code> option for writing out polygons in KML format is available in version 2.0.0 or later. In order to use the <code>-img</code> 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 <code>-ln</code> and <code>-poly</code> options do not depend on the TIFF library, and are always enabled. <p>This command is used in conjunction with the <code><a href="gradcomdsetgxout.html">set gxout kml</a> </code> command which sets the graphics output type; the <code><a href="gradcomddisplay.html">display</a></code> 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. <p>The files <code><i>fnameroot</i>.tif</code> and <code><i>fnameroot</i>.kml</code> will be replaced if they exist. If <code> <i>fnameroot</i> </code>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). <p>The output in KML format is intended for use with GIS tools such as <a href="http://earth.google.com/">Google Earth</a>. Please note that Google Earth prefers longitudes to range from -180 to 180 instead of 0 to 360. <h3>Examples </h3> <pre>clear set gxout kml set kml myimg d var clear set gxout kml set kml -ln mycntr d var </pre> </p> <p> </p> <p> </p> </body> </html>