Skip to content
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

Add groundwater transport capabilities to nlmod #148

Merged
merged 37 commits into from
Mar 13, 2023
Merged

Add groundwater transport capabilities to nlmod #148

merged 37 commits into from
Mar 13, 2023

Conversation

dbrakenhoff
Copy link
Collaborator

@dbrakenhoff dbrakenhoff commented Mar 7, 2023

This PR introduces functionality to create a transport model using nlmod.

  • Add BUY package to GWF
  • Add gwt module for building groundwater transport model
  • Add gwt.output for post-processing concentrations (and converting pointwater and freshwater heads)
  • Add gwt.prepare module to set dataset attributes with default values for transport modeling (currently only for chloride)
  • Improve GHB and CHD constructors to accept auxiliary variables
  • Improve lrc_to_reclist and lcid_to_reclist to accept aux vars
  • Add aggregate_by_weighted_mean_to_ds to vertically calculate the weighted mean per layer from a dataset with different layer definition.
  • Add example notebook.

- add auxiliary variable support to GHB and CHD
- add BUY package
- add GWT
- add DIS (copy of GWF, dis, could be more efficient?)
- add DISV (copy of GWT disv, could be more efficient)
- add ADV
- add DSP (determine where to pick up vars)
- add SSM
- add MST
- add CNC
- add OC (_set_record could be generalized between gwf/gwt)
- add IC
- add GWFGWT exchange
- add GWT
- add DIS (copy of GWF, dis, could be more efficient?)
- add DISV (copy of GWT disv, could be more efficient)
- add ADV
- add DSP (determine where to pick up vars)
- add SSM
- add MST
- add CNC
- add OC (_set_record could be generalized between gwf/gwt)
- add IC
- add GWFGWT exchange
- allow aux to be both dataset variable (str) and single float/int
- weighted mean value of source dataarray  per layer defined in model dataset
- make dis/disv work for both gwf and gwt
- improve aux support to ghb/chd
- store ssm_sources if aux is defined and transport is True
- add drn package, similar to GHB
- make _set_record work for both head and concentration for oc pkg
- allow masking where recharge should be applied.
- reuse gwf dis/disv and _set_record
- improve getting vars from dataset or passing directly to function
- for ssm, get sources from ssm_sources attribute (auto added when gwf pkgs are created with aux vars)
- add method to load concentrations as dataarray
- add method to get concentrations at gw surface (first active layer)
- supports chloride (with certain default values)
- no overwriting stored dataset attributes when building a model
- introduce _get_var_from_ds_attr for unifying method to obtain attribute data from dataset
- introduce _get_var_from_ds_datavar for unifying method to obtain data variable from dataset
- allow setting custom modelname for transport model
- add docstrings
- introduce _dis and _disv and reuse in gwt/gwt modules
- fix other issues
@dbrakenhoff dbrakenhoff marked this pull request as ready for review March 10, 2023 11:31
@dbrakenhoff dbrakenhoff self-assigned this Mar 10, 2023
@dbrakenhoff dbrakenhoff added the enhancement New feature or request label Mar 10, 2023
Copy link
Collaborator

@OnnoEbbens OnnoEbbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! I added some questions/ideas

docs/examples/02_surface_water.ipynb Outdated Show resolved Hide resolved
docs/examples/09_schoonhoven.ipynb Outdated Show resolved Hide resolved
docs/examples/13_plot_methods.ipynb Outdated Show resolved Hide resolved
docs/examples/14_stromingen_example.ipynb Outdated Show resolved Hide resolved
nlmod/dims/layers.py Show resolved Hide resolved
nlmod/gwt/gwt.py Outdated Show resolved Hide resolved
nlmod/gwt/output.py Outdated Show resolved Hide resolved
nlmod/gwt/output.py Outdated Show resolved Hide resolved
nlmod/gwt/prepare.py Show resolved Hide resolved
nlmod/version.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants