Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > 86de73cd0961932e7aca64f21352ffa6 > files > 183

grads-2.0.2-1.fc18.x86_64.rpm

<!--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 sdfwrite</title>
<style type="text/css">
<!--
.style1 {color: #990000}
-->
</style>
</head>
<body bgcolor="e0f0ff" text="#000000">

<h2><b>set sdfwrite</b></h2>
<p>
<code>set sdfwrite &lt;-4d or -5d&gt; &lt;-flt or -dbl&gt; &lt;-nc3 or -nc4&gt; &lt;-chunk&gt; &lt;-zip&gt; <i>fname</i></code>
<p>
Sets the filename and other characteristics for self-describing  data output. Arguments in <code>&lt; &gt;</code> are optional. </p>
<ul>
  <p><code><i>fname</i>&nbsp;&nbsp;&nbsp; </code>output filename (default = <code>grads.sdfwrite.nc</code>)<br>
    <code>-4d &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>forces the output data file to have at least 4 coordinate dimensions (lon, lat, lev, and time)<br>
    <code>-5d &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>forces the output data file to have 5 coordinate dimensions (lon, lat, lev, time, and ens)<br>
    <code>-flt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>output data written with floating point precision<br>
    <code>-dbl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>output data written with double precision (default)<br>
    <code>-nc3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>output data file written in  netCDF classic format (default)<br>
    <code>-nc4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>output data file written in netCDF-4 format<br>
    <code>-chunk&nbsp;&nbsp;&nbsp;</code>output data will be chunked (only if <code>-nc4</code>); set chunk sizes with the <a href="gradcomdsetchunksize.html"><code>set chunksize</code></a> command<br>
    <code>-zip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code>output data will be compressed (implies <code>-nc4</code> and <code>-chunk</code>)<br>
    </p>
</ul>
<p>
<h3>Usage Notes</h3>
<p>
This command is  available in GrADS <span class="style1">v2.0.a3+</span>. 
<p> The <code>-4d</code> and <code>-5d</code> options were introduced in GrADS <span class="style1">v2.0.a5+</span>. 
<p> The <code>-flt</code>, <code>-dbl</code>, <code>-nc3</code>,<code>-nc4</code>, <code>-chunk</code>, and <code>-zip</code> options were introduced in GrADS <span class="style1">2.0.a8+</span>.
<p>  If the <code>-4d</code> and <code>-5d</code> options are not used, the output will have the same number of dimensions as the defined variable being written out to file (GrADS <span class="style1">2.0.a9+</span>). In earlier versions, the <code>-4d</code> and <code>-5d</code> options &quot;stuck&quot; until the <code><a href="gradcomdreset.html">reset</a></code>, <code><a href="gradcomdreinit.html">reinit</a></code>, or <code><a href="gradcomdclear.html">clear sdfwrite</a></code> commands were invoked. 
<p>The output data will be in NetCDF format.  The  file 
  <code><i>fname</i></code> will be replaced if it exists. Use the 
  <a href="gradcomdsdfwrite.html"><code>sdfwrite</code></a> command to create the output file. 
The <a href="gradcomdqsdfwrite.html"><code>query sdfwrite</code></a> command
  returns the status of the <code>sdfwrite</code> options. The <code><a href="gradcomdclear.html">clear sdfwrite</a></code> command resets the sdfwrite parameters back to their default values. 
<p>If you use the <code>-zip</code> option, then it is not necessary to also specify <code>-nc4</code> or <code>-chunk</code>; GrADS will automatically set these options. A compressed file is always in netCDF-4 format and is always chunked. Use the <a href="gradcomdsetchunksize.html"><code>set chunksize</code></a> command to set the chunk size before writing out the file. 
Please see the documentation on <a href="compression.html">compression</a> for more details. 
<p>
<h3>Examples </h3>
<p>Suppose you have a high resolution data set (5120x2560) and you wish to save the variable as compressed netcdf with floating point precsion. </p>
<p><code>set x 1 5120<br />
set y 1 2560<br />
set z 1<br />
set t 1<br />
define var = var<br /> 
set sdfwrite -flt  -zip var.nc<br />
set chunksize 512 256<br />
sdfwrite var<br />
</code></p>
<p>&nbsp;</p>
</body>
</html>