Clone this repository to get access to the slides and practice problems:
$ git clone https://github.com/esm-tools/pymor_workshop.git
$ cd pymor_workshop
$ mkdir work
Make a folder to work in, for example:
$ cd work
During the live workshop, you'll be able to use the QOS --qos=training
in DKRZ's HPC, to gain priority in the slurm queue. To benefit from this make sure you add this to your salloc
or sbatch
commands, or to the #SBATCH
headers of the scripts.
- Workshop intro - Slides, Video
- Aims
- Outline
- Pymor - Slides, Video
- What is Pymor?
- Main Pymor features
- Demo: pymor cli, Video
- Time to resolve installation problems @pgierz
- Have you installed Pymor inside a conda environment named
pymor
already? - Can you run
pymor --help
and other commands? - Maybe you need to upgrade (
pip install --upgrade py-cmor[dev,fesom]
)
- Have you installed Pymor inside a conda environment named
- Presentation - Slides, Video
- Exercise: Running a basic pymor process (text and solutions), Video
- Presentation - Slides, Video
- Exercise: Unit conversion (text and solutions), Video
- Presentation - Slides, Video
- Exercise: File timespan (text and solutions), Video
- Presentation - Slides, Video
- Exercise: Temporal frequency, Video
- Presentation - Slides, Video
- Exercise: Adjust timestamp, Video
- Presentation - Slides, Video
- Exercise: Costumizing your compute resources, Video
- Presentation - Slides, Video
- Exercise: Add a custom step in the pipeline, Video
- Presentation - Slides
- Exercise: Using aux files
- Presentation - Slides
- Exercise: Using pyfesom2 with pymor
As the data to run the exercises lives on Levante,(DKRZ), we need to setup the Pymor package on Levante.
The installation is done in 2 steps:
- Create a virtual environment
- Install Pymor
Note: the exercises assume you have a pymor
conda environment, so make sure when you create the environment that its name matches that.
module load python3
eval "$(conda shell.bash hook)" # Init conda without the need to add extra lines to ~/.bashrc
conda create -n pymor python=3.10 # Create a conda environment named pymor
conda activate pymor
pip install --isolated py-cmor[dev,fesom]
You can then check the Pymor works by running:
pymor --version
pymor --help
For additional information, check out the following links
- Creating Virtual environments on Levante: Python environment locations.
- Installing Pymor: Pymor documentation.
The Pymor workshop repository contains scripts to run the exercises.
work="/work/$(id -gn)/$USER"
echo "work directory: $work"
cd $work
git clone https://github.com/esm-tools/pymor_workshop.git
cd pymor_workshop
This workshop is designed for ease-of-use if you are working on DKRZ's Levante system. You can access all of the test data here:
/work/ab0995/a270243/pymor_workshop/exercises/data
If you want to be able to see the files as part of your own repository, you can make a link
pwd # You should be in the root of the repository (`/work/$PROJECT/$USER/pymor_workshop`)
ln -sv /work/ab0995/a270243/pymor_workshop/exercises/data ./exercises/data
Alternatively, if you would like to use synthetic data made up of random numbers, but with realistic metadata, dimensions,
and attributes, you can generate some. Make sure you are in the same Python environment as pymor
is installed for this:
make fake-data
ln -sv ./fake-data ./exercises/data