Deltares / hydromt_wflow

Wflow plugin for HydroMT
https://deltares.github.io/hydromt_wflow/
GNU General Public License v3.0
16 stars 13 forks source link

Improve behavior of `setup_constant_pars` #232

Open JoostBuitink opened 7 months ago

JoostBuitink commented 7 months ago

Kind of request

Changing existing functionality

Enhancement Description

Currently the setup_constant_pars is adding maps with uniform values to the staticmaps file. Currently, there is also no entry added to the wflow TOML configuration file, but implicitly taken from the "reference" TOML file. This means that, if someone would like to add an additional constant parameter, the TOML file won't be updated correctly.

Furthermore, to improve clarity and ease-of-use, it would be good if - in stead of a layer in the staticmaps - the value gets added to the wflow TOML configuration file, see the example below:

[input.vertical]
ksathorfrac.value = 100

Use case

No response

Additional Context

Currently, If passing the required information to the config object (through parameter.value), the TOML gets written in the following manner:

[input.vertical.ksathorfrac]
value = 100

While this is file for a limited number of constant parameters, I would prefer if it gets added like in the "Enhancement description" above.

I did some work related to this in this branch: https://github.com/Deltares/hydromt_wflow/tree/toml_naming