diff --git a/.travis.yml b/.travis.yml
index 4736a62e..4912106b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,35 +1,44 @@
language: python
-dist: bionic
+dist: focal
+sudo: false
arch:
- amd64
- ppc64le
-sudo: false
addons:
apt:
packages:
- - libgrib-api-dev
+ - libproj-dev
+ - proj-bin
+ - libeccodes-dev
env:
global:
- - DEPENDS="numpy pyproj"
-
-python:
- - "3.5"
- - "3.6"
- - "3.8"
+ - DEPENDS="numpy pyproj<3.0.0"
+ - PROJ_DIR=/usr
+ - PROJ_LIB=/usr/share/proj
+
+matrix:
+ fast_finish: true
+ include:
+ - name: "python-2.7"
+ env: PY=2.7
+ - name: "python-3.7"
+ env: PY=3.7
+ - name: "python-3.8"
+ env: PY=3.8
+ - name: "python-3.9"
+ env: PY=3.9
notifications:
email: false
before_install:
- - pip install pyproj==1.9.6
- - sudo apt-get install libeccodes-dev
+ - pip install --upgrade pip
- pip install $DEPENDS
install:
- - python setup.py build
- python setup.py install
script:
diff --git a/Changelog b/Changelog
index 592c0af4..43bc0aca 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,6 @@
-since version 2.0.5
-===================
+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).
diff --git a/MANIFEST.in b/MANIFEST.in
index bfbc07dc..7ea38026 100755
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -11,10 +11,8 @@ include setup.cfg.template
include setup.py
include test.py
include README.md
-include README.macosx
include utils/*grib*
recursive-include docs *
-recursive-include ports *
recursive-include ncepgrib2_docs *
include sampledata/*.grb
include sampledata/*.grb2
diff --git a/README.macosx b/README.macosx
deleted file mode 100644
index a2ab2958..00000000
--- a/README.macosx
+++ /dev/null
@@ -1,21 +0,0 @@
-pygrib is now available in macports (py-pygrib package), so the
-instructions below are obsolete (unless you want to keep up to date with the
-latest pygrib and let macports manage the installation).
-
---------------------
-
-Although pygrib is not yet part of MacPorts (http://www.macports.org), you can use
-the included Portfile to install it using a local Portfile repository. See
-ports/README for more details. Once macports is installed, and your local
-Portfile repo is set up, all you have to do to install pygrib and it's
-dependencies is run "sudo port install py27-pygrib".
-
-This will install pygrib from svn HEAD. To periodically upgrade, just do
- - sudo port uninstall py27-pygrib
- - sudo port install py27-pygrib (this will re-download and rebuild)
-
-google "macports local portfile" for more information on creating a local Portfile
-repository.
-
-pygrib has been submitted to the macports tracker, but has not yet been accepted.
-The ticket is here: https://trac.macports.org/ticket/32192.
diff --git a/README.md b/README.md
index 95f568d7..09dcc17f 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Python module for reading and writing GRIB files (edition 1 and edition 2).
GRIB is the World Meteorological Organization (WMO) standard
file format for the exchange of weather data.
-Provides a interfaces for the ECWMF GRIB_API C library and
+Provides a high-level interfaces for the ECWMF ECCODES C library and
the NCEP grib2 C library, including
command line utilities for listing (grib_list) and repacking (grib_repack)
GRIB files.
@@ -12,15 +12,17 @@ Quickstart:
* Clone the github repository, or download a source release from https://pypi.python.org/pypi/pygrib.
-* Copy setup.cfg.template to setup.cfg, open in text editor, follow instructions in
-comments for editing. If you are using the old grib_api library instead of the new eccodes
-library, be sure to uncomment the last line setup.cfg.
+* install dependencies (eccodes library, numpy, pyproj). On linux, this can
+be done via `pip install numpy pyproj; sudo apt-get install libeccodes-dev`.
-* Run 'python setup.py build'
+* Copy `setup.cfg.template` to `setup.cfg`, open in text editor, follow instructions in
+comments for editing.
-* Run 'python setup.py install' (with sudo if necessary)
+* Run `python setup.py build`
-* Run 'python test.py' to test your pygrib installation.
+* Run `python setup.py install` (with sudo if necessary)
+
+* Run `python test.py` to test your pygrib installation.
For full installation instructions and API documentation, see https://jswhit.github.io/pygrib.
diff --git a/docs/api-objects.txt b/docs/api-objects.txt
index 8346eed3..6d72e250 100644
--- a/docs/api-objects.txt
+++ b/docs/api-objects.txt
@@ -24,7 +24,7 @@ pygrib.datetime_to_julian pygrib-module.html#datetime_to_julian
pygrib.tolerate_badgrib pygrib-module.html#tolerate_badgrib
pygrib.gribmessage pygrib.gribmessage-class.html
pygrib.gribmessage.latlons pygrib.gribmessage-class.html#latlons
-pygrib.gribmessage.__getattribute__ pygrib.gribmessage-class.html#__getattribute__
+pygrib.gribmessage.__reduce__ pygrib.gribmessage-class.html#__reduce__
pygrib.gribmessage.has_key pygrib.gribmessage-class.html#has_key
pygrib.gribmessage._all_keys pygrib.gribmessage-class.html#_all_keys
pygrib.gribmessage.__init__ pygrib.gribmessage-class.html#__init__
@@ -42,7 +42,9 @@ pygrib.gribmessage._get_key pygrib.gribmessage-class.html#_get_key
pygrib.gribmessage._reshape_mask pygrib.gribmessage-class.html#_reshape_mask
pygrib.gribmessage.analDate pygrib.gribmessage-class.html#analDate
pygrib.gribmessage.__getitem__ pygrib.gribmessage-class.html#__getitem__
+pygrib.gribmessage.__setstate__ pygrib.gribmessage-class.html#__setstate__
pygrib.gribmessage.keys pygrib.gribmessage-class.html#keys
+pygrib.gribmessage.__getattribute__ pygrib.gribmessage-class.html#__getattribute__
pygrib.gribmessage.validDate pygrib.gribmessage-class.html#validDate
pygrib.gribmessage.expand_grid pygrib.gribmessage-class.html#expand_grid
pygrib.gribmessage.__setitem__ pygrib.gribmessage-class.html#__setitem__
@@ -56,15 +58,18 @@ pygrib.gribmessage.__repr__ pygrib.gribmessage-class.html#__repr__
pygrib.gribmessage.expand_reduced pygrib.gribmessage-class.html#expand_reduced
pygrib.index pygrib.index-class.html
pygrib.index.__new__ pygrib.index-class.html#__new__
+pygrib.index.__setstate__ pygrib.index-class.html#__setstate__
pygrib.index.keys pygrib.index-class.html#keys
+pygrib.index.__reduce__ pygrib.index-class.html#__reduce__
pygrib.index.write pygrib.index-class.html#write
pygrib.index.select pygrib.index-class.html#select
-pygrib.index.types pygrib.index-class.html#types
+pygrib.index.__init__ pygrib.index-class.html#__init__
pygrib.index.__call__ pygrib.index-class.html#__call__
pygrib.index.close pygrib.index-class.html#close
-pygrib.index.__init__ pygrib.index-class.html#__init__
+pygrib.index.types pygrib.index-class.html#types
pygrib.index.name pygrib.index-class.html#name
pygrib.open pygrib.open-class.html
+pygrib.open.__reduce__ pygrib.open-class.html#__reduce__
pygrib.open.close pygrib.open-class.html#close
pygrib.open.message pygrib.open-class.html#message
pygrib.open.next pygrib.open-class.html#next
@@ -81,6 +86,7 @@ pygrib.open.tell pygrib.open-class.html#tell
pygrib.open._advance pygrib.open-class.html#_advance
pygrib.open.__exit__ pygrib.open-class.html#__exit__
pygrib.open.__getitem__ pygrib.open-class.html#__getitem__
+pygrib.open.__setstate__ pygrib.open-class.html#__setstate__
pygrib.open.read pygrib.open-class.html#read
pygrib.open.__next__ pygrib.open-class.html#__next__
pygrib.open.has_multi_field_msgs pygrib.open-class.html#has_multi_field_msgs
diff --git a/docs/class-tree.html b/docs/class-tree.html
index 70960873..f77a3d34 100644
--- a/docs/class-tree.html
+++ b/docs/class-tree.html
@@ -49,9 +49,6 @@
Class Hierarchy
- - object:
- The most base type
-
-
Class Hierarchy
+
+
+
+
+ |
+
+
+ __setstate__(...) |
+
+
+
|
@@ -390,19 +422,6 @@ Class gribmessage
|
-
-
- Inherited from object :
- __format__ ,
- __hash__ ,
- __reduce__ ,
- __reduce_ex__ ,
- __sizeof__ ,
- __str__ ,
- __subclasshook__
-
- |
-
@@ -466,22 +485,6 @@ Class gribmessage
-
-
-
-
-
-
- Inherited from object :
- __class__
-
- |
-
-
+
+
+
+
+
+
+ __reduce__(...)
+
+ |
+ |
+
+
+
+
+ - Overrides:
+ object.__reduce__
+
- (inherited documentation)
+
+
+ |
+
validDate
-
-Class index
+
+type index
object --+
|
@@ -70,12 +70,12 @@ Class index
href="pygrib.open-class.html#select" class="link">open.select.
Warning: Searching for data within multi-field grib messages
does not work using an index (and is not supported by the GRIB API library). NCEP often puts u and v winds
- together in a single multi-field grib message. You will get incorrect
- results if you try to use an index to find data in these messages. Use
- the slower, but more robust open.select in this case.
+ href="https://confluence.ecmwf.int/display/ECC" target="_top">ECCODES
+ library). NCEP often puts u and v winds together in a single multi-field
+ grib message. You will get incorrect results if you try to use an index
+ to find data in these messages. Use the slower, but more robust open.select in this
+ case.
If no key are given (i.e. *args is empty), it is assumed the filename
represents a previously saved index (created using the
grib_index_build
tool or Class index
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ __setstate__(...) |
+
+
+
|
@@ -220,23 +252,6 @@ Class index
|
-
-
- Inherited from object :
- __delattr__ ,
- __format__ ,
- __getattribute__ ,
- __hash__ ,
- __reduce__ ,
- __reduce_ex__ ,
- __repr__ ,
- __setattr__ ,
- __sizeof__ ,
- __str__ ,
- __subclasshook__
-
- |
-
@@ -279,13 +294,6 @@
Class index
name
-
-
- Inherited from object :
- __class__
-
- |
-
@@ -345,6 +353,29 @@
__new__(
+
+
+
+
+
+
+ __reduce__(...)
+
+ |
+ |
+
+
+
+
+ - Overrides:
+ object.__reduce__
+
- (inherited documentation)
+
+
+ |
+
types
-
-Class open
+
+type open
object --+
|
@@ -217,6 +217,38 @@ Class open
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ __setstate__(...) |
+
+
+
|
@@ -384,23 +416,6 @@ Class open
|
-
-
- Inherited from object :
- __delattr__ ,
- __format__ ,
- __getattribute__ ,
- __hash__ ,
- __reduce__ ,
- __reduce_ex__ ,
- __repr__ ,
- __setattr__ ,
- __sizeof__ ,
- __str__ ,
- __subclasshook__
-
- |
-
@@ -459,13 +474,6 @@
Class open
has_multi_field_msgs
-
-
- Inherited from object :
- __class__
-
- |
-
@@ -524,6 +532,29 @@
__new__(
+
+
+
+
+
+
+ __reduce__(...)
+
+ |
+ |
+
+
+
+
+ - Overrides:
+ object.__reduce__
+
- (inherited documentation)
+
+
+ |
+