Skip to content

Commit

Permalink
Fixes and closes issue #423 (#425)
Browse files Browse the repository at this point in the history
* Explicit cast to np.array isn't preserved

* Fixes issue in LAK package _init_ routines when only a single lake is active

* Previous alteration worked for one lake, but didn't handle one stage for multiple lakes.  This should account for that condition

* Fix mis-statement

* LMT: Lacking support for keyword 'ALL' following Package_Flows keyword

* Add precision for variable thkmin

* PERLEN variable getting trucated by use of "G" (general form) when number of significant digits was > 4.

* Switching printing of PERLEN in BTN from 10.6G to 10G

* Fix for issue #402 including a new test for checking mtlkt.py

* Remove apostrophe from comment (interferes with Travis build)

* Rename test, another recent commit had the same name

* Remove argument from call to test

* Adding new example notebook for MT3D-USGS that uses SFT, LKT, and UZT, including connections between them

* Fixed a typo, added link for docs/notebook_examples.md in a reasonable section of the document

* An errant capital letter in the new notebook, switched to lowercase

* Removing variable MXUZCON from mtuzt.py.  Variable was in pre-release versions of MT3D-USGS, but didn't make the final cut and was never removed from flopy until now.  Fixes and closes issue #423

* Indexes needed adjusting after removing un-used variable from Item 2 in UZT input file.

* Fixing another index issue brought about by the removal of MXUZCON
  • Loading branch information
emorway-usgs authored and jdhughes-usgs committed Oct 30, 2018
1 parent e71fbbd commit 17b7fe3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
6 changes: 6 additions & 0 deletions docs/version_changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FloPy Changes
-----------------------------------------------
### Version 3.2.11
*

* Bug fixes:
* Removed variable MXUZCON from `mtuzt.py` that was present during the development of MT3D-USGS, but was not included in the release version of MT3D-USGS.

### Version 3.2.10
* Added parameter_load variable to `mbase` that is set to true if parameter data are applied in the model (only used in models that support parameters). If this is set to `True` `free_format_input` is set to `True` (if currently `False`) when the `write_input()` method is called. This change preserves the precision of parameter data (which is free format data).
* MODFLOW 6 model and simulation packages can not be retrieved as a `MFSimulation` attribute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0 0 0 !MXUZCON,ICBCUZ,IETFLG
0 0 !ICBCUZ, IETFLG
INTERNAL 1 (free) -1 !IUZFBND
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #IUZFBND
CONSTANT 0.2539484 !A11 - SWC (lay 1)
Expand Down
23 changes: 8 additions & 15 deletions flopy/mt3d/mtuzt.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ class Mt3dUzt(Package):
model : model object
The model object (of type :class:`flopy.mt3dms.mt.Mt3dms`) to which
this package will be added.
mxuzcon : int
Is the maximum number of UZF1 connections and is equal to the number
of non-zero entries in the IRNBND array found in the UZF1 input file
for MODFLOW. Keep in mind there is potential for every cell with a
non-zero IRNBND entry to pass water to either a lake or stream segment
icbcuz : int
Is the unit number to which unsaturated-zone concentration will be
written out.
Expand Down Expand Up @@ -150,7 +145,7 @@ class Mt3dUzt(Package):
"""

def __init__(self, model, mxuzcon=0, icbcuz=None, iet=0, iuzfbnd=None,
def __init__(self, model, icbcuz=None, iet=0, iuzfbnd=None,
wc=0., sdh=0., cuzinf=None, cuzet=None, cgwet=None,
extension='uzt', unitnumber=None, filenames=None, **kwargs):

Expand Down Expand Up @@ -201,7 +196,6 @@ def __init__(self, model, mxuzcon=0, icbcuz=None, iet=0, iuzfbnd=None,

# Set package specific parameters
self.heading1 = '# UZT for MT3D-USGS, generated by Flopy'
self.mxuzcon = mxuzcon
self.icbcuz = icbcuz
self.iet = iet

Expand Down Expand Up @@ -300,8 +294,8 @@ def write_file(self):
f_uzt.write('#{0:s}\n'.format(self.heading1))

# Item 2
f_uzt.write('{0:10d}{1:10d}{2:10d} #MXUZCON, ICBCUZ, IET\n'
.format(self.mxuzcon, self.icbcuz, self.iet))
f_uzt.write('{0:10d}{1:10d} #ICBCUZ, IET\n'
.format(self.icbcuz, self.iet))

# Item 3
f_uzt.write(self.iuzfbnd.get_file_entry())
Expand Down Expand Up @@ -441,14 +435,13 @@ def load(f, model, nlay=None, nrow=None, ncol=None, nper=None,
i += 1
line = f.readline()

# Item 2 (MXUZCON, ICBCUZ, IET)
# Item 2 (ICBCUZ, IET)
if line[0:1] != '#':
# Don't yet read the next line because the current line because it
# Don't yet read the next line because the current line
# contains the values in item 2
m_arr = line.strip().split()
mxuzcon = int(m_arr[0])
icbcuz = int(m_arr[1])
iet = int(m_arr[2])
icbcuz = int(m_arr[0])
iet = int(m_arr[1])

# Item 3 [IUZFBND(NROW,NCOL) (one array for each layer)]
if model.verbose:
Expand Down Expand Up @@ -659,7 +652,7 @@ def load(f, model, nlay=None, nrow=None, ncol=None, nper=None,
model.add_pop_key_list(icbcuz)

# Construct and return uzt package
uzt = Mt3dUzt(model, mxuzcon=mxuzcon, icbcuz=icbcuz, iet=iet,
uzt = Mt3dUzt(model, icbcuz=icbcuz, iet=iet,
iuzfbnd=iuzfbnd, wc=wc, sdh=sdh, cuzinf=cuzinf,
cuzet=cuzet, cgwet=cgwet, unitnumber=unitnumber,
filenames=filenames, **kwargs)
Expand Down

0 comments on commit 17b7fe3

Please sign in to comment.