Deltares / hydromt_wflow

Wflow plugin for HydroMT
https://deltares.github.io/hydromt_wflow/
GNU General Public License v3.0
15 stars 13 forks source link

Snapping to river with uparea method #248

Closed hboisgon closed 4 months ago

hboisgon commented 6 months ago

Issue addressed

Fixes #224

Explanation

Allow to pass a mask to the gauge_map_uparea workflow. Also found a bug that validation was not properly done (should be both validation on relative and absolute error).

Checklist

Done: check if possible upstream area snapping with no data for some locations could work (especially if mask is not None eg snap_to_river)

hboisgon commented 4 months ago

Thanks for the review @dalmijn. Can you please send your test? This will be easier to debug.

hboisgon commented 4 months ago

@dalmijn and @JoostBuitink I corrected the bugs and added a flag for fillna in upstream are that is false by default (nodata gauges are skipped). So that the users knows what he is doing if he decides to put the flag to True :) Hope the PR is now ready to be merged!