-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing feature properties to BMI models through model_params
#588
Conversation
Appears we're not building SLoTH in the workflows yet. While automated testing was one of SLoTH's use cases, the thought was more for integration tests... this one is simple enough, can it get away with using |
|
I have this fixed in a parallel PR... looks like I need to make a subset of that PR into its own PR anyway. I'll try to get this out today. |
#594 should fix the unit test issue. |
Moving back to draft -- accidentally committed upstream changes from SoilMoistureProfiles (which I'm not even sure how those got pulled on my local side). EDIT: fixed as of force push to 1ef3d47. |
c7f4cff
to
1ef3d47
Compare
#594 was merged which should remove the need for skipping the test if test_bmi_cpp is not built... recommend rebasing. |
Adds MODEL_VAR_1 and MODEL_VAR_2, as well as OUTPUT_VAR_4 and OUTPUT_VAR_5 as output variables
4aa3f4b
to
bc57e14
Compare
Hmm. Fun fact... this worked: (with SLoTH...)
|
This PR resolves #554 by providing a new value specification for formulation model parameters (
model_params
).An external model parameter is described as:
Where the following represent:
<parameter name>
: the name the BMI model will use<source>
: This PR only supports a source of"hydrofabric"
, but this scaffolds out the possibly of supplying a path to a separate file that can be joined on demand.<mapping>
: A mapping name that signifies what the property is named as within<source>
An example of what this could look like is as follows:
In this example,
area
andlength_km
are defined within the hydrofabric feature, and are passed to the BMI model asarea_sqkm
andlength_km
, respectively.Additions
parse_external_model_params
torealization::Formulation_Manager
that performs the parsing/modification ofmodel_params
.Formulation_Manager::read
that checks for amodel_params
key when iterating the catchment-specific formulations.Testing
All unit tests pass locally in
Release
with GCC 13.1.1, Clang 15.0.7, and IntelLLVM 2023.Todos
model_params
for global formulations.model_params
.model_params
for catchment-specific multi-BMI formulations.model_params
.model_params
for global multi-BMI formulations.model_params
.Checklist
Target Environment support