Installation¶
If you would like to subscribe to the low-volume, OpenClimateGIS mailing list, please fill out the OpenClimateGIS Download Form. Filling out the form also helps us collect useful usage statistics.
Anaconda Package¶
An Anaconda package is available through conda-forge.
Using the Package Manager¶
Installation with optional dependencies:
conda install -c conda-forge ocgis esmpy mpi4py cf_units rtree nose mock
Installation without optional dependencies:
conda install -c conda-forge ocgis
Alternatively, NESII provides linux-64 and osx-64 builds for both OpenClimateGIS, ESMPy, and ICCLIM:
conda install -c nesii -c conda-forge ocgis esmpy icclim
Using an Environment File¶
An Anaconda environment file installing all OpenClimateGIS dependencies is available in the repository root.
cd <OpenClimateGIS source directory>
conda env create -f environment.yml
Building from Source¶
- Download the current release using the OpenClimateGIS Download Form.
- Extract the file using your favorite extraction utility.
- Navigate into extracted directory.
- Run the command:
[sudo] python setup.py install
Testing the Installation¶
It is recommended that a simple suite of tests are run to verify the new installation. Testing requires the Python nose
library (https://nose.readthedocs.io/en/latest/) and mock
(included by default with Python 3+):
[sudo] pip install nose mock
# OR
conda install nose mock
Run tests:
python -c "from ocgis.test import run_simple; run_simple(verbose=False)"
Optional dependencies may also be tested. If an optional dependency is not installed, a test failure will occur:
python -c "from ocgis.test import run_simple; run_simple(attrs=['simple', 'optional'], verbose=False)"
Tests may also be ran with a setup command:
python setup.py test
Please report any errors on the software’s GitHub issue tracker.
Configuring the GeomCabinet
¶
Set the path to the directory containing the shapefiles or shapefile folders using env.DIR_GEOMCABINET. You may also set the system environment variable OCGIS_DIR_GEOMCABINET
.
Supported Python Versions¶
Python versions 2.7, 3.6, and 3.7 are tested and supported. Versions 2.7 or 3.7 are recommended. Python 3.5 demonstrates undefined behavior with parallel operations using mpi4py
.
Dependencies¶
OpenClimateGIS is tested against the library versions listed below.
Required¶
Package Name | Version | URL |
---|---|---|
numpy |
1.15.0 | http://www.numpy.org/ |
netCDF4 |
1.4.2 | http://unidata.github.io/netcdf4-python/ |
gdal |
2.3.2 | https://pypi.python.org/pypi/GDAL/ |
pyproj |
1.9.5.1 | https://github.com/jswhit/pyproj |
shapely |
1.6.4 | https://pypi.python.org/pypi/Shapely |
fiona |
1.8.0 | https://pypi.python.org/pypi/Fiona |
six |
1.11.0 | https://pypi.python.org/pypi/six |
setuptools |
40.5.0 | https://pypi.python.org/pypi/setuptools |
Optional¶
Optional dependencies are listed below. OpenClimateGIS will still operate without these libraries installed but functionality and performance may change.
Package Name | Version | URL | Usage |
---|---|---|---|
ESMF |
7.1.0r | https://www.earthsystemcog.org/projects/esmpy/releases | Supports regridding operations. |
mpi4py |
3.0.0 | http://mpi4py.readthedocs.io/en/stable/ | Required for parallel execution. |
rtree |
0.8.3 | https://pypi.python.org/pypi/Rtree/ | Constructs spatial indexes at runtime. Useful for complicated GIS operations (i.e. large or complex polygons for subsetting) |
cf_units |
2.0.2 | https://github.com/SciTools/cf_units | Allows unit transformations. |
icclim |
4.2.10 | http://icclim.readthedocs.io/en/latest/ | Calculation of the full suite of European Climate Assessment (ECA) indices with optimized code implementation. |
nose |
1.3.7 | https://nose.readthedocs.io/en/latest/ | Run unit tests. |
mock |
2.0.0 | https://pypi.python.org/pypi/mock/ | Run unit tests. |
Building from Source¶
Dependencies may be built entirely from source. An (outdated) bash script is available on GitHub.
Uninstalling¶
The uninstall
command will simply provide you with the directory location of the OpenClimateGIS package. This must be manually removed.
python setup.py uninstall