On Wed, 27 Oct 2004, Lori Thompson wrote:
Robb-
I just wanted to pass along to you the solution to the problem I had
that was presented by Remik. Thanks for all your help.
thanks for the response. So it appears that your cdl wasn't 100% correct
robb...
Lori
Remik Ziemlinski wrote:
> gribtocdl in.grib > in.cdl
> gribtonc in.cdl out.nc < in.grib
> ncrename -d record,reftime out.nc
>
> Voila...and please update Robb.
>
>
>> > Robb-
>> >
>> > The record dimension (time) has 124 values, where each value is a
>> number
>> > representing "n" days since a particular date (i.e., 105192,
>> 105198). In
>> > this case, the resultant netCDF file does not contain this data in the
>> > data section. As a result, the time values are 1 through 124.
>> >
>> > Valtime and reftime have these correct values, but the data variables
>> > are a function of the record dimension and not these variables. I
>> tried
>> > manually editing the CDL file and adding the record data in the data
>> > section but this did not work. You can get the GRIB data and the ASCII
>> > file containing the time variables via anonymous ftp:
>> > ftp ftp.gfdl.noaa.gov
>> > The tar gzipped file is:
>> > /pub/lat/pgb.200401.tar.gz
>> >
>> > Thank you,
>> > Lori
>> >
>> > Robb Kambic wrote:
>> > > On Wed, 20 Oct 2004, Unidata Support wrote:
>> > >
>> > >
>> > >>------- Forwarded Message
>> > >>
>> > >>
>> > >>>To: support@xxxxxxxxxxxxxxxx
>> > >>>From: "Lori Thompson" <Lori.Thompson@xxxxxxxx>
>> > >>>Subject: no record dimension data written to netCDF file
>> > >>>Organization: NOAA
>> > >>>Keywords: 200410201509.i9KF9IUE015245 gribtonc
>> > >>
>> > >>I used gribtocdl and gribtonc to convert NCEP reanalysis2 GRIB
>> data to
>> > >>netCDF. The resulting netCDF file contains the correct time
>> levels (124)
>> > >>represented as RECORD dimension and all the variables are a function
>> > >>of this dimension. However, there is no data for RECORD in the data
>> > >>section. The data section contains values for reftime, valtime,
>> > >>datetime, valtime_offset and forecasttime. As a result, plots of the
>> > >>data show it as a function of 124 records, instead of the correct
>> values
>> > >>as a representation of "hours since 1992-01-01..." The correct
>> values
>> > >>are represented in the data section under reftime and valtime and
>> the
>> > >>strings are correct for datetime and forecasttime. Is the correct
>> > >>solution to manipulate the CDL file and make the variables a
>> funtion of
>> > >>valtime instead of record?
>> > >
>> > >
>> > > Lori,
>> > >
>> > > no quite sure i understand fully what you are saying, but if
>> valtime
>> > > works... could you send me your cdl file and the resulting
>> netcdf file
>> > > with the data section, actually you could just send a ascii
>> representation
>> > > of the vars reftime, valtime, datetime, valtime_offset and
>> forecasttime.
>> > > also do you have a sample grib file i can get?
>> > >
>> > > robb..,
>> > >
>> > >
>> > >>Thanks in advance,
>> > >>Lori
>> > >>
>> > >>--
>> >
>>
>>****************************************************************************
>> > >>Unidata User Support UCAR
>> > >>(303)497-8643
>> > >>support@xxxxxxxxxxxxxxxx
>> >
>>
>>----------------------------------------------------------------------------
>> >
>>
>>----------------------------------------------------------------------------
>> > >>NOTE: All email exchanges with Unidata User Support are recorded
>> in the
>> > >>Unidata inquiry tracking system and then made publicly available
>> > >>through the web. If you do not want to have your interactions made
>> > >>available in this way, you must let us know in each email you
>> send to us.
>> > >>
>> > >>------- End of Forwarded Message
>> > >>
>> > >
>> > >
>> > >
==============================================================================
Robb Kambic Unidata Program Center
Software Engineer III Univ. Corp for Atmospheric Research
rkambic@xxxxxxxxxxxxxxxx WWW: http://www.unidata.ucar.edu/
==============================================================================