<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Arlindo,<div><br></div><div>No difference (same message) without the lat/lon variables listed in the CTL file and opening up directly with sdfopen:&nbsp;</div><div><br></div><div><div>ga-&gt; sdfopen /prod/custom/Input/modelplots/GRADS/reference/topo2.grd</div><div>Scanning self-describing file: &nbsp;/prod/custom/Input/modelplots/GRADS/reference/topo2.grd</div><div><b>gadsdf: SDF file has no discernable X coordinate.</b></div><div><br></div><div>Cheers</div><div>Kevin</div></div><div><br><div><div>On Nov 17, 2009, at 11/17/09 - 8:49 PM, Arlindo da Silva wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Tue, Nov 17, 2009 at 10:52 PM, Kevin M Levey <span dir="ltr">&lt;<a href="mailto:klevey@customweather.com">klevey@customweather.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
TUE 17NOV09: 1945PST<br>
<br>
I am having problems opening trying to open a netcdf file of elevation data created by GMT. I am getting an error I've never seen before and don't understand.<br>
<br>
The output from ncdump -h is:<br>
<br>
netcdf topo2 {<br>
dimensions:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;lat = 101 ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;lon = 151 ;<br>
variables:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;double lat(lat) ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lat:long_name = "latitude" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lat:units = "degrees_north" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lat:actual_range = 36.9, 37. ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;double lon(lon) ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lon:long_name = "longitude" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lon:units = "degrees_north" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lon:actual_range = -120.18, -120.03 ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;float elevation(lat, lon) ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elevation:long_name = "elevation" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elevation:units = "meters" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elevation:_FillValue = -999.f ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elevation:actual_range = 57.8879890441895, 96.9689636230469 ;<br>
<br>
// global attributes:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:Conventions = "COARDS/CF-1.0" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:title = "../grids/madera/mapdata/topo/topo.grd" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:history = "grdsample -R-120.18/-120.03/36.90/37 -I0.06m ../grids/DATA/tmp/madera_topo250.grd -G../grids/madera/mapdata/topo/topo.grd" ;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:GMT_version = "4.5.0 [64-bit]" ;<br>
}<br>
<br>
<br>
My CTL file is as follows:<br>
<br>
DSET /prod/custom/Input/modelplots/GRADS/reference/topo2.grd<br>
TITLE This is a sample USL grid box for Central California<br>
UNDEF -9999<br>
XDEF lon 151 LINEAR -120.18 0.001<br>
YDEF lat 101 LINEAR 36.9 0.001<br>
VARS 3<br>
alt=&gt;elevation 1 99 Altitude in meters<br>
lon=&gt;lon 1 99 longitude<br>
lat=&gt;lat 1 99 &nbsp;Latitude<br>
ENDVARS<br>
<br></blockquote><div><br></div><div>Try eliminating lat/lon from the variable list; these are 1D coordinate variables:</div><div><br></div><div>VARS 1<br>alt=&gt;elevation 1 99 Altitude in meters<br>ENDVARS</div><div><br>
</div><div>Better yet, have you tried opening this netcdf file directly with "sdfopen"?</div><div><br></div><div>ga-&gt; sdfopen&nbsp;/prod/custom/Input/modelplots/GRADS/reference/topo2.grd</div><div><br></div><div>&nbsp;&nbsp; &nbsp;Arlindo</div>
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
However, here is the output I get when opening the CTL file (GRADS Version 2.0.a7.oga.2)<br>
<br>
ga-&gt; xdfopen usl_topo.ctl<br>
Scanning Descriptor File: &nbsp;usl_topo.ctl<br>
SDF file has no discernable time coordinate -- using default values.<br>
gadsdf: SDF file does not have any non-coordinate variables.<br>
SDF Descriptor file usl_topo.ctl was not successfully opened &amp; parsed.<br>
<br>
Obviously I am doing something wrong here. I've had success before opening up WRF netcdf data files using this method, but if anyone has any suggestions here, I'd love to hear from you.<br>
<br>
Thanks.<br>
<br>
Regards,<br>
<br>
Kevin M Levey, MSc in Oceans and Atmospheric Sciences (University of Cape Town)<br>
Director of Meteorological Operations<br>
CustomWeather, Inc.<br>
San Francisco, California, USA<br>
<br>
"Taking the World by Storm!"<br>
<br>
<a href="http://www.customweather.com/" target="_blank">http://www.customweather.com</a><br>
<a href="http://www.myforecast.com/" target="_blank">http://www.myforecast.com</a><br>
<a href="http://www.1stweather.com/" target="_blank">http://www.1stweather.com</a><br>
<br>
cell: 415-794-0411<br>
work: 415-777-3566<br>
email: <a href="mailto:klevey@customweather.com">klevey@customweather.com</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>
</blockquote></div><br></div></body></html>