Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > dcaf9bd555d1ce386641f56c6523d3ed > files > 123

grads-2.0.2-1.fc18.i686.rpm

<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.--><style type="text/css">
<!--
body {
	background-color: #e0f0ff;
}
-->
</style>

<H2><B>set chunksize</B></H2>
<P>
<code>set chunksize <i>Xsize Ysize &lt;Zsize&gt; &lt;Tsize&gt; &lt;Esize&gt;</i></code>
<p>
<code><i>Xsize</i>&nbsp;&nbsp;</code> Size of the chunk in the X dimension. Default value is the grid size in X. <br>
<code><i>Ysize</i>&nbsp;&nbsp;</code> Size of the chunk in the Y dimension. Default value is the grid size in Y. <br>
<code><i>Zsize</i>&nbsp;&nbsp;</code> Size of the chunk in the Z dimension. Default value is 1. <br>
<code><i>Tsize</i>&nbsp;&nbsp;</code> Size of the chunk in the T dimension. Default value is 1. <br>
<code><i>Esize</i>&nbsp;&nbsp;</code> Size of the chunk in the E dimension. Default value is 1. <br>
<p>It is not necessary to specify the chunk size for the Z, T, or E dimensions if you wish to use the default values. 
<H3>Usage Notes</H3>
<P><em>Chunking </em>refers to the partitioning of a dataset into fixed-size multi-dimensional chunks. Chunks are treated as atomic objects; disk I/O, cacheing, and compression are always done on a per-chunk basis. Chunking can significantly improve I/O performance, provided the chunk size is set appropriately for the data set in question. 

<P>A chunk has the same number of dimensions as the original data set. The size of a chunk in any dimension should be equal to or less than the size of the data set's grid dimensions. For data sets with more than 2 dimensions, DO NOT set the chunk sizes equal to the grid dimension sizes, in which case the entire data set would be one chunk, and DO NOT set all the chunk sizes equal to 1 (one), in which case a chunk would be a single value. 
<P>The  default values  in GrADS set the chunk size equal to the grid dimension in X and Y, and 1 (one) for the Z, T, and E dimensions -- a chunk is a single 2D lat/lon grid. However, if your data set is of sufficiently high resolution (e.g., if the grid size is less than 1.0 degree latitude/longitude), then you should set the chunk size smaller than the grid size in X and Y -- divide by 2, or 5, or 10 as necessary to keep the chunk  in the ballpark of 512 kbytes.

It is recommended that you keep the chunk size equal to 1 for the Z, T, and E dimensions.
<P>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. 
<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 -nc4 -chunk -zip var.nc<br />
set chunksize 512 256<br />
sdfwrite var<br />
</code>


<P>