Skip to content

Commit

Permalink
Merge pull request #215 from CABLE-LSM/192-move-experiment-key-under-…
Browse files Browse the repository at this point in the history
…fluxsite

Move `experiment` key under `fluxsite`
  • Loading branch information
SeanBryan51 authored Nov 30, 2023
2 parents a160d2c + ab84f0a commit ded19e5
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 40 deletions.
4 changes: 3 additions & 1 deletion benchcab/benchcab.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def _initialise_tasks(self, config: dict) -> list[Task]:
"science_configurations", internal.DEFAULT_SCIENCE_CONFIGURATIONS
),
fluxsite_forcing_file_names=get_met_forcing_file_names(
config["experiment"]
config.get("fluxsite", {}).get(
"experiment", internal.FLUXSITE_DEFAULT_EXPERIMENT
)
),
)
return self.tasks
Expand Down
24 changes: 12 additions & 12 deletions benchcab/data/config-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ modules:
schema:
type: "string"

experiment:
type: "string"
allowed: [
"five-site-test",
"forty-two-site-test",
"AU-Tum",
"AU-How",
"FI-Hyy",
"US-Var",
"US-Whs"
]

science_configurations:
type: "list"
schema:
Expand Down Expand Up @@ -72,6 +60,18 @@ fluxsite:
type: "dict"
required: false
schema:
experiment:
type: "string"
allowed: [
"five-site-test",
"forty-two-site-test",
"AU-Tum",
"AU-How",
"FI-Hyy",
"US-Var",
"US-Whs"
]
required: false
multiprocessing:
type: "boolean"
required: false
Expand Down
3 changes: 2 additions & 1 deletion benchcab/data/test/config-invalid.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# A sample configuration that should fail validation.
project: w97

experiment: NON EXISTENT EXPERIMENT!!!
fluxsite:
experiment: NON EXISTENT EXPERIMENT!!!

realisations: [
{
Expand Down
2 changes: 0 additions & 2 deletions benchcab/data/test/config-valid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

project: w97

experiment: five-site-test

realisations:
- repo:
svn:
Expand Down
9 changes: 4 additions & 5 deletions benchcab/data/test/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ git reset --hard 6287539e96fc8ef36dc578201fbf9847314147fb
cat > config.yaml << EOL
project: $PROJECT
experiment: AU-Tum
realisations:
- repo:
svn:
Expand All @@ -34,9 +32,10 @@ modules: [
]
fluxsite:
pbs:
storage:
- scratch/$PROJECT
experiment: AU-Tum
pbs:
storage:
- scratch/$PROJECT
EOL

benchcab run -v
2 changes: 2 additions & 0 deletions benchcab/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@
],
}

FLUXSITE_DEFAULT_EXPERIMENT = "forty-two-site-test"

OPTIONAL_COMMANDS = ["fluxsite-bitwise-cmp"]


Expand Down
39 changes: 20 additions & 19 deletions docs/user_guide/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,25 @@ modules: [

```

## experiment
## fluxsite
Contains settings specific to fluxsite tests.

This key is _optional_. **Default** settings for the fluxsite tests will be used if it is not present

```yaml
fluxsite:
experiment: AU-How
pbs:
ncpus: 18
mem: 30GB
walltime: 06:00:00
storage: [scratch/a00, gdata/xy11]
multiprocess: True
```
: **Default:** _required key, no default_. :octicons-dash-24: Type of experiment to run. Experiments are defined in the **benchcab-evaluation** workspace on [modelevaluation.org][meorg]. This key specifies the met forcing files used in the test suite. To choose from:
### [experiment](#experiment)
: **Default:** `forty-two-site-test`, _optional key_. :octicons-dash-24: Type of fluxsite experiment to run. Experiments are defined in the **benchcab-evaluation** workspace on [modelevaluation.org][meorg]. This key specifies the met forcing files used in the test suite. To choose from:

: | Key value | Experiment description |
|-----------|------------------------|
Expand All @@ -68,25 +84,10 @@ modules: [
| `US-Var` | Run simulations at the Vaira Ranch-Ione (US) site |
| `US-Whs` | Run simulations at the Walnut Gulch Lucky Hills Shrub (US) site |

```yaml

experiment: "AU-How"

```
## fluxsite
Contains settings specific to fluxsite tests.
This key is _optional_. **Default** settings for the fluxsite tests will be used if it is not present
```yaml
fluxsite:
pbs:
ncpus: 18
mem: 30GB
walltime: 06:00:00
storage: [scratch/a00, gdata/xy11]
multiprocess: True
experiment: AU-How
```

### [pbs](#pbs)
Expand Down

0 comments on commit ded19e5

Please sign in to comment.