Skip to content

Conversation

@rene-deltares
Copy link
Contributor

What was done

A model with old style long culverts should automatically be converted to a model with new style long culverts (For now if the setting convertLongCulverts is enabled)
When running dflowfm with the --partition flag on a model with old longculverts, the converted longculverts should end up in the partitioned netfile, and the partitioned mdu file should contain references to the converted structures.ini and the converted cross sections file.

Evidence of the work done

  • Figure showing the longculvert discharge. One for a sequential run, with converted long culverts. One for a parallel run, where the partitioning was used.
longculvert_discharge_blue_parallel_red_sequential_zoom Blue line is the parallel his file, red line is the sequential his file. The plot is of the longculvert `LC2`. `LC1` shows no difference in the discharge

Tests

  • Tests updated
    <add testcase numbers if applicable, Issue number>
  • Not applicable

Documentation

  • Documentation updated
    <add description of changes if applicable, Issue number>
  • Not applicable

Issue link

Copy link
Contributor

@FlorisBuwaldaDeltares FlorisBuwaldaDeltares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! One small question

mkdir -p "$(dirname $TESTBENCH_ARTIFACTS)"
if [[ ! -d "$TESTBENCH_ARTIFACTS" ]]; then
ln -s -T "$(realpath build_fm-suite_release/install/)" "$TESTBENCH_ARTIFACTS"
ln -s -T "$(realpath -m build_fm-suite_release/install/)" "$TESTBENCH_ARTIFACTS"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh this seems like an unrelated change? what does this fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it is unrelated. This should go in a separate issue for improving devcontainer usability

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove it from this PR

private

public :: generatepartitionmdufile
public :: generatePartitionMDUFile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this routine not have snake_case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer snake_case as well, but I didn't change the name. I'll change it to snake_case

<checks>
<file name="DFM_OUTPUT_tunnel/tunnel_0000_his.nc" type="NETCDF">
<parameters>
<parameter name="longculvert_discharge" toleranceAbsolute="0.005" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question for reviewers: The tolerance here is quite high. I had to set it to 0.005 so the testcase would pass on both linux and windows with the same references. Is it ok?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the long culvert has a bit of instabilities during initialization. For this reason i'm not worrying about those small discharge differences, but it might be something to revisit later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants