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

fix(mvr): added documentation explaining the difference between the two flopy mvr classes #950

Merged
merged 1 commit into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion flopy/mf6/modflow/mfgwfmvr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

class ModflowGwfmvr(mfpackage.MFPackage):
"""
ModflowGwfmvr defines a mvr package within a gwf6 model.
ModflowGwfmvr defines a mvr package within a gwf6 model. This package
can only be used to move water between packages within a single model.
To move water between models use ModflowMvr.

Parameters
----------
Expand Down
4 changes: 3 additions & 1 deletion flopy/mf6/modflow/mfmvr.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

class ModflowMvr(mfpackage.MFPackage):
"""
ModflowMvr defines a mvr package.
ModflowMvr defines a mvr package. This package can only be used to move
water between two different models. To move water between two packages
in the same model use the "model level" mover package (ex. ModflowGwfmvr).

Parameters
----------
Expand Down
22 changes: 18 additions & 4 deletions flopy/mf6/utils/createpackages.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,25 @@ def create_packages():
package[2])
else:
package_container_text = ''
doc_string = mfdatautil.MFDocString(
'Modflow{} defines a {} package'
'{}.'.format(package_name.title(),
ds = 'Modflow{} defines a {} package' \
'{}.'.format(package_name.title(),
package[0].file_type,
package_container_text))
package_container_text)
if package[0].file_type == 'mvr':
# mvr package warning
if package[2]:
ds = '{} This package\n can only be used to move ' \
'water between packages within a single model.' \
'\n To move water between models use ModflowMvr' \
'.'.format(ds)
else:
ds = '{} This package can only be used to move\n ' \
'water between two different models. To move ' \
'water between two packages\n in the same ' \
'model use the "model level" mover package (ex. ' \
'ModflowGwfmvr).'.format(ds)

doc_string = mfdatautil.MFDocString(ds)

if package[0].dfn_type == mfstructure.DfnType.exch_file:
add_var(init_vars, None, init_param_list, package_properties,
Expand Down