Skip to content

Latest commit

 

History

History
135 lines (94 loc) · 2.63 KB

Installation_on_Levante.md

File metadata and controls

135 lines (94 loc) · 2.63 KB

Installation on Levante

Levante is the current (year 2024) supercomputer at DKRZ (German Climate Computing Center).

Two steps are needed to get SynsatiPy running on "standard" datasets. First, the forward operator RTTOV needs to be installed and second the python package SynSatiPy also needs a separate installation.

Step I: Installation of RTTOV

After you downloaded and untared the RTTOV source code:

(i) link in the correct Makefile

cd build
mv Makefile.local Makefile.local~
cp <PATH2CONFIG>/Makefile.levante_norpath.ifort .
ln -s Makefile.levante_norpath.ifort Makefile.local

(ii) setup the correct architecture

cp <PATH2CONFIG>/ifort-openmp-levante-ext arch

(iii) run compilation

make ARCH=ifort-openmp-levante-ext -j 8

(iv) additional data

see RTTOV documentation

Step II: Installation of SynSatiPy

(i) Setting up a virtual python env

cd /work/bb1262/tools/conda
python -m venv python3.10_synsatipy
source python3.10_synsatipy/bin/activate

(ii) Get SynSatiPy and install it

# git clone ...

# install in dev mode
pip install -e .

(iii) prepare environment

export RTTOV_PYTHON_WRAPPER=/work/bb1262/tools/rttov/rttov-v13.2/wrapper/
ulimit -s 204800

(iv) run tests

pip install pytest

cd synsatipy
pytest

If all tests run successfully than the installation procedure went well up to this point.

Step III: Setting up a Dedicated Jupyter Kernel

This is a bit tricky because we need to use python from our env, but jupyter from the base conda.

(i) clean up everything

module purge
deactivate

(ii) load envs in the correct order

module load python3
source /work/bb1262/tools/conda/python3.10_synsatipy/bin/activate

(iii) create a jupyter kernel with standard methods

pip install ipykernel
python -m ipykernel install --user --name python3-synsatipy  --display-name="SynSatiPy (Python 3.10)"

(iv) update kernel config

# go to the place where the kernel is defined, e.g.
cd ~/.local/share/jupyter/kernels/python3-synsatipy

you need to have a starter there like

> cat start-kernel.sh 
#!/bin/bash

source /etc/profile
source ~/.bashrc

source /work/bb1262/tools/conda/python3.10_synsatipy/bin/activate

ulimit -s 204800
python -m ipykernel_launcher -f "$1"

and an updated kernel file like

> cat kernel.json
{
 "argv": [
  "/home/b/b380352/.local/share/jupyter/kernels/python3.10_synsatipy/start-kernel.sh",
  "{connection_file}"
 ],
 "display_name": "SynSatiPy (Python 3.10)",
 "language": "python",
 "metadata": {
  "debugger": true
 }
}