Skip to main content

EC-Earth4 experiment configuration tool with YAML overlay system

Project description

ece4-exp

Generate EC-Earth4 experiment configs in 30 seconds.

pip install ece4-exp
ece4-exp setup                 # First-time setup
ece4-exp generate gcm-sr 10 a001  # 10 nodes

Quick Start

# 1. Install
pip install ece4-exp

# 2. Setup (also enables TAB completion)
ece4-exp setup
# Restart your shell

# 3. Generate experiment
ece4-exp generate gcm-sr 10 a001  # 10 nodes = 1120 cores on MareNostrum5

That's it! You have a001_experiment.yml ready to use with EC-Earth4.

Common Recipes

Recipe Description Typical Nodes (MN5)
gcm-sr Coupled atmosphere-ocean GCM 10 nodes (1120 cores)
omip-sr Ocean-only forced by reanalysis 2 nodes (224 cores)
amip-sr Atmosphere-only prescribed SST 8 nodes (896 cores)
ccycle-sr Carbon cycle coupled 10+ nodes

Commands

# Setup
ece4-exp setup                      # Configure platform, account, and HPC host

# Generate (specify nodes, not processors)
ece4-exp generate RECIPE NODES EXPID
ece4-exp generate gcm-sr 10 a001      # 10 nodes
ece4-exp generate omip-sr 2 o001 --walltime 72

# Discovery
ece4-exp list                       # Show available recipes
ece4-exp inspect gcm-sr             # View recipe details

# Deploy to HPC
ece4-exp deploy a001                # rsync config to HPC runtime directory

# Advanced
ece4-exp save --expid a001          # Save modifications as new recipe

Customization

Override defaults:

ece4-exp generate gcm-sr 10 a001 --platform ecmwf-hpc2020 --account myproj

Custom recipes:

# Generate, edit, save as recipe
ece4-exp generate gcm-sr 10 test
vim test_experiment.yml              # Make changes
ece4-exp save --expid test --recipe gcm-sr
# If you moved the file: --config /path/to/test_experiment.yml

# Reuse your recipe
ece4-exp generate test 10 a002

Custom platforms:

cp $(python3 -c "from ece4_exp import paths; print(paths.PLATFORMS_DIR)")/bsc-marenostrum5.yml \\
   ~/.config/ece4-exp/platforms/my-hpc.yml
vim ~/.config/ece4-exp/platforms/my-hpc.yml  # Adjust settings
ece4-exp generate gcm-sr 10 a001 --platform my-hpc

What It Does

ece4-exp creates EC-Earth4 experiment configuration files by combining:

  1. Base config (from EC-Earth4 repo)
  2. Platform settings (HPC-specific paths, modules)
  3. Recipe (experiment type: GCM, OMIP, AMIP, etc.)
  4. Your defaults (~/.config/ece4-exp/defaults.yml)
  5. CLI overrides (command-line flags)

The result is a validated YAML file you deploy to the HPC and pass to EC-Earth4's runtime:

ece4-exp deploy a001   # rsync to HPC scratch/ecearth4/scripts/runtime/

# then on the HPC:
cd $scratch/ecearth4/scripts/runtime
se user.yml platform.yml a001_experiment.yml scriptlib/main.yml

Documentation

Tab Completion

Add one line to your shell config file (shown by ece4-exp setup):

bash — add to ~/.bashrc:

eval "$(register-python-argcomplete ece4-exp)"

zsh — add to ~/.zshrc:

eval "$(register-python-argcomplete ece4-exp)"

Then restart your shell or run source ~/.bashrc (or ~/.zshrc).

After that:

  • ece4-exp ge<TAB>ece4-exp generate
  • ece4-exp generate gcm<TAB> → completes recipe names

Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ece4_exp-1.3.1.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ece4_exp-1.3.1-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file ece4_exp-1.3.1.tar.gz.

File metadata

  • Download URL: ece4_exp-1.3.1.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for ece4_exp-1.3.1.tar.gz
Algorithm Hash digest
SHA256 618304e4ea3e0aac198091cfac69d6b33b4f583b92174b0a895b45958b4fed08
MD5 42fb6bb265bf7cfbf7f2df14bf49979f
BLAKE2b-256 f267f85adb08e0fce76225d5e9b8762ae0ad8f30c27a6e4aff47ad2279da9db0

See more details on using hashes here.

File details

Details for the file ece4_exp-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: ece4_exp-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for ece4_exp-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aeb010c600f222cec2bd7b143ada85acec062572bfe9dcc92b2d7e2c22719315
MD5 98f2d2c06e30326409f8ef1392440bd1
BLAKE2b-256 8fa1e8b6c7227a281f30db118983ecad8ffb4b55be03f35579a3045e415cab73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page