-
Notifications
You must be signed in to change notification settings - Fork 22
PAMTRA
Welcome to the pamtra wiki! This is wiki has 2 purposes:
- Act as a fallback solution when readthedocs fails
- Provide quick and easy installation instructions using pip
If you run python>=3.12 this is your only chance, but the approach has been tested already on lower python versions. Alternatively you can still run the Makefile-based installation. This approach has the advantage of not messing with your PYTHONPATH and your .bashrc and it also provides an easy and clean way to uninstall pyPamtra
First of all, if you have a previous installation of pyPamtra you might want to check your .bashrc file and edit its addition of the local lib/ folder to the PYTHONPATH. If you still want to keep that, it might be good to delete/rename the pyPamtra-related files under your local lib/ folder such that they do not cause conflicts.
It is recommended, as always, to test installation on a dedicated python environment first:
sudo apt install python3-venv
python3 -m venv pamtraenv
source pamtraenv/bin/activateSome libraries
sudo apt install git gfortran libopenblas-dev libfftw3-dev libnetcdff-devFew python packages
pip install numpy scipy matplotlib netcdf4 xarray meson numexpr cython
Now it is time to download and install pamtra. cd where you want to store the pamtra source code
git clone https://github.com/igmk/pamtra.git
cd pamtra
pip install .ENJOY
This is basically a fitting of the instructions above to the environment provided by DKRZ on the supercomputer Levante. pyPamtra has been used on different HPC systems, but you might have to adapt the following commands to your HPC setup.
module load git
spack load /fwvsvi # python3.9.9
cd <WHERE YOU WANT YOUR PYTHON ENVIRONMENT>
python -m venv pamtraenv
source pamtraenv/bin/activate
pip install numpy scipy matplotlib netcdf4 cython xarray meson
cd <WHERE YOU WANT TO STORE YOUR PAMTRA CODE>
git clone https://github.com/igmk/pamtra.git
cd pamtra
spack load /bcn7mbu # gcc 11.2
spack load /tpmfvwu # openblas 0.3.18 gcc 11.2
spack load /fnfhvr6 # fftw 3.10.10
spack load /jn6xcuy # netcdf-fortran 4.6.1 gcc 11.2
pip install .Other compilers and library versions also work. I just copied here a functioning recipe, you have fun with the ingredients.
Levante also provides jupyterhub. If you want to use your pamtraenv on jupyterhub do:
pip install ipykernel
python -m ipykernel install --user --name=pamtra-kernel --display-name="pamtra kernel"from within your activate pamtraenv. This will enable loading a "pamtra kernel" to run your notebooks.
From this HINT
brew install openblas
brew install pkgconf
brew install netcdf
brew install fftw
export PKG_CONFIG_PATH="/opt/homebrew/opt/openblas/lib/pkgconfig"
env CC=gcc-14 pip install .