<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: </div><div><br></div><div><div>ga-> sdfopen /prod/custom/Input/modelplots/GRADS/reference/topo2.grd</div><div>Scanning self-describing file: /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"><<a href="mailto:klevey@customweather.com">klevey@customweather.com</a>></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>
lat = 101 ;<br>
lon = 151 ;<br>
variables:<br>
double lat(lat) ;<br>
lat:long_name = "latitude" ;<br>
lat:units = "degrees_north" ;<br>
lat:actual_range = 36.9, 37. ;<br>
double lon(lon) ;<br>
lon:long_name = "longitude" ;<br>
lon:units = "degrees_north" ;<br>
lon:actual_range = -120.18, -120.03 ;<br>
float elevation(lat, lon) ;<br>
elevation:long_name = "elevation" ;<br>
elevation:units = "meters" ;<br>
elevation:_FillValue = -999.f ;<br>
elevation:actual_range = 57.8879890441895, 96.9689636230469 ;<br>
<br>
// global attributes:<br>
:Conventions = "COARDS/CF-1.0" ;<br>
:title = "../grids/madera/mapdata/topo/topo.grd" ;<br>
: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>
: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=>elevation 1 99 Altitude in meters<br>
lon=>lon 1 99 longitude<br>
lat=>lat 1 99 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=>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-> sdfopen /prod/custom/Input/modelplots/GRADS/reference/topo2.grd</div><div><br></div><div> Arlindo</div>
<div> </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-> xdfopen usl_topo.ctl<br>
Scanning Descriptor File: 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 & 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>