<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Those chunks are ~10MB large which is not ideal for performance; <=1MB is a better target size. Chunks should ideally be 2-dimensional – having the Z axis in each chunk is ... bad. You didn't mention what the X and Y dimesion sizes are, but GrADS will be reading
a lot of those chunks and you will want to set a very large cache size so it can keep them in memory instead of returning to the file to read them over and over again. If you have a descriptor file you can use the CACHESIZE entry, or else try the 'set cachesf'
command before you open the file. Please see <a href="http://cola.gmu.edu/grads/gadoc/gradcomdsetcachesf.html" id="LPlnk822872">
http://cola.gmu.edu/grads/gadoc/gradcomdsetcachesf.html</a> and the more general page on compression:<a href="http://cola.gmu.edu/grads/gadoc/compression.html" id="LPlnk572045">http://cola.gmu.edu/grads/gadoc/compression.html</a>.<br>
--Jennifer</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div style="direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<b>From:</b> gradsusr <gradsusr-bounces@gradsusr.org> on behalf of Eric A. Aligo <eric.aligo@noaa.gov><br>
<b>Sent:</b> Friday, April 19, 2024 10:43 AM<br>
<b>To:</b> gradsusr@gradsusr.org <gradsusr@gradsusr.org><br>
<b>Subject:</b> Re: [gradsusr] template option suddenly slow for nc files</div>
<div style="direction: ltr;"> </div>
<p style="margin-top: 0px; margin-bottom: 0px;">Thanks for the response! The first list below is from a file that gives me a hard time with templating in GrADS. The second list below works well in GrADS, and I had to set ideflate=0 (no compression). Is there
something that I can do to use compression and still be able to use the template option efficiently or am I stuck with no compression?</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">With compression:</p>
<p style="margin-top: 0px; margin-bottom: 0px;"> float dzdt(time, pfull, grid_yt, grid_xt) ;<br>
dzdt:_QuantizeBitRoundNumberOfSignificantBits = 18 ;<br>
dzdt:_FillValue = 9.99e+20f ;<br>
dzdt:cell_methods = "time: point" ;<br>
dzdt:long_name = "vertical wind" ;<br>
dzdt:missing_value = 9.99e+20f ;<br>
dzdt:output_file = "dyn" ;<br>
dzdt:units = "m/sec" ;<br>
dzdt:_Storage = "chunked" ;<br>
dzdt:_ChunkSizes = 1, 17, 263, 626 ;<br>
dzdt:_DeflateLevel = 1 ;<br>
dzdt:_Shuffle = "true" ;<br>
dzdt:_Endianness = "little" ;<br>
dzdt:_NoFill = "true" ;</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Without compression:</p>
<p style="margin-top: 0px; margin-bottom: 0px;"> float dzdt(time, pfull, grid_yt, grid_xt) ;<br>
dzdt:_FillValue = 9.99e+20f ;<br>
dzdt:cell_methods = "time: point" ;<br>
dzdt:long_name = "vertical wind" ;<br>
dzdt:missing_value = 9.99e+20f ;<br>
dzdt:output_file = "dyn" ;<br>
dzdt:units = "m/sec" ;<br>
dzdt:_Storage = "contiguous" ;<br>
dzdt:_Endianness = "little" ;<br>
dzdt:_NoFill = "true" ;</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<div>On 4/18/2024 9:05 PM, Jennifer M Adams wrote:</div>
<blockquote>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Eric, can you try running ncdump with the -s option to show the chunking parameters? It may be that the chunk shapes and sizes are different and not entirely compatible with the GrADS I/O pattern.</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
--Jennifer</div>
<hr style="display: inline-block; width: 98%;">
<div style="direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<b>From:</b> gradsusr <a href="mailto:gradsusr-bounces@gradsusr.org" id="OWAa58e3b0e-b241-f95c-59bb-8c5fdfb7d05b" class="x_moz-txt-link-rfc2396E OWAAutoLink" data-loopstyle="linkonly">
<gradsusr-bounces@gradsusr.org></a> on behalf of Eric A. Aligo <a href="mailto:eric.aligo@noaa.gov" id="OWAf1968061-abe2-72da-30b7-03a1d457f116" class="x_moz-txt-link-rfc2396E OWAAutoLink" data-loopstyle="linkonly">
<eric.aligo@noaa.gov></a><br>
<b>Sent:</b> Thursday, April 18, 2024 8:37 AM<br>
<b>To:</b> <a href="mailto:gradsusr@gradsusr.org" id="OWA6fb59cee-dd30-d7e8-5fa5-d65c8776d417" class="x_moz-txt-link-abbreviated OWAAutoLink" data-loopstyle="linkonly">
gradsusr@gradsusr.org</a> <a href="mailto:gradsusr@gradsusr.org" id="OWAc0c27fd9-7b0a-249d-735d-f22c253a4cab" class="x_moz-txt-link-rfc2396E OWAAutoLink" data-loopstyle="linkonly">
<gradsusr@gradsusr.org></a><br>
<b>Subject:</b> [gradsusr] template option suddenly slow for nc files</div>
<div style="direction: ltr;"> </div>
<p style="margin-top: 0px; margin-bottom: 0px;">Plotting one level and one time from a 3D field takes 3 seconds from a netcdf file using one version of FV3 code, but now it takes 2.5 minutes with a new version of FV3 code. The differences I see in the header
of the netcdf file are: the version of netcdf and hdf5, ncnsto, and grid_id. The fill/undefined values are also different. My control file is below. Is this a known issue with GraDS and netcdf/hdf5? A bug?</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">dset ^dynf%h3.nc<br>
dtype netcdf<br>
options template<br>
undef 9.99e+20<br>
title FV3 history<br>
xdef 2501 linear -135 0.03<br>
ydef 1051 linear 22.0 0.03<br>
tdef 3 linear 00Z20JUN2019 1hr<br>
zdef 65 linear 1 1<br>
VARS 1<br>
dzdt 65 t,z,y,x Vertical velocity<br>
endvars</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">ncdump -h:</p>
<p style="margin-top: 0px; margin-bottom: 0px;">:_NCProperties = "version=2,netcdf=4.9.2,hdf5=1.14.0" ;
<b><-----takes 2.5 minutes to plot field</b><br>
<br>
:_NCProperties = "version=2,netcdf=4.7.4,hdf5=1.10.6," ; <b><-----takes 3 seconds to plot field</b></p>
<p style="margin-top: 0px; margin-bottom: 0px;">Here's some of the header of the netcdf file that behaves normally:</p>
<p style="margin-top: 0px; margin-bottom: 0px;">netcdf dynf002 {<br>
dimensions:<br>
grid_xt = 2501 ;<br>
grid_yt = 1051 ;<br>
nchars = 20 ;<br>
pfull = 65 ;<br>
phalf = 66 ;<br>
time = 1 ;</p>
<p style="margin-top: 0px; margin-bottom: 0px;"> float dzdt(time, pfull, grid_yt, grid_xt) ;<br>
dzdt:_FillValue = -1.e+10f ;<br>
dzdt:cell_methods = "time: point" ;<br>
dzdt:long_name = "vertical wind" ;<br>
dzdt:missing_value = -1.e+10f ;<br>
dzdt:output_file = "dyn" ;<br>
dzdt:units = "m/sec" ;<br>
// global attributes:<br>
:_NCProperties = "version=2,netcdf=4.7.4,hdf5=1.10.6," ;<br>
:ak = 212.637f, 452.613f, 723.285f, 1028.378f, 1372.014f, 1758.738f, 2193.544f, 2681.893f, 3229.725f, 3843.468f, 4530.025f, 5296.374f, 6132.608f, 7004.872f, 7877.419f, 8714.452f, 9480.727f, 10155.56f, 10734.38f, 11213.79f, 11591.01f, 11863.99f,
12031.62f, 12093.93f, 12052.24f, 11909.32f, 11669.5f, 11338.72f, 10924.5f, 10435.84f, 9883.087f, 9277.633f, 8631.631f, 7957.623f, 7268.15f, 6575.364f, 5890.665f, 5224.384f, 4585.535f, 3981.638f, 3418.626f, 2900.827f, 2431.016f, 2010.516f, 1639.35f, 1316.413f,
1039.659f, 806.289f, 612.932f, 455.809f, 330.883f, 233.98f, 160.901f, 107.5f, 69.754f, 43.805f, 26.13f, 14.45f, 7.211f, 3.103f, 1.058f, 0.234f, 0.017f, 0.f, 0.f, 0.f ;<br>
:bk = 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 3.79e-06f, 0.00018806f, 0.00097247f, 0.00279793f, 0.00610706f, 0.01133629f, 0.01877378f, 0.02854147f, 0.04074101f, 0.05545674f, 0.07275035f, 0.09265514f, 0.1151704f, 0.1402563f, 0.1678291f,
0.1977584f, 0.2298655f, 0.2639235f, 0.2996609f, 0.3367662f, 0.3748959f, 0.4136837f, 0.4527515f, 0.4917214f, 0.530227f, 0.5679249f, 0.6045035f, 0.6396912f, 0.6732613f, 0.7050351f, 0.7348821f, 0.7627185f, 0.7885046f, 0.8122396f, 0.833957f, 0.8537182f, 0.8716077f,
0.8877271f, 0.9021903f, 0.9151191f, 0.926639f, 0.9368768f, 0.9459575f, 0.9540022f, 0.9611273f, 0.9674414f, 0.9730366f, 0.9779925f, 0.9823816f, 0.9862693f, 0.9897139f, 0.992767f, 0.9954739f, 0.9978736f, 1.f ;<br>
:dlat = 0.03f ;<br>
:dlon = 0.03f ;<br>
:grid = "latlon" ;<br>
:<b>grid_id = 1 ;</b><br>
:hydrostatic = "non-hydrostatic" ;<br>
:lat1 = 22.f ;<br>
:lat2 = 53.5f ;<br>
:lon1 = -135.f ;<br>
:lon2 = -60.f ;<br>
:<b>ncnsto = 13 ;</b><br>
:source = "FV3GFS" ;</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Here's the header of the netcdf file that doesn't behave normally:</p>
<p style="margin-top: 0px; margin-bottom: 0px;">netcdf dynf002 {<br>
dimensions:<br>
grid_xt = 2501 ;<br>
grid_yt = 1051 ;<br>
nchars = 20 ;<br>
pfull = 65 ;<br>
phalf = 66 ;<br>
time = 1 ;<br>
float dzdt(time, pfull, grid_yt, grid_xt) ;<br>
dzdt:_FillValue = <b>9.99e+20</b>f ;<br>
dzdt:cell_methods = "time: point" ;<br>
dzdt:long_name = "vertical wind" ;<br>
dzdt:missing_value = <b>9.99e+20</b>f ;<br>
dzdt:output_file = "dyn" ;<br>
dzdt:units = "m/sec" ;<br>
<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">// global attributes:<br>
:ak = 212.637f, 452.613f, 723.285f, 1028.378f, 1372.014f, 1758.738f, 2193.544f, 2681.893f, 3229.725f, 3843.468f, 4530.025f, 5296.374f, 6132.608f, 7004.872f, 7877.419f, 8714.452f, 9480.727f, 10155.56f, 10734.38f, 11213.79f, 11591.01f, 11863.99f,
12031.62f, 12093.93f, 12052.24f, 11909.32f, 11669.5f, 11338.72f, 10924.5f, 10435.84f, 9883.087f, 9277.633f, 8631.631f, 7957.623f, 7268.15f, 6575.364f, 5890.665f, 5224.384f, 4585.535f, 3981.638f, 3418.626f, 2900.827f, 2431.016f, 2010.516f, 1639.35f, 1316.413f,
1039.659f, 806.289f, 612.932f, 455.809f, 330.883f, 233.98f, 160.901f, 107.5f, 69.754f, 43.805f, 26.13f, 14.45f, 7.211f, 3.103f, 1.058f, 0.234f, 0.017f, 0.f, 0.f, 0.f ;<br>
:bk = 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 3.79e-06f, 0.00018806f, 0.00097247f, 0.00279793f, 0.00610706f, 0.01133629f, 0.01877378f, 0.02854147f, 0.04074101f, 0.05545674f, 0.07275035f, 0.09265514f, 0.1151704f, 0.1402563f, 0.1678291f,
0.1977584f, 0.2298655f, 0.2639235f, 0.2996609f, 0.3367662f, 0.3748959f, 0.4136837f, 0.4527515f, 0.4917214f, 0.530227f, 0.5679249f, 0.6045035f, 0.6396912f, 0.6732613f, 0.7050351f, 0.7348821f, 0.7627185f, 0.7885046f, 0.8122396f, 0.833957f, 0.8537182f, 0.8716077f,
0.8877271f, 0.9021903f, 0.9151191f, 0.926639f, 0.9368768f, 0.9459575f, 0.9540022f, 0.9611273f, 0.9674414f, 0.9730366f, 0.9779925f, 0.9823816f, 0.9862693f, 0.9897139f, 0.992767f, 0.9954739f, 0.9978736f, 1.f ;<br>
:dlat = 0.03f ;<br>
:dlon = 0.03f ;<br>
:grid = "latlon" ;<br>
:<b>grid_id = 1L ;</b><br>
:hydrostatic = "non-hydrostatic" ;<br>
:lat1 = 22.f ;<br>
:lat2 = 53.5f ;<br>
:lon1 = -135.f ;<br>
:lon2 = -60.f ;<br>
:<b>ncnsto = 16</b> ;<br>
:source = "FV3GFS" ;<br>
:_NCProperties = "version=2,netcdf=4.9.2,hdf5=1.14.0" ;</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Eric</p>
<br>
<fieldset class="x_moz-mime-attachment-header"></fieldset>
<pre><div>_______________________________________________
gradsusr mailing list
<a href="mailto:gradsusr@gradsusr.org" id="OWA7e1b7c79-2be5-1452-c70c-444bf9f6ee29" class="x_moz-txt-link-abbreviated OWAAutoLink" data-loopstyle="linkonly">gradsusr@gradsusr.org</a>
<a href="http://secure-web.cisco.com/1SbYKTeS8idBPpsZluWZCxvfxcXkEGpZunNc-YWDqyYtKA38gj2WBAn-aUkf-zZx62tRro_EA9rmilTB-0YXT4ZYHpFLKR-QeChZ6F2mfdl0bdJnH5mIHwDZCN12omSaC0zqyyyH2iwMv1-aXPDFpz-WjIF4_M3zBBoAuqTXPSTFgytd4cjgrFafOerjx1_UbIghkI1h3zPwDX2Fo7FiOw3Z0iBaCR5QjtFgqzm0Tlk1BdsNWO3JrD11VmauLC-FG1Iy1LXXS8z8rwgT9FeusHfk78zNs4Ie4gj_U-giIy5WFxcmVXLQxzp4iFdRr1gJko0zba7eJt5erJdMZxeY0aUGBYL4o28g_8HyMRFo33VXovAO5gOv8-COrW8_oCysKu55a0FSrmB8DtX1JY6p8g_Xzf-BhzBLXB8SeyBGKZVY/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr" id="OWA5a6f88fe-ccb8-ce98-3ff5-3c2a9f47a210" class="x_moz-txt-link-freetext OWAAutoLink" data-auth="NotApplicable" data-loopstyle="linkonly">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</div></pre>
</blockquote>
</body>
</html>