spidru / JGribX

Java GRIB-1/GRIB-2 decoder
MIT License
34 stars 14 forks source link

Support NOMADS, NOAA, NWS Grid Template Lambert Conformal (Can be Secant, Tangent, Conical, or Bipolar) #10

Open randycasburn opened 4 years ago

randycasburn commented 4 years ago

Lambert Conformal (Can be Secant, Tangent, Conical, or Bipolar) is the now the U.S. National standard. It would be quite helpful to be able to decode that grid template.

https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-30.shtml

Are there any plans to support this format?

spidru commented 4 years ago

I've just checked the NOAA NCEP website: https://www.nco.ncep.noaa.gov/pmb/products/gfs/#GFS

It seems that Latitute-Longitude grid is still listed as the first option. I do see Lambert Conformal listed further below, but it seems to me that Latitude-Longitude grid is still the default option. Could you indicate where it is stated that Lambert Conformal is the US national standard?

randycasburn commented 4 years ago

I provided the incorrect link for your reference. The link included here is the specification for the GRIB2 design used by the NWS. It specifies the precise format for the file structure.

GRIB2 Encoding Details for the National Weather Service Digital Forecast Database

Also repeated here:

NDFD GRIB ALL SECTIONS

Scroll down to Section 3--Grid Definition Section. The first table after the description specifies Lambert Conformal for CONUS and SUB CONUS grids. It shows template 30 as the value in that location.

Additionally, the NWS NOMADS data system is the source of these GRIB2 files. Each file I downloaded and ran through your program reported Unsupported template type: 30.

The following link takes you to one of NOMADS GRIB filter pages. This one is for HRRR hourly CONUS. create the smallest GRIB you like and the tool (and every other filter tool in NOMADS) will produce Lambert Conformant (30) for CONUS models.

NOMADS HRRR GRIB2 Filter

I hope all of this is helpful and thanks for your quick reply.

spidru commented 4 years ago

As you point out, JGribX will indeed throw NotSupported exceptions when trying to read GRIB files with CONUS grids. At the moment, only Latitude/Longitude grids are supported.

From the last link you sent, it does seem that the HRRR only uses CONUS models. Are you restricted to the use of regional models such as HRRR rather than global models such as GFS?

I can look into adding support for Lambert Conformal models, but this would probably take a while.

randycasburn commented 4 years ago

All of the GFS models from that same source are all Lambert too. I've checked several and came up with the same result. Client uses ECCodes at the moment. But, only needs surface PRATE, location and time. Was looking to move them to a more streamlined (and customizability) approach.

Thanks again for your time. I won't ask you to change your roadmap to support Lambert. But if you choose to...:-)

spidru commented 4 years ago

I'll see if I can find some time to look into supporting Lambert Conformal models. I don't really have a roadmap for this project, it's mostly depending on issues raised by users :)

In the meantime, here's an example of where I had found GFS GRIB files that use the Latitude-Longitude model here.

Will keep you posted on progress on Lambert Conformal!