Merged
Conversation
…d.knmi.get_recharge()`
Collaborator
|
I can't reproduce |
Collaborator
Author
Ok, thanks for checking. Lets hope this error will go away again by itself in the future. So this last error is not related to this PR, and I think we can merge it. |
This was referenced Oct 29, 2025
OnnoEbbens
approved these changes
Nov 19, 2025
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.
This PR makes the addition of recharge to a model dataset and generating rch- and evt-packages more flexible.
The following improvements have been added:
Current implementation
When running the code:
produces for
knmi_ds:add_stn_dimensions=True
You can now add
add_stn_dimensions=Trueto the last line (nlmod.read.knmi.get_recharge(ds, add_stn_dimensions=True)), which results in:So the recharge is not copied for every gridcell anymore, but is specified per rainfall- and evaporation-station (see dimensions
stn_RDandstn_EV24). New variablesrecharge_stnandevaporation_stnare returned, that determine for which cells each station is used. This change is also supported in the generation of the rch-, evt- and uzf-packages.to_model_time=False
We can also add
to_model_time=Falseto this line (nlmod.read.knmi.get_recharge(ds, add_stn_dimensions=True, to_model_time=False)), which results in:This does not resample the time to the model-time, and adds the dimensions
time_RDandtime_EV24. This may be useful for when you want to preprocess the data to the model time differently than we do now innlmod.More flexibility in adding meteorlogical data to rch, evt and uzf
More flexibility is added in supplying meteorological data to the rch- evt and uzf packages.
rechargein rch,ratein evt andfinf/petinuzfcan now be supplied as a float (see issue #505), a DataArray with only time-dimension, a DataArray with only spatial dimensions, a DataArray with both time and spatial dimensions, and by supplying data only for stations (see add_stn_dimensions=True above). This DataArray can also still be referenced by the name of the variable in ds. All changes should be backwards compatible.