Skip to content

Commit

Permalink
feat(gwt/buy): major refactor for gwt and buy
Browse files Browse the repository at this point in the history
* fix(uzf): fix indexing error in UZF (#274)

* Error introduced as part of recent UZF refactoring
* Closes #273

* fix(memory): some variables not deallocated (#278)

Implemented new check in develop mode so code bombs with error if memory manager variable not deallocated

* refactor(budobj): new budget object for advanced packages (#279)

* single code base for writing binary budget files for advanced packages
* single code base for creating and writing budget tables to list file for advanced packages
* implemented for MAW, UZF, LAK, SFR, and MVR
* closes #277
* update mf6exes from 2.0 to 3.0
* will allow generalized transport calculations for advanced packages

* refactor(advanced packages): read static data as part of df() (#281)

* refactor(advanced packages): modify advanced packages to read all static data as part of df()
* modify setup_budobj to include the connectivity so that it is available to other models

* fix(budterm): initialize nlist to zero (#283)

* initialize nlist to zero (#284)

* fix(lak): initialize chdratin and chdratout to zero (#286)

* fix(lak): added sign checks for user specified lak flow terms (#288)

* User-specified values for RAINFALL, EVAPORATION, RUNOFF, INFLOW, and WITHDRAWAL must be positive.  The program worked if these values were negative, but that doesn't necessarily make sense and is probably an input error.
* Updated definition file to reflect these changes
* Corrected minor typo in lake definition file
* Updated release notes to reflect this change
* Close #287

* feat(sfr): add storage term to sfr budget (#293)

* Also includes a reach volume term written as an aux variable.  This is needed for transport.
* initialize str so non-ascii characters don't show up in output files
* updated notes for these changes

* * fix(csub): Fix CSUB binary budget data saved as IMETH=6 datatype

closes #290

* refactor(sfr): Refactor SFR Package to remove use of Geometry objects (#296)

* refactor(sfr): Refactor SFR Package to remove use of Geometry objects

* doc(pak-ts): update description of package timeseries variables. 

* ci(yml): update yml to clone shallow copy of flopy and pymake repos

* doc(release): Update release notes

* Closes #276, and #289

* refactor(xt3d): accumulate flowja instead of set (#306)

This change is required for transport, which accumulates terms in flowja

* fix(dis): corrected connection vector error in DIS package (#308)

Code was incorrectly calculating cell center elevations when nozee was .false.  This error would have affected XT3D simulations with unconfined flow and non-zero values specified for ANGLE2 in the NPF Package.  It also would affect dispersive transport with XT3D for unconfined conditions.

* Update sln-ims-example.dat

* refactor(maw): refactor MAW conductance calculation for issue 305 (#310)

Add traps to catch 1) skin factors that are <= 0 when using the SKIN
conductance equation and 2) and negative saturated conductances values.

Closes #305

* feat(tableobj): Add a generic table object for lst file output (#303)

Full implementation for SFR package. Partial implementation for LAK, MAW, and UZF packages.

* feat(tableobj): update MAW package to use tableobj for data output (#315)

Also fix some budget reporting issues in the MAW package

* fix(auxmult): auxmult fix when auxmult and bound are in time series (#316)

* change order of time series interpolation so aux is done first in case it is an auxmult column
* partially addresses #314
* updated release notes

* refactor(BoundaryPackage): Add use of TableObject for print_flows option (#317)

* feat(lnf): update n-point geometry package data

* Revert "feat(lnf): update n-point geometry package data"

This reverts commit 3460cfb.

* fix(lak): revise the way outlet to-mvr flows are stored in budobj (#321)

* fix(lak): revise the way outlet to-mvr flows are stored in budobj

* updated release notes

* refactor(lak/maw/sfr): for CONSTANT features write fixed value instead of DHNOFLO to binary file (#329)

* refactor(lak/maw/sfr): for CONSTANT features write fixed value instead of DHNOFLO to binary file

* update release notes

* fix(maw): new headtable corrected to have mawwells rows instead of maxbound (#332)

* fix(sfr): Remove upstream_fraction check from PACKAGEDATA block (#334)

closes #324

* feat(transport): update develop with some general routines needed for transport (#339)

* feat(transport): update develop with some general routines needed for transport
* fix(mover): correct typo in error message
* closes #336
* refactor(disu): correct type in disu error message
* closes #635

* fix(csub): Allow interbed observations when no interbeds specified (#338)

DNODATA values reported if 1) delay interbed observations are specified
and no delay interbeds are specified and 2) interbed observations are
specified and the number of interbeds is zero. Added test of all
observation types to test_gwf_csub_sk01.py which has no interbeds.

closes #298

* ci(travis): update travis.yml to install miniconda instead of apt python (#346)

* refactor(mf6): standardize output to STDOUT to use istdout variable

* refactor(mf6): standardize output to STDOUT to use istdout variable

Modify mf5to6 to use standard SimVariables.f90 in mf6 src and add
ListType variables in original mf5to6 SimVariables.f90 file to
SimListVariables.f90 and update use statements.

* feat(npf): add save saturation option to NPF (#351)

* changed some things to public in lak, uzf, sfr
* fixed minor bug in uzf
* updated release notes and dfn files
* modified lak to store hlak and clak in the bound array

* refactor(sim_message): Refactor to have independent sim_message (#353)

* bug(csub): Write better cellid format to strain csv files (#355)

Write integer cellids to csv files instead of string. Add method
to discretization classes to return array of user indices. Refactored
table output to use table object instead of UWWORD.

closes #299

* fix(csub): Add additional inelastic- and elastic-compaction-cell obs. (#356)

Closes #302

* fix(csub): Report NODATA for CSUB observ. not calculated in steady-state (#359)

CSUB source has been modified to report NODATA values for observations
that are not calculated during steady-state stress periods.
Observations that are not calculated for steady-state stress
periods include SKE, SK, SKE-CELL, SK-CELL, DELAY-HEAD,
DELAY-PRECONSTRESS, DELAY-GSTRESS, DELAY-ESTRESS, PRECONSTRESS-CELL.
Update mfio to reflect these changes.

Also modified CSUB observations so that thick-cell observation is
correctly calculated during steady-state stress periods.

Closes #300

* Merge refactor-src into develop (#361)

* refactor(ListReader): Refactor ListReader to use table object (#362)

* fix(npf): remove isavsat hardwire (#364)

* refactor(src): remove unused variables (#366)

* update mkdist.py to copy additional MSVS solutions and projects

* refactor(uzf): refactor uzf to use table object instead of UWWORD (#367)

* refactor(uzf): refactor uzf to use table object instead of UWWORD

Also simplify table object to write tables of unknown length.

* refactor(uzf): refactor uzf to use table object instead of UWWORD

Simplify table object to write tables of unknown length. Update
observations to use table object when PRINT_INPUT (iprpak=1) is
specified to write input observation data.

* fix(uzf): flowjaface is not ordered for uzf (#372)

* fix(bnd_cf): make another call to bnd_cf routines in gwf bnd_bd (#378)

* boundary budgets were being calculated using hcof and rhs values from the previous iteration.  This could cause drain flows to be into the aquifer, for example. This fix recalculates the package hcof and rhs values in bd using the final head solution.

* update release notes to reflect this change

* docs(sfr/lak): couple minor doc changes (#380)

* refactor(src): remove unused variables

* update mkdist.py to copy additional MSVS solutions and projects

* docs(sfr/lak): couple minor doc changes

* feature(ims): add additional solver output (#375)

Closes #375

* refactor(lak package dfn - perioddata): combined all perioddata into one recarray (#381)

* refactor(lak package dfn - perioddata): combined lakeperioddata and outletperioddata into perioddata

* refactor(lak stress period data): updated dfn

* feature(ims): refactor package convergence check (#382)

* Introduce end-of-line normalization (#386)

* refactor(xt3d): update develop with minor changes needed for transport (#388)

* feature(ims): update inner iteration summary (#389)

* refactor(NumericalSolution): refactor csv output (#395)

* refactor(NumericalSolution): refactor csv output

Refactor csv output to save at the end of the each outer iteration. Add
options to save separate outer and inner iteration data.

closes #172

* refactor(NumericalSolution): refactor *_cc() methods (#396)

Refactor *_cc() methods to pass package integer (ipak) location
information and the total number of inner iterations. The ipak
variable simplifies construction of the solution outer iteration
information for the csv file. The total number of inner iterations
makes package convergence csv files consistent with the outer iteration
csv file.

Update the release notes to reflect recent changes to csv convergence
output. Also moved changes for previous versions to release notes
appendix (Appendix A).

* refactor(Sim): Add MessageModule to containerize message functionality (#399)

Add generic message functionality (in Message.f90) to standardize messages
(errors, warnings, notes) written at the end of the simulation. Added initial 
warning messages in mf6. Warning messages and notes are not written if
the 'SUMMARY' level command line switch is specified.

Refactor IMS package to replace outer_hclose and inner_hclose with
outer_dvclose and inner_dvclose. Using outer_hclose and inner_hclose
will return warning messages. Added error messages for outer_rclosebnd
and csv_output.

* docs(gwf-mvr.dfn): clarify mvrtype definition (#408)

Closes #393

* refactor(misc): bringing in changes made on transport branch (#409)

* implemented table writer for mvr flows
* turned on fpp preprocessing in vfproj for compilerversion.fpp
* modifed obs table header in tex file
* minor changes to budget and budgetobject to support transport

* feat(ssm): divide ssm budget terms by package in GWT budget table

* initialize maxbudterm to 1 instead of zero.  GWF-GWF adds an entry

* Output in bmi
- writing stdout to file or screen is now configurable through bmi

(cherry picked from commit ba98a37)

* Cleaning up the bmi a bit...

(cherry picked from commit 798afe9)

* Introduced option to update storage (sc2) for each timestep

(cherry picked from commit 93b5cc9)

* and also update flag for sc1 now

(cherry picked from commit c4ff085)

* added dynamic array resizing to budget object

* Little more error trapping to ssm test.  Still failing due to flopy bug.

* refactor(misc): add deprecated tag to dfn, refactor budget.f90 (#413)

* refactor(misc): add deprecated tag to dfn, refactor budget.f90

* updated mf6ivar readme.md to included deprecated description

* fix for maw02 failure resulting from flopy updates

* feat(DRN): add option for scaling drainage discharge

* feat(DRN): add option for scaling drainage discharge

Add autotest (test_gwf_drn_ddrn02) that compares cubic scaled drain
discharge to groundwater seepage calculated by the UZF package.

* feat(DRN): add option for scaling drainage discharge

Add autotest (test_gwf_drn_ddrn01) that compares scaled drain
discharge to calculated values. Update release notes with scaled
drainage discharge option.

* feat(sim): add standard subroutine for deprecation warnings

* feat(sim): add standard subroutine for deprecation warnings

* feat(sim): add standard subroutine for deprecation warnings

Modify get_filename() subroutine to trim filename path based on OS.

* feat(sim): add standard subroutine for deprecation warnings

Modify get_filename() subroutine to trim filename path based on OS.

* BMI work: writing bmi messages through generic utils

* sorry, forgot width specifier...

* * added flow_package_name option to advanced transport packages
* added flow_package_auxiliary_name options to advanced transport packages
* programmed buoyancy package to work with lake by adding a new density routine to lake package
* need to program buy compatibility for sfr/maw/uzf next

* updated buy_lak02 to work with latest code changes

* docs(gwf-sfr.dfn): clarify 2nd idv definition (#418)

Close #417

* * implement density terms for embedded lakes
* add lak_activate_density() method to more cleanly turn on density effects
* add buy_ar_bnd() methods

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): update to travis yml - patterned after flopy

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): rework travis.yml

* ci(update): cleanup

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* moving toward new buoyancy package input format

* refactor(advanced packages): minor changes to support buoyancy package (#422)

* refactor(advanced packages): add minor changes to support buoyancy package

* add change to boundarypackage.f90 to support the noupdateauxvar variable

* fix for latests flopy changes

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

* refactor(lak): refactor timeseries to use read_value_or_time_series()

Fixed issue in HashTable when key does not exist and return from
function with uninitialized indx. With gfortran indx was initialized
by default to a value greater than 0.

* refactor(lak): refactor timeseries to use read_value_or_time_series()

Cleanup of error messages.

* * full implementation of new buoyancy package input file
* final step is to remove use of "density" auxiliary variable from boundary packages?

* implemented consistent approach for determining stress package density
updated buoyancy input instructions

Co-authored-by: Hughes, J.D <[email protected]>
Co-authored-by: spaulins-usgs <[email protected]>
Co-authored-by: Eric Morway <[email protected]>
Co-authored-by: mjr-deltares <[email protected]>
  • Loading branch information
5 people committed May 6, 2020
1 parent c2c5f4a commit 98f9141
Show file tree
Hide file tree
Showing 111 changed files with 5,905 additions and 1,903 deletions.
66 changes: 14 additions & 52 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,34 @@ language: c
os: linux
dist: xenial
compiler: gcc
services:
- xvfb
cache:
pip: true
directories:
- "$HOME/.cache/pip"
- "$HOME/.local"
env:
global:
- PATH="$HOME/anaconda/bin:$PATH"
- BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH;
else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
matrix:
include:
- env: FC=gfortran-4.9
- env: FC=gfortran-5
- env: FC=gfortran-6
- env: FC=gfortran-7
- env: FC=gfortran-8
- env: FC=gfortran-9
before_install:
- sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -y
- sudo apt-get install -y $FC
- sudo apt-get install -y texlive texlive-latex-extra
texlive-latex-recommended texlive-science texlive-fonts-extra
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh
- bash $HOME/miniconda.sh -b -p $HOME/anaconda
- export PATH="$HOME/anaconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda config --add channels conda-forge
- conda install --file requirements.travis.txt
- conda info -a
- ./travis/before_install.sh
install:
- if [[ ! -d "$HOME/.local/bin" ]]; then mkdir "$HOME/.local/bin"; fi
- ln -fs /usr/bin/$FC $HOME/.local/bin/gfortran
- gfortran --version
- python --version
- pip --version
- pip config --user set global.progress_bar off
- git clone https://github.com/modflowpy/flopy --depth 1 --branch=develop ~/flopy
- pip install --user -e ~/flopy
- git clone https://github.com/modflowpy/pymake --depth 1 --branch=master ~/pymake
- pip install --user -e ~/pymake
- git clone https://github.com/mjr-deltares/modflow6-bmipy.git --depth 1 --branch=master ~/amipy
- pip install --user -e ~/amipy
- ./travis/install.sh
- ./travis/install_pypack.sh
before_script:
- ./travis/before_script.sh
script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH;
else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
- pwd
- git clone https://github.com/MODFLOW-USGS/modflow6-examples ../modflow6-examples
- cd ../modflow6-examples
- if git show-ref -q --heads $BRANCH; then
git checkout $BRANCH; echo switched to modflow6-examples branch $BRANCH;
else echo using modflow6-examples branch master; fi
- git branch
- cd ../modflow6
- ls ../
- which python
- python --version
- python -c "import numpy as np; print('numpy version {}'.format(np.__version__))"
- python -c "import flopy; flopypth = flopy.__path__[0]; print('flopy is installed
in {}'.format(flopypth))"
- python -c "import flopy; dir(flopy.mf6)"
- cd ./autotest
- python update_flopy.py
- cd ..
- python -c "import flopy; dir(flopy.mf6)"
- which nosetests
- nosetests --version
- nosetests -v --with-id --with-timer -w ./autotest
- ./travis/script.sh
notifications:
slack:
secure: u8y6K08360InJfEUS3A4B+xxazxeuAbwViRDNnzkuQohFR3rewmzlnrDUSudZQbF4uokpkmQ9/kP8hlwKjrYHHay+4mRgu7ogoWGLnj/KOJjAr04bXuFa8+WOOOSHBjhVhrv86RlApO7/p9HWl2zqINVPl2/UUtnTxYoUnf82EfvYQh9C3hfq6sDAroV1Ei3USk3mpCITuNujHCvAheaBFGX/mElG3JG5TxfZbBQE+srwZTZ5cNT9px76nLfFB2lGKYnjq6WT9miwhIqLv/SJJamGr2an7fHeTtSB4fwETKYxDPhZurWZr4tulp8zUqLN9M9rsND59IJfwo6fV98SZvWSxCMfF31l9Y+n25mZJJFOXqx88glrcNbPLcZQMRG9qFvv8V7S0hpp/1HaMGGWB5gw+h4lrF5cuboatgzMQI6bArESbTNlkUj6TStH0cDw9+jnypPEwa+Ryh6qyq747h9K5duIOZW8DKFB08TAN/PVlmCc5c0HRb6TcEwDRvpOtDnWmsUiKhAhhamN5yfa/6xaXWaJ9aenlJ1lrZVcZkLODYCd52JTHH9CQ51xyXePGBTXVnYne7+7RyG79sXTW2AYvTzAHg8ixs613nrqZV8VyG5y+vKuUrJ61IKab14t9W0lOFDSQoX+pf3YwCkT05K72CHj0chVjrTaWF2Bu4=
File renamed without changes.
103 changes: 5 additions & 98 deletions autotest/test000_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,101 +58,14 @@ def test_create_dirs():
return


def getmfexes(pth='.', version='', pltfrm=None):
"""
Get the latest MODFLOW binary executables from a github site
(https://github.com/MODFLOW-USGS/executables) for the specified
operating system and put them in the specified path.
Parameters
----------
pth : str
Location to put the executables (default is current working directory)
version : str
Version of the MODFLOW-USGS/executables release to use.
pltfrm : str
Platform that will run the executables. Valid values include mac,
linux, win32 and win64. If platform is None, then routine will
download the latest appropriate zipfile from the github repository
based on the platform running this script.
"""

# Determine the platform in order to construct the zip file name
if pltfrm is None:
if sys.platform.lower() == 'darwin':
pltfrm = 'mac'
elif sys.platform.lower().startswith('linux'):
pltfrm = 'linux'
elif 'win' in sys.platform.lower():
is_64bits = sys.maxsize > 2 ** 32
if is_64bits:
pltfrm = 'win64'
else:
pltfrm = 'win32'
else:
errmsg = ('Could not determine platform'
'. sys.platform is {}'.format(sys.platform))
raise Exception(errmsg)
else:
assert pltfrm in ['mac', 'linux', 'win32', 'win64']
zipname = '{}.zip'.format(pltfrm)

# Determine path for file download and then download and unzip
url = ('https://github.com/MODFLOW-USGS/executables/'
'releases/download/{}/'.format(version))
assets = {p: url + p for p in ['mac.zip', 'linux.zip',
'win32.zip', 'win64.zip']}
download_url = assets[zipname]
pymake.download_and_unzip(download_url, pth, verify=False)

return


def test_getmfexes():
yield getmfexes, mfexe_pth, download_version
return


def copy_app_in_mfexe(target):
found = False
if os.path.isdir(mfexe_pth):
if target in os.listdir(mfexe_pth):
srcpth = os.path.join(mfexe_pth, target)
pymake.getmfexes(mfexe_pth)
for target in os.listdir(mfexe_pth):
srcpth = os.path.join(mfexe_pth, target)
if os.path.isfile(srcpth):
dstpth = os.path.join(ebindir, target)
print('copying {} -> {}'.format(srcpth, dstpth))
shutil.copy(srcpth, dstpth)
found = True

return found


def test_build_modflow():
found = copy_app_in_mfexe('mf2005dbl' + eext)
if not found:
pymake.build_apps('mf2005')
return


def test_build_mfnwt():
found = copy_app_in_mfexe('mfnwtdbl' + eext)
if not found:
pymake.build_apps('mfnwt')
return


def test_build_usg():
found = copy_app_in_mfexe('mfusgdbl' + eext)
if not found:
pymake.build_apps('mfusg')


def test_build_lgr():
found = copy_app_in_mfexe('mflgrdbl' + eext)
if not found:
pymake.build_apps('mflgr')
return


Expand All @@ -176,7 +89,6 @@ def test_build_modflow6():
# add -Werror for compilation to terminate if errors are found
fflags = ('-Wtabs -Wline-truncation -Wunused-label '
'-Wunused-variable -pedantic -std=f2008')
#fflags = None

pymake.main(srcdir, target, fc=fc, cc=cc, include_subdirs=True,
fflags=fflags)
Expand Down Expand Up @@ -262,7 +174,6 @@ def test_build_zonebudget():
# add -Werror for compilation to terminate if errors are found
fflags = ('-Wtabs -Wline-truncation -Wunused-label '
'-Wunused-variable -pedantic -std=f2008')
#fflags = None

pymake.main(srcdir, target, fc=fc, cc=cc, extrafiles=extrafiles,
fflags=fflags)
Expand All @@ -273,11 +184,7 @@ def test_build_zonebudget():

if __name__ == "__main__":
test_create_dirs()
getmfexes(pth=mfexe_pth, version=download_version)
test_build_modflow()
test_build_mfnwt()
test_build_usg()
test_build_lgr()
test_getmfexes()
test_build_modflow6()
test_build_modflow6_so()
test_build_mf5to6()
Expand Down
28 changes: 16 additions & 12 deletions autotest/test_gwf_auxvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@


def get_model(idx, dir):

nlay, nrow, ncol = 1, 10, 10
nper = 3
perlen = [1., 1., 1.]
Expand Down Expand Up @@ -97,7 +96,7 @@ def get_model(idx, dir):
# chd files
chdlist0 = []
chdlist0.append([(0, 0, 0), 100.])
chdlist0.append([(0, nrow-1, ncol-1), 95.])
chdlist0.append([(0, nrow - 1, ncol - 1), 95.])

chdspdict = {0: chdlist0}
chd = flopy.mf6.ModflowGwfchd(gwf,
Expand All @@ -118,11 +117,14 @@ def get_model(idx, dir):
auxiliary=['aux1', 'aux2'],
connectiondata=wellconnectionsrecarray,
perioddata=wellperiodrecarray)
#maw.remove()
# maw.remove()

# <rno> <cellid(ncelldim)> <rlen> <rwid> <rgrd> <rtp> <rbth> <rhk> <man> <ncon> <ustrf> <ndv> [<aux(naux)>] [<boundname>]
packagedata = [[0, (0, 5, ncol-2), delr, 10., 0.001, 98., 1., 1., 0.3, 1, 1.0, 0, auxvar1, auxvar2],
[1, (0, 5, ncol-1), delr, 10., 0.001, 97., 1., 1., 0.3, 1, 1.0, 0, auxvar1, auxvar2]]
packagedata = [
[0, (0, 5, ncol - 2), delr, 10., 0.001, 98., 1., 1., 0.3, 1, 1.0, 0,
auxvar1, auxvar2],
[1, (0, 5, ncol - 1), delr, 10., 0.001, 97., 1., 1., 0.3, 1, 1.0, 0,
auxvar1, auxvar2]]
connectiondata = [[0, -1],
[1, 0]]
sfr = flopy.mf6.ModflowGwfsfr(gwf,
Expand All @@ -134,7 +136,7 @@ def get_model(idx, dir):
packagedata=packagedata,
auxiliary=['aux1', 'aux2'],
connectiondata=connectiondata)
#sfr.remove()
# sfr.remove()

# <lakeno> <strt> <nlakeconn> [<aux(naux)>] [<boundname>]
packagedata = [[0, 100., 1, auxvar1, auxvar2, 'lake1'],
Expand All @@ -152,17 +154,19 @@ def get_model(idx, dir):
packagedata=packagedata,
auxiliary=['aux1', 'aux2'],
connectiondata=connectiondata)
#lak.remove()
# lak.remove()

# <iuzno> <cellid(ncelldim)> <landflag> <ivertcon> <surfdep> <vks> <thtr> <thts> <thti> <eps> [<boundname>]
packagedata = [[0, (0, nrow - 1, 5), 1, -1, .1, .01, .01, .1, .01, 3.5, 'uz1'],
[1, (0, nrow - 1, 6), 1, -1, .1, .01, .01, .1, .01, 3.5, 'uz1'],
[2, (0, nrow - 1, 7), 1, -1, .1, .01, .01, .1, .01, 3.5, 'uz1'],
[3, (0, nrow - 1, 8), 1, -1, .1, .01, .01, .1, .01, 3.5, 'uz1']]
packagedata = [
[0, (0, nrow - 1, 5), 1, -1, .1, .01, .01, .1, .01, 3.5, 'uz1'],
[1, (0, nrow - 1, 6), 1, -1, .1, .01, .01, .1, .01, 3.5, 'uz1'],
[2, (0, nrow - 1, 7), 1, -1, .1, .01, .01, .1, .01, 3.5, 'uz1'],
[3, (0, nrow - 1, 8), 1, -1, .1, .01, .01, .1, .01, 3.5, 'uz1']]
# <iuzno> <finf> <pet> <extdp> <extwc> <ha> <hroot> <rootact> [<aux(naux)>]
perioddata = []
for p in packagedata:
perioddata.append((p[0], 0.001, 0., 1., 0., 0., 0., 0., auxvar1, auxvar2))
perioddata.append(
(p[0], 0.001, 0., 1., 0., 0., 0., 0., auxvar1, auxvar2))
uzf = flopy.mf6.ModflowGwfuzf(gwf,
boundnames=True,
print_input=True,
Expand Down
12 changes: 6 additions & 6 deletions autotest/test_gwf_buy01.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from simulation import Simulation

ex = ['buy_01a', 'buy_01b', 'buy_01c']
dense = [1000., 1024.5, 1024.5]
concbuy = [0., 35., 35.]
dz = [0., 0., 10.]
exdirs = []
for s in ex:
Expand Down Expand Up @@ -97,10 +97,10 @@ def get_model(idx, dir):
save_specific_discharge=True,
icelltype=1, k=Kh)

d = dense[idx]
buy = flopy.mf6.ModflowGwfbuy(gwf,
denseref=1000., drhodc=0.7,
dense=d)
d = concbuy[idx]
pd = [(0, 0.7, 0., 'none', 'none')]
buy = flopy.mf6.ModflowGwfbuy(gwf, nrhospecies=len(pd), packagedata=pd,
denseref=1000., concentration=d)

# chd files
chdlist1 = []
Expand Down Expand Up @@ -152,7 +152,7 @@ def eval_results(sim):
h1 = 101.
h2 = 100.
dh = h1 - h2
rho1 = rho2 = dense[idx]
rho1 = rho2 = 1000. + 0.7 * concbuy[idx]
z1 = 50.
ddz = dz[idx]
z2 = 50.
Expand Down
24 changes: 13 additions & 11 deletions autotest/test_gwf_buy02.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
from simulation import Simulation

ex = ['buy_02a', 'buy_02b', 'buy_02c', 'buy_02d', 'buy_02e', 'buy_02f']
dense = [1000., 1024.5, 1024.5,
[1024.5, 1020., 1015., 1010., 1000.],
[1024.5, 1020., 1015., 1010., 1000.],
[1024.5, 1020., 1015., 1010., 1000.]]
concbuy = [0., 35., 35.,
[35., 30., 17.5, 5., 0.],
[35., 30., 17.5, 5., 0.],
[35., 30., 17.5, 5., 0.]]
dz = [0., 0., 10., 0., 10., 10.]
hhformulation_rhs = [False, False, False, False, False, True]
exdirs = []
Expand Down Expand Up @@ -107,9 +107,11 @@ def get_model(idx, dir):
save_specific_discharge=True,
icelltype=1, k=Kh)

d = dense[idx]
d = concbuy[idx]
hhrhs = hhformulation_rhs[idx]
buy = flopy.mf6.ModflowGwfbuy(gwf, denseref=1000., drhodc=0.7, dense=d,
pd = [(0, 0.7, 0., 'none', 'none')]
buy = flopy.mf6.ModflowGwfbuy(gwf, nrhospecies=len(pd), packagedata=pd,
denseref=1000., concentration=d,
hhformulation_rhs=hhrhs)

# chd files
Expand Down Expand Up @@ -173,12 +175,12 @@ def eval_results(sim):
h1 = head[0]
h2 = head[1]
dh = h1 - h2
ddense = dense[idx]
if isinstance(ddense, list):
rho1 = ddense[0]
rho2 = ddense[1]
c = concbuy[idx]
if isinstance(c, list):
rho1 = 1000. + .7 * c[0]
rho2 = 1000. + .7 * c[1]
else:
rho1 = rho2 = ddense
rho1 = rho2 = 1000. + 0.7 * c
z1 = (h1 - 0.) / 2
ddz = dz[idx]
b2 = 0. - ddz
Expand Down
Loading

0 comments on commit 98f9141

Please sign in to comment.