[Met_help] NetCDF format

John Halley Gotway johnhg at ucar.edu
Wed Sep 16 09:54:58 MDT 2009


Holly,

How are you converting from GRIB2 to GRIB1?  We've been using the "cnvgrib" tool to do this conversion (http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/).  There are several steps required to build this
tool, but once it's built, it seems to work well.

I retrieved a sample file NDFD file from: ftp://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/DF.gr2/DC.ndfd/AR.conus/VP.001-003/ds.maxt.bin
And I ran the following command to convert from GRIB2 to 1: cnvgrib -g21 ds.maxt.bin ds.maxt.gr
It seemed to do the trick.  I've posted 2 files to the anonymous ftp site:

Original NDFD GRIB2 File: ftp.rap.ucar.edu/incoming/irap/met_help/grib_data/ds.maxt.gr2
Output of cnvgrib tool:   ftp.rap.ucar.edu/incoming/irap/met_help/grib_data/ds.maxt.gr

Feel free to look at them to see whether or not they have the same problem with the data that you're seeing.

I'm looking into when we're planning to support GRIB2 directly - whether it's the next release in winter 2010 or later.  I'll let you know what I find out.

Thanks,
John

Holly Hassenzahl wrote:
> Hi John-
> 
> Hope you had a nice time away from the office!
> 
> I've read here and there that you guys are working on giving MET the
> ability to read Grib2.  Do you have an estimation on when that version
> might be released (if that's still the plan)?
> 
> We are having a really tough time getting the NDFD grib2 data converted.
> We are currently converting to grib1, but just realized that the grib2
> arrays are packed strangely (like an 'S' structure instead of line by
> line).  Thus when stats are computed, half are correct and half are not.
> So now we're sort of back at square one on that front.  Just got us
> curious about where things are at with grib2 readability!
> 
> Thanks,
> Holly
> 
> ___________________________________
> Holly C. Hassenzahl
> Meteorologist, Science Analyst
> Data Products Group
>  
> Weather Central, Inc.
> 401 Charmany Drive Suite 200
> Madison, WI 53711
> +1.608.274.5789
> +1.608.276.4600
> http://www.weathercentral.tv
>  
> -----Original Message-----
> From: John Halley Gotway [mailto:johnhg at rap.ucar.edu] 
> Sent: Thursday, September 10, 2009 4:03 PM
> To: Holly Hassenzahl
> Cc: met_help at ucar.edu
> Subject: RE: NetCDF format
> 
> Holly,
> 
> I've attached a sample NetCDF header as an example of the global
> attributes to define the lat/lon grid.  This example is a global grid
> for
> GFS data.  Looks like it consists of the lat/lon for the lower-left
> corner, the lat/lon increments in degrees, and the total number of
> lat/lon
> points.  Pretty straightforward.
> 
> Hopefully that gets you what you need.  I'll be out of town Friday
> through
> Tuesday of next week.  If you have more questions, I'll try to get to
> them
> later next week.
> 
> Good luck.
> 
> John
> 
>> Hi John-
>>
>> P&G is a rotated equidistant projection.  We can remap it to Plate
>> Caree.  Do you have any ncdump output of a MET fcst file using the
> Plate
>> Caree projection?  We just need to know what all the parameters need
> to
>> be called, etc.
>>
>> Thanks,
>> Holly
>>
>> ___________________________________
>> Holly C. Hassenzahl
>> Meteorologist, Science Analyst
>> Data Products Group
>>
>> Weather Central, Inc.
>> 401 Charmany Drive Suite 200
>> Madison, WI 53711
>> +1.608.274.5789
>> +1.608.276.4600
>> http://www.weathercentral.tv
>>
>>
>> -----Original Message-----
>> From: John Halley Gotway [mailto:johnhg at rap.ucar.edu]
>> Sent: Wednesday, September 09, 2009 9:13 PM
>> To: Holly Hassenzahl
>> Cc: met_help at ucar.edu
>> Subject: RE: NetCDF format
>>
>> Holly,
>>
>> I'm not familiar with "P&G".  What is that?  The projections currently
>> implemented in MET are lat/lon (i.e. Plate Carree), lambert conformal,
>> mercator, and polar stereographic.  Would one of those work for you
>> guys?
>>
>> John
>>
>>> Thanks, John.  I really appreciate your feedback.  We will work on
>>> reformatting the file tomorrow.
>>>
>>> The projection we are working with is P&G.  One of my colleagues said
>> he
>>> could try to remap it to Lambert Conformal, but that it would be
>> easier
>>> to remap it to a pseudo-mercator grid.  Does MET support
>>> pseudo-mercator?  And if so, what are the global variables that we
>> would
>>> need to specify for that projection?
>>>
>>> Thanks,
>>> Holly
>>>
>>> ___________________________________
>>> Holly C. Hassenzahl
>>> Meteorologist, Science Analyst
>>> Data Products Group
>>>
>>> Weather Central, Inc.
>>> 401 Charmany Drive Suite 200
>>> Madison, WI 53711
>>> +1.608.274.5789
>>> +1.608.276.4600
>>> http://www.weathercentral.tv
>>>
>>>
>>> -----Original Message-----
>>> From: John Halley Gotway [mailto:johnhg at rap.ucar.edu]
>>> Sent: Wednesday, September 09, 2009 3:40 PM
>>> To: Holly Hassenzahl
>>> Cc: met_help at ucar.edu
>>> Subject: Re: NetCDF format
>>>
>>> Holly,
>>>
>>> Sure thing.  Take a look in the directory METv2.0/out/pcp_combine for
>>> the
>>> output of the PCP-Combine tool.  These were generated in by the MET
>> test
>>> scripts.  The NetCDF output from PCP-Combine is the format you should
>>> copy.
>>>
>>> The NetCDF format in METv2.0 is rather narrowly defined and wasn't
>>> originally intended for this sort of use.  We're working to provide
>> more
>>> general support for NetCDF in the next release.
>>>
>>> But as long as you make it look like the output of PCP-Combine, you
>>> should
>>> be fine.  Here are a few pointers:
>>>
>>> - Be sure to name the NetCDF data variables using the GRIB code
>>> abbreviations listed in this table:
>>> http://www.nco.ncep.noaa.gov/pmb/docs/on388/table2.html
>>>    - Any spaces in the abbreviation in that table should be removed
> in
>>> the
>>> variable name.
>>>    - For accumulation intervals, append the number of accumulation
>> hours
>>> "_NN" to the variable name.  For example, 3-hours accumulated precip
>>> would be APCP_03.
>>>
>>> - Be sure to define all the variable attributes you see in the output
>> of
>>> PCP-Combine.  The "_ut" means unix time, the number of seconds since
>> Jan
>>> 1
>>> 1970.  FYI, the command "date +%s" will give you the current unix
>> time.
>>> - Lastly, you need to define a bunch of global attributes that define
>>> the
>>> grid on which the data resides.  The PCP-Combine output gives an
>> example
>>> of data on a Lambert Conformal grid.  If your data is on a different
>>> projection, you could email me for help.  Or you could find a Grib
>> file
>>> that uses that type of projection, run it though PCP-Combine, and
> then
>>> look at the global attributes to see how they're defined.
>>>
>>> As I mentioned, we realize these conventions are overly restrictive.
>>> We're working to make it a lot easier to use NetCDF CF-convention
> data
>>> in
>>> future releases of MET.
>>>
>>> Thanks,
>>> John
>>>> Hello John-
>>>>
>>>>
>>>>
>>>> I hope this email finds you well.  We are hoping to convert one of
>> our
>>>> in-house models into NetCDF format so it can be read by Point Stat
> in
>>>> MET.  Our first attempt gave us the following error:  "NetCDF:
>>>> Attribute not found."
>>>>
>>>>
>>>>
>>>> Is there a sample NetCDF file you could send me so we have something
>>> to
>>>> go off of?  Or a list of attributes/variables that must be defined
> in
>>>> the files in order to be read by MET?
>>>>
>>>>
>>>>
>>>> Thank you!
>>>>
>>>> Holly
>>>>
>>>>
>>>>
>>>> ___________________________________
>>>>
>>>> Holly C. Hassenzahl
>>>>
>>>> Meteorologist, Science Analyst
>>>>
>>>> Data Products Group
>>>>
>>>>
>>>>
>>>> Weather Central, Inc.
>>>>
>>>> 401 Charmany Drive Suite 200
>>>>
>>>> Madison, WI 53711
>>>>
>>>> +1.608.274.5789
>>>>
>>>> +1.608.276.4600
>>>>
>>>> http://www.weathercentral.tv
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>


More information about the Met_help mailing list