ece4-exp 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ece4_exp-1.0.0/LICENSE +21 -0
- ece4_exp-1.0.0/MANIFEST.in +18 -0
- ece4_exp-1.0.0/PKG-INFO +205 -0
- ece4_exp-1.0.0/QUICK_DEMO.sh +106 -0
- ece4_exp-1.0.0/README.md +184 -0
- ece4_exp-1.0.0/ece4_exp/__init__.py +0 -0
- ece4_exp-1.0.0/ece4_exp/cli.py +289 -0
- ece4_exp-1.0.0/ece4_exp/generate-experiment-config.py +448 -0
- ece4_exp-1.0.0/ece4_exp/init_config.py +277 -0
- ece4_exp-1.0.0/ece4_exp/paths.py +78 -0
- ece4_exp-1.0.0/ece4_exp/save_recipe_from_diff.py +146 -0
- ece4_exp-1.0.0/ece4_exp/validate-experiment-config.py +165 -0
- ece4_exp-1.0.0/ece4_exp/yaml_util.py +246 -0
- ece4_exp-1.0.0/ece4_exp.egg-info/PKG-INFO +205 -0
- ece4_exp-1.0.0/ece4_exp.egg-info/SOURCES.txt +28 -0
- ece4_exp-1.0.0/ece4_exp.egg-info/dependency_links.txt +1 -0
- ece4_exp-1.0.0/ece4_exp.egg-info/entry_points.txt +2 -0
- ece4_exp-1.0.0/ece4_exp.egg-info/requires.txt +5 -0
- ece4_exp-1.0.0/ece4_exp.egg-info/top_level.txt +1 -0
- ece4_exp-1.0.0/platforms/bsc-marenostrum5.yml +53 -0
- ece4_exp-1.0.0/platforms/ecmwf-hpc2020.yml +40 -0
- ece4_exp-1.0.0/pyproject.toml +39 -0
- ece4_exp-1.0.0/recipes/OMIP_with_ERA5_6_Cycles.yml +35 -0
- ece4_exp-1.0.0/recipes/aa2s.yml +8 -0
- ece4_exp-1.0.0/recipes/amip-sr.yml +14 -0
- ece4_exp-1.0.0/recipes/ccycle-sr.yml +19 -0
- ece4_exp-1.0.0/recipes/gcm-sr.yml +16 -0
- ece4_exp-1.0.0/recipes/omip-sr.yml +10 -0
- ece4_exp-1.0.0/scripts/ece4-exp-completion.sh +53 -0
- ece4_exp-1.0.0/setup.cfg +4 -0
ece4_exp-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 Barcelona Supercomputing Center (BSC)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Include recipe and platform files
|
|
2
|
+
recursive-include recipes *.yml *.yaml
|
|
3
|
+
recursive-include platforms *.yml *.yaml
|
|
4
|
+
|
|
5
|
+
# Include documentation
|
|
6
|
+
include README.md
|
|
7
|
+
include LICENSE
|
|
8
|
+
include QUICK_DEMO.sh
|
|
9
|
+
|
|
10
|
+
# Include scripts
|
|
11
|
+
include scripts/ece4-exp-completion.sh
|
|
12
|
+
|
|
13
|
+
# Exclude development files
|
|
14
|
+
exclude ece4-exp
|
|
15
|
+
exclude setup.sh
|
|
16
|
+
exclude SIMPLIFICATION_ANALYSIS.md
|
|
17
|
+
recursive-exclude autosubmit *
|
|
18
|
+
global-exclude *.pyc __pycache__
|
ece4_exp-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ece4-exp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: EC-Earth4 experiment configuration tool with YAML overlay system
|
|
5
|
+
Author-email: Vladimir Lapin <vladimir.lapin@bsc.es>
|
|
6
|
+
Project-URL: Homepage, https://github.com/vlap/ece4-exp
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/vlap/ece4-exp/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/vlap/ece4-exp/blob/main/README.md
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
14
|
+
Requires-Python: >=3.8
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: ruamel.yaml>=0.17.0
|
|
18
|
+
Requires-Dist: jsonschema>=4.0.0
|
|
19
|
+
Provides-Extra: highlight
|
|
20
|
+
Requires-Dist: pygments>=2.10.0; extra == "highlight"
|
|
21
|
+
|
|
22
|
+
# ece4-exp: EC-Earth4 Experiment Configuration Tool
|
|
23
|
+
|
|
24
|
+
**Generate EC-Earth4 configs in 30 seconds instead of 2-4 hours.**
|
|
25
|
+
|
|
26
|
+
One command creates production-ready configurations with correct components, calculated node layouts, and validated parameters.
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
### Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Via pip (recommended)
|
|
34
|
+
pip install ece4-exp
|
|
35
|
+
|
|
36
|
+
# Or from source
|
|
37
|
+
git clone https://github.com/vlap/ece4-exp.git
|
|
38
|
+
cd ece4-exp
|
|
39
|
+
pip install -e .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Generate Your First Config
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 --expid myexp \
|
|
46
|
+
--platform bsc-marenostrum5 --account bsc32
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Optional:** Save defaults to avoid typing platform/account every time:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
ece4-exp init-user
|
|
53
|
+
# Edit ~/.config/ece4-exp/defaults.yml
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then just:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 --expid myexp
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Pre-Built Recipes
|
|
63
|
+
|
|
64
|
+
| Recipe | Description | Components | Procs (MN5) |
|
|
65
|
+
|--------|-------------|------------|-------------|
|
|
66
|
+
| `gcm-sr.yml` | Coupled atmosphere-ocean | OIFS + NEMO + XIOS + OASIS | 1120 (10 nodes) |
|
|
67
|
+
| `omip-sr.yml` | Ocean-only | NEMO + XIOS | 224 (2 nodes) |
|
|
68
|
+
| `amip-sr.yml` | Atmosphere-only | OIFS + XIOS + AMIPFR | 896 (8 nodes) |
|
|
69
|
+
| `ccycle-sr.yml` | Carbon cycle | OIFS + NEMO + LPJG + XIOS | 1120+ |
|
|
70
|
+
|
|
71
|
+
## Common Commands
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# List available recipes
|
|
75
|
+
ece4-exp list
|
|
76
|
+
|
|
77
|
+
# Generate experiment config
|
|
78
|
+
ece4-exp generate --recipe <recipe.yml> --sim-procs <N> --expid <id>
|
|
79
|
+
|
|
80
|
+
# Preview without creating file
|
|
81
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 --dry-run
|
|
82
|
+
|
|
83
|
+
# Validate configuration
|
|
84
|
+
ece4-exp validate myexp.yml
|
|
85
|
+
|
|
86
|
+
# Save customized config as new recipe
|
|
87
|
+
ece4-exp save --expid myexp --recipe gcm-sr.yml -o my-recipe.yml
|
|
88
|
+
|
|
89
|
+
# Initialize user defaults (optional)
|
|
90
|
+
ece4-exp init-user
|
|
91
|
+
|
|
92
|
+
# Show help
|
|
93
|
+
ece4-exp --help
|
|
94
|
+
ece4-exp generate --help
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Examples
|
|
98
|
+
|
|
99
|
+
### Ocean-Only Experiment
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
ece4-exp generate --recipe omip-sr.yml --sim-procs 224 --expid omip001 \
|
|
103
|
+
--platform bsc-marenostrum5 --account bsc32
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Custom Recipe Workflow
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# 1. Generate base config
|
|
110
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 -o test.yml
|
|
111
|
+
|
|
112
|
+
# 2. Edit manually
|
|
113
|
+
vim test.yml
|
|
114
|
+
|
|
115
|
+
# 3. Validate
|
|
116
|
+
ece4-exp validate test.yml
|
|
117
|
+
|
|
118
|
+
# 4. Save as new recipe (includes base + your changes)
|
|
119
|
+
ece4-exp save --expid test --recipe gcm-sr.yml -o my-tuned-gcm.yml
|
|
120
|
+
|
|
121
|
+
# 5. Reuse
|
|
122
|
+
ece4-exp generate --recipe my-tuned-gcm.yml --sim-procs 1120 --expid exp002
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Batch Generation
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
for id in {001..010}; do
|
|
129
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 \
|
|
130
|
+
--expid exp$id --quiet
|
|
131
|
+
done
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## How It Works
|
|
135
|
+
|
|
136
|
+
**YAML overlay system** merges configurations in this order:
|
|
137
|
+
|
|
138
|
+
1. Base config (from EC-Earth4 repo)
|
|
139
|
+
2. Platform launcher settings
|
|
140
|
+
3. Recipe (experiment pattern)
|
|
141
|
+
4. User defaults (~/.config/ece4-exp/defaults.yml)
|
|
142
|
+
5. CLI flags
|
|
143
|
+
|
|
144
|
+
Each layer overrides the previous, giving you full control.
|
|
145
|
+
|
|
146
|
+
## Run with EC-Earth4
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cd /path/to/ecearth4/scripts/runtime
|
|
150
|
+
se user.yml platform.yml experiment.yml scriptlib/main.yml
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Where `experiment.yml` is generated by ece4-exp.
|
|
154
|
+
|
|
155
|
+
## Documentation
|
|
156
|
+
|
|
157
|
+
- **Try the demo:** `./QUICK_DEMO.sh` (3-minute interactive walkthrough)
|
|
158
|
+
- **Detailed guide:** [DEMO.md](DEMO.md)
|
|
159
|
+
- **Presentation:** [docs/presentation/](docs/presentation/) (slides)
|
|
160
|
+
- **Changelog:** [docs/CHANGES.md](docs/CHANGES.md)
|
|
161
|
+
|
|
162
|
+
## Platform Support
|
|
163
|
+
|
|
164
|
+
**Currently supported:**
|
|
165
|
+
- BSC MareNostrum 5
|
|
166
|
+
- ECMWF HPC2020
|
|
167
|
+
|
|
168
|
+
**Adding a new platform:**
|
|
169
|
+
Create `platforms/<platform>.yml` with launcher templates (~50 lines).
|
|
170
|
+
|
|
171
|
+
## Requirements
|
|
172
|
+
|
|
173
|
+
- Python 3.8+
|
|
174
|
+
- ruamel.yaml >= 0.17.0
|
|
175
|
+
- jsonschema >= 4.0.0
|
|
176
|
+
- pygments >= 2.10.0 (optional, for syntax highlighting)
|
|
177
|
+
|
|
178
|
+
## Features
|
|
179
|
+
|
|
180
|
+
✅ Pre-tested recipes
|
|
181
|
+
✅ Auto node layout calculation
|
|
182
|
+
✅ Config validation
|
|
183
|
+
✅ Upstream EC-Earth4 sync
|
|
184
|
+
✅ Custom recipe creation
|
|
185
|
+
✅ Script-friendly (--quiet mode)
|
|
186
|
+
✅ Cross-platform (Linux, macOS, Windows)
|
|
187
|
+
|
|
188
|
+
## Autosubmit Compatibility
|
|
189
|
+
|
|
190
|
+
For auto-ecearth4 users, backward compatibility is maintained:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
ece4-exp generate --expdef expdef_ID.yml --jobs jobs_ID.yml
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## License & Support
|
|
197
|
+
|
|
198
|
+
**License:** MIT - See [LICENSE](LICENSE)
|
|
199
|
+
|
|
200
|
+
**Questions?** vladimir.lapin@bsc.es
|
|
201
|
+
**Issues:** https://github.com/vlap/ece4-exp/issues
|
|
202
|
+
|
|
203
|
+
## Contributing
|
|
204
|
+
|
|
205
|
+
See [SIMPLIFICATION_ANALYSIS.md](SIMPLIFICATION_ANALYSIS.md) for development roadmap.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Quick 2-minute demo of ece4-exp
|
|
3
|
+
|
|
4
|
+
set +e # Don't exit on errors
|
|
5
|
+
|
|
6
|
+
# Colors
|
|
7
|
+
CYAN='\033[0;36m'
|
|
8
|
+
GREEN='\033[0;32m'
|
|
9
|
+
YELLOW='\033[1;33m'
|
|
10
|
+
NC='\033[0m'
|
|
11
|
+
|
|
12
|
+
echo "╔══════════════════════════════════════════════════════════╗"
|
|
13
|
+
echo "║ ece4-exp: EC-Earth4 Made Easy - Quick Demo ║"
|
|
14
|
+
echo "╚══════════════════════════════════════════════════════════╝"
|
|
15
|
+
echo ""
|
|
16
|
+
|
|
17
|
+
# Step 1: List recipes
|
|
18
|
+
echo -e "${CYAN}📋 Step 1: What recipes are available?${NC}"
|
|
19
|
+
echo "$ ece4-exp list"
|
|
20
|
+
echo ""
|
|
21
|
+
ece4-exp list
|
|
22
|
+
echo ""
|
|
23
|
+
read -p "Press Enter to continue..."
|
|
24
|
+
echo ""
|
|
25
|
+
|
|
26
|
+
# Step 2: Generate GCM experiment
|
|
27
|
+
echo -e "${CYAN}🚀 Step 2: Generate a coupled GCM experiment${NC}"
|
|
28
|
+
echo "$ ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 --expid demo-gcm"
|
|
29
|
+
echo ""
|
|
30
|
+
if ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 --expid demo-gcm -o demo-gcm.yml; then
|
|
31
|
+
echo -e "${GREEN}✓ Created demo-gcm.yml${NC}"
|
|
32
|
+
else
|
|
33
|
+
echo -e "${YELLOW}✗ Generation failed${NC}"
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
echo ""
|
|
37
|
+
read -p "Press Enter to continue..."
|
|
38
|
+
echo ""
|
|
39
|
+
|
|
40
|
+
# Step 3: Modify and save as custom recipe
|
|
41
|
+
echo -e "${CYAN}💾 Step 3: Customize and save as new recipe${NC}"
|
|
42
|
+
echo "$ ece4-exp save - Save your modifications as a reusable recipe"
|
|
43
|
+
echo ""
|
|
44
|
+
echo "Let's modify the config to run 10 legs instead of 1:"
|
|
45
|
+
sed -i 's/nlegs: 1/nlegs: 10/' demo-gcm.yml
|
|
46
|
+
echo "Changed: nlegs: 1 → nlegs: 10"
|
|
47
|
+
echo ""
|
|
48
|
+
# Rename for save command (expects {expid}_experiment.yml format)
|
|
49
|
+
cp demo-gcm.yml demo-gcm_experiment.yml
|
|
50
|
+
cp ece4_exp/demo-gcm_pristine.yml ece4_exp/demo-gcm_experiment_pristine.yml
|
|
51
|
+
echo "$ python3 -m ece4_exp.save_recipe_from_diff --expid demo-gcm --recipe gcm-sr.yml -o my-10legs.yml"
|
|
52
|
+
if python3 -m ece4_exp.save_recipe_from_diff --expid demo-gcm --recipe gcm-sr.yml -o my-10legs.yml 2>&1 | grep -v "^$"; then
|
|
53
|
+
echo ""
|
|
54
|
+
if [ -f recipes/my-10legs.yml ]; then
|
|
55
|
+
echo -e "${GREEN}✓ Saved as recipes/my-10legs.yml${NC}"
|
|
56
|
+
echo "Recipe content:"
|
|
57
|
+
cat recipes/my-10legs.yml
|
|
58
|
+
fi
|
|
59
|
+
fi
|
|
60
|
+
echo ""
|
|
61
|
+
read -p "Press Enter to continue..."
|
|
62
|
+
echo ""
|
|
63
|
+
|
|
64
|
+
# Step 4: Validate
|
|
65
|
+
echo -e "${CYAN}✅ Step 4: Validate the configuration${NC}"
|
|
66
|
+
echo "$ ece4-exp validate demo-gcm.yml"
|
|
67
|
+
echo ""
|
|
68
|
+
ece4-exp validate demo-gcm.yml
|
|
69
|
+
echo ""
|
|
70
|
+
read -p "Press Enter to continue..."
|
|
71
|
+
echo ""
|
|
72
|
+
|
|
73
|
+
# Step 5: Ocean-only example
|
|
74
|
+
echo -e "${CYAN}🌊 Step 5: Ocean-only experiment (different setup)${NC}"
|
|
75
|
+
echo "$ ece4-exp generate --recipe omip-sr.yml --sim-procs 224 --expid demo-omip"
|
|
76
|
+
echo ""
|
|
77
|
+
if ece4-exp generate --recipe omip-sr.yml --sim-procs 224 --expid demo-omip -o demo-omip.yml 2>&1 | tail -5; then
|
|
78
|
+
echo ""
|
|
79
|
+
echo "Components (no atmosphere!):"
|
|
80
|
+
grep "components:" demo-omip.yml
|
|
81
|
+
echo -e "${GREEN}✓ Created demo-omip.yml${NC}"
|
|
82
|
+
fi
|
|
83
|
+
echo ""
|
|
84
|
+
|
|
85
|
+
echo "╔══════════════════════════════════════════════════════════╗"
|
|
86
|
+
echo "║ Demo Complete! ║"
|
|
87
|
+
echo "╚══════════════════════════════════════════════════════════╝"
|
|
88
|
+
echo ""
|
|
89
|
+
echo -e "${GREEN}⏱️ Time: ~3 minutes${NC}"
|
|
90
|
+
echo ""
|
|
91
|
+
echo "What you saw:"
|
|
92
|
+
echo " 1. List available recipes"
|
|
93
|
+
echo " 2. Generate coupled GCM config"
|
|
94
|
+
echo " 3. Modify config and save as new recipe"
|
|
95
|
+
echo " 4. Validate config"
|
|
96
|
+
echo " 5. Generate ocean-only config"
|
|
97
|
+
echo ""
|
|
98
|
+
echo "Next steps:"
|
|
99
|
+
echo " • Run: ece4-exp init-user (set your defaults)"
|
|
100
|
+
echo " • Read: README.md (full documentation)"
|
|
101
|
+
echo " • View: docs/presentation/ece4-exp-intro.pdf (slides)"
|
|
102
|
+
echo ""
|
|
103
|
+
echo -e "${CYAN}Cleaning up demo files...${NC}"
|
|
104
|
+
rm -f demo-*.yml recipes/my-*.yml ece4_exp/demo-*_pristine.yml
|
|
105
|
+
echo -e "${GREEN}✓ Demo files cleaned${NC}"
|
|
106
|
+
echo ""
|
ece4_exp-1.0.0/README.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# ece4-exp: EC-Earth4 Experiment Configuration Tool
|
|
2
|
+
|
|
3
|
+
**Generate EC-Earth4 configs in 30 seconds instead of 2-4 hours.**
|
|
4
|
+
|
|
5
|
+
One command creates production-ready configurations with correct components, calculated node layouts, and validated parameters.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Via pip (recommended)
|
|
13
|
+
pip install ece4-exp
|
|
14
|
+
|
|
15
|
+
# Or from source
|
|
16
|
+
git clone https://github.com/vlap/ece4-exp.git
|
|
17
|
+
cd ece4-exp
|
|
18
|
+
pip install -e .
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Generate Your First Config
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 --expid myexp \
|
|
25
|
+
--platform bsc-marenostrum5 --account bsc32
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Optional:** Save defaults to avoid typing platform/account every time:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
ece4-exp init-user
|
|
32
|
+
# Edit ~/.config/ece4-exp/defaults.yml
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Then just:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 --expid myexp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Pre-Built Recipes
|
|
42
|
+
|
|
43
|
+
| Recipe | Description | Components | Procs (MN5) |
|
|
44
|
+
|--------|-------------|------------|-------------|
|
|
45
|
+
| `gcm-sr.yml` | Coupled atmosphere-ocean | OIFS + NEMO + XIOS + OASIS | 1120 (10 nodes) |
|
|
46
|
+
| `omip-sr.yml` | Ocean-only | NEMO + XIOS | 224 (2 nodes) |
|
|
47
|
+
| `amip-sr.yml` | Atmosphere-only | OIFS + XIOS + AMIPFR | 896 (8 nodes) |
|
|
48
|
+
| `ccycle-sr.yml` | Carbon cycle | OIFS + NEMO + LPJG + XIOS | 1120+ |
|
|
49
|
+
|
|
50
|
+
## Common Commands
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# List available recipes
|
|
54
|
+
ece4-exp list
|
|
55
|
+
|
|
56
|
+
# Generate experiment config
|
|
57
|
+
ece4-exp generate --recipe <recipe.yml> --sim-procs <N> --expid <id>
|
|
58
|
+
|
|
59
|
+
# Preview without creating file
|
|
60
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 --dry-run
|
|
61
|
+
|
|
62
|
+
# Validate configuration
|
|
63
|
+
ece4-exp validate myexp.yml
|
|
64
|
+
|
|
65
|
+
# Save customized config as new recipe
|
|
66
|
+
ece4-exp save --expid myexp --recipe gcm-sr.yml -o my-recipe.yml
|
|
67
|
+
|
|
68
|
+
# Initialize user defaults (optional)
|
|
69
|
+
ece4-exp init-user
|
|
70
|
+
|
|
71
|
+
# Show help
|
|
72
|
+
ece4-exp --help
|
|
73
|
+
ece4-exp generate --help
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Examples
|
|
77
|
+
|
|
78
|
+
### Ocean-Only Experiment
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
ece4-exp generate --recipe omip-sr.yml --sim-procs 224 --expid omip001 \
|
|
82
|
+
--platform bsc-marenostrum5 --account bsc32
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Custom Recipe Workflow
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# 1. Generate base config
|
|
89
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 -o test.yml
|
|
90
|
+
|
|
91
|
+
# 2. Edit manually
|
|
92
|
+
vim test.yml
|
|
93
|
+
|
|
94
|
+
# 3. Validate
|
|
95
|
+
ece4-exp validate test.yml
|
|
96
|
+
|
|
97
|
+
# 4. Save as new recipe (includes base + your changes)
|
|
98
|
+
ece4-exp save --expid test --recipe gcm-sr.yml -o my-tuned-gcm.yml
|
|
99
|
+
|
|
100
|
+
# 5. Reuse
|
|
101
|
+
ece4-exp generate --recipe my-tuned-gcm.yml --sim-procs 1120 --expid exp002
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Batch Generation
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
for id in {001..010}; do
|
|
108
|
+
ece4-exp generate --recipe gcm-sr.yml --sim-procs 1120 \
|
|
109
|
+
--expid exp$id --quiet
|
|
110
|
+
done
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## How It Works
|
|
114
|
+
|
|
115
|
+
**YAML overlay system** merges configurations in this order:
|
|
116
|
+
|
|
117
|
+
1. Base config (from EC-Earth4 repo)
|
|
118
|
+
2. Platform launcher settings
|
|
119
|
+
3. Recipe (experiment pattern)
|
|
120
|
+
4. User defaults (~/.config/ece4-exp/defaults.yml)
|
|
121
|
+
5. CLI flags
|
|
122
|
+
|
|
123
|
+
Each layer overrides the previous, giving you full control.
|
|
124
|
+
|
|
125
|
+
## Run with EC-Earth4
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
cd /path/to/ecearth4/scripts/runtime
|
|
129
|
+
se user.yml platform.yml experiment.yml scriptlib/main.yml
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Where `experiment.yml` is generated by ece4-exp.
|
|
133
|
+
|
|
134
|
+
## Documentation
|
|
135
|
+
|
|
136
|
+
- **Try the demo:** `./QUICK_DEMO.sh` (3-minute interactive walkthrough)
|
|
137
|
+
- **Detailed guide:** [DEMO.md](DEMO.md)
|
|
138
|
+
- **Presentation:** [docs/presentation/](docs/presentation/) (slides)
|
|
139
|
+
- **Changelog:** [docs/CHANGES.md](docs/CHANGES.md)
|
|
140
|
+
|
|
141
|
+
## Platform Support
|
|
142
|
+
|
|
143
|
+
**Currently supported:**
|
|
144
|
+
- BSC MareNostrum 5
|
|
145
|
+
- ECMWF HPC2020
|
|
146
|
+
|
|
147
|
+
**Adding a new platform:**
|
|
148
|
+
Create `platforms/<platform>.yml` with launcher templates (~50 lines).
|
|
149
|
+
|
|
150
|
+
## Requirements
|
|
151
|
+
|
|
152
|
+
- Python 3.8+
|
|
153
|
+
- ruamel.yaml >= 0.17.0
|
|
154
|
+
- jsonschema >= 4.0.0
|
|
155
|
+
- pygments >= 2.10.0 (optional, for syntax highlighting)
|
|
156
|
+
|
|
157
|
+
## Features
|
|
158
|
+
|
|
159
|
+
✅ Pre-tested recipes
|
|
160
|
+
✅ Auto node layout calculation
|
|
161
|
+
✅ Config validation
|
|
162
|
+
✅ Upstream EC-Earth4 sync
|
|
163
|
+
✅ Custom recipe creation
|
|
164
|
+
✅ Script-friendly (--quiet mode)
|
|
165
|
+
✅ Cross-platform (Linux, macOS, Windows)
|
|
166
|
+
|
|
167
|
+
## Autosubmit Compatibility
|
|
168
|
+
|
|
169
|
+
For auto-ecearth4 users, backward compatibility is maintained:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
ece4-exp generate --expdef expdef_ID.yml --jobs jobs_ID.yml
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## License & Support
|
|
176
|
+
|
|
177
|
+
**License:** MIT - See [LICENSE](LICENSE)
|
|
178
|
+
|
|
179
|
+
**Questions?** vladimir.lapin@bsc.es
|
|
180
|
+
**Issues:** https://github.com/vlap/ece4-exp/issues
|
|
181
|
+
|
|
182
|
+
## Contributing
|
|
183
|
+
|
|
184
|
+
See [SIMPLIFICATION_ANALYSIS.md](SIMPLIFICATION_ANALYSIS.md) for development roadmap.
|
|
File without changes
|