C-LAM
C-LAM - Cloud-computing based template for NWP Local Area Model.
The work was an outcome of the ECMWF Code for Earth 2026 edition.
It is an automated installation workflow for building a reproducible WRF/WPS environment on Virtual Machines, with a primary focus on the European Weather Cloud.
Two deployment modes with the same Ansible playbook
Selected by the boolean clam_use_container in group_vars/all.yml (default false). The two role/variable sets are disjoint.
clam_use_container |
Action | Roles |
|---|---|---|
false |
Build WRF/WPS from source (Ansible version of build_scripts/). |
system_packages, intel_oneapi, arw_libs, wrf_wps, wps_geog, eccodes* |
true |
Deploy a prebuilt Apptainer image + run scripts to run nodes. Compiles nothing. | apptainer, intel_mpi*, sif_deploy, run_scripts_deploy |
* intel_mpi only runs with clam_install_oneapi=true (multinode hosts); eccodes only with install_eccodes=true.
Requirements
Control node (where you run Ansible):
ansible-coreonly; the playbook usesansible.builtinmodules exclusively, so no Galaxy collections are required.sudo apt install -y ansible # or: pipx install ansible-core- For container mode: a prebuilt SIF (
clam-wrf.sif), produced once via./container/build_sif.sh.
Target hosts:
- Ubuntu 24.04 (enforced by a
pre_tasksassertion). - SSH access as a normal user with passwordless
sudo(play runs as the ordinary user; do not use--becomefor the whole play). - The target may be the control node itself (
localhost ansible_connection=local). - Source build needs ~60 GB under
arw_rootand several hours (run undertmux/screen/nohup).
Quickstart
a. Source build deployment
cd ansible
# Full stack (open-data variant + ecCodes by default):
ansible-playbook site.yml -e clam_use_container=false
# On EWC, stack on the data volume:
ansible-playbook site.yml -e clam_use_container=false -e arw_root=/data/ARW
# Run a single step via tags:
ansible-playbook site.yml -e clam_use_container=false --tags oneapi
Tags: packages, oneapi, libs, wrf, wps, wrf_wps, geog, eccodes.
b. Pre-built container deployment
# From repo root build the SIF once:
./container/build_sif.sh # produces clam-wrf.sif
cd ansible
# Install Apptainer + deploy SIF and run scripts to all hosts:
ansible-playbook site.yml -e clam_use_container=true
# Multi-node hosts: also install the host Intel MPI launcher:
ansible-playbook site.yml -e clam_use_container=true -e clam_install_oneapi=true
# Custom SIF path + deploy/data dirs:
ansible-playbook site.yml \
-e clam_use_container=true \
-e clam_sif_src=/mnt/data1/clam-wrf.sif \
-e clam_deploy_dir=/opt/clam -e clam_data_dir=/data/clam
# Build SIF on the target from a registry instead of copying:
ansible-playbook site.yml \
-e clam_use_container=true \
-e clam_sif_registry=docker://<registry-url>/<project>/clam-wrf:latest
Tags: apptainer, oneapi, deploy, geog (e.g. --skip-tags geog).
Launch a run after deploy:
# Single node:
IMG=~/clam-ewc/clam-wrf.sif DATA_DIR=~/clam-data ~/clam-ewc/container/run_apptainer.sh
# Multi node:
HOSTS=vm01,vm03 PPN=16 IMG=~/clam-ewc/clam-wrf.sif DATA_DIR=~/clam-data ~/clam-ewc/container/run_multinode.sh
Key variables
Source build deployment mode (group_vars/all.yml):
| Variable | Default | Meaning |
|---|---|---|
arw_root |
$HOME/ARW |
Install root (ARW_ROOT) |
arw_build_jobs |
4 |
make -j for third party libs |
wps_ecmwf_opendata |
true |
Patch ungrib for ECMWF open data GRIB2 |
install_eccodes |
= wps_ecmwf_opendata |
Install ecCodes |
wrf_force_rebuild / wps_force_rebuild |
false |
Force clean rebuild |
Container deployment mode :
| Variable | Default | Meaning |
|---|---|---|
clam_sif_src |
../clam-wrf.sif |
SIF path on control node (copy mode) |
clam_sif_registry |
"" |
Build SIF on target from this ref; empty = copy |
clam_deploy_dir |
~/clam-ewc |
Launcher + run scripts location on target |
clam_data_dir |
~/clam-data |
Host dir bound to /data (GEOG/BC/RUNS) |
clam_download_geog |
true |
Download high res WPS static data |
clam_install_oneapi |
false |
Install host Intel MPI (set true multinode) |