Release Notes
**Class grib2io.open():**
- New `select()` method for selection/filtering of GRIB2 Messages. Currently supported keyword arguments are: `‘duration’`, `‘leadTime’`, `‘level’`, `'refDate'`, and `‘shortName’`. These arguments only accept single values at this time. Please see documentation for usage of these keyword arguments. The `level` keyword, only supports the following surfaces: isobaric surface, height above/below ground, and sigma are supported at this time. A future update will allow for multiple values per keyword. The following example will select GRIB2 Messages that are Geopotential Height at the 500mb level, with a lead time of 24-hours.
python
>>> import grib2io
>>> g = grib2io.open("test.grib2")
>>> msgs = g.select(shortName="HGT",level="500mb",leadTime=24)
- New `_find_level()` “private” method to parse the user provided level= kwarg in the select() method. The value is parsed and searched for.
- New class attribute, `‘shortNames’`, containing a tuple of unique shortName strings contained in the GRIB2 file.
**Class grib2io.Grib2Message():**
- New `latlons()` method that will return latitude and longitude values of the `grib2io.Grib2Message` instance. An alias for this method named `grid()` is also available.
- Fixed an issue where the incorrect lead time would be set for GRIB2 message using Product Definition Templates 4.8,9,10,11,12. There are time interval messages (i.e. Accumulated Precipitation; "APCP").
**Sub-module grib2io.utils:**
- New `getleadtime()` function to compute the lead time given GRIB2 Indentification Section (1), Product Definition Template (section 4) and Number. For time interval messages, the lead time value returned here is the ending hour.
- New `getduration()` function to compute the duration time given GRIB2 Product Definition Template (Section 4) and Number. GRIB2 Messages describing data at an instance in time have a duration = 0.
**Miscellaneous:**
- Added directory `make_grib2_tables/` at the repository root that contains shell and Python scripts to scrape the NCEP GRIB2 HTML tables and generate Python dictionary-based tables. **IMPORTANT:** The Python scripts use Pandas for HTML reading and processing, but Pandas is *_not_* required for `grib2io`. Releases of `grib2io` will contain the latest version of the tables at the time of release. The ability to update tables is provided here.
- Documentation generation has been changed to use [pdoc](https://pdoc.dev).
- Applied a temporary patch in grib2.h in the bundled NCEP g2c library. The patch adds function definitions for g2_unpack* functions. This allow for successful build using Apple's LLVM clang.