Skip to content

esm-tools/pymor_workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pymor Workshop

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.


Outline

1. Intro

  • 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])

2. Pymor syntax

3. Features

3.1. Units (module_units and cmor_units)

3.2. Time span for output files (file_timespan)

3.3. Time averages

3.4. Adjusting time stamps of steps

3.5. Control computing resources

3.6. Pipelines and custom steps

3.7. Combining model output variables

3.8. PyFESOM

4. Try Pymor with your data

5. Close the workshop


Install 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:

  1. Create a virtual environment
  2. Install Pymor

Create a virtual environment

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

Install 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

Pymor workshop repository

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

Get the example data

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •