Skip to content

grib2io v0.9.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@eengl eengl released this 07 Feb 20:09
· 578 commits to master since this release
b2c2fb0

grib2io Version 0.9.0 Release Notes

This is a minor pre-release. Alot of the code amd documentation has been cleaned up. At this release, the Python package classifier Development Status has been bumped to level 4 - Beta.

New Features:

  • Added ability to write a GRIB2 Local Use Section (Section 2) to new Grib2Message objects using new Grib2Message method, addlocal(). The GRIB2 Local Use Section can contain anything you wish to put into the GRIB2 Message. (#9)

  • All Grib2Message class attributes that originate from a GRIB2 metadata and link to a GRIB2 code table are now a Grib2Metadata object. This gives users the choice to work with metadata as the coded value (Grib2Metadata.value) or the definition (Grib2Metadata.definition).

  • Added ability to select GRIB2 messages from grib2io.open file object via the shortName

import grib2io
g = grib2io.open('test.grib2')
msgs = g['APCP'] # Returns all GRIB2 message with shortName = 'APCP'

Class Updates:

grib2io.Grib2Message

  • new method, to_bytes(), that returns the GRIB2 Message as a bytes object.

  • new method, addlocal(), to add a Local Use Section (Section 2) to the new Grib2Message object. In order for this to work, a few function, grib2_addlocal() in g2clib.pyx was created to interface to the g2c function, g2_addlocal().

  • updated __getitem__() to allow for key of type str.

Changes / Updates: