Skip to content

Commit 59018ff

Browse files
authored
Installation docs updates (#306)
* update README * first round of install docs updates * update install docs
1 parent 9feadac commit 59018ff

File tree

2 files changed

+20
-118
lines changed

2 files changed

+20
-118
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,21 @@ This package provides over 30 diagnostic calculations, several interpolation rou
99
Installation
1010
----------------------------
1111

12-
conda install -c conda-forge wrf-python
12+
conda install conda-forge::wrf-python
1313

1414
Documentation
1515
----------------------------------
1616

17-
http://wrf-python.rtfd.org
17+
https://wrf-python.readthedocs.io
1818

1919

2020
Citation
2121
------------------
2222

23-
If you use this software, please cite it as described at the [WRF-Python - Citation](
24-
https://wrf-python.readthedocs.io/en/latest/citation.html) page.
23+
If you use this software, please cite it as described in the [documentation](
24+
https://wrf-python.readthedocs.io/en/latest/citation.html).
2525

2626

2727
--------------------
2828

29-
*The National Center for Atmospheric Research is sponsored by the National
30-
Science Foundation. Any opinions, findings and conclusions or recommendations
31-
expressed in this material do not necessarily reflect the views of the
32-
National Science Foundation.*
33-
34-
29+
*This material is based upon work supported by the NSF National Center for Atmospheric Research, a major facility sponsored by the U.S. National Science Foundation and managed by the University Corporation for Atmospheric Research. Any opinions, findings and conclusions or recommendations expressed in this material do not necessarily reflect the views of the U.S. National Science Foundation.*

doc/source/installation.rst

Lines changed: 15 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,46 @@
11
Installation
22
============
33

4-
Required Dependencies
5-
----------------------
6-
7-
- Python 3.9+
8-
- numpy (1.11 or later; 1.14 required to build on Windows)
9-
- wrapt (1.10 or later)
10-
- setuptools (38.0 or later)
11-
12-
13-
Highly Recommended Packages
14-
----------------------------
15-
16-
- xarray (0.7.0 or later)
17-
- PyNIO (1.4.3 or later)
18-
- netCDF4-python (1.2.0 or later)
19-
20-
21-
Plotting Packages
22-
-------------------------
23-
24-
- PyNGL (1.4.3 or later)
25-
- matplotlib (1.4.3 or later)
26-
- cartopy (0.13 or later)
27-
- basemap (1.0.8 or later)
28-
29-
304
Installing via Conda
315
---------------------
326

337
The easiest way to install wrf-python is using
34-
`Conda <http://conda.pydata.org/docs/>`_::
8+
`Conda <https://docs.conda.io>`_::
359

36-
conda install -c conda-forge wrf-python
10+
conda install conda-forge::wrf-python
3711
3812
.. note::
3913

40-
If you use conda to install wrf-python on a supercomputer like
41-
Yellowstone or Cheyenne, we recommend that you do not load any python
14+
If you use Conda to install WRF-Python on a supercomputer like
15+
Derecho or Casper, we recommend that you do not load any Python
4216
related modules via the 'module load' command. The packages installed
43-
by the 'module load' system will not play nicely with packages installed
44-
via conda.
17+
by the 'module load' system may not play nicely with packages installed
18+
via Conda.
4519

46-
Further, some systems will install python packages to a ~/.local directory,
47-
which will be found by the miniconda python interpreter and cause various
20+
Further, some systems will install Python packages to a ~/.local directory,
21+
which will be found by the Conda Python interpreter and cause various
4822
import problems. If you have a ~/.local directory, we strongly suggest
4923
renaming it (mv ~/.local ~/.local_backup).
5024

5125

52-
Installing on Yellowstone
53-
----------------------------
54-
55-
On Yellowstone, wrf-python can also be installed using the module load system,
56-
if this is preferred over using conda.
57-
58-
Unfortunately, because wrf-python requires newer dependencies, it is not
59-
available using the 'all-python-libs' module, so many of the dependencies
60-
need to be manually installed (most are for xarray).
61-
62-
Also, make sure you are running in the gnu/4.8.2 compiler environment or
63-
you will get import errors for a missing libquadmath library when you
64-
go to import wrf-python.
65-
66-
To install::
26+
WRF-Python on NSF NCAR HPC
27+
--------------------------
6728

68-
module load gnu/4.8.2 or module swap intel gnu/4.8.2
69-
module load python/2.7.7
70-
module load numpy/1.11.0 wrapt/1.10.10 scipy/0.17.1 bottleneck/1.1.0 numexpr/2.6.0 pyside/1.1.2 matplotlib/1.5.1 pandas/0.18.1 netcdf4python/1.2.4 xarray/0.8.2
71-
module load wrf-python/1.0.1
29+
WRF-Python is included in the `NCAR Python Library <https://ncar-hpc-docs.readthedocs.io/en/latest/environment-and-software/user-environment/package-managers/conda/#the-ncar-python-library>`_ on the NSF NCAR HPC systems or can be installed using a supported package manager of your choice.
7230

7331

7432
Installing via Source Code
7533
--------------------------
7634

7735
Installation via source code will require a Fortran and C compiler in order
78-
to run f2py. You can get them
79-
`here <https://gcc.gnu.org/wiki/GFortranBinaries>`_.
36+
to run F2PY.
8037

81-
The source code is available via github:
38+
The source code is available on GitHub:
8239

8340
https://github.com/NCAR/wrf-python
8441

85-
Or PyPI:
86-
87-
https://pypi.python.org/pypi/wrf-python
88-
89-
To install, if you do not need OpenMP support, change your working directory
42+
To install, change your working directory
9043
to the wrf-python source directory and run::
9144

9245
$ pip install .
93-
94-
Beginning with wrf-python 1.1, OpenMP is supported, but preprocessing the
95-
ompgen.F90 file is required, which also requires running f2py to
96-
build the .pyf file. To simplify this process, you can use the build scripts in
97-
the *build_scripts* directory as a guide, or just call the script directly.
98-
99-
Below is a sample from a build script for GNU compiler with OpenMP enabled:
100-
101-
.. code-block:: none
102-
103-
cd ../fortran/build_help
104-
105-
gfortran -o sizes -fopenmp omp_sizes.f90
106-
107-
python sub_sizes.py
108-
109-
cd ..
110-
111-
gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90
112-
113-
f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature
114-
115-
cd ..
116-
117-
python setup.py clean --all
118-
119-
python setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build
120-
121-
pip install .
122-
123-
Beginning with numpy 1.14, f2py extensions can now be built using the MSVC
124-
compiler and mingw gfortran compiler. Numpy 1.14 is required to build
125-
wrf-python for Python 3.5+.
126-
127-
.. note::
128-
129-
If you are building on a supercomputer and receiving linker related
130-
errors (e.g. missing symbols, undefined references, etc), you probably
131-
need to unset the LDFLAGS environment variable. System administrators on
132-
supercomputing systems often define LDFLAGS for you so that you don't need
133-
to worry about where libraries like NetCDF are installed. Unfortunately,
134-
this can cause problems with the numpy.distutils build system. To fix,
135-
using the build command from above::
136-
137-
$ unset LDFLAGS python setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build
138-
139-
46+

0 commit comments

Comments
 (0)