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

hersala hersala at GMAIL.COM
Wed Nov 25 12:14:34 EST 2009


Dear Arlindo and Kevin:

Perhaps you have solved the problem that you discuss in the list some days
ago. Anyway I think that this info could be helpful for your purpose. It is
about a problem existing between GMT4 y gdal compliant softwares.

ftp://ftp.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/ice_surface/grid_registered/netcdf/readme_etopo1_netcdf.txt

Cheers,
Hernán


2009/11/18 Kevin M Levey <klevey at customweather.com>

> Hey Arlindo
>
> Here is a weird thing - I figured out the problem.
>
> According to the documentation:
>
>
>    SDF_varname=>grads_varname
>
> SDF_varname is the name the data variable was given when the SDF file was
> originally created. For NetCDF files, this name appears in the output from
> ncdump. It is important that SDF_varname exactly matches the variable name
> in the data file. SDF_varname may contain uppercase letters and
> non-alpha-numeric characters.
>
> I had my names mixed, i.e. instead of
>
> elevation=>alt 1 99 Altitude in meters
>
> I had
>
> alt=>elevation 1 99 Altitude in meters
>
> hence the message "gadsdf: SDF file does not have any non-coordinate
> variables." I just wish there was a list of GRADS error messages and what
> they mean in the documentation. It would really help.
>
> But the kicker is that for WRF outputted files it works the other way
> around.
>
> Anyway, problem solved.
>
> Thanks!
>
> Cheers
> Kevin
>
>
> On Nov 18, 2009, at 11/18/09 - 11:15 AM, Arlindo da Silva wrote:
>
> Kevin,
>
>   Could you make this file available to me for testing?
>
>       Arlindo
>
>
> On Wed, Nov 18, 2009 at 10:27 AM, Kevin M Levey <klevey at customweather.com>wrote:
>
>> Hi Arlindo,
>>
>> No difference (same message) without the lat/lon variables listed in the
>> CTL file and opening up directly with sdfopen:
>>
>> ga-> sdfopen /prod/custom/Input/modelplots/GRADS/reference/topo2.grd
>> Scanning self-describing file:
>>  /prod/custom/Input/modelplots/GRADS/reference/topo2.grd
>> *gadsdf: SDF file has no discernable X coordinate.*
>>
>> Cheers
>> Kevin
>>
>> On Nov 17, 2009, at 11/17/09 - 8:49 PM, Arlindo da Silva wrote:
>>
>>
>>
>> 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
>>
>>
>>
>
>
> --
> Arlindo da Silva
> dasilva at alum.mit.edu
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20091125/4970c752/attachment.html 


More information about the gradsusr mailing list