NETCDF descriptor file problem: gadsdf: SDF file does not have any non-coordinate variables.

Arlindo da Silva arlindo.dasilva at GMAIL.COM
Tue Nov 17 23:49:09 EST 2009


On Tue, Nov 17, 2009 at 10:52 PM, Kevin M Levey <klevey at customweather.com>wrote:

> TUE 17NOV09: 1945PST
>
> 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.
>
> The output from ncdump -h is:
>
> netcdf topo2 {
> dimensions:
>        lat = 101 ;
>        lon = 151 ;
> variables:
>        double lat(lat) ;
>                lat:long_name = "latitude" ;
>                lat:units = "degrees_north" ;
>                lat:actual_range = 36.9, 37. ;
>        double lon(lon) ;
>                lon:long_name = "longitude" ;
>                lon:units = "degrees_north" ;
>                lon:actual_range = -120.18, -120.03 ;
>        float elevation(lat, lon) ;
>                elevation:long_name = "elevation" ;
>                elevation:units = "meters" ;
>                elevation:_FillValue = -999.f ;
>                elevation:actual_range = 57.8879890441895, 96.9689636230469
> ;
>
> // global attributes:
>                :Conventions = "COARDS/CF-1.0" ;
>                :title = "../grids/madera/mapdata/topo/topo.grd" ;
>                :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" ;
>                :GMT_version = "4.5.0 [64-bit]" ;
> }
>
>
> My CTL file is as follows:
>
> DSET /prod/custom/Input/modelplots/GRADS/reference/topo2.grd
> TITLE This is a sample USL grid box for Central California
> UNDEF -9999
> XDEF lon 151 LINEAR -120.18 0.001
> YDEF lat 101 LINEAR 36.9 0.001
> VARS 3
> alt=>elevation 1 99 Altitude in meters
> lon=>lon 1 99 longitude
> lat=>lat 1 99  Latitude
> ENDVARS
>
>
Try eliminating lat/lon from the variable list; these are 1D coordinate
variables:

VARS 1
alt=>elevation 1 99 Altitude in meters
ENDVARS

Better yet, have you tried opening this netcdf file directly with "sdfopen"?

ga-> sdfopen /prod/custom/Input/modelplots/GRADS/reference/topo2.grd

    Arlindo


> However, here is the output I get when opening the CTL file (GRADS Version
> 2.0.a7.oga.2)
>
> ga-> xdfopen usl_topo.ctl
> Scanning Descriptor File:  usl_topo.ctl
> SDF file has no discernable time coordinate -- using default values.
> gadsdf: SDF file does not have any non-coordinate variables.
> SDF Descriptor file usl_topo.ctl was not successfully opened & parsed.
>
> 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.
>
> Thanks.
>
> Regards,
>
> Kevin M Levey, MSc in Oceans and Atmospheric Sciences (University of Cape
> Town)
> Director of Meteorological Operations
> CustomWeather, Inc.
> San Francisco, California, USA
>
> "Taking the World by Storm!"
>
> http://www.customweather.com
> http://www.myforecast.com
> http://www.1stweather.com
>
> cell: 415-794-0411
> work: 415-777-3566
> email: klevey at customweather.com
>



--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20091117/923ca401/attachment.html 


More information about the gradsusr mailing list