Eric,<div>Thanks for your suggestion. I removed "byteswapped" and the headerbytes option from my control file, but unfortunately that did not solve the problem. Any other ideas?</div><div><br></div><div>Jeff<br>
<br><div class="gmail_quote">On Mon, Jun 18, 2012 at 10:24 PM, Eric Altshuler <span dir="ltr"><<a href="mailto:ela@cola.iges.org" target="_blank">ela@cola.iges.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Jeff,<br>
<br>
For netcdf data, the 'byteswapped' and 'headerbytes' options are meaningless. The netcdf format is independent of byte ordering and there are always some extra bytes for the metadata. Try removing the byteswapped option and the headerbytes entry.<br>
<br>
Best regards,<br>
<br>
Eric L. Altshuler<br>
Assistant Research Scientist<br>
Center for Ocean-Land-Atmosphere Studies<br>
4041 Powder Mill Road, Suite 302<br>
Calverton, MD 20705-3106<br>
USA<br>
<br>
E-mail: <a href="mailto:ela@cola.iges.org">ela@cola.iges.org</a><br>
Phone: (301) 902-1257<br>
Fax: (301) 595-9793<br>
<div><div class="h5"><br>
----- Original Message -----<br>
From: "Jeff Duda" <<a href="mailto:jeffduda319@gmail.com">jeffduda319@gmail.com</a>><br>
To: "GrADS Users Forum" <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
Sent: Monday, June 18, 2012 3:22:33 PM<br>
Subject: [gradsusr] help displaying from netcdf file<br>
<br>
<br>
I'm trying to use Grads to display data from a netCDF file. The result of ncdump for that file is<br>
<br>
ncdump -h ARW_cn_20110427.nettemp2m079200<br>
netcdf ARW_cn_20110427 {<br>
dimensions:<br>
x = 1163 ;<br>
y = 723 ;<br>
z = 1 ;<br>
variables:<br>
float temp2m(z, y, x) ;<br>
temp2m:standard_name = "temp2m" ;<br>
temp2m:long_name = "temp2m" ;<br>
temp2m:units = "F" ;<br>
}<br>
<br>
The file size is 3363608 bytes. Given the data are floating point and single precision, the size of the data alone are 1163*723*4 = 3363396, for a difference of 212 bytes<br>
<br>
I made a control file designed to open several hundred individual files to display the variable temp2m:<br>
dset s4%e_arw/ARW_%e_20110427.nettemp2m%ch<br>
chsub 1 1 003600<br>
chsub 2 2 007200<br>
chsub 3 3 010800<br>
chsub 4 4 014400<br>
chsub 5 5 018000<br>
chsub 6 6 021600<br>
chsub 7 7 025200<br>
chsub 8 8 028800<br>
chsub 9 9 032400<br>
chsub 10 10 036000<br>
chsub 11 11 039600<br>
chsub 12 12 043200<br>
chsub 13 13 046800<br>
chsub 14 14 050400<br>
chsub 15 15 054000<br>
chsub 16 16 057600<br>
chsub 17 17 061200<br>
chsub 18 18 064800<br>
chsub 19 19 068400<br>
chsub 20 20 072000<br>
chsub 21 21 075600<br>
chsub 22 22 079200<br>
chsub 23 23 082800<br>
chsub 24 24 086400<br>
chsub 25 25 090000<br>
chsub 26 26 093600<br>
chsub 27 27 097200<br>
chsub 28 28 100800<br>
chsub 29 29 104400<br>
chsub 30 30 108000<br>
chsub 31 31 111600<br>
chsub 32 32 115200<br>
chsub 33 33 118800<br>
chsub 34 34 122400<br>
chsub 35 35 126000<br>
chsub 36 36 129600<br>
options template byteswapped<br>
undef -9999.0<br>
dtype netcdf<br>
pdef 1163 723 lcc 23.2231 -119.145 1.0 1.0 38.5 38.5 -97.0000 4000.000 4000.000<br>
xdef 1163 linear -128.1065 0.053758<br>
ydef 723 linear 23.2231 0.040388<br>
zdef 1 linear 1.0 1.0<br>
tdef 36 linear 01Z27APR2011 1HR<br>
edef 10 NAMES cn m21 m23 m24 m25 m26 m27 m28 m29 m30<br>
VARS 1<br>
temp2m 1 y,x 2-m temperature (F)<br>
ENDVARS<br>
headerbytes 212<br>
<br>
When attempting to display the variable in Grads, I get this output:<br>
ga-> open SSEF_ens_temp2m_20110427_net.ctl<br>
Scanning description file: SSEF_ens_temp2m_20110427_net.ctl<br>
Data file s4%e_arw/ARW_%e_20110427.nettemp2m%ch is open as file 1<br>
LON set to -128.107 -65.6397<br>
LAT set to 23.2231 52.3832<br>
LEV set to 1 1<br>
Time values set: 2011:4:27:1 2011:4:27:1<br>
E set to 1 1<br>
Notice: Implied interpolation for file SSEF_ens_temp2m_20110427_net.ctl<br>
Interpolation will be performed on any data displayed from this file<br>
ga-> d temp2m<br>
Notice: Automatic Grid Interpolation Taking Place<br>
NetCDF Error (gancrow, nc_get_vara_double): NetCDF: Index exceeds dimension bound<br>
Data Request Error: Error for variable 'temp2m'<br>
Error ocurred at column 1<br>
DISPLAY error: Invalid expression<br>
Expression = temp2m<br>
<br>
I have also tried altering the line<br>
temp2m 1 y,x 2-m temperature (F)<br>
by the line<br>
temp2m 1 z,y,x 2-m temperature (F)<br>
in accordance with the output from ncdump. No avail.<br>
<br>
Please help me determine the reason for this error and how to fix it. Thanks.<br>
<br>
Jeff Duda<br>
--<br>
Jeff Duda<br>
Graduate research assistant<br>
University of Oklahoma School of Meteorology<br>
Center for Analysis and Prediction of Storms<br>
<br>
<br>
</div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br><br>
</div>