NetCDF Xdfopen problem

Mike Johnson Mike.W.Johnson at NOAA.GOV
Mon Nov 19 17:07:32 EST 2007


Donata - thanks for the advice.  I was able to read with

DSET ^20070824_1200.nc
XDEF x 200 LINEAR -125.117 2.5
YDEF y 200 LINEAR 40.2711 2.5
TDEF record 39 LINEAR 12Z 24 AUF2007 1HR

I think I discovered that using gedit (the linux editor I'm using) is
maybe not a good idea, since I ended up fixing my "missing DSET
record"
problem by simply putting a blank line in front of DSET command.

Anyway - thank you for your suggestions.

Mike


Mike Johnson
Senior Forecaster,
Medford OR Weather Forecast Office
National Weather Service, NOAA
(541) 776-4344



----- Original Message -----
From: Donata Giglio <donylilium22 at YAHOO.COM>
Date: Thursday, November 15, 2007 11:46 pm
Subject: Re: NetCDF Xdfopen problem

> Sorry for not writing you back before... I've just
> read
>
> try this:
>
>
> ZDEF levels_1 1 LINEAR 1 1
> ws=>ws 1 0 Wind Speed
> wd=>wd 1 0 Wind Direction
>
> and if doesn't work try
>
> ZDEF levels_1 1 LINEAR 1 1
> ws=>ws 0 0 Wind Speed
> wd=>wd 0 0 Wind Direction
>
> use xdfopen when you open the descriptor file
>
> hope this helps, bye
>
>
> --- Mike Johnson <Mike.W.Johnson at NOAA.GOV> ha scritto:
>
> > Donata - thanks for response.  I tried your
> > suggestion and it generated the
> > following, do you have any idea why?  thanks.
> > 1.  ddf file now looks like:
> >
> > DSET  ^20070824_1200.nc
> > TITLE Example NetCDF File
> > UNDEF -99999.
> > XDEF x 200 LINEAR -125.117 2.5
> > YDEF y 200 LINEAR 40.2711 2.5
> > ZDEF levels_1 1 LINEAR 1 1
> > TDEF n_valtimes 39 LINEAR 12Z24AUG2007 1HR
> > VARS 2
> > ws=>ws 1 0 t,z,y,x Wind Speed
> > wd=>wd 1 0 t,z,y,x Wind Direction
> > ENDVARS
> >
> > 2.  Error now looks like:
> > xdfopen 20070824_1200.ddf
> > Scanning Description File: 20070824_1200.ddf
> > XDFopen Error:  Missing DSET record.
> > The data file was not opened.
> >
> > I'm not understanding this error at all...Do you
> > have any idea?
> >
> > thanks
> >
> > Mike Johnson
> > Senior Forecaster,
> > Medford OR Weather Forecast Office
> > National Weather Service, NOAA
> > (541) 776-4344
> >
> >
> >
> > Donata Giglio wrote:
> > > Hi!
> > > I would try to change these lines:
> > >
> > > ZDEF levels_1 1 LINEAR 1 1
> > > ws=>ws 1 0 t,z,y,x Wind Speed
> > > wd=>wd 1 0 t,z,y,x Wind Direction
> > >
> > > I hope this helps :-)
> > > Bye,
> > > Donata
> > >
> > > --- Mike Johnson <Mike.W.Johnson at NOAA.GOV> ha
> > scritto:
> > >
> > >
> > >> I've just recently returned to the GRADS
> > community
> > >> from an extended
> > >> absence and was hoping someone could give some
> > >> advice on reading a
> > >> netcdf file (of which I have no previous
> > >> experience).  Anyway, I've
> > >> tried a number of things relative to online
> > >> documentation and examples
> > >> from the users group.  So far I've been
> > unsuccessful
> > >> in opening the
> > >> file. I am using GrADS v1.9b4.  thanks in
> > advance...
> > >>
> > >> Mike Johnson
> > >>
> > >> Here's symptoms of what I thought was the most
> > >> promising methodology.
> > >>
> > >> *1.  I created a data descriptor file
> > >> "20070824_1200.ddf" with following:*
> > >>
> > >> DSET  ^20070824_1200.nc
> > >> TITLE Example NetCDF File
> > >> UNDEF -99999.
> > >> XDEF x 200 LINEAR -125.117 2.5
> > >> YDEF y 200 LINEAR 40.2711 2.5
> > >> ZDEF levels_1 LINEAR 1 1
> > >> TDEF n_valtimes 39 LINEAR 12Z24AUG2007 1HR
> > >> VARS 2
> > >> ws=>ws 1 t,z,y,x Wind Speed
> > >> wd=>wd 1 t,z,y,x Wind Direction
> > >> ENDVARS
> > >>
> > >> *2.  error produced:*
> > >> xdfopen 20070824_1200.ddf
> > >> Scanning Description File: 20070824_1200.ddf
> > >> XDFopen Error:  Missing or invalid dimension
> > size.
> > >>  --> The invalid description file record is:
> > >>  --> zdef levels_1 linear 1 1
> > >>  The data file was not opened.
> > >>
> > >> *3.  partial ncdump output of 20070824_1200.nc:*
> > >>  netcdf 20070824_1200 {
> > >> dimensions:
> > >>              record = UNLIMITED ; // (39
> > currently)
> > >>              n_valtimes = 39 ;
> > >>              data_variables = 2 ;
> > >>              charsPerLevel = 11 ;
> > >>              namelen = 132 ;
> > >>              x = 200 ;
> > >>              y = 200 ;
> > >>              levels_1 = 1 ;
> > >> variables:
> > >>              float ws(record, levels_1, y, x)
> > >>                          ws:long_name = "Wind
> > Speed"
> > >> ;
> > >>                          ws:units = "m/s" ;
> > >>                          ws:udunits = "meter/sec"
> > ;
> > >>                          ws:uiname = "windSpeed"
> > ;
> > >>                          ws:valid_range = -150.f,
> > >> 150.f ;
> > >>                          ws:_FillValue = -99999.f
> > ;
> > >>                          ws:_n3d = 1 ;
> > >>                          ws:levels = "FHAG 10" ;
> > >>             char wsLevels(levels_1,
> > charsPerLevel) ;
> > >>             char wsInventory(n_valtimes,
> > levels_1) ;
> > >>             float wd(record, levels_1, y, x) ;
> > >>                          wd:long_name = "Wind
> > >> Direction" ;
> > >>                          wd:units = "degree_True"
> > ;
> > >>                          wd:udunits =
> > "degree_True"
> > >> ;
> > >>                          wd:uiname = "windDir" ;
> > >>                          wd:valid_range = 0.f,
> > 360.f
> > >> ;
> > >>                          wd:_FillValue = -99999.f
> > ;
> > >>                          wd:_n3d = 1 ;
> > >>                          wd:levels = "FHAG 10"
> > >>              char wdlevels(levels_1,
> > charsPerLevel)
> > >> ;
> > >>              char wdInventory(n_valtimes,
> > levels_1)
> > >> ;
> > >>              int valtimeMINUSreftime(n_valtimes)
> > ;
> > >>
> > valtimeMINUSreftime:units
> > >> = "seconds"
> > >>              double reftime ;
> > >>                           reftime:long_name =
> > >> "reference time" ;
> > >>                           reftime:units =
> > "seconds
> > >> since (1970-1-1
> > >> 00:00:00:0)" ;
> > >>              char origin(namelen) ;
> > >>              char model(namelen) ;
> > >> // global attributes:
> > >>                           :projIndex = 3 ;
> > >>                           :projName = "LATLON"
> > >>                           :centralLat = 42.5392f
> > ;
> > >>                           :centralLon =
> > -122.1475f ;
> > >>                           :rotation = 25.f ;
> > >>                           :lat00 = 40.2711f ;
> > >>                           :lon00 = -125.117f ;
> > >>                           :latNxNy = 44.7219f ;
> > >>                           :lonNxNy = -118.9594f ;
> > >>                           :dxKm = 2.5f ;
> > >>                           :dyKm = 2.5f ;
> > >> data:
> > >>
> > >> ws =
> > >> 8., 8.6,...............................
> > >>
> > >>
> > >
> > >
> > >
> > >
> > >       ___________________________________
> > > L'email della prossima generazione? Puoi averla
> > con la nuova Yahoo! Mail:
> > http://it.docs.yahoo.com/nowyoucan.html
> > >
> >
>
>
>
>
>      ___________________________________
> L'email della prossima generazione? Puoi averla con la nuova
> Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
>



More information about the gradsusr mailing list