Open shartgring opened 1 month ago
See also the tests in #169 where this problem was found. Ideally, the tests of setup_bridges
and setup_culverts
should be able to run directly after reading the test model, without first calling the setup_channels
method
Version checks
Reproducible Example
The workflow for setting point cross-sections, which is used for cross-sections but also bridges and culverts, relies on the branches containing the columns
["frictionid", "frictiontype", "frictionvalue"]
. In workflows.crosssections.py: https://github.com/Deltares/hydromt_delft3dfm/blob/8862432e235ff5740c83dd322d76d22f6b22271b/hydromt_delft3dfm/workflows/crosssections.py#L594-L598However, when a DFlowFM model is read using
read_model
, these attributes are not read, and only columns found in thebranches.gui
file are included. I looked atprepare_default_friction_and_crosssection()
but I think it that we might be looking for something elseCurrent behaviour
When a model is read, no friction info is added to the branches. This info is used by other parts of the code
Desired behaviour
Either change workflows such that the friction info is not needed, or enhance model reading such that the friction of the branches can be inferred from a model. A possible (easy) solution is reading the branches geom, but this will then not work with DFlowFM models that are not built using hydromt_delft3dfm. Either way, I think there are multiple solutions and that therefore some extra thinking is required for finding the best solution
Additional context
No response