Skip to content

Commit

Permalink
fix(mvr): added documentation explaining the difference between the t…
Browse files Browse the repository at this point in the history
…wo flopy mvr classes (#950)
  • Loading branch information
spaulins-usgs committed Jul 31, 2020
1 parent cd81a09 commit 49b4aa2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
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

0 comments on commit 49b4aa2

Please sign in to comment.