Skip to content

Commit

Permalink
FIX: Update the installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 committed Sep 20, 2023
1 parent 858ff2b commit 7c66a69
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 591 deletions.
6 changes: 3 additions & 3 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ without these packages.
* `Basemap <https://matplotlib.org/basemap/>`_ But Cartopy is recommended as
basemap will no longer have support.

* `xarray <https://xarray.pydata.org/en/stable/`_
* `pyproj <https://code.google.com/p/pyproj/`_
* `xarray <https://docs.xarray.dev/en/stable/>`_
* `pyproj <https://github.com/pyproj4/pyproj>`_

* `pytest <https://docs.pytest.org/en/latest/`_
* `pytest <https://docs.pytest.org/en/latest/>`_

Obtaining the latest source
===========================
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://docs.scipy.org/doc/numpy/", None),
"numpy": ("https://numpy.org/doc/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
"matplotlib": ("https://matplotlib.org", None),
"matplotlib": ("https://matplotlib.org/stable", None),
}

# Add myst extensions
Expand Down
4 changes: 3 additions & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ Short Courses
Various short courses on Py-ART and open source radar software have been given
which contain tutorial like materials and additional examples.

* `2023 AMS, Open Source Radar Short Course <https://github.com/openradar/ams-open-radar-2023>`_
* `2022 ERAD, Open Source Radar Short Course <https://github.com/openradar/erad2022>`_
* `2015 AMS, Open Source Radar Short Course <https://github.com/openradar/AMS-Short-Course-on-Open-Source-Radar-Software>`_
* `2015 ARM/ASR Meeting, PyART, the Python ARM Radar Toolkit <https://github.com/ARM-DOE/notebooks/tree/master/ASR_PI_2015>`_
* `2014 ARM/ASM Meeting, Py-ART tutorial <https://github.com/ARM-DOE/notebooks/tree/master/ASR_PI_2014>`_
Expand All @@ -183,7 +185,7 @@ environment based on the `environment.yml <https://github.com/ARM-DOE/pyart/blob

Or for a basic environment and downloading optional dependencies as needed::

conda create -n pyart_env -c conda-forge python=3.8 arm_pyart
conda create -n pyart_env -c conda-forge arm_pyart

Basic command in a terminal or command prompt to install the latest version of
Py-ART::
Expand Down
157 changes: 1 addition & 156 deletions doc/source/userguide/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,156 +1 @@
============
Installation
============

Required Dependencies
=====================

Py-ART requires the following software.

* Python__ 3.6.x, 3.7.x or 3.8x

__ http://www.python.org

* NumPy__

__ http://www.scipy.org

* SciPy__

__ http://www.scipy.org

* matplotlib__

__ http://matplotlib.org/

* netCDF4__

__ https://github.com/Unidata/netcdf4-python


Optional Dependencies
=====================

The following packages are recommended for a fully-functional Py-ART
installation, but the package will install and work with reduced functionality
without these packages.

* `TRMM RSL <https://trmm-fc.gsfc.nasa.gov/trmm_gv/software/rsl/>`_

* `CyLP <https://github.com/mpy/CyLP>`_ or
`PyGLPK <https://tfinley.net/software/pyglpk/>`_ or
`CVXOPT <https://cvxopt.org/>`_ and their dependencies.

* `Cartopy <https://scitools.org.uk/cartopy/docs/latest/>`_ or
* `Basemap <https://matplotlib.org/basemap/>`_ But Cartopy is recommended as
basemap will no longer have support.

* `xarray <https://xarray.pydata.org/en/stable/>`_
* `pyproj <https://code.google.com/p/pyproj/>`_

* `pytest <https://docs.pytest.org/en/latest/>`_

Obtaining the latest source
===========================

The latest source code for Py-ART can be obtained from the GitHub repository,
https://github.com/ARM-DOE/pyart.

The latest source can be checked out using

::

$ git clone https://github.com/ARM-DOE/pyart.git


Installing from Source
======================

The path to the TRMM RSL library must be provided during install. This can
either be done by setting the ``RSL_PATH`` environmentation variable. In bash
this can be done using ``export RSL_PATH=/path/to/rsl/``. If this location is
not specified, some common locations will be searched. Note that the location
provided should be the root TRMM RSL path, under which both a `lib` and
`include` directory are contained, the default location is ``/lib/local/trmm``.
If using CyLP, a path for the coincbc directory is needed. This can be done
using ``export COIN_INSTALL_DIR=/path/to/coincbc/``. When using CyLP, on some
systems, installing the Anaconda compilers is needed. These can be found here:
https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html

After specifying the TRMM RSL path Py-ART can be installed globally using

::

$ python setup.py install

of locally using

::

$ python setup.py install --user

If you prefer to use Py-ART without installing, simply add the this path to
your ``PYTHONPATH`` (directory or with a .pth file) and compile the extension
in-place.

::

$ python setup.py build_ext -i

You can also install Py-ART in development mode by using

::

$ pip install -e .

Frequently asked questions
==========================

* I'm getting a no 'io' module after installing pyart with pip.

There is a pyart on pip that is a different package. Make sure to do::

pip install arm_pyart

and not::

pip install pyart

* I'm getting a segfault or compile error with CyLP in newer Python versions
when installing in an environment.

Anaconda has its own compilers now on conda-forge. Theres can be found here:
https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html
Once the proper compilers are installed, reinstall CyLP.

* I'm getting a segfault or another error in python when using
``pyart.io.read_rsl()`` with IRIS/other files.

This is due to a bug in RSL, and can be remedied by adding
``-fno-stack-protector -D_FORTIFY_SOURCE=0`` to the CFLAGS parameter of the
makefile of RSL. This issue has been fixed with the release of rsl-v1.44.

* I'm having trouble getting PyGLPK to compile on my 64-bit operating system.

Change the line in the setup.py file from

::

define_macros = macros, extra_compile_args=['-m32'], extra_link_args=['-m32'],

to

::

define_macros = macros, extra_compile_args=['-m64'], extra_link_args=['-m64'],

Then build and install PyGLPK as recommended in the PYGLPK README.txt file.

* When running basemap, I get an error 'KeyError: PROJ_LIB'.

Basemap is not being supported beyond 2020, some of these errors relate
to it not playing nicely with newer versions of packages. We recommend using
Cartopy instead, but some users have been able to use:
import os
os.environ['PROJ_LIB'] = 'C:/Users/xx Username xxx/Anaconda3/Lib/site-packages/mpl_toolkits/basemap'
To get basemap working, but again Cartopy should be used instead of Basemap.
.. include:: ../../../INSTALL.rst
Loading

0 comments on commit 7c66a69

Please sign in to comment.