Chuck,<br>Thanks for the help. I have gotten Grads to recognize the data and open the .ctl file, but now the data doesn't look right. What have I done wrong?<br><br>SGS2.ctl text:<br>DSET ^SGS.nc<br>UNDEF -1e.+34 _FillValue<br>
OPTIONS 365_day_calendar<br>XDEF 248 LINEAR 1 1.0<br>YDEF 144 LEVELS<br>-88, -84, -80, -76, -72, -68, -65.4684377765723, -63.4528127641699,<br> -61.4371877517676, -59.4215627393652, -57.4059377269629,<br> -55.3903127145605, -53.3746877021582, -51.3590626897559,<br>
-49.3434376773535, -47.3278126649512, -45.3121876525488,<br> -43.2965626401465, -41.2809376277441, -39.2653126153418,<br> -37.2496876029395, -35.2340625905371, -33.2184375781348,<br> -31.2028125657324, -29.1871875533301, -27.1715625409277,<br>
-25.1559375285254, -23.140312516123, -21.1246875037207,<br> -19.1090624913184, -17.093437478916, -15.0778124665137,<br> -13.0621874541113, -11.046562441709, -9.03093742930666,<br> -7.01531241690431, -4.99968740450198, -3.07649989284378,<br>
-2.60149989284378, -2.12649989284376, -1.65149989284377,<br> -1.17649989284377, -0.701499892843798, -0.226499892843742,<br> 0.248500107156228, 0.723500107156225, 1.19850010715621, 1.6735001071562,<br> 2.14850010715623, 2.62350010715626, 3.09850010715625, 3.57350010715625,<br>
4.04850010715625, 4.52350010715621, 4.99850010715626, 5.47350010715624,<br> 5.94850010715622, 6.42350010715623, 6.89850010715621, 7.37350010715624,<br> 7.84850010715624, 8.32350010715629, 8.79850010715625, 9.27350010715626,<br>
9.74850010715623, 10.2235001071563, 10.6985001071563, 11.1735001071562,<br> 11.6485001071562, 12.1235001071562, 12.5985001071563, 13.0735001071562,<br> 13.5485001071562, 14.0235001071562, 14.4985001071562, 14.9735001071563,<br>
15.4485001071563, 15.9235001071563, 16.3985001071563, 16.8735001071562,<br> 17.3485001071563, 17.8235001071562, 18.2985001071562, 18.7735001071562,<br> 19.2485001071563, 19.7235001071563, 20.1985001071563, 20.6735001071563,<br>
21.1485001071562, 21.6235001071562, 22.0985001071562, 22.5735001071562,<br> 23.0485001071562, 23.5235001071562, 23.9985001071562, 24.4735001071562,<br> 24.9485001071563, 25.4235001071563, 25.8985001071563, 26.3735001071563,<br>
26.8485001071563, 27.3235001071563, 27.7985001071563, 28.2735001071563,<br> 28.7485001071563, 29.2235001071562, 29.6985001071562, 30.1735001071563,<br> 30.6485001071562, 31.1235001071562, 31.5985001071562, 32.0735001071562,<br>
32.5485001071562, 33.0235001071562, 33.4985001071562, 33.9735001071562,<br> 34.4485001071563, 34.9235001071563, 35.3985001071563, 35.8735001071563,<br> 36.3485001071563, 36.8235001071562, 37.2985001071563, 37.7735001071562,<br>
39.2653126153417, 41.2809376277441, 43.2965626401464, 45.3121876525488,<br> 47.3278126649512, 49.3434376773535, 51.3590626897559, 53.3746877021582,<br> 55.3903127145606, 57.4059377269629, 59.4215627393652, 61.4371877517676,<br>
63.4528127641699, 65.4684377765723, 68, 71.9999999999999, 76,<br> 79.9999999999999, 83.9999999999999, 87.9999999999999<br>ZDEF 1 LEVELS 1000<br>TDEF 12 LINEAR 00Z01SEP1996 1mo<br>VARS 1<br>PRECLIM 0 y,x PRECIPITATION<br>
ENDVARS<br><br>Jeff Duda<br><br><div class="gmail_quote">On Mon, Apr 25, 2011 at 11:24 AM, Charles Seman <span dir="ltr"><<a href="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</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>
Try this (<a href="http://iges.org/grads/gadoc/gradcomdxdfopen.html" target="_blank">http://iges.org/grads/gadoc/gradcomdxdfopen.html</a>):<br>
<br>
TDEF TIME 12 LINEAR 00Z01SEP1996 1mo<br>
<br>
Note the use of "TIME 12" and dt = "1mo"...<br>
For reference, please find attached a GrADS ctl file which opens a NOLEAP <a href="http://climatology.nc" target="_blank">climatology.nc</a> file in GrADS v2 and an "ncdump -c" file showing the time coordinates, etc...<br>
<br>
Hope this helps,<br>
Chuck<br>
<br>
Jeffrey Duda wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hello,<br>
I need help opening a netcdf file to be viewed in Grads. I've attached it to this email. I tried sdfopen , but I got this error:<br>
<br>
SDF Error: 365 day calendars are no longer supported by sdfopen.<br>
To open this file with GrADS, use a descriptor file with<br>
a complete TDEF entry and OPTIONS 365_day_calendar.<br>
Documentation is at <a href="http://iges.org/grads/gadoc/SDFdescriptorfile.html" target="_blank">http://iges.org/grads/gadoc/SDFdescriptorfile.html</a><br>
<br>
So I tried writing a very simple descriptor file:<br>
<br>
DSET ^SGS.nc<br>
OPTIONS 365_day_calendar<br>
TDEF 365 LINEAR 00Z01SEP1996 1dy<br>
<br>
When I tried to open this using xdfopen, I got this error:<br>
<br>
gadxdf error: Missing or invalid dimension size.<br>
--> The invalid description file record is:<br>
--> tdef 365 linear 00z01sep1996 1dy<br>
The data file was not opened.<br>
<br>
So I'm not really sure what I'm doing wrong...or what I'm doing at all, for that matter. Please help. The output from ncdump on the file is:<br>
<br>
netcdf SGS {<br>
dimensions:<br>
LON = 248 ;<br>
LAT = 144 ;<br>
bnds = 2 ;<br>
TIME = UNLIMITED ; // (12 currently)<br>
variables:<br>
double LON(LON) ;<br>
LON:units = "degrees_east" ;<br>
LON:modulo = 360. ;<br>
LON:point_spacing = "even" ;<br>
LON:axis = "X" ;<br>
double LAT(LAT) ;<br>
LAT:units = "degrees_north" ;<br>
LAT:point_spacing = "uneven" ;<br>
LAT:axis = "Y" ;<br>
LAT:bounds = "LAT_bnds" ;<br>
double LAT_bnds(LAT, bnds) ;<br>
double TIME(TIME) ;<br>
TIME:units = "days since 1996-09-01 00:00:00" ;<br>
TIME:time_origin = "01-SEP-1996 00:00:00" ;<br>
TIME:calendar = "NOLEAP" ;<br>
TIME:axis = "T" ;<br>
TIME:bounds = "TIME_bnds" ;<br>
double TIME_bnds(TIME, bnds) ;<br>
float PRECLIM(TIME, LAT, LON) ;<br>
PRECLIM:missing_value = -1.e+34f ;<br>
PRECLIM:_FillValue = -1.e+34f ;<br>
PRECLIM:long_name = "(PRECIP[D=1,L=1])" ;<br>
<br>
// global attributes:<br>
:history = "FERRET V6.65 30-Mar-11" ;<br>
:Conventions = "CF-1.0" ;<br>
}<br>
<br>
Thanks.<br>
<br>
Jeff Duda<br>
<br>
-- <br>
Jeff Duda<br>
Iowa State University<br>
Meteorology Graduate Student<br>
3134 Agronomy Hall<br>
</div></div><a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">www.meteor.iastate.edu/~jdduda</a> <<a href="http://www.meteor.iastate.edu/%7Ejdduda" target="_blank">http://www.meteor.iastate.edu/~jdduda</a>><br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote>
<br>
-- <br>
<br>
Please note that <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a> should be considered my NOAA<br>
email address, not <a href="mailto:cjs@gfdl.noaa.gov" target="_blank">cjs@gfdl.noaa.gov</a>.<br>
<br>
********************************************************************<br>
Charles Seman <a href="mailto:Charles.Seman@noaa.gov" target="_blank">Charles.Seman@noaa.gov</a><br>
U.S. Department of Commerce / NOAA / OAR<br>
Geophysical Fluid Dynamics Laboratory voice: <a href="tel:%28609%29%20452-6547" value="+16094526547" target="_blank">(609) 452-6547</a><br>
201 Forrestal Road fax: <a href="tel:%28609%29%20987-5063" value="+16099875063" target="_blank">(609) 987-5063</a><br>
Princeton, NJ 08540-6649 <a href="http://www.gfdl.noaa.gov/%7Ecjs/" target="_blank">http://www.gfdl.noaa.gov/~cjs/</a><br>
********************************************************************<br>
<br>
"The contents of this message are mine personally and do not reflect any<br>
official or unofficial position of the United States Federal Government,<br>
the United States Department of Commerce, or NOAA."<br>
<br>dset ^<a href="http://climatology.nc" target="_blank">climatology.nc</a><br>
dtype netcdf<br>
options 365_day_calendar<br>
undef -999.<br>
xdef 144 linear 1.25 2.5<br>
ydef 90 linear -89 2<br>
zdef 23 levels 1000 925 850 775 700 600 500 400<br>
300 250 200 150 100 70 50 30 20 10<br>
7 5 3 2 1<br>
tdef 12 linear 12Z11JAN2000 1mo<br>
vars 5<br>
olr=>olr 0 t,y,x outgoing longwave radiation<br>
swdn_toa=>swdn_toa 0 t,y,x SW flux down at TOA<br>
swup_toa=>swup_toa 0 t,y,x SW flux up at TOA<br>
olr_clr=>olr_clr 0 t,y,x clear skyoutgoing longwave radiation<br>
swup_toa_clr=>swup_toa_clr 0 t,y,x clear skySW flux up at TOA<br>
endvars<br>
<br>netcdf climatology { // format variant: 64bit<br>
dimensions:<br>
time = UNLIMITED ; // (12 currently)<br>
level = 23 ;<br>
lat = 90 ;<br>
lon = 144 ;<br>
variables:<br>
double time(time) ;<br>
time:long_name = "time" ;<br>
time:units = "days since 1980-01-01 00:00:00" ;<br>
time:cartesian_axis = "T" ;<br>
time:calendar_type = "NOLEAP" ;<br>
time:calendar = "NOLEAP" ;<br>
time:climatology = "climatology_bounds" ;<br>
float level(level) ;<br>
level:units = "hPa" ;<br>
level:long_name = "pressure" ;<br>
level:cartesian_axis = "Z" ;<br>
level:axis = "Z" ;<br>
level:positive = "down" ;<br>
float lat(lat) ;<br>
lat:long_name = "latitude" ;<br>
lat:units = "degrees_N" ;<br>
lat:cartesian_axis = "Y" ;<br>
float lon(lon) ;<br>
lon:long_name = "longitude" ;<br>
lon:units = "degrees_E" ;<br>
lon:cartesian_axis = "X" ;<br>
float olr(time, lat, lon) ;<br>
olr:long_name = "outgoing longwave radiation" ;<br>
olr:units = "watts/m2" ;<br>
olr:missing_value = -999.f ;<br>
olr:interp_method = "conserve_order2" ;<br>
olr:cell_methods = "time: mean within months time: mean over years" ;<br>
olr:time_avg_info = "average_T1,average_T2,average_DT" ;<br>
float swdn_toa(time, lat, lon) ;<br>
swdn_toa:long_name = "SW flux down at TOA" ;<br>
swdn_toa:units = "watts/m2" ;<br>
swdn_toa:missing_value = -999.f ;<br>
swdn_toa:interp_method = "conserve_order2" ;<br>
swdn_toa:cell_methods = "time: mean within months time: mean over years" ;<br>
swdn_toa:time_avg_info = "average_T1,average_T2,average_DT" ;<br>
float swup_toa(time, lat, lon) ;<br>
swup_toa:long_name = "SW flux up at TOA" ;<br>
swup_toa:units = "watts/m2" ;<br>
swup_toa:missing_value = -999.f ;<br>
swup_toa:interp_method = "conserve_order2" ;<br>
swup_toa:cell_methods = "time: mean within months time: mean over years" ;<br>
swup_toa:time_avg_info = "average_T1,average_T2,average_DT" ;<br>
float olr_clr(time, lat, lon) ;<br>
olr_clr:long_name = "clear skyoutgoing longwave radiation" ;<br>
olr_clr:units = "watts/m2" ;<br>
olr_clr:missing_value = -999.f ;<br>
olr_clr:interp_method = "conserve_order2" ;<br>
olr_clr:cell_methods = "time: mean within months time: mean over years" ;<br>
olr_clr:time_avg_info = "average_T1,average_T2,average_DT" ;<br>
float swup_toa_clr(time, lat, lon) ;<br>
swup_toa_clr:long_name = "clear skySW flux up at TOA" ;<br>
swup_toa_clr:units = "watts/m2" ;<br>
swup_toa_clr:missing_value = -999.f ;<br>
swup_toa_clr:interp_method = "conserve_order2" ;<br>
swup_toa_clr:cell_methods = "time: mean within months time: mean over years" ;<br>
swup_toa_clr:time_avg_info = "average_T1,average_T2,average_DT" ;<br>
<br>
// global attributes:<br>
:filename = "<a href="http://atmos.1981-2000.01.nc" target="_blank">atmos.1981-2000.01.nc</a>" ;<br>
:title = "c48L48_am3p8" ;<br>
:grid_type = "mosaic" ;<br>
:grid_tile = "1" ;<br>
:history = "Thu Mar 4 15:44:48 2010: ncrcat -O <a href="http://atmos.1981-2000.01_subvars.nc" target="_blank">atmos.1981-2000.01_subvars.nc</a> <a href="http://atmos.1981-2000.02_subvars.nc" target="_blank">atmos.1981-2000.02_subvars.nc</a> <a href="http://atmos.1981-2000.03_subvars.nc" target="_blank">atmos.1981-2000.03_subvars.nc</a> <a href="http://atmos.1981-2000.04_subvars.nc" target="_blank">atmos.1981-2000.04_subvars.nc</a> <a href="http://atmos.1981-2000.05_subvars.nc" target="_blank">atmos.1981-2000.05_subvars.nc</a> <a href="http://atmos.1981-2000.06_subvars.nc" target="_blank">atmos.1981-2000.06_subvars.nc</a> <a href="http://atmos.1981-2000.07_subvars.nc" target="_blank">atmos.1981-2000.07_subvars.nc</a> <a href="http://atmos.1981-2000.08_subvars.nc" target="_blank">atmos.1981-2000.08_subvars.nc</a> <a href="http://atmos.1981-2000.09_subvars.nc" target="_blank">atmos.1981-2000.09_subvars.nc</a> <a href="http://atmos.1981-2000.10_subvars.nc" target="_blank">atmos.1981-2000.10_subvars.nc</a> <a href="http://atmos.1981-2000.11_subvars.nc" target="_blank">atmos.1981-2000.11_subvars.nc</a> <a href="http://atmos.1981-2000.12_subvars.nc" target="_blank">atmos.1981-2000.12_subvars.nc</a> <a href="http://climatology.nc" target="_blank">climatology.nc</a>\n",<br>
"/home/z1l/bin/tools/fregrid_parallel --input_mosaic <a href="http://atmos_mosaic.nc" target="_blank">atmos_mosaic.nc</a> --input_file 19810101.atmos_month --interp_method conserve_order2 --nlon 144 --nlat 90 --scalar_field (**please see the field list in this file**)" ;<br>
:code_version = "$Name: preQ_z1l $" ;<br>
:comment = "FMS time averaging, version 3.0, precision=double" ;<br>
:nco_openmp_thread_number = 1 ;<br>
data:<br>
<br>
time = 7315.5, 7345, 7374.5, 7405, 7435.5, 7466, 7496.5, 7527.5, 7558,<br>
7588.5, 7619, 7649.5 ;<br>
<br>
level = 1000, 925, 850, 775, 700, 600, 500, 400, 300, 250, 200, 150, 100,<br>
70, 50, 30, 20, 10, 7, 5, 3, 2, 1 ;<br>
<br>
lat = -89, -87, -85, -83, -81, -79, -77, -75, -73, -71, -69, -67, -65, -63,<br>
-61, -59, -57, -55, -53, -51, -49, -47, -45, -43, -41, -39, -37, -35,<br>
-33, -31, -29, -27, -25, -23, -21, -19, -17, -15, -13, -11, -9, -7, -5,<br>
-3, -1, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33,<br>
35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69,<br>
71, 73, 75, 77, 79, 81, 83, 85, 87, 89 ;<br>
<br>
lon = 1.25, 3.75, 6.25, 8.75, 11.25, 13.75, 16.25, 18.75, 21.25, 23.75,<br>
26.25, 28.75, 31.25, 33.75, 36.25, 38.75, 41.25, 43.75, 46.25, 48.75,<br>
51.25, 53.75, 56.25, 58.75, 61.25, 63.75, 66.25, 68.75, 71.25, 73.75,<br>
76.25, 78.75, 81.25, 83.75, 86.25, 88.75, 91.25, 93.75, 96.25, 98.75,<br>
101.25, 103.75, 106.25, 108.75, 111.25, 113.75, 116.25, 118.75, 121.25,<br>
123.75, 126.25, 128.75, 131.25, 133.75, 136.25, 138.75, 141.25, 143.75,<br>
146.25, 148.75, 151.25, 153.75, 156.25, 158.75, 161.25, 163.75, 166.25,<br>
168.75, 171.25, 173.75, 176.25, 178.75, 181.25, 183.75, 186.25, 188.75,<br>
191.25, 193.75, 196.25, 198.75, 201.25, 203.75, 206.25, 208.75, 211.25,<br>
213.75, 216.25, 218.75, 221.25, 223.75, 226.25, 228.75, 231.25, 233.75,<br>
236.25, 238.75, 241.25, 243.75, 246.25, 248.75, 251.25, 253.75, 256.25,<br>
258.75, 261.25, 263.75, 266.25, 268.75, 271.25, 273.75, 276.25, 278.75,<br>
281.25, 283.75, 286.25, 288.75, 291.25, 293.75, 296.25, 298.75, 301.25,<br>
303.75, 306.25, 308.75, 311.25, 313.75, 316.25, 318.75, 321.25, 323.75,<br>
326.25, 328.75, 331.25, 333.75, 336.25, 338.75, 341.25, 343.75, 346.25,<br>
348.75, 351.25, 353.75, 356.25, 358.75 ;<br>
}<br>
<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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/~jdduda">www.meteor.iastate.edu/~jdduda</a><br>