-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling data when building flopy packages from model dataset #188
Merged
Conversation
This file contains 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
- use _get_value_from_ds_attr and _get_value_from_data_var - deprecation warning for ghb/drn `da_name=` kwarg - rename 'chd' arg to 'mask' (with deprecationwarning)
- since we use ds as a common abbreviation for dataset
CI error is unrelated to this PR (something about data from Wetterskip Fryslan), so this is ready for review. |
Looks good. There are probably some other places we need to make input more consistent (I cannot name one though), but let's merge these improvements! |
rubencalje
approved these changes
Jun 7, 2023
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 aims to inform users how nlmod is dealing with data when users build flopy packages.
In terms of variables we're trying to stick to flopy default names as much as possible. This is mostly the case, though some differences might remain. To distinguish datasets between different packages the convention we're using is
<package-abbreviation>_<variable-name>
.Basically, there are two options:
Option 2 will have precedence over option 1, so passing your own data-array will always override any stored dataset (with the same name).
Option 1:
Option 2:
The function
_get_value_from_ds_datavar
takes care of this behavior for data variables. The function_get_value_from_ds_attr
does something similar for attributes. Both these functions are tested intest_003_mfpackages.py
, which can also be helpful in understanding how to call these methods.Other things worth mentioning:
da_name
keyword arguments fornlmod.gwf.ghb
andnlmod.gwf.drn
packageschd
keyword argument, renamed tomask
innlmod.gwf.chd