Skip to content
/ extpar Public

External Parameter for Numerical Weather Prediction and Climate Application

Notifications You must be signed in to change notification settings

C2SM/extpar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EXTPAR

General Information

EXTPAR (External Parameters for Numerical Weather Prediction and Climate Application) is an official software of the COSMO Consortium. It is used to prepare the external parameter data files that are used as input for the COSMO and the ICON model.

The code is written in Fortran 90 and in Python. The Python scripts use CDO for the most compute-intensive parts. Currently the code is tested regularly using the gcc, NAG, and Intel Fortran compilers. The code is also accelerated in some places with OpenMP parallelization.

The code once compiled generates 6 Fortran executables and 9 Python scripts, which can be run simultaneously except for the final extpar_consistency_check.exe, which is used to tie together all the external parameter results into one output file.

Information about the latest changes can be found in the Release Notes.

A full documentation of the code can be found as an assets of each release.

Quick Start

We support the setup for extpar on three different HPC-infrastructures. Balfrin and Levante. The installation steps are

  1. clone the source repository
  2. run the configuration script for the corresponding HPC-infrastructure
  3. copy all the .exe and .py files from bin to the directory in which the namelist and all required input-data is present.

You do then have two choices to run extpar:

  1. configure the PYTHONPATH variable such that it includes to the python/lib folder of the source repository
  2. build and install a python package for your user account

Preparing extpar

Levante

git clone --recursive [email protected]:C2SM-RCM/extpar.git
cd extpar
git submodule update
./configure.levante.gcc
source modules.env
make -j 4

Balfrin

git clone --recursive [email protected]:C2SM-RCM/extpar.git
./configure.balfrin.gcc
source modules.env
make -j 16
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
pip install -r requirements.txt

Installing extpar

After you prepared extpar (see above), you have to options to install and run the software.

Option 1: PYTHONPATH

If you like to run the extpar scripts without installing a package, make sure to have the python/lib folder in your PYTHONPATH variable. You can do this via

export PYTHONPATH=$PYTHONPATH:$(pwd)/python/lib

Afterwards you can cd into the bin/ directory and run the corresponding executables, e.g.

cd bin
./extpar_aot_to_buffer.exe

For more detailed compilation instructions see: compile_run

Option 2: Build and install a python package

Alternatively you can build a python package and install it to your libraries. This has the advantages that the executables can be ran from anywhere in the system without the need to copy the executables themselves.

To build the package, now run

python setup.py sdist

You can then install it via

pip install dist/extpar-*.tar.gz

Note: If you do not have the permissions to install it into the system-wide python library, it will be installed for your user account only (you can also add the --user flag to pip to force this behaviour).

If you did not install extpar into the system-libraries, make sure that the bin folder of your local user is on your PATH variable to be able to run the extpar scripts. This is usually done via

export PATH="$HOME/.local/bin:$PATH"

You can add this line to your .bashrc file if you want.


You can then call the functionalities of WrapExtpar.py via

python -m extpar.WrapExtpar

or import the script in python via

from extpar.WrapExtpar import generate_external_parameters

Or you call the executable scripts in your run directory, e.g.

extpar_aot_to_buffer.exe

Input Data

Data Location

In order to run Extpar, input data files for the external parameter variables are needed. The data is provided on all supported machines:

  • Tsa: /store/c2sm/extpar_raw_data/linked_data
  • Daint: /store/c2sm/extpar_raw_data/linked_data
  • Levante: /work/pd1167/extpar-input-data/linked_data
  • Balfrin: /store_new/mch/c2sm/extpar_raw_data/linked_data

The input data files are also stored in a git-LFS data repository found at: https://gitlab.dkrz.de/extpar-data/extpar-input-data. Instructions to download or update the input data files can be found in this repository. To gain access to the git-LFS input data repository, contact the Extpar source code administrator.

Fast Data Access

On CSCS-machines, access from comupte-nodes to /store is generally slow. Instead copy all required input-data prior to your Exptar runs to $SCRATCH. The script extract_inputfiles_from_namelist.py is able to to extract all input-data needed from any given set of Extpar namelists (INPUT_* and namelist.py).

For Mistral no such performance penalty has been observed.

Testing

The extpar code comes with a technical testsuite to ensure the accuracy of the results. Weekly tests run for compilers

  • GCC

For more information about how the testsuite can be run or new test added see testsuite-documentation

Information for developers

In case you want to contribute to Extpar please have a look at our coding rules and development workflow.

Support

In the case of issues or questions, please contact the current source code administrator (Jonas Jucker) at [email protected].