Skip to content

Commit

Permalink
Rename BMI var to user_demand.cumulative_inflow
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Oct 7, 2024
1 parent 8ceffc7 commit 0d69ae0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/bmi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function BMI.get_value_ptr(model::Model, name::AbstractString)::AbstractVector{F
p.subgrid.level
elseif name == "user_demand.demand"
vec(p.user_demand.demand)
elseif name == "user_demand.inflow"
elseif name == "user_demand.cumulative_inflow"
u.user_demand_inflow
else
error("Unknown variable $name")
Expand Down
2 changes: 1 addition & 1 deletion core/test/bmi_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end
"basin.cumulative_drainage",
"basin.subgrid_level",
"user_demand.demand",
"user_demand.inflow",
"user_demand.cumulative_inflow",
]
value_first = BMI.get_value_ptr(model, name)
BMI.update_until(model, 86400.0)
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim_api/tests/test_bmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_get_value_ptr_allocation(libribasim, user_demand, tmp_path):
libribasim.update_until(60.0)

# Realized inflow
actual_inflow = libribasim.get_value_ptr("user_demand.inflow")
actual_inflow = libribasim.get_value_ptr("user_demand.cumulative_inflow")
expected_inflow = np.array([1e-4 * 60.0, 0.0, 0.0])
assert_array_almost_equal(actual_inflow, expected_inflow)

Expand Down

0 comments on commit 0d69ae0

Please sign in to comment.