Re: [netcdf-java] Missing GRIB parameters in NetCDF?

  • To: Tor Christian Bekkvik <torc@xxxxxx>
  • Subject: Re: [netcdf-java] Missing GRIB parameters in NetCDF?
  • From: Robb Kambic <rkambic@xxxxxxxxxxxxxxxx>
  • Date: Mon, 24 Aug 2009 15:49:29 -0600 (MDT)
On Thu, 20 Aug 2009, Robb Kambic wrote:

On Thu, 20 Aug 2009, Tor Christian Bekkvik wrote:


Hi,
I am using NetCDF to read GRIB/GRIB2 files. Almost everything works fine, but some GRIB parameters seems to be unavailable via the NetCDF API. I this case,
I could not find
       "RESOLUTION AND COMPONENT FLAGS (GDS OCTET 17)" from the GRIB file.
, at least not in the NetCDF attributes..

(Details: This GDS parameter from the GRIB file tells how to interpret
direction from combined U- and V- components. (In my case, current vectors from
weather data)
Text from GRIB standards documentation:

      TABLE 7 - RESOLUTION AND COMPONENT FLAGS (GDS OCTET 17):
      Bit 5:
      0     u- and v-components of vector quantities resolved relative
              to easterly and northerly directions

      1     u and v components of vector quantities resolved relative
              to the defined grid in the direction of increasing x and y
              (or i and j) coordinates respectively

)

 

- How could we get this GRIB parameter ?




Tor,

The information is available in the CDM stack, ie

GridIndex index;

List<GridDefRecord> hcsList = index.getHorizCoordSys();
for (GridDefRecord gds : hcsList) {
  String windflag = gds.getParam(GridDefRecord.WIND_FLAG)
}


In my first response it was a mistake to move the discussion from the netCDF-Java library to the lower level GRIB library without an explanation. The purpose was to show you the code snipet of how the value was obtained. Hopefully I didn't confuse you.


Robb...



 

Thanks,

Tor Chr Bekkvik

 

 

 




===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III Univ. Corp for Atmospheric Research
rkambic@xxxxxxxxxxxxxxxx                   WWW: http://www.unidata.ucar.edu/
===============================================================================

===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
rkambic@xxxxxxxxxxxxxxxx                   WWW: http://www.unidata.ucar.edu/
===============================================================================
  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: