Wflow.jl icon indicating copy to clipboard operation
Wflow.jl copied to clipboard

Mapping of internal model variables and parameters to standard names

Open verseve opened this issue 1 year ago • 0 comments

Feature type

Changing existing functionality

Improvement Description

The mapping of model variables to external names (e.g. in the TOM config file and BMI) is one to one. For example, the satwaterdepth variable of the vertical SBM concept can be accessed in Julia through model.vertical.satwaterdepth, and should be mapped to vertical.satwaterdepth in the TOML config file to write this variable as output or read as a state input. As part of v1.0, the large structs of vertical concepts are divided into sub-models/structs. For example the SBM concept is divided into interception, snow, glacier and soil modules. Additionally, separate structs are used for model variables and parameters, and we make use of shared parameters (e.g. for vegetation).

As a consequence, this results in a mapping that can get complex for an end-user, with below an example for a part of the TOML config file:

[output.vertical.interception.variables]
canopy_storage = "canopystorage"

[output.vertical.soil.variables]
satwaterdepth = "satwaterdepth"
tsoil = "tsoil"
ustorelayerdepth = "ustorelayerdepth"

[output.vertical.snow.variables]
snow_storage = "snow"
snow_water = "snowwater"

Additionally, a disadvantage of the one to one mapping is that any change in the setup of the Model struct requires also a change in the TOML config file. An improvement would be to work with standard variable/parameter names resulting in a more user friendly external access of model variables.

Implementation Description

For the variable names CSDMS provides a good standard that we can use: https://csdms.colorado.edu/wiki/CSDMS_Standard_Names.

Additional Context

No response

verseve avatar Oct 09 '24 12:10 verseve