Skip to content

A dynamic plugin library for dispatching the WRF RRTMG radiation scheme.

License

Notifications You must be signed in to change notification settings

everest-h2020/wrf-plugin

Repository files navigation

EVEREST logo

This software bundle is part of the EVEREST project, funded under an EU grant.

WRF RRTMG plugin

This is the main repository of the plugin_rrtmg project, which produces a dynamic library of the same name that dispatches class to the RRTMG submodule in WRF.

Building

A two-step build process is required, which involves the use of Python (version 3.10 or newer). First, setup the virtual environment and install the Python dependencies.

# Setup the python virtual environment.
python3.10 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

To build the plugin, the constant data must be baked. This is achieved by running the following command in the virtual environment:

python bake.py

The plugin_rrtmg project is built using CMake (version 3.20 or newer). Make sure to provide all dependencies required by the project, either by installing them to system-default locations, or by setting the appropriate search location hints!

Dependency apt Package name
libnetcdf libnetcdf-dev
libnetcdf_c++4 libnetcdf-c++4-dev
# Configure.
cmake -S . -B build -G Ninja

# Build.
cmake --build build

Testing

An additional CMake target called runner is provided, which invokes the plugin on pre-recorded test data (data/wrf-input.nc). The runner executable should be executed from within the project root directory, where it will produce an output.nc file.

Assuming the virtual environment is activated, the following commands will perform verification:

# Produces data/ref-output.nc using the Python reference.
python make_reference.py

# Execute the runner.
build/runner

# Compare the actual with the expected result.
python compare.py

License

This project is licensed under the ISC license.


EU notice

About

A dynamic plugin library for dispatching the WRF RRTMG radiation scheme.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published