bmi icon indicating copy to clipboard operation
bmi copied to clipboard

How to deal with values at e.g. boundaries, hydraulic structures?

Open hrajagers opened this issue 7 years ago • 4 comments

Alternative 1:

  • set_value(“boundaries:hoekvanholland:water_level”, 2.0)

Alternative 2:

  • get_value("boundaries")
  • identify boundary index
  • set_value_at_index("boundary_water_level", 2.0)

hrajagers avatar Nov 16 '18 14:11 hrajagers

Similar to interpolation question "get water_level at (x,y)" Distinguish between BMI with basic functions, and convenience (framework) functions on top of BMI

hrajagers avatar Nov 16 '18 14:11 hrajagers

Alternative 1 can be slow: string parsing every time

Alternative 3:

  • item = get_input_item_handle(“boundaries:hoekvanholland:water_level”)
  • set_value(item, 2.0)

This is already more in line with Alternative 2.

hrajagers avatar Nov 16 '18 14:11 hrajagers

This issue has come up in work with @rmcd-mscb.

mdpiper avatar Nov 16 '18 16:11 mdpiper

I think for boundaries: these can be implemented as seperate grids, ie one or more boundaries are refered to with different grid indices. These can be (depending on the implementation of the code) be really references to seperate grids, or references to a subset of the main grid. The issue is here a way to let the same variable life on different grids...

for hydraulic structures, recording stations etc: these would benefit from #14, they need a way to represent non-grid data (e.g. a set of sampling stations).

ipelupessy avatar Nov 20 '18 10:11 ipelupessy