Fractional open-water coverage for the recharge mask and polder DRN - #71
Merged
Conversation
- riv_from_oppervlakte_pwn stores ds['panden_coverage']: the panden-covered fraction of each cell from the intersected piece areas. - recharge_pond_mask(fractional=True) uses that fraction at panden cells (summed with the lake coverage and clipped at 1) instead of a hard 1.0; without the variable the previous 1.0-at-panden-cells behavior is kept. - drn_from_waterboard_data's exclude generalizes from a boolean drop mask to an open-water fraction: the conductance is scaled by the drainable land share 1 - exclude, dropping the reach where the share is zero. Boolean masks behave exactly as before. - Tests: known-answer panden coverage, combined lake+panden fraction with clipping, and land-share-scaled DRN conductance.
Open
10 tasks
Member
Author
|
The rch an evt should only be subtracted from the lakes, because they have their own rainfall and evaporation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supports NHFLO/models#135: fully fractional handling of open-water cell coverage in
09pwnmodel2.riv_from_oppervlakte_pwnstoresds['panden_coverage']— the panden-covered fraction of each cell, from the intersected piece areas.recharge_pond_mask(fractional=True)uses that fraction at panden cells (summed with the lake coverage, clipped at 1) instead of a hard 1.0. When the variable is absent the previous behavior (1.0 at panden RIV cells) is preserved, which keeps the existing contract tests green.drn_from_waterboard_data'sexcludegeneralizes from a boolean drop mask to an open-water fraction: the DRN conductance is scaled by the drainable land share1 - exclude, and the reach is dropped where the land share is zero. Boolean masks scale by 0/1 and behave exactly as before (all 24 pre-existing polder/lakes/panden tests pass unchanged).The models script combines this with the RWS
rws_oppwater_areafraction (and the BGT fraction in thepolders_in_detailbranch) into onesw_frac, scales RCH and the new EVT package by1 - sw_frac, and passes it as the polder-DRN exclude — see the companion commit on NHFLO/models#135.Note: the models notebook CI installs
nhflotools@main, so NHFLO/models#135 needs this PR merged first (the old boolean-only~excluderaises on a float fraction).Tests: 142 passed, 1 xfailed (3 new: panden coverage known-answer, combined lake+panden fraction with clipping, land-share-scaled DRN conductance).