eWaterCycle / eWaterCycle/ewatercycle
recipes that require input from different MIP tables not supported by forcing.generate()
- Dominant language
- Python
- Stars
- 41
- Forks
- 6
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 2
Description
foricing.generate() makes the assumption that all the variables that the recipe needs are available in a unique set of information contained in a dict, for example:
```python
cmip_dataset_observation = {
"dataset": "MPI-ESM1-2-HR",
"project": "CMIP6",
"grid": "gn",
"exp": "historical",
"ensemble": "r3i1p1f1",
}
```
followed by
```python
pcrglobwb_forcing = ewatercycle.forcing.sources["PCRGlobWBForcing"].generate(
dataset=cmip_dataset_observation,
start_time="1990-01-01T00:00:00Z",
end_time="1992-12-31T00:00:00Z",
shape="./data/Rhine/Rhine.shp",
extract_region={
"start_latitude": y0 - esmvaltool_padding,
"end_latitude": y1 + esmvaltool_padding,
"start_longitude": x0 - esmvaltool_padding,
"end_longitude": x1 + esmvaltool_padding,
},
start_time_climatology="1990-01-01T00:00:00Z",
end_time_climatology="1992-01-01T00:00:00Z",
)
```
When generating forcing for WFLOW we discovered that sometimes some variables are not stored in the same MIP table as others. (Case in point: ```orog```).
Suggested fix (though I would not know how to implement) would be to allow a nested dict in the dataset specificy this for expert users, for example:
```python
cmip_dataset_observation = {
"dataset": "MPI-ESM1-2-HR",
"project": "CMIP6",
"mip": {"tas": "day", "pr": "day", "orog": "perm"},
"grid": "gn",
"exp": "historical",
"ensemble": "r3i1p1f1",
}
```
This could be an option for any field in the dict. When a single string is provided this automatically the value for all the variables.
Contributor guide
Assessment
This issue has not been assessed yet.