Open d2hydro opened 6 months ago
While merging Ribasim-models we want to find all tables with node_id columns. Currently these are hard-coded in the variable CLASS_TABLES.
node_id
CLASS_TABLES
If ribasim itself doesn't have merge functions in March, we want to read the tables from models, using, a version of, the code below:
This should work:
CLASS_TABLES = {} for node in model.nodes().values(): CLASS_TABLES[node.get_input_type()] = node.fields()
Downside is that it requires a model instance. But the results doesn't depend on the model.
Originally posted by @visr in https://github.com/Deltares/Ribasim-NL/issues/67#issuecomment-1957932327
While merging Ribasim-models we want to find all tables with
node_id
columns. Currently these are hard-coded in the variableCLASS_TABLES
.If ribasim itself doesn't have merge functions in March, we want to read the tables from models, using, a version of, the code below:
This should work:
Downside is that it requires a model instance. But the results doesn't depend on the model.
Originally posted by @visr in https://github.com/Deltares/Ribasim-NL/issues/67#issuecomment-1957932327