version 2.1.7 release
=====================
* update to support Cython 3.1.
* build 3.14 and aarch64 wheels, drop support for python < 3.10.

version 2.1.6 release
=====================
* switch dynamic version handling from pkg_resources (in setuptools) to packaging
* expose 'redtoreg' function for interpolating reduced to full gaussian
  gridded fields, optimize function for 50x speedup.
* Fix for issue #235 (`latlons` doesn't work when only a single latitude in grid).
* Fix for issue #241 (forecast time units in inventory wrong for 15 minute HRRR data).
* Add `len` method to open instance (issue #239).
* Numpy 2 compatibility (issue #251).
* Fix failing doctest for eccodes >= 2.34.1 (issue #245).
* use eccodes.h instead of grib_api.h, add `eccodes_version` module variable.

version 2.1.5 release
=====================
* remove python 3.6 support, add python 3.11,3.12
* add __dir__ method so dir(grb) returns grib keys.
* allow pygrib.open to open a path specified by a PathLike object
* fix compilation issues on macos x
* allow pygrib.open to take an io.BufferedReader object as an argument
  (issue #83, PR #206)
* ensure that RuntimeError contains a message of type `str` (PR #212)
* fix an issue that the 3rd bit of scanning mode does not affect processing (PR #213)

version 2.1.4 (git tag v2.1.4rel)
================================
* move conftest.py to test dir (so tests can be run from there)
* add check-manifest test to github actions workflow.
* update some cartopy test scripts to remove deprecation warnings.
* move package under 'src' dir so import pygrib works in install dir.
* add windows and macos x tests.
* make sure gribmessage.__repr__ doesn't fail is shapeOfTheEarth parameter
  is missing (issue #177).
* move private eccodes dir inside 'share', so `import eccodes` doesn't import an empty package.

version 2.1.3 (git tag v2.1.3rel)
================================
* fix pygrib.get_definitions_path() so it works if set_definitions_path has not been called.
* add conftest.py to MANIFEST.in (issue #171)

version 2.1.2 (git tag v2.1.2rel)
================================
* use pytest-mpl for image comparison tests.
* change license to MIT.
* changes gribmessage.projparams['proj'] from 'cyl' to 'longlat'
  for non-projection projections (e.g. 'regular_ll'). Issue #167.
* reorganize to include eccodes definitions inside package 
  when wheels are build (PYGRIB_WHEEL env var is set).
  Add set_definitions_path/get_defintions_path module functions
  to get/reset ECCODES_DEFINITION_PATH.
* include binary wheels for linux in pypi release.
* add grid template definition for RAP grib files in binary wheels (issue #134).
  Not fully implemented, but at least file can be read (gridType=unknown, latlons 
  method doesn't yet work)..

version 2.1.1 (git tag v2.1.1rel)
=================================
* clean up docs.
* migrate examples in 'test' directory from basemap to cartopy.
* enable github actions for CI (PR #159).

version 2.1 (git tag v2.1rel)
============================
* split ncepgrib2 module into a separate project
 (https://github.com/jswhit/ncepgrib2). pygrib now only uses
  eccodes. Docs converted to sphinx.

version 2.0.6 (git tag v2.0.6rel)
=================================
* restore python 2 compatability.
* distinguish between run and build time dependenices in setup.py (PR #112).
* Fix problem printing grib messages with NLDAS grib files (PR #141).

version 2.0.5 (git tag v2.0.5rel)
==================================
* fix error in latlons method for lambert projection and polar stereo when 
  jScansPositively == 0 (PR #129).
* Add README.md as long description for pypi (PR #130).

version 2.0.4 (git tag v2.0.4rel)
================================
* fix error in gaussian latitudes (issue #102)
* fix MemoryError when computing rotated lat/lons (issue #99)

version 2.0.3 (git tag v2.0.3rel)
=================================
* default lib name switched from grib_api to eccodes (can still
modify in setup.cfg).
* fix for latlons method for mercator domains that cross Greenwich 
(issue #67).

version 2.0.2 (git tag v2.0.2rel)
================================
* add .travis.yml for automatically running test.py using travis CI.
* make sure ftime cannot be None (to avoid crash in grib_list).
* update g2clib_src to version 1.6.0 from NCEP.
* use forecastTime if available to define validDate - otherwise
  fall back on end of stepRange (issue #40).
* comment out reference to private jasper variable (inmem_) in 
  g2clib_src/enc_jpeg2000.c (no longer available in latest version of
  Jasper lib)

version 2.0.1 (git tag v2.0.1rel)
================================
* Fix for test failure on python 3.5 (issue #24).
* improvements to setup.py, including making it more windows-friendly.
  Added windows support in setup.cfg, should now be possible to build on 
  windows if grib_api is built with MSVS (see
  https://software.ecmwf.int/wiki/pages/viewpage.action?pageId=48109524). 
  Pull request #18.
* make has_key gribmessage method more robust (it was returning False in
  cases when a key actually did exist - issue #9).

version 2.0.0 (git tag v2.0.0rel)
=================================
* migrate to Github (https://github.com/jswhit/pygrib).
* make sure is_missing(key) method of grib message doesn't fail when
  key is analDate or validDate.
* fix grib_list so it handles analDate and validDate keys properly.
* update ncep g2clib to version 1.5.0.
* change download_url in setup.py to point to pypi instead of googlecode.
* silence warnings ("Non-trivial type declarators in shared declaration (e.g.
  mix of pointers and values). Each pointer declaration should be on its own
  line") with Cython 0.2.

version 1.9.9 (svn tag v1.9.9rel)
================================
* analDate and validDate are now searchable with pygrib.open.select.
* expand_grid(False) now suppresses expansion of lats, lons returned from
  latlons method, as well as data (issue 84)..

version 1.9.8 (svn tag v1.9.8rel)
=================================
* to be consistent with what the grib_api lib does, don't flip data grids
  when jScansPositively=0 or iScansNegatively=1 (issue 77).
* fix segfaulting in ncepgrib2.py when interpolating from reduced to regular
  grids.
* raise exception in redtoreg.pyx if number of points on reduced grid
  does not equal number of data values (to prevent segfault).
* add -m option to grib_list (same as -s, but also print min/max of data).
* add 'tolerate_badgrib' module variable. When set to True (default False)
  execptions won't be raised when grib files are encountered with missing or
  malformed keys. Toggle with tolerate_badgrib_on() and
  tolerate_badgrib_off().
* add man pages (thanks to Jos De Klos and Alastair McKinstry). Modify
  setup.py to install man pages in MAN_DIR/man1 (MAN_DIR is an environment
  variable, or can be set in setup.cfg).
* fix for issue 80 (remove mention of --packing_scheme from 
  grib_repack help message).

version 1.9.7 (svn revision 660)
================================
* add 'data' method for gribmessage that returns data, lats and lons
  for a subset region (defined by bounding lat and lon values).
* fix for GRIB1 mercator data (issue 72).
* added 'expand_grid' method to gribmessage - toggles expansion of
  reduced grids to regular grids.  Expansion is on by default, to turn
  off use grb.expand_grid(False).
* added runtime_library_dirs to Extension in setup.py (so correct library
  path is built in when linking shared libs).

version 1.9.6 (svn revision 642)
================================
* fixed print statement in setup.py and regenerated C interfaces with
  new version of Cython to fix python 3.3 errors.
* print warning when trying to create an index from a file with
  multi-field messages.  This is because keys inside multi-field messages
  will not be indexed correctly by the grib_api library
  (https://software.ecmwf.int/issues/browse/SUP-275). Partially addresses
  issue 61.

version 1.9.5 (svn revision 631)
================================
* avoid crashing when julianDay is miscoded (by just not setting analDate,
  validDate keys).
* update g2clib source to version 1.4.0.
* fix compilation issue when jpeg/openjpeg or png not needed (issue 59).
* add __dealloc__ method that closes file handles when no more 
  references exist to the object.
* fix radius of the earth definition of WGS84 ellipsoid, use 'radius' key
  to set earth radius if available (issue 58).
* change behaviour of select method (for index and open objects)
  so that an error is raised if there are no matches. 
  This avoids a segfault that happens if the select method is
  called for an index created from an empty file.

version 1.9.4 (svn revision 610)
================================
* Added 'write' method to index, so grib index can be saved.
  Saved grid index can be re-loaded using pygrib.index(filename)
  (if no keys are specified, then filename is assumed to represent
  a saved index instead of grib file).
* added MacPorts portfile (so it can be installed via MacPorts
  on macosx using a "local Portfile repository").
* assume forecastTime=0 if missing when computing analDate, verifDate keys.
* reset iterator in rewind method (fixes issue 54).

version 1.9.3 (svn revision 583)
================================ 
* workaround for bug in grib_api 1.9.16 (distinctLongitudes are
  wrong when longitudeOfLastGridPoint < 0).
* exposed setdates function, which can be used to update analDate and
  validDate keys when forecastTime and/or julianDay keys are changes.
* added "reload" function to update all keys in gribmessage instance
  to be consistent with modified keys.
* update test.py so tests pass with grib_api 1.9.16.
* update NCEP grib lib (g2clib) to version 1.2.3.
* ncepgrib2.Grib2Encode.addfield now accepts masked arrays
  (the bitmap is automatically created from the mask). bitmapflag and 
  bitmap keywords removed. scan order is now automatically taken care of.

version 1.9.2 (svn revision 544)
================================
* python 3 fix for ncepgrib2.
* change behavior of open.select, so that it always searches
  from beginning of file (not from where iterator is currently
  positioned).
* fix calculation of longitudes for gridType='regular_ll', when
  longitudeOfLastGridPoint < longitudeOfFirstGridPoint.  For 
  example, for ECMWF grids sometimes longitudeOfFirstGridPoint = 0
  and longitudeOfLastGridPoint = -0.5.  In such cases, 
  longitudeOfLastGridPoint should be treated as 359.5 (issue 39)

version 1.9.1 (svn revision 527)
================================
* validDate now correctly defined if forecast time units
  is minutes or days, not just hours. If forecast time is 
  a range, validDate corresponds to the end of the range.
  fcstimeunits gribmessage instance variable added.
* fix bug for reg lat/lon and gaussian grids introduced in 1.9.0.
* add type of forecast interval (max,accum,avg) to gribmessage.__repr__
* add forecast time units in gribmessage.__repr__
* fix bug in ncepgrib2 (issue 38)

version 1.9.0 (svn revision 511)
================================
* use numpy.ma.isMA instead of hasattr(arr,'mask').
* include ncep grib2 lib and python interface (ncepgrib2 module).  This
  is used by pygrib to decode grib messages with packingType='grid_complex'
  and 'grid_complex_spatial_differencing' since grib_api does not decode
  these messages correctly.  ncepgrib2.Grib2Encode also provides a way to
  create grib2 messages from scratch.
* grb.__repr__ returns parameterName and parameterUnits, if name and units
  keys don't exist (issue 36).
* regenerate with Cython 0.15.1, fix a couple of latent bugs found by new Cython
  compiler.

version 1.8.4 - svn revision 478
================================
* make sure _set_projparams is called by fromstring (issue 33).
* add __enter__ and __exit__ methods so you can do "with pygrib.open(filename) as f:"
* set projparams instance variable when grib message is created, instead of
  when latlons method called (issue 27).

version 1.8.3 - svn revision 442
================================
* repacked example grib files to prevent tests from failing.  Test failures
  ocurred for grib messages using second-order complex
  packing, due to a bug introduced in the grib_api library in version 1.9.8.

version 1.8.2 - svn revision 434
================================
* Python 3 support. 
* changed name of grib1to2 and grib2to1 to cnvgrib1to2 and cnvgrib2to1
  to avoild conflict with scripts installed by grib_api-1.9.5 (fixes
  issue 22).
* added utils grib1to2 and grib2to1 to MANIFEST (they were not included in
  1.8.1).
* fix open.seek so it works for negative offsets when from_what=1.
* grib_api_version module var changed from int to string (10905 --> '1.9.5').

version 1.8.1 - svn revision 393
================================
* in grib_api 1.9.5, grib_count_in_file does not count
  individual messages inside multi-part messages (as it did in previous
  versions).  So, instead of calling that routine pygrib now counts them
  internally.
* open.select now puts iterator back in original position.
* fix bug in open.message (message(N) was advancing N messages, not
  going to message number N).
* use julian_to_datetime to automatically create gribmessage analDate
  and validDate attributes.
* added julian_to_datetime and datetime_to_julian functions.
* added "fromstring" function (reverse of gribmessage.tostring).
* regenerated C source with Cython 0.14.1
* print grib api version after running tests with test.py.
* readline() returns None if EOF encountered (instead of raising an exception).
* added grib1to2 and grib2to1 utilites.

version 1.8.0 - svn revision 377
================================
* make pygrib.open objects behave more like regular python file objects.
  Added seek,tell,read,readline methods.  'filename' attribute changed to
  'name', 'closed' attribute added.
* slicing the iterator using __getitem__ does not change position of
  iterator.
* force 'paramId' to be a scalar integer, not an integer array.
* arrays initialized to zero (use np.zeros instead of np.empty).  Now
  values returned in "paramId" are repeatable, don't contain random garbage
  in undefined elements.
* now verified to work with Python 2.4.

version 1.7.2 - svn revision 303
================================
* select method of open instance can now use functions to 
  filter keys based on conditional expressions. For example,
  sel_grbs = grbs.select(shortName='gh',level=lambda l: l < 500 and l > 300)
  returns geoptential height levels between 500 and 300.
* fix a couple of instances where PyString_AsString was used
  incorrectly, replaced with PyString_FromString. Exposed by
  cython 0.13 beta, but should have no user-visible effects.
* valid_key method added, tests to see if message has a key,
  it's value is not missing and can be read.  Now used in 
  gribmessage.__repr__, so it should never fail on a bad key.
* added new tpc tropical storm wind probability example.
* add more ensemble info, probability info to gribmessage.__repr__.
* gribmessage __repr__ provides more useful level information (including
  units).

version 1.7.1 - svn revision 263
================================
* try to import pyproj, and if that fails try to import pyproj
  from mpl_toolkits.basemap.
* reduced verbosity of grib_list.
* made grib_list more robust (prints "NOT FOUND" when there is an error
  reading the value for a key).
* allow for specifying header and library directories separately
  (e.g. GRIBAPI_INCDIR and GRIBAPI_LIBDIR env vars, instead of just
  GRIBAPI_DIR)
* fix setup.py to reference zlib as "-lz", not "-lzlib" (issue 9).

version 1.7 - svn revision 251
==============================
* added is_missing grib message method (to check if the value associated
  with a key is set to the grib missing value constant).
* grib_api_version module variable contains version info for grib_api lib.
* added *_LIBDIR and *_INCDIR env vars to setup.py for more flexible
  specification of library and include dir locations.
* fix bugs in handling of scale factor for radius of the earth.
* some grids use the key "projectionCentreFlag",
  while some use "projectionCenterFlag". Account for 
  both possibilities (added to test_stere.py).
* missingvalue_int and missingvalue_float are now module variables
  (not instance variables).
* raise error if no keys are specified when creating index instance.

version 1.6.1 - svn revision 227
================================
* only print ensemble info in __repr__ (which is called when 'print grb' is
  done) when both both 'perturbationNumber' and 'typeOfEnsembleForecast' keys are
  present. Fixes error on 'print grb' for ERA-interim grib files.

version 1.6 - svn revision 223
==============================
* raise IOError when grib message number < 1 is accessed with message method
  (instead of segfaulting, which is rude).  Fixes issue 4.
* indexing open instance (iterator) with an integer key now is the same as
  calling the message method (grbs.message(2) == grbs[2]).
* slicing iterator now also works (grbs[::2] returns every other grib message
  in a list).
* added 'select' method to open instance for selecting grib messages based
  on key/value pairs.
* added 'index' class which can be used for fast subsettting of grib files 
  based on specified key/value pairs (a faster alternative to 'select' method
  of open instance).
* fixes for grib_api version 1.9.0 (the names of some keys changed).

version 1.5 - svn revsion 187
=============================
* fix bug in latlons method for space_view grids not centered
  on the equator at Greenwich.
* compatibility fixes for version 1.8.0.1 of grib_api definitions
  (the names of several keys changed from version 1.8.0).
* use __cinit__ to initialize C level objects, __init__ for
  python level objects (instead of doing everything in __new__).

version 1.4 - svn revision 172
==============================
* allow gribmessage keys to be set or accessed like attributes.
* added __dealloc__ method to gribmessage to allow for garbage collection.
  Prevents out of memory errors when iterating over large numbers of grib
  messages.

version 1.3 - svn revision 153
==============================
* make sure gribmessage instances are created from clones
  of grib handle, so information is retained when state of parent
  grib iterator is modified.

version 1.2 - svn revision 152
==============================
* fix issue 2 - segault when iterating over certain grib files 
  (those at ftp://ftp.ssec.wisc.edu/pub/eosdb/dbcras, for example).

version 1.1 - svn revision 147
==============================
* fix segfault that occured when iterator hit end of file and grib message was
  accessed.
* fix __repr__ so level information is correctly printed for GRIB1 files.
* fix setup.py to find openjpeg and jasper headers on Ubuntu.
* use doctest in test.py.

version 1.0 - svn revision 124
==============================
* fix formatting of analysis time in gribmessage __repr__.
* add command line utilites grib_list and grib_repack.
* added support for rotated lat/lon and gaussian grids in latlons().

version 1.0b1 - svn revision 91
===============================
* basic write support through __setitem__ (to modify an existing grib
  message) and tostring (to get the encoded binary string that can
  be written to a file).  This allows modifications to an existing grib
  message, but not the creation of a new grib message from scratch.

version 1.0a1 - svn revision 55
===============================
* initial release.  Support for reading GRIB1 and GRIB2 is nearly complete.
  No support for writing yet.
