DHI / mikeio

Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.
https://dhi.github.io/mikeio
BSD 3-Clause "New" or "Revised" License
136 stars 53 forks source link

Dfsu read elements preserve order #690

Closed ecomodeller closed 1 month ago

ecomodeller commented 2 months ago

closes #689

ecomodeller commented 2 months ago

After, consistency between values and coordinates. image

ecomodeller commented 2 months ago

632 is related closely to this PR

ecomodeller commented 1 month ago

@jsmariegaard Merging this PR broke some tests in modelskill related to skill 😐

FAILED tests/test_config.py::test_comparison_from_yml - assert 0.2330094096313094 == 0.2331039 ± 2.3e-07
FAILED tests/test_multivariable_compare.py::test_mv_skill - assert 0.2249234222997736 ± 2.2e-07 == 0.22792652
FAILED tests/test_multivariable_compare.py::test_mv_mm_skill - assert 1.3053589704786461 ± 1.3e-06 == 1.5610323
FAILED tests/test_multivariable_compare.py::test_mv_mm_mean_skill - assert 0.643293404624024 ± 6.4e-07 == 0.6246696
FAILED tests/test_pointcompare.py::test_score - assert 0.19863716489592623 == 0.19870695 ± 2.0e-07

But I suppose the expected scores are actually not correct, since the default algorithm is to use IDW interpolation and the nearest elements are out of order, but this needs to be verified. image image

jsmariegaard commented 1 month ago

Hmm, something for next week...