v 3.3.1 release PR (#926)
parent
184e716ff4
commit
efb8d0a3da
5
.flake8
5
.flake8
|
@ -3,7 +3,9 @@ exclude =
|
|||
.git,
|
||||
__pycache__,
|
||||
build,
|
||||
dist
|
||||
dist,
|
||||
examples,
|
||||
autotest
|
||||
ignore =
|
||||
# https://flake8.pycqa.org/en/latest/user/error-codes.html
|
||||
F401, # 'module' imported but unused
|
||||
|
@ -20,6 +22,7 @@ ignore =
|
|||
E241, # multiple spaces after ','
|
||||
E402, # module level import not at top of file
|
||||
E501, # line too long (> 79 characters)
|
||||
E502, # backslash is redundant between brackets
|
||||
E722, # do not use bare 'except'
|
||||
W291, # trailing whitespace
|
||||
W292, # no newline at end of file
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for windows files
|
||||
#
|
||||
*.bat text eol=crlf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.pdf binary
|
||||
|
||||
# Do not modify the model data in various directories
|
||||
examples/data/** binary
|
||||
examples/groundwater_paper/uspb/** binary
|
|
@ -29,8 +29,6 @@ addons:
|
|||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- gfortran-8
|
||||
- g++-8
|
||||
- libhdf5-serial-dev
|
||||
- netcdf-bin
|
||||
- libnetcdf-dev
|
||||
|
|
|
@ -4,7 +4,6 @@ Contributing
|
|||
Contributions to FloPy are welcome from the community. As a contributor, here are the guidelines we would like you to follow:
|
||||
|
||||
- [Code of Conduct](#coc)
|
||||
- [Question or Problem?](#question)
|
||||
- [Issues and Bugs](#issue)
|
||||
- [Feature Requests](#feature)
|
||||
- [Submission Guidelines](#submit)
|
||||
|
@ -14,18 +13,6 @@ Contributions to FloPy are welcome from the community. As a contributor, here ar
|
|||
## <a name="coc"></a> Code of Conduct
|
||||
Help us keep FloPy open and inclusive. Please read and follow our [Code of Conduct][coc].
|
||||
|
||||
## <a name="question"></a> Got a Question or Problem?
|
||||
|
||||
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [Stack Overflow](https://stackoverflow.com/questions/tagged/flopy) where the questions should be tagged with tag `flopy`.
|
||||
|
||||
Stack Overflow is a much better place to ask questions since:
|
||||
|
||||
- there are thousands of people willing to help on Stack Overflow
|
||||
- questions and answers stay available for public viewing so your question / answer might help someone else
|
||||
- Stack Overflow's voting system assures that the best answers are prominently visible.
|
||||
|
||||
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
|
||||
|
||||
## <a name="issue"></a> Found a Bug?
|
||||
If you find a bug in the source code, you can help us by
|
||||
[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can [submit a Pull Request](#submit-pr) with a fix.
|
||||
|
@ -73,9 +60,9 @@ Before you submit your Pull Request (PR) consider the following guidelines:
|
|||
```shell
|
||||
cd autotest
|
||||
nosetests -v build_exes.py
|
||||
nosetests -v t*_test.py
|
||||
nosetests -v
|
||||
```
|
||||
Note: the FloPy test suite requires the [nosetests](https://pypi.org/project/nose/) and [pymake](https://github.com/modflowpy/pymake) python packages.
|
||||
Note: the FloPy test suite requires the [nosetests](https://pypi.org/project/nose/) and [pymake](https://github.com/modflowpy/pymake) python packages. All the FloPy dependencies must also be installed for the tests to pass.
|
||||
|
||||
1. Commit your changes using a descriptive commit message that follows our
|
||||
[commit message conventions](#commit). Adherence to these conventions
|
||||
|
|
174
README.md
174
README.md
|
@ -1,11 +1,13 @@
|
|||
|
||||
<img src="https://raw.githubusercontent.com/modflowpy/flopy/master/examples/images/flopy3.png" alt="flopy3" style="width:50;height:20">
|
||||
|
||||
### Version 3.3.0
|
||||
### Version 3.3.1
|
||||
[![Build Status](https://travis-ci.org/modflowpy/flopy.svg?branch=master)](https://travis-ci.org/modflowpy/flopy)
|
||||
[![PyPI Version](https://img.shields.io/pypi/v/flopy.png)](https://pypi.python.org/pypi/flopy)
|
||||
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b23a5edd021b4aa19e947545ab49e577)](https://www.codacy.com/manual/jdhughes-usgs/flopy?utm_source=github.com&utm_medium=referral&utm_content=modflowpy/flopy&utm_campaign=Badge_Grade)
|
||||
[![Coverage Status](https://coveralls.io/repos/github/modflowpy/flopy/badge.svg?branch=master)](https://coveralls.io/github/modflowpy/flopy?branch=master)
|
||||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b23a5edd021b4aa19e947545ab49e577)](https://www.codacy.com/app/jdhughes-usgs/flopy?utm_source=github.com&utm_medium=referral&utm_content=modflowpy/flopy&utm_campaign=Badge_Grade)
|
||||
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/flopy/badges/installer/conda.svg)](https://conda.anaconda.org/conda-forge)
|
||||
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/flopy/badges/version.svg)](https://anaconda.org/conda-forge/flopy)
|
||||
[![PyPI Version](https://img.shields.io/pypi/v/flopy.png)](https://pypi.python.org/pypi/flopy)
|
||||
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/modflowpy/flopy.git/master)
|
||||
|
||||
Introduction
|
||||
|
@ -16,10 +18,21 @@ FloPy includes support for [MODFLOW 6](docs/mf6.md), MODFLOW-2005, MODFLOW-NWT,
|
|||
For general modeling issues, please consult a modeling forum, such as the [MODFLOW Users Group](https://groups.google.com/forum/#!forum/modflow). Other MODFLOW resources are listed in the [MODFLOW Resources](https://github.com/modflowpy/flopy#modflow-resources) section.
|
||||
|
||||
|
||||
Contributing
|
||||
------------------------------------------------
|
||||
Installation
|
||||
-----------------------------------------------
|
||||
|
||||
Bug reports, code contributions, or improvements to the documentation are welcome from the community. Prior to contributing, please read up on our guidelines for [contributing](CONTRIBUTING.md) and then check out one of our issues in the [hotlist: community-help](https://github.com/modflowpy/flopy/labels/hotlist%3A%20community%20help).
|
||||
FloPy requires **Python** 3.5 (or higher) and **NumPy** 1.9 (or higher). Dependencies for optional FloPy methods are summarized [here](docs/flopy_method_dependencies.md).
|
||||
|
||||
To install FloPy type:
|
||||
|
||||
conda install -c conda-forge flopy
|
||||
|
||||
or
|
||||
|
||||
pip install flopy
|
||||
|
||||
|
||||
The release candidate version can also be installed from the git repository using the instructions provided [below](#relcand).
|
||||
|
||||
|
||||
Documentation
|
||||
|
@ -32,6 +45,7 @@ Getting Started
|
|||
-----------------------------------------------
|
||||
|
||||
### MODFLOW 6 Quick Start
|
||||
|
||||
```python
|
||||
import os
|
||||
import flopy
|
||||
|
@ -66,157 +80,61 @@ pmv.plot_specific_discharge(spdis, color='white')
|
|||
```
|
||||
<img src="examples/images/quickstart.png" alt="plot" style="width:30;height:30">
|
||||
|
||||
### [Frequently asked questions](docs/flopyFAQ.md)
|
||||
|
||||
### [Tutorials](http://modflowpy.github.io/flopydoc/tutorials.html)
|
||||
Additional FloPy Resources
|
||||
------------------------------------------------
|
||||
|
||||
### [Additional jupyter Notebook Examples](docs/notebook_examples.md)
|
||||
- [Tutorials](http://modflowpy.github.io/flopydoc/tutorials.html) demonstrating basic FloPy use.
|
||||
|
||||
### [Python Script Examples](docs/script_examples.md)
|
||||
- [Jupyter notebooks](docs/notebook_examples.md) demonstrating the use of FloPy pre- and post-processing capabilities with a variety of MODFLOW-based models.
|
||||
|
||||
- [Scripts](docs/script_examples.md) demonstrating the use of FloPy for running and post-processing MODFLOW-based models.
|
||||
|
||||
If You Get Stuck
|
||||
-----------------------------------------------
|
||||
- A list of supported packages in FloPy is available in [docs/supported_packages.md](docs/supported_packages.md) on the github repo.
|
||||
|
||||
- A table of the supported and proposed model checks implemented in FloPy is available in [docs/model_checks.md](docs/model_checks.md) on the github repo.
|
||||
|
||||
- A summary of changes in each FloPy version is available in [docs/version_changes.md](docs/version_changes.md) on the github repo.
|
||||
|
||||
Questions
|
||||
------------------------------------------------
|
||||
FloPy usage has been growing rapidly, and as the number of users has increased, so has the number of questions about how to use FloPy. We ask our users to carefully consider the nature of their problem and seek help in the appropriate manner.
|
||||
|
||||
### Questions
|
||||
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [Stack Overflow](https://stackoverflow.com/questions/tagged/flopy) where the questions should be tagged with tag `flopy` or the [MODFLOW google group](https://groups.google.com/forum/#!forum/modflow).
|
||||
|
||||
For questions related to how to do something with FloPy, we ask our users to submit the question to [Stack Overflow](https://stackoverflow.com) and assign the [flopy](https://stackoverflow.com/questions/tagged/flopy) tag. Many of our recent questions have been related to MODFLOW or Python, and the Flopy developers cannot always respond to these inquiries.
|
||||
Stack Overflow is a much better place to ask questions since:
|
||||
|
||||
### Bugs
|
||||
- there are thousands of people willing to help on Stack Overflow and the MODFLOW google group
|
||||
- questions and answers stay available for public viewing so your question / answer might help someone else
|
||||
- Stack Overflow's voting system assures that the best answers are prominently visible.
|
||||
|
||||
If you think you have discovered a bug in FloPy in which you feel that the program does not work as intended, then we ask you to submit a [Github issue](https://github.com/modflowpy/flopy/labels/bug).
|
||||
To save your and our time, **we will systematically close all issues that are requests for general support and redirect people to Stack Overflow or the MODFLOW google group**.
|
||||
|
||||
|
||||
FloPy Supported Packages
|
||||
-----------------------------------------------
|
||||
Contributing
|
||||
------------------------------------------------
|
||||
|
||||
A list of supported packages in FloPy is available in [docs/supported_packages.md](docs/supported_packages.md) on the github repo.
|
||||
Bug reports, code contributions, or improvements to the documentation are welcome from the community. Prior to contributing, please read up on our guidelines for [contributing](CONTRIBUTING.md) and then check out one of our issues in the [hotlist: community-help](https://github.com/modflowpy/flopy/labels/hotlist%3A%20community%20help).
|
||||
|
||||
|
||||
FloPy Model Checks
|
||||
-----------------------------------------------
|
||||
<a name="relcand"></a>Installing the latest FloPy release candidate
|
||||
------------------------------------------------
|
||||
|
||||
A table of the supported and proposed model checks implemented in FloPy is available in [docs/model_checks.md](docs/model_checks.md) on the github repo.
|
||||
|
||||
|
||||
FloPy Changes
|
||||
-----------------------------------------------
|
||||
|
||||
A summary of changes in each FloPy version is available in [docs/version_changes.md](docs/version_changes.md) on the github repo.
|
||||
|
||||
|
||||
Installation
|
||||
-----------------------------------------------
|
||||
|
||||
**Python versions:**
|
||||
|
||||
FloPy requires **Python** 3.5 (or higher).
|
||||
|
||||
|
||||
**Dependencies:**
|
||||
|
||||
FloPy requires **NumPy** 1.9 (or higher).
|
||||
|
||||
|
||||
**For base and Anaconda Python distributions:**
|
||||
|
||||
To install FloPy type:
|
||||
|
||||
pip install flopy
|
||||
|
||||
or
|
||||
|
||||
conda install -c conda-forge flopy
|
||||
|
||||
To update FloPy type:
|
||||
|
||||
pip install flopy --upgrade
|
||||
|
||||
or
|
||||
|
||||
conda update -c conda-forge flopy
|
||||
|
||||
To uninstall FloPy type:
|
||||
|
||||
pip uninstall flopy
|
||||
|
||||
or
|
||||
|
||||
conda uninstall flopy
|
||||
|
||||
|
||||
**Installing from the git repository:**
|
||||
|
||||
***Current Version of FloPy:***
|
||||
|
||||
To install the current version of FloPy from the git repository type:
|
||||
|
||||
pip install https://github.com/modflowpy/flopy/zipball/master
|
||||
|
||||
To update your version of FloPy with the current version from the git repository type:
|
||||
|
||||
pip install https://github.com/modflowpy/flopy/zipball/master --upgrade
|
||||
|
||||
***Development version of FloPy:***
|
||||
|
||||
To install the latest development version of FloPy from the git repository type:
|
||||
To install the latest release candidate type:
|
||||
|
||||
pip install https://github.com/modflowpy/flopy/zipball/develop
|
||||
|
||||
To update your version of FloPy with the latest development version from the git repository type:
|
||||
|
||||
pip install https://github.com/modflowpy/flopy/zipball/develop --upgrade
|
||||
|
||||
|
||||
|
||||
***Optional Method Dependencies:***
|
||||
|
||||
Additional dependencies to use optional FloPy helper methods are listed below.
|
||||
|
||||
| Method | Python Package |
|
||||
| ------------------------------------------------------------------------------------ | -------------------------------------------------- |
|
||||
| `.PlotMapView()` in `flopy.plot` | **matplotlib** >= 1.4 |
|
||||
| `.PlotCrossSection()` in `flopy.plot` | **matplotlib** >= 1.4 |
|
||||
| `.plot()` | **matplotlib** >= 1.4 |
|
||||
| `.plot_shapefile()` | **matplotlib** >= 1.4 and **Pyshp** >= 1.2 |
|
||||
| `.to_shapefile()` | **Pyshp** >= 1.2 |
|
||||
| `.export(*.shp)` | **Pyshp** >= 1.2 |
|
||||
| `.export(*.nc)` | **netcdf4** >= 1.1 and **python-dateutil** >= 2.4 |
|
||||
| `.export(*.tif)` | **rasterio** |
|
||||
| `.export(*.asc)` in `flopy.utils.reference` `SpatialReference` class | **scipy.ndimage** |
|
||||
| `.interpolate()` in `flopy.utils.reference` `SpatialReference` class | **scipy.interpolate** |
|
||||
| `.interpolate()` in `flopy.mf6.utils.reference` `StructuredSpatialReference` class | **scipy.interpolate** |
|
||||
| `.get_dataframes()` in `flopy.utils.mflistfile` `ListBudget` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframes()` in `flopy.utils.observationfile` `ObsFiles` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframes()` in `flopy.utils.sfroutputfile` `ModflowSfr2` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframes()` in `flopy.utils.util_list` `MfList` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframes()` in `flopy.utils.zonebud` `ZoneBudget` class | **pandas** >= 0.15 |
|
||||
| `.pivot_keyarray()` in `flopy.mf6.utils.arrayutils` `AdvancedPackageUtil` class | **pandas** >= 0.15 |
|
||||
| `._get_vertices()` in `flopy.mf6.utils.binaryfile_utils` `MFOutputRequester` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframe()` in `flopy.mf6.utils.mfobservation` `Observations` class | **pandas** >= 0.15 |
|
||||
| `.df()` in `flopy.modflow.mfsfr2` `SfrFile` class | **pandas** >= 0.15 |
|
||||
| `.time_coverage()` in `flopy.export.metadata` `acc` class - ***used if available*** | **pandas** >= 0.15 |
|
||||
| `.loadtxt()` in `flopy.utils.flopyio` - ***used if available*** | **pandas** >= 0.15 |
|
||||
| `.generate_classes()` in `flopy.mf6.utils` | [**pymake**](https://github.com/modflowpy/pymake) |
|
||||
| `.intersect()` in `flopy.discretization.VertexGrid` | **matplotlib** >= 1.4 |
|
||||
| `GridIntersect()` in `flopy.utils.gridintersect` | **shapely** |
|
||||
| `GridIntersect().plot_polygon()` in `flopy.utils.gridintersect` | **shapely** and **descartes** |
|
||||
| `Raster()` in `flopy.utils.Raster` | **rasterio**, **affine**, and **scipy** |
|
||||
| `Raster().sample_polygon()` in `flopy.utils.Raster` | **shapely** |
|
||||
| `Raster().crop()` in `flopy.utils.Raster` | **shapely** |
|
||||
|
||||
How to Cite
|
||||
-----------------------------------------------
|
||||
|
||||
##### ***Citation for FloPy:***
|
||||
|
||||
[Bakker, M., Post, V., Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733–739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)
|
||||
[Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733–739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)
|
||||
|
||||
##### ***Software/Code citation for FloPy:***
|
||||
|
||||
[Bakker, M., Post, V., Langevin, C. D., Hughes, J. D., White, J. T., Leaf, A. T., Paulinski, S. R., Larsen, J. D., Toews, M. W., Morway, E. D., Bellino, J. C., Starn, J. J., and Fienen, M. N., 2019, FloPy v3.3.0: U.S. Geological Survey Software Release, 14 December 2019, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
|
||||
[Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Leaf, A. T., Paulinski, S. R., Larsen, J. D., Toews, M. W., Morway, E. D., Bellino, J. C., Starn, J. J., and Fienen, M. N., 2020, FloPy v3.3.1: U.S. Geological Survey Software Release, 26 June 2020, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
|
||||
|
||||
|
||||
MODFLOW Resources
|
||||
|
|
|
@ -1,375 +0,0 @@
|
|||
# Build the executables that are used in the flopy autotests
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
|
||||
try:
|
||||
import pymake
|
||||
except:
|
||||
print('pymake is not installed...will not build executables')
|
||||
pymake = None
|
||||
|
||||
os.environ["TRAVIS"] = "1"
|
||||
|
||||
download_version = '3.0'
|
||||
|
||||
# path where downloaded executables will be extracted
|
||||
exe_pth = 'exe_download'
|
||||
# make the directory if it does not exist
|
||||
if not os.path.isdir(exe_pth):
|
||||
os.makedirs(exe_pth)
|
||||
|
||||
# determine if running on Travis
|
||||
is_travis = 'TRAVIS' in os.environ
|
||||
|
||||
bindir = '.'
|
||||
dotlocal = False
|
||||
if is_travis:
|
||||
dotlocal = True
|
||||
|
||||
if not dotlocal:
|
||||
for idx, arg in enumerate(sys.argv):
|
||||
if '--travis' in arg.lower():
|
||||
dotlocal = True
|
||||
break
|
||||
if dotlocal:
|
||||
bindir = os.path.join(os.path.expanduser('~'), '.local', 'bin')
|
||||
bindir = os.path.abspath(bindir)
|
||||
|
||||
# write where the executables will be downloaded
|
||||
print('modflow executables will be downloaded to:\n\n "{}"'.format(bindir))
|
||||
|
||||
build_from_source = False
|
||||
if not build_from_source:
|
||||
for idx, arg in enumerate(sys.argv):
|
||||
if '--build' in arg.lower():
|
||||
build_from_source = True
|
||||
break
|
||||
|
||||
# write if the executables will be built from source
|
||||
msg = 'build all executables from source code: {}\n'.format(build_from_source)
|
||||
print(msg)
|
||||
|
||||
def get_targets():
|
||||
targets = pymake.usgs_program_data.get_keys(current=True)
|
||||
targets.sort()
|
||||
targets.remove('vs2dt')
|
||||
return targets
|
||||
|
||||
|
||||
def build_target(target):
|
||||
if pymake is not None:
|
||||
pymake.build_apps(targets=target)
|
||||
|
||||
return
|
||||
|
||||
|
||||
def which(program):
|
||||
"""
|
||||
Test to make sure that the program is executable
|
||||
|
||||
"""
|
||||
import os
|
||||
def is_exe(fpath):
|
||||
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
|
||||
|
||||
fpath, fname = os.path.split(program)
|
||||
if fpath:
|
||||
if is_exe(program):
|
||||
return program
|
||||
else:
|
||||
for path in os.environ["PATH"].split(os.pathsep):
|
||||
exe_file = os.path.join(path, program)
|
||||
if is_exe(exe_file):
|
||||
return exe_file
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def get_modflow_exes(pth='.', version='', platform=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.
|
||||
|
||||
platform : 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 asset from the github reposity.
|
||||
|
||||
"""
|
||||
|
||||
# Determine the platform in order to construct the zip file name
|
||||
if platform is None:
|
||||
if sys.platform.lower() == 'darwin':
|
||||
platform = 'mac'
|
||||
elif sys.platform.lower().startswith('linux'):
|
||||
platform = 'linux'
|
||||
elif 'win' in sys.platform.lower():
|
||||
is_64bits = sys.maxsize > 2 ** 32
|
||||
if is_64bits:
|
||||
platform = 'win64'
|
||||
else:
|
||||
platform = 'win32'
|
||||
else:
|
||||
errmsg = ('Could not determine platform'
|
||||
'. sys.platform is {}'.format(sys.platform))
|
||||
raise Exception(errmsg)
|
||||
else:
|
||||
assert platform in ['mac', 'linux', 'win32', 'win64']
|
||||
zipname = '{}.zip'.format(platform)
|
||||
|
||||
# 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)
|
||||
|
||||
return
|
||||
|
||||
|
||||
def get_exes_list():
|
||||
temp = os.listdir(exe_pth)
|
||||
avail_targets = pymake.usgs_program_data.get_keys(current=True)
|
||||
targets = []
|
||||
for target in avail_targets:
|
||||
for tt in temp:
|
||||
if target in tt:
|
||||
targets.append(tt)
|
||||
|
||||
# write summary of available download executables
|
||||
msg = 'executables that are available from the download:\n'
|
||||
for idx, target in enumerate(targets):
|
||||
msg += ' {:>2d}: {}\n'.format(idx + 1, target)
|
||||
print('{}\n'.format(msg))
|
||||
|
||||
return targets
|
||||
|
||||
|
||||
def is_executable(f):
|
||||
# write message
|
||||
msg = 'testing if {} is executable.'.format(f)
|
||||
print(msg)
|
||||
|
||||
fname = os.path.join(exe_pth, f)
|
||||
errmsg = '{} not executable'.format(fname)
|
||||
assert which(fname) is not None, errmsg
|
||||
return
|
||||
|
||||
|
||||
def get_code_json():
|
||||
jpth = 'code.json'
|
||||
json_dict = None
|
||||
if jpth in os.listdir(exe_pth):
|
||||
fpth = os.path.join(exe_pth, jpth)
|
||||
json_dict = pymake.usgs_program_data.load_json(fpth)
|
||||
|
||||
return json_dict
|
||||
|
||||
|
||||
def evaluate_versions(target, src):
|
||||
# get code.json dictionary
|
||||
json_dict = get_code_json()
|
||||
|
||||
# get current modflow program dictionary
|
||||
prog_dict = pymake.usgs_program_data.get_program_dict()
|
||||
|
||||
if json_dict is not None:
|
||||
# extract the json keys
|
||||
json_keys = list(json_dict.keys())
|
||||
# evaluate if the target is in the json keys
|
||||
if target in json_keys:
|
||||
source_version = prog_dict[target].version
|
||||
git_version = json_dict[target].version
|
||||
|
||||
# write a message
|
||||
msg = 'Source code version of {} '.format(target) + \
|
||||
'is "{}"'.format(source_version)
|
||||
print(4 * ' ' + msg)
|
||||
msg = 'Download code version of {} '.format(target) + \
|
||||
'is "{}"\n'.format(git_version)
|
||||
print(4 * ' ' + msg)
|
||||
|
||||
prog_version = source_version.split('.')
|
||||
json_version = git_version.split('.')
|
||||
|
||||
# evaluate major, minor, etc. version numbers
|
||||
for sp, sj in zip(prog_version, json_version):
|
||||
if int(sp) > int(sj):
|
||||
src = None
|
||||
break
|
||||
|
||||
return src
|
||||
|
||||
|
||||
def copy_target(target, src):
|
||||
srcpth = os.path.join(exe_pth, src)
|
||||
dstpth = os.path.join(bindir, src)
|
||||
|
||||
# write message showing copy src and dst
|
||||
msg = 'copying {} -> {}'.format(srcpth, dstpth)
|
||||
print(msg)
|
||||
|
||||
# copy the target
|
||||
shutil.copy(srcpth, dstpth)
|
||||
|
||||
# determine if json file in directory with downloaded files
|
||||
json_file = None
|
||||
for f in os.listdir(exe_pth):
|
||||
if f.lower().endswith('.json'):
|
||||
json_file = f
|
||||
break
|
||||
|
||||
# update code.json with data from from the json file in exe_pth
|
||||
if json_file is not None:
|
||||
fpth = os.path.join(bindir, json_file)
|
||||
|
||||
# set default program dictionary
|
||||
usgs_dict = pymake.usgs_program_data.get_program_dict()
|
||||
target_dict = {target: usgs_dict[target]}
|
||||
|
||||
# process the json
|
||||
download_dict = pymake.usgs_program_data.load_json(fpth)
|
||||
if download_dict is not None:
|
||||
if target in list(download_dict.keys()):
|
||||
target_dict = {target: download_dict[target]}
|
||||
|
||||
# update the json
|
||||
pymake.usgs_program_data.update_json(fpth=fpth,
|
||||
temp_dict=target_dict)
|
||||
|
||||
return
|
||||
|
||||
|
||||
def list_json():
|
||||
# build list_json command
|
||||
fpth = os.path.join(bindir, 'code.json')
|
||||
ljson = 'pymake.usgs_program_data.list_json(fpth="{}")'.format(fpth)
|
||||
|
||||
# build full command
|
||||
cmd = "python -c 'from __future__ import print_function; " + \
|
||||
"import pymake; {}'".format(ljson)
|
||||
|
||||
# run command
|
||||
os.system(cmd)
|
||||
return
|
||||
|
||||
|
||||
def cleanup():
|
||||
if os.path.isdir(exe_pth):
|
||||
shutil.rmtree(exe_pth)
|
||||
|
||||
return
|
||||
|
||||
|
||||
def main():
|
||||
get_modflow_exes(exe_pth, download_version)
|
||||
|
||||
etargets = get_exes_list()
|
||||
for f in etargets:
|
||||
is_executable(f)
|
||||
|
||||
# build each target
|
||||
targets = get_targets()
|
||||
for etarget in etargets:
|
||||
src = None
|
||||
for target in targets:
|
||||
if target in etarget:
|
||||
src = etarget
|
||||
break
|
||||
|
||||
# evaluate if the usgs source files and newer versions than
|
||||
# downloaded executables...if so build the target from source code
|
||||
if src is not None:
|
||||
src = evaluate_versions(target, src)
|
||||
|
||||
# reset source if code should be rebuilt from source
|
||||
if build_from_source:
|
||||
src = None
|
||||
|
||||
# copy the downloaded executable
|
||||
if src is not None:
|
||||
copy_target(target, src)
|
||||
# build the target from source code
|
||||
else:
|
||||
msg = 'building {}'.format(target)
|
||||
print(msg)
|
||||
build_target(target)
|
||||
|
||||
# # build all targets (until github gfortran-8 exes are available)
|
||||
# build_target(target)
|
||||
|
||||
# list the created json file
|
||||
list_json()
|
||||
|
||||
# clean up the download directory
|
||||
cleanup()
|
||||
|
||||
|
||||
def test_download_and_unzip():
|
||||
yield get_modflow_exes, exe_pth, download_version
|
||||
|
||||
etargets = get_exes_list()
|
||||
for f in etargets:
|
||||
yield is_executable, f
|
||||
return
|
||||
|
||||
|
||||
def test_build_all_apps():
|
||||
# get list of downloaded targets
|
||||
etargets = get_exes_list()
|
||||
|
||||
# build each target
|
||||
targets = get_targets()
|
||||
for etarget in etargets:
|
||||
src = None
|
||||
for target in targets:
|
||||
if target in etarget:
|
||||
src = etarget
|
||||
break
|
||||
|
||||
# evaluate if the usgs source files and newer versions than
|
||||
# downloaded executables...if so build the target from source code
|
||||
if src is not None:
|
||||
src = evaluate_versions(target, src)
|
||||
|
||||
# reset source if code should be rebuilt from source
|
||||
if build_from_source:
|
||||
src = None
|
||||
|
||||
# copy the downloaded executable
|
||||
if src is not None:
|
||||
yield copy_target, target, src
|
||||
# build the target
|
||||
else:
|
||||
msg = 'building {}'.format(target)
|
||||
print(msg)
|
||||
yield build_target, target
|
||||
|
||||
# # build all targets (until github gfortran-8 exes are available)
|
||||
# yield build_target, target
|
||||
|
||||
return
|
||||
|
||||
|
||||
def test_list_json():
|
||||
list_json()
|
||||
return
|
||||
|
||||
|
||||
def test_cleanup():
|
||||
cleanup()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -0,0 +1,88 @@
|
|||
# Build the executables that are used in the flopy autotests
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
|
||||
try:
|
||||
import pymake
|
||||
except:
|
||||
print('pymake is not installed...will not build executables')
|
||||
pymake = None
|
||||
|
||||
os.environ["TRAVIS"] = "1"
|
||||
|
||||
# path where downloaded executables will be extracted
|
||||
exe_pth = 'exe_download'
|
||||
# make the directory if it does not exist
|
||||
if not os.path.isdir(exe_pth):
|
||||
os.makedirs(exe_pth)
|
||||
|
||||
# determine if running on Travis
|
||||
is_travis = 'TRAVIS' in os.environ
|
||||
|
||||
bindir = '.'
|
||||
dotlocal = False
|
||||
if is_travis:
|
||||
dotlocal = True
|
||||
|
||||
if not dotlocal:
|
||||
for idx, arg in enumerate(sys.argv):
|
||||
if '--travis' in arg.lower():
|
||||
dotlocal = True
|
||||
break
|
||||
if dotlocal:
|
||||
bindir = os.path.join(os.path.expanduser('~'), '.local', 'bin')
|
||||
bindir = os.path.abspath(bindir)
|
||||
if not os.path.isdir(bindir):
|
||||
os.makedirs(bindir)
|
||||
|
||||
# write where the executables will be downloaded
|
||||
print('modflow executables will be downloaded to:\n\n "{}"'.format(bindir))
|
||||
|
||||
|
||||
def cleanup():
|
||||
if os.path.isdir(exe_pth):
|
||||
shutil.rmtree(exe_pth)
|
||||
return
|
||||
|
||||
|
||||
def list_exes():
|
||||
cmd = 'ls -l {}'.format(bindir)
|
||||
os.system(cmd)
|
||||
return
|
||||
|
||||
|
||||
def test_download_and_unzip():
|
||||
pymake.getmfexes(exe_pth)
|
||||
|
||||
# move the exes from exe_pth to bindir
|
||||
files = os.listdir(exe_pth)
|
||||
for file in files:
|
||||
if file.startswith('__'):
|
||||
continue
|
||||
src = os.path.join(exe_pth, file)
|
||||
dst = os.path.join(bindir, file)
|
||||
print('moving {} -> {}'.format(src, dst))
|
||||
os.replace(src, dst)
|
||||
|
||||
|
||||
def test_cleanup():
|
||||
cleanup()
|
||||
|
||||
|
||||
def test_list_download():
|
||||
list_exes()
|
||||
|
||||
|
||||
def main():
|
||||
test_download_and_unzip()
|
||||
|
||||
# clean up the download directory
|
||||
cleanup()
|
||||
|
||||
# list executables
|
||||
list_exes()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,4 +1,4 @@
|
|||
rmdir /S /Q __pycache__
|
||||
nosetests -v
|
||||
rmdir /S /Q __pycache__
|
||||
pause
|
||||
rmdir /S /Q __pycache__
|
||||
nosetests -v
|
||||
rmdir /S /Q __pycache__
|
||||
pause
|
||||
|
|
|
@ -24,6 +24,7 @@ def test_binaryfile_reference():
|
|||
|
||||
if matplotlib is not None:
|
||||
assert isinstance(h.plot(), matplotlib.axes.Axes)
|
||||
matplotlib.pyplot.close()
|
||||
return
|
||||
|
||||
|
||||
|
@ -36,6 +37,7 @@ def test_formattedfile_reference():
|
|||
|
||||
if matplotlib is not None:
|
||||
assert isinstance(h.plot(masked_values=[6999.000]), matplotlib.axes.Axes)
|
||||
matplotlib.pyplot.close()
|
||||
return
|
||||
|
||||
|
||||
|
|
|
@ -163,6 +163,19 @@ def export_shapefile_modelgrid_override(namfile):
|
|||
raise Exception(msg)
|
||||
|
||||
|
||||
def test_output_helper_shapefile_export():
|
||||
ws = os.path.join('..', 'examples', 'data', 'freyberg_multilayer_transient')
|
||||
name = 'freyberg.nam'
|
||||
|
||||
ml = flopy.modflow.Modflow.load(name, model_ws=ws)
|
||||
|
||||
head = flopy.utils.HeadFile(os.path.join(ws, 'freyberg.hds'))
|
||||
cbc = flopy.utils.CellBudgetFile(os.path.join(ws, "freyberg.cbc"))
|
||||
flopy.export.utils.output_helper(os.path.join('temp', 'test.shp'), ml,
|
||||
{'HDS': head, 'cbc': cbc},
|
||||
mflay=1, kper=10)
|
||||
|
||||
|
||||
def test_freyberg_export():
|
||||
from flopy.discretization import StructuredGrid
|
||||
namfile = 'freyberg.nam'
|
||||
|
@ -874,6 +887,17 @@ def test_read_usgs_model_reference():
|
|||
model_ws = os.path.join('temp', 't007')
|
||||
mrf = os.path.join(model_ws, 'usgs.model.reference')
|
||||
shutil.copy('../examples/data/usgs.model.reference', mrf)
|
||||
|
||||
xul, yul = 0, 0
|
||||
with open(mrf) as foo:
|
||||
for line in foo:
|
||||
if 'xul' in line.lower():
|
||||
xul = float(line.strip().split()[1])
|
||||
elif "yul" in line.lower():
|
||||
yul = float(line.strip().split()[1])
|
||||
else:
|
||||
continue
|
||||
|
||||
fm = flopy.modflow
|
||||
m = fm.Modflow(modelname='junk', model_ws=model_ws)
|
||||
# feet and days
|
||||
|
@ -888,6 +912,11 @@ def test_read_usgs_model_reference():
|
|||
mg.read_usgs_model_reference_file(mrf)
|
||||
m2.modelgrid = mg
|
||||
|
||||
if abs(mg.xvertices[0, 0] - xul) > 0.01:
|
||||
raise AssertionError()
|
||||
if abs(mg.yvertices[0, 0] - yul) > 0.01:
|
||||
raise AssertionError
|
||||
|
||||
assert m2.modelgrid.xoffset == mg.xoffset
|
||||
assert m2.modelgrid.yoffset == mg.yoffset
|
||||
assert m2.modelgrid.angrot == mg.angrot
|
||||
|
@ -1119,10 +1148,179 @@ def test_modelgrid_with_PlotMapView():
|
|||
plt.close()
|
||||
|
||||
|
||||
def test_mapview_plot_bc():
|
||||
from matplotlib.collections import QuadMesh, PatchCollection
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
sim_name = 'mfsim.nam'
|
||||
sim_path = os.path.join("..", "examples", "data", "mf6",
|
||||
"test003_gwfs_disv")
|
||||
sim = flopy.mf6.MFSimulation.load(sim_name=sim_name,
|
||||
sim_ws=sim_path)
|
||||
ml6 = sim.get_model("gwf_1")
|
||||
ml6.modelgrid.set_coord_info(angrot=-14)
|
||||
mapview = flopy.plot.PlotMapView(model=ml6)
|
||||
mapview.plot_bc('CHD')
|
||||
ax = mapview.ax
|
||||
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Boundary condition was not drawn")
|
||||
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, PatchCollection):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
plt.close()
|
||||
|
||||
sim_name = 'mfsim.nam'
|
||||
sim_path = os.path.join('..', 'examples', 'data', 'mf6', 'test045_lake2tr')
|
||||
sim = flopy.mf6.MFSimulation.load(sim_name=sim_name,
|
||||
sim_ws=sim_path)
|
||||
|
||||
ml6 = sim.get_model("lakeex2a")
|
||||
mapview = flopy.plot.PlotMapView(model=ml6)
|
||||
mapview.plot_bc('LAK')
|
||||
mapview.plot_bc("SFR")
|
||||
|
||||
ax = mapview.ax
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Boundary condition was not drawn")
|
||||
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, QuadMesh):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
plt.close()
|
||||
|
||||
sim_name = 'mfsim.nam'
|
||||
sim_path = os.path.join('..', 'examples', 'data', 'mf6',
|
||||
'test006_2models_mvr')
|
||||
sim = flopy.mf6.MFSimulation.load(sim_name=sim_name,
|
||||
sim_ws=sim_path)
|
||||
|
||||
ml6 = sim.get_model("parent")
|
||||
ml6c = sim.get_model('child')
|
||||
ml6c.modelgrid.set_coord_info(xoff=700, yoff=0, angrot=0)
|
||||
|
||||
mapview = flopy.plot.PlotMapView(model=ml6)
|
||||
mapview.plot_bc("MAW")
|
||||
|
||||
mapview2 = flopy.plot.PlotMapView(model=ml6c, ax=mapview.ax)
|
||||
mapview2.plot_bc("MAW")
|
||||
ax = mapview2.ax
|
||||
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Boundary condition was not drawn")
|
||||
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, QuadMesh):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
plt.close()
|
||||
|
||||
sim_name = 'mfsim.nam'
|
||||
sim_path = os.path.join('..', 'examples', 'data', 'mf6',
|
||||
'test001e_UZF_3lay')
|
||||
sim = flopy.mf6.MFSimulation.load(sim_name=sim_name,
|
||||
sim_ws=sim_path)
|
||||
ml6 = sim.get_model("gwf_1")
|
||||
|
||||
mapview = flopy.plot.PlotMapView(model=ml6)
|
||||
mapview.plot_bc("UZF")
|
||||
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Boundary condition was not drawn")
|
||||
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, QuadMesh):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
plt.close()
|
||||
|
||||
|
||||
def test_crosssection_plot_bc():
|
||||
from matplotlib.collections import PatchCollection
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
sim_name = 'mfsim.nam'
|
||||
sim_path = os.path.join("..", "examples", "data", "mf6",
|
||||
"test003_gwfs_disv")
|
||||
sim = flopy.mf6.MFSimulation.load(sim_name=sim_name,
|
||||
sim_ws=sim_path)
|
||||
ml6 = sim.get_model("gwf_1")
|
||||
xc = flopy.plot.PlotCrossSection(ml6, line={'line': ([0, 5.5],
|
||||
[10, 5.5])})
|
||||
xc.plot_bc('CHD')
|
||||
ax = xc.ax
|
||||
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Boundary condition was not drawn")
|
||||
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, PatchCollection):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
plt.close()
|
||||
|
||||
sim_name = 'mfsim.nam'
|
||||
sim_path = os.path.join('..', 'examples', 'data', 'mf6', 'test045_lake2tr')
|
||||
sim = flopy.mf6.MFSimulation.load(sim_name=sim_name,
|
||||
sim_ws=sim_path)
|
||||
|
||||
ml6 = sim.get_model("lakeex2a")
|
||||
xc = flopy.plot.PlotCrossSection(ml6, line={'row': 10})
|
||||
xc.plot_bc('LAK')
|
||||
xc.plot_bc("SFR")
|
||||
|
||||
ax = xc.ax
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Boundary condition was not drawn")
|
||||
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, PatchCollection):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
plt.close()
|
||||
|
||||
sim_name = 'mfsim.nam'
|
||||
sim_path = os.path.join('..', 'examples', 'data', 'mf6',
|
||||
'test006_2models_mvr')
|
||||
sim = flopy.mf6.MFSimulation.load(sim_name=sim_name,
|
||||
sim_ws=sim_path)
|
||||
|
||||
ml6 = sim.get_model("parent")
|
||||
xc = flopy.plot.PlotCrossSection(ml6, line={'column': 1})
|
||||
xc.plot_bc("MAW")
|
||||
|
||||
ax = xc.ax
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Boundary condition was not drawn")
|
||||
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, PatchCollection):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
plt.close()
|
||||
|
||||
sim_name = 'mfsim.nam'
|
||||
sim_path = os.path.join('..', 'examples', 'data', 'mf6',
|
||||
'test001e_UZF_3lay')
|
||||
sim = flopy.mf6.MFSimulation.load(sim_name=sim_name,
|
||||
sim_ws=sim_path)
|
||||
ml6 = sim.get_model("gwf_1")
|
||||
|
||||
xc = flopy.plot.PlotCrossSection(ml6, line={"row": 0})
|
||||
xc.plot_bc("UZF")
|
||||
|
||||
ax = xc.ax
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Boundary condition was not drawn")
|
||||
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, PatchCollection):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
plt.close()
|
||||
|
||||
|
||||
def test_tricontour_NaN():
|
||||
from flopy.plot import PlotMapView
|
||||
import numpy as np
|
||||
from flopy.discretization import StructuredGrid
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
arr = np.random.rand(10, 10) * 100
|
||||
arr[-1, :] = np.nan
|
||||
|
@ -1154,6 +1352,8 @@ def test_tricontour_NaN():
|
|||
if not np.allclose(lev, levels[ix]):
|
||||
raise AssertionError("TriContour NaN catch Failed")
|
||||
|
||||
plt.close()
|
||||
|
||||
|
||||
def test_get_vertices():
|
||||
from flopy.utils.reference import SpatialReference
|
||||
|
@ -1183,7 +1383,21 @@ def test_get_vertices():
|
|||
assert np.array_equal(a1, a2)
|
||||
|
||||
|
||||
def test_get_lrc_get_node():
|
||||
node = 50
|
||||
ml = flopy.modflow.Modflow()
|
||||
dis = flopy.modflow.ModflowDis(ml, nlay=1, nrow=1, ncol=201, delr=10,
|
||||
delc=1, top=50, botm=0)
|
||||
lrc = dis.get_lrc([node, ])
|
||||
if lrc[0] != (0, 0, 50):
|
||||
raise AssertionError("get_lrc() is not returning zero based (k, i, j)")
|
||||
nodes = dis.get_node(lrc)
|
||||
if nodes[0] != node:
|
||||
raise AssertionError('get_node() is not returning zero based node')
|
||||
|
||||
|
||||
def test_vertex_model_dot_plot():
|
||||
import matplotlib.pyplot as plt
|
||||
# load up the vertex example problem
|
||||
sim_name = "mfsim.nam"
|
||||
sim_path = "../examples/data/mf6/test003_gwftri_disv"
|
||||
|
@ -1193,13 +1407,16 @@ def test_vertex_model_dot_plot():
|
|||
disv_ml = disv_sim.get_model('gwf_1')
|
||||
ax = disv_ml.plot()
|
||||
assert ax
|
||||
plt.close('all')
|
||||
|
||||
|
||||
def test_model_dot_plot():
|
||||
import matplotlib.pyplot as plt
|
||||
loadpth = os.path.join('..', 'examples', 'data', 'secp')
|
||||
ml = flopy.modflow.Modflow.load('secp.nam', model_ws=loadpth)
|
||||
ax = ml.plot()
|
||||
assert ax
|
||||
plt.close('all')
|
||||
|
||||
|
||||
def test_get_rc_from_node_coordinates():
|
||||
|
@ -1258,43 +1475,6 @@ def test_netcdf_classmethods():
|
|||
assert len(diff) == 0, str(diff)
|
||||
|
||||
|
||||
# def test_netcdf_overloads():
|
||||
# import os
|
||||
# import flopy
|
||||
# nam_file = "freyberg.nam"
|
||||
# model_ws = os.path.join('..', 'examples', 'data', 'freyberg_multilayer_transient')
|
||||
# ml = flopy.modflow.Modflow.load(nam_file,model_ws=model_ws,check=False,
|
||||
# verbose=False,load_only=[])
|
||||
#
|
||||
# f = ml.export(os.path.join("temp","freyberg.nc"))
|
||||
# fzero = flopy.export.NetCdf.zeros_like(f)
|
||||
# assert fzero.nc.variables["model_top"][:].sum() == 0
|
||||
# print(f.nc.variables["model_top"][0,:])
|
||||
# fplus1 = f + 1
|
||||
# assert fplus1.nc.variables["model_top"][0,0] == f.nc.variables["model_top"][0,0] + 1
|
||||
# assert (f + fplus1).nc.variables["model_top"][0,0] ==\
|
||||
# f.nc.variables["model_top"][0,0] + \
|
||||
# fplus1.nc.variables["model_top"][0,0]
|
||||
#
|
||||
# fminus1 = f - 1
|
||||
# assert fminus1.nc.variables["model_top"][0,0] == f.nc.variables["model_top"][0,0] - 1
|
||||
# assert (f - fminus1).nc.variables["model_top"][0,0]==\
|
||||
# f.nc.variables["model_top"][0,0] - \
|
||||
# fminus1.nc.variables["model_top"][0,0]
|
||||
#
|
||||
# ftimes2 = f * 2
|
||||
# assert ftimes2.nc.variables["model_top"][0,0] == f.nc.variables["model_top"][0,0] * 2
|
||||
# assert (f * ftimes2).nc.variables["model_top"][0,0] ==\
|
||||
# f.nc.variables["model_top"][0,0] * \
|
||||
# ftimes2.nc.variables["model_top"][0,0]
|
||||
#
|
||||
# fdiv2 = f / 2
|
||||
# assert fdiv2.nc.variables["model_top"][0,0] == f.nc.variables["model_top"][0,0] / 2
|
||||
# assert (f / fdiv2).nc.variables["model_top"][0,0] == \
|
||||
# f.nc.variables["model_top"][0,0] / \
|
||||
# fdiv2.nc.variables["model_top"][0,0]
|
||||
#
|
||||
# assert f.nc.variables["ibound"][0,0,0] == 1
|
||||
def test_wkt_parse():
|
||||
"""Test parsing of Coordinate Reference System parameters
|
||||
from well-known-text in .prj files."""
|
||||
|
@ -1453,20 +1633,20 @@ def test_export_contourf():
|
|||
cs = plt.contourf(a)
|
||||
export_contourf(filename, cs)
|
||||
assert os.path.isfile(filename), 'did not create contourf shapefile'
|
||||
plt.close()
|
||||
return
|
||||
|
||||
def main():
|
||||
# test_shapefile()
|
||||
# test_shapefile_ibound()
|
||||
# test_netcdf_classmethods()
|
||||
|
||||
test_netcdf_classmethods()
|
||||
# for namfile in namfiles:
|
||||
# export_mf2005_netcdf(namfile)
|
||||
# export_shapefile(namfile)
|
||||
|
||||
for namfile in namfiles:
|
||||
export_mf2005_netcdf(namfile)
|
||||
export_shapefile(namfile)
|
||||
|
||||
for namfile in namfiles[0:2]:
|
||||
export_shapefile_modelgrid_override(namfile)
|
||||
# for namfile in namfiles[0:2]:
|
||||
# export_shapefile_modelgrid_override(namfile)
|
||||
|
||||
# test_netcdf_overloads()
|
||||
# test_netcdf_classmethods()
|
||||
|
@ -1480,7 +1660,7 @@ def main():
|
|||
# test_vertex_model_dot_plot()
|
||||
# test_sr_with_Map()
|
||||
# test_modelgrid_with_PlotMapView()
|
||||
test_epsgs()
|
||||
# test_epsgs()
|
||||
# test_sr_scaling()
|
||||
# test_read_usgs_model_reference()
|
||||
# test_dynamic_xll_yll()
|
||||
|
@ -1500,7 +1680,9 @@ def main():
|
|||
# test_export_contourf()
|
||||
# test_sr()
|
||||
# test_shapefile_polygon_closed()
|
||||
|
||||
test_mapview_plot_bc()
|
||||
test_crosssection_plot_bc()
|
||||
test_output_helper_shapefile_export()
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ def test_sfr():
|
|||
if matplotlib is not None:
|
||||
assert isinstance(sfr.plot()[0],
|
||||
matplotlib.axes.Axes) # test the plot() method
|
||||
matplotlib.pyplot.close()
|
||||
|
||||
# trout lake example (only sfr file is included)
|
||||
# can add tests for sfr connection with lak package
|
||||
|
@ -183,6 +184,8 @@ def test_sfr():
|
|||
/ sfr.reach_data.rchlen[reach_inds]
|
||||
chk = sfr.check()
|
||||
assert sfr.reach_data.slope.min() < 0.0001 and 'minimum slope' in chk.warnings
|
||||
# negative segments for lakes shouldn't be included in segment numbering order check
|
||||
assert 'segment numbering order' not in chk.warnings
|
||||
sfr.reach_data.slope[0] = 1.1
|
||||
chk.slope(maximum_slope=1.0)
|
||||
assert 'maximum slope' in chk.warnings
|
||||
|
@ -552,6 +555,22 @@ def test_SfrFile():
|
|||
assert df.gradient.values[-1] == 5.502E-02
|
||||
assert df.shape == (1080, 20)
|
||||
|
||||
ml = flopy.modflow.Modflow.load('test1tr.nam',
|
||||
model_ws=path, exe_name='mf2005')
|
||||
ml.change_model_ws(outpath)
|
||||
ml.write_input()
|
||||
ml.run_model()
|
||||
|
||||
sfrout = SfrFile(os.path.join(outpath, 'test1tr.flw'))
|
||||
assert sfrout.ncol == 16, sfrout.ncol
|
||||
assert sfrout.names == common_names + ['gradient'], sfrout.names
|
||||
expected_times = [
|
||||
(0, 0), (4, 0), (9, 0), (12, 0), (14, 0), (19, 0), (24, 0), (29, 0),
|
||||
(32, 0), (34, 0), (39, 0), (44, 0), (49, 0), (0, 1), (4, 1), (9, 1),
|
||||
(12, 1), (14, 1), (19, 1), (24, 1), (29, 1), (32, 1), (34, 1), (39, 1),
|
||||
(44, 1), (45, 1), (46, 1), (47, 1), (48, 1), (49, 1)]
|
||||
assert sfrout.times == expected_times, sfrout.times
|
||||
|
||||
|
||||
def test_sfr_plot():
|
||||
#m = flopy.modflow.Modflow.load('test1ss.nam', model_ws=path, verbose=False)
|
||||
|
@ -559,19 +578,20 @@ def test_sfr_plot():
|
|||
#sfr.plot(key='strtop')
|
||||
#plt.show()
|
||||
#assert True
|
||||
#plt.close()
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# test_sfr()
|
||||
test_sfr()
|
||||
# test_ds_6d_6e_disordered()
|
||||
test_disordered_reachdata_fields()
|
||||
# test_disordered_reachdata_fields()
|
||||
# test_sfr_renumbering()
|
||||
# test_example()
|
||||
# test_export()
|
||||
# test_transient_example()
|
||||
# mtest_sfr_plot()
|
||||
# test_assign_layers()
|
||||
# test_SfrFile()
|
||||
#test_SfrFile()
|
||||
# test_const()
|
||||
pass
|
||||
|
|
|
@ -68,6 +68,22 @@ def test_mflist_reducedpumping():
|
|||
|
||||
return
|
||||
|
||||
|
||||
def test_mf6listfile():
|
||||
pth = os.path.join('..', 'examples', 'data', 'mf6', 'test005_advgw_tidal',
|
||||
'expected_output')
|
||||
list_file = os.path.join(pth, 'AdvGW_tidal.gitlist')
|
||||
assert os.path.exists(list_file)
|
||||
mflist = flopy.utils.Mf6ListBudget(list_file)
|
||||
names = mflist.get_record_names()
|
||||
for item in ['RCH_IN', 'RCH2_IN', 'RCH3_IN', 'RCH_OUT', 'RCH2_OUT',
|
||||
'RCH3_OUT']:
|
||||
assert item in names, '{} not found in names'.format(item)
|
||||
assert len(names) == 25
|
||||
inc = mflist.get_incremental()
|
||||
return
|
||||
|
||||
|
||||
@raises(AssertionError)
|
||||
def test_mflist_reducedpumping_fail():
|
||||
'''
|
||||
|
@ -89,3 +105,4 @@ if __name__ == '__main__':
|
|||
test_mflistfile()
|
||||
test_mflist_reducedpumping()
|
||||
test_mflist_reducedpumping_fail()
|
||||
test_mf6listfile()
|
||||
|
|
|
@ -61,7 +61,7 @@ def test_mf2000_p07():
|
|||
pth = os.path.join(pth2000, 'P07')
|
||||
namfile = 'p7mf2k.nam'
|
||||
mf = flopy.modflow.Modflow.load(namfile, model_ws=pth,
|
||||
version='mf2k', verbose=True,
|
||||
verbose=True,
|
||||
exe_name=mf2k_exe)
|
||||
|
||||
cpth = os.path.join(newpth, 'P07_2K')
|
||||
|
|
|
@ -1,15 +1,30 @@
|
|||
__author__ = 'aleaf'
|
||||
|
||||
import os
|
||||
|
||||
try:
|
||||
import matplotlib
|
||||
# if os.getenv('TRAVIS'): # are we running https://travis-ci.org/ automated tests ?
|
||||
# matplotlib.use('Agg') # Force matplotlib not to use any Xwindows backend
|
||||
except:
|
||||
matplotlib = None
|
||||
|
||||
import flopy
|
||||
|
||||
try:
|
||||
import pymake
|
||||
except:
|
||||
pymake = None
|
||||
|
||||
tpth = os.path.abspath(os.path.join('temp', 't015'))
|
||||
# make the directory if it does not exist
|
||||
if not os.path.isdir(tpth):
|
||||
os.makedirs(tpth)
|
||||
|
||||
mfexe = 'mf2005'
|
||||
v = flopy.which(mfexe)
|
||||
run = True
|
||||
if v is None:
|
||||
run = False
|
||||
|
||||
print(os.getcwd())
|
||||
|
||||
if os.path.split(os.getcwd())[-1] == 'flopy3':
|
||||
|
@ -21,12 +36,107 @@ str_items = {0: {'mfnam': 'str.nam',
|
|||
'sfrfile': 'str.str'}}
|
||||
|
||||
|
||||
def test_str_free():
|
||||
m = flopy.modflow.Modflow.load(str_items[0]['mfnam'], exe_name=mfexe,
|
||||
model_ws=path, verbose=False, check=False)
|
||||
ws = tpth
|
||||
m.change_model_ws(ws)
|
||||
|
||||
# get pointer to str package
|
||||
str = m.str
|
||||
str.istcb2 = -1
|
||||
|
||||
# add aux variables to str
|
||||
aux_names = ['aux iface', 'aux xyz']
|
||||
names = ['iface', 'xyz']
|
||||
current, current_seg = flopy.modflow.ModflowStr.get_empty(23, 7,
|
||||
aux_names=names)
|
||||
|
||||
# copy data from existing stress period data
|
||||
for name in str.stress_period_data[0].dtype.names:
|
||||
current[:][name] = str.stress_period_data[0][:][name]
|
||||
|
||||
# fill aux variable data
|
||||
for idx, c in enumerate(str.stress_period_data[0]):
|
||||
for jdx, name in enumerate(names):
|
||||
current[idx][name] = idx + jdx * 10
|
||||
|
||||
# replace str data with updated str data
|
||||
str = flopy.modflow.ModflowStr(m, mxacts=str.mxacts, nss=str.nss,
|
||||
ntrib=str.ntrib, ndiv=str.ndiv,
|
||||
icalc=str.icalc, const=str.const,
|
||||
ipakcb=str.ipakcb, istcb2=str.istcb2,
|
||||
iptflg=str.iptflg, irdflg=str.irdflg,
|
||||
stress_period_data={0: current},
|
||||
segment_data=str.segment_data,
|
||||
options=aux_names)
|
||||
|
||||
# add head output to oc file
|
||||
oclst = ['PRINT HEAD', 'PRINT BUDGET', 'SAVE HEAD', 'SAVE BUDGET']
|
||||
spd = {(0, 0): oclst, (0, 1): oclst, (0, 2): oclst}
|
||||
oc = flopy.modflow.ModflowOc(m, stress_period_data=spd)
|
||||
oc.reset_budgetunit()
|
||||
|
||||
# reset ipakcb for str package to get ascii output in lst file
|
||||
str.ipakcb = -1
|
||||
|
||||
m.write_input()
|
||||
if run:
|
||||
try:
|
||||
success, buff = m.run_model()
|
||||
except:
|
||||
success = False
|
||||
assert success, 'base model run did not terminate successfully'
|
||||
|
||||
# load the fixed format model with aux variables
|
||||
try:
|
||||
m2 = flopy.modflow.Modflow.load(str_items[0]['mfnam'], exe_name=mfexe,
|
||||
model_ws=ws, verbose=False, check=False)
|
||||
except:
|
||||
m2 = None
|
||||
|
||||
msg = 'could not load the fixed format model with aux variables'
|
||||
assert m2 is not None, msg
|
||||
|
||||
ws = os.path.join(tpth, 'mf2005')
|
||||
m.change_model_ws(ws)
|
||||
m.set_ifrefm()
|
||||
m.write_input()
|
||||
if run:
|
||||
try:
|
||||
success, buff = m.run_model()
|
||||
except:
|
||||
success = False
|
||||
assert success, 'free format model run did not terminate successfully'
|
||||
|
||||
# load the free format model
|
||||
try:
|
||||
m2 = flopy.modflow.Modflow.load(str_items[0]['mfnam'], exe_name=mfexe,
|
||||
model_ws=ws, verbose=False, check=False)
|
||||
except:
|
||||
m2 = None
|
||||
|
||||
msg = 'could not load the free format model with aux variables'
|
||||
assert m2 is not None, msg
|
||||
|
||||
# compare the fixed and free format head files
|
||||
if run:
|
||||
if pymake is not None:
|
||||
fn1 = os.path.join(tpth, 'str.nam')
|
||||
fn2 = os.path.join(ws, 'str.nam')
|
||||
success = pymake.autotest.compare_heads(fn1, fn2, verbose=True)
|
||||
msg = 'fixed and free format input output head files are different'
|
||||
assert success, msg
|
||||
|
||||
|
||||
def test_str_plot():
|
||||
m = flopy.modflow.Modflow.load(str_items[0]['mfnam'], model_ws=path,
|
||||
verbose=True)
|
||||
verbose=True, check=False)
|
||||
if matplotlib is not None:
|
||||
assert isinstance(m.str.plot()[0], matplotlib.axes.Axes)
|
||||
matplotlib.pyplot.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_str_free()
|
||||
test_str_plot()
|
||||
|
|
|
@ -2,6 +2,20 @@ import os
|
|||
import flopy
|
||||
import numpy as np
|
||||
|
||||
|
||||
tpth = os.path.abspath(os.path.join('temp', 't016'))
|
||||
if not os.path.isdir(tpth):
|
||||
os.makedirs(tpth)
|
||||
|
||||
|
||||
exe_name = 'mfusg'
|
||||
v = flopy.which(exe_name)
|
||||
|
||||
run = True
|
||||
if v is None:
|
||||
run = False
|
||||
|
||||
|
||||
def test_usg_disu_load():
|
||||
|
||||
pthusgtest = os.path.join('..', 'examples', 'data', 'mfusg_test',
|
||||
|
@ -17,7 +31,7 @@ def test_usg_disu_load():
|
|||
assert isinstance(disu, flopy.modflow.ModflowDisU)
|
||||
|
||||
# Change where model files are written
|
||||
model_ws = os.path.join('temp', 't016')
|
||||
model_ws = tpth
|
||||
m.model_ws = model_ws
|
||||
|
||||
# Write the disu file
|
||||
|
@ -37,6 +51,7 @@ def test_usg_disu_load():
|
|||
|
||||
return
|
||||
|
||||
|
||||
def test_usg_sms_load():
|
||||
|
||||
pthusgtest = os.path.join('..', 'examples', 'data', 'mfusg_test',
|
||||
|
@ -52,7 +67,7 @@ def test_usg_sms_load():
|
|||
assert isinstance(sms, flopy.modflow.ModflowSms)
|
||||
|
||||
# Change where model files are written
|
||||
model_ws = os.path.join('temp', 't016')
|
||||
model_ws = tpth
|
||||
m.model_ws = model_ws
|
||||
|
||||
# Write the sms file
|
||||
|
@ -69,6 +84,39 @@ def test_usg_sms_load():
|
|||
|
||||
return
|
||||
|
||||
|
||||
def test_usg_model():
|
||||
mf = flopy.modflow.Modflow(version='mfusg', structured=True,
|
||||
model_ws=tpth, modelname='simple',
|
||||
exe_name=v)
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay=1, nrow=11, ncol=11)
|
||||
bas = flopy.modflow.ModflowBas(mf)
|
||||
lpf = flopy.modflow.ModflowLpf(mf)
|
||||
wel = flopy.modflow.ModflowWel(mf, stress_period_data={0: [[0, 5, 5, -1.]]})
|
||||
ghb = flopy.modflow.ModflowGhb(mf,
|
||||
stress_period_data={
|
||||
0: [[0, 0, 0, 1.0, 1000.],
|
||||
[0, 9, 9, 0.0, 1000.], ]})
|
||||
oc = flopy.modflow.ModflowOc(mf)
|
||||
sms = flopy.modflow.ModflowSms(mf, options='complex')
|
||||
|
||||
# run with defaults
|
||||
mf.write_input()
|
||||
if run:
|
||||
success, buff = mf.run_model()
|
||||
assert success
|
||||
|
||||
# try different complexity options; all should run successfully
|
||||
for complexity in ['simple', 'moderate', 'complex']:
|
||||
print('testing MFUSG with sms complexity: ' + complexity)
|
||||
sms = flopy.modflow.ModflowSms(mf, options=complexity)
|
||||
sms.write_file()
|
||||
if run:
|
||||
success, buff = mf.run_model()
|
||||
assert success
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_usg_disu_load()
|
||||
test_usg_sms_load()
|
||||
test_usg_model()
|
||||
|
|
|
@ -40,6 +40,7 @@ def test_bcs_check():
|
|||
ibound[1, 1, 1] = 1 # fully isolated cell
|
||||
ibound[0:2, 4, 4] = 1 # cell connected vertically to one other cell
|
||||
bas = flopy.modflow.ModflowBas(mf, ibound=ibound)
|
||||
mf._mg_resync = True
|
||||
chk = bas.check()
|
||||
assert chk.summary_array['desc'][0] == 'isolated cells in ibound array'
|
||||
assert chk.summary_array.i[0] == 1 and chk.summary_array.i[0] == 1 and \
|
||||
|
|
|
@ -232,6 +232,143 @@ def test_get_model_shape():
|
|||
return
|
||||
|
||||
|
||||
def test_zonebudget_output_to_netcdf():
|
||||
from flopy.utils import HeadFile, ZoneBudgetOutput
|
||||
from flopy.modflow import Modflow
|
||||
from flopy.mf6 import MFSimulation
|
||||
from flopy.export.utils import output_helper
|
||||
|
||||
model_ws = os.path.join("..", "examples", "data",
|
||||
"freyberg_multilayer_transient")
|
||||
zb_ws = os.path.join("..", "examples", "data", "zonbud_examples")
|
||||
|
||||
hds = "freyberg.hds"
|
||||
nam = "freyberg.nam"
|
||||
zon = "zonef_mlt.zbr"
|
||||
|
||||
hds = HeadFile(os.path.join(model_ws, hds))
|
||||
ml = Modflow.load(nam, model_ws=model_ws)
|
||||
zone_array = read_zbarray(os.path.join(zb_ws, zon))
|
||||
|
||||
# test with standard zonebudget output
|
||||
zbout = "freyberg_mlt.txt"
|
||||
ncf_name = zbout + ".nc"
|
||||
|
||||
zb = ZoneBudgetOutput(os.path.join(zb_ws, zbout), ml.dis, zone_array)
|
||||
vdf = zb.volumetric_flux()
|
||||
|
||||
netobj = zb.dataframe_to_netcdf_fmt(vdf, flux=False)
|
||||
|
||||
export_dict = {"hds": hds,
|
||||
"zonebud": netobj}
|
||||
|
||||
output_helper(os.path.join(outpth, ncf_name), ml, export_dict)
|
||||
|
||||
# test with zonebudget csv 1 output
|
||||
zbout = "freyberg_mlt.1.csv"
|
||||
ncf_name = zbout + ".nc"
|
||||
|
||||
zb = ZoneBudgetOutput(os.path.join(zb_ws, zbout), ml.dis, zone_array)
|
||||
|
||||
netobj = zb.dataframe_to_netcdf_fmt(zb.dataframe)
|
||||
|
||||
export_dict = {"hds": hds,
|
||||
"zonebud": netobj}
|
||||
|
||||
output_helper(os.path.join(outpth, ncf_name), ml, export_dict)
|
||||
|
||||
# test with zonebudget csv 2 output
|
||||
zbout = "freyberg_mlt.2.csv"
|
||||
ncf_name = zbout + ".nc"
|
||||
|
||||
zb = ZoneBudgetOutput(os.path.join(zb_ws, zbout), ml.dis, zone_array)
|
||||
vdf = zb.volumetric_flux(extrapolate_kper=True)
|
||||
|
||||
netobj = zb.dataframe_to_netcdf_fmt(vdf, flux=False)
|
||||
|
||||
export_dict = {"hds": hds,
|
||||
"zonebud": netobj}
|
||||
|
||||
output_helper(os.path.join(outpth, ncf_name), ml, export_dict)
|
||||
|
||||
# test built in export function
|
||||
zbout = "freyberg_mlt.2.csv"
|
||||
ncf_name = zbout + ".bi1" + ".nc"
|
||||
|
||||
zb = ZoneBudgetOutput(os.path.join(zb_ws, zbout), ml.dis, zone_array)
|
||||
zb.export(os.path.join(outpth, ncf_name), ml)
|
||||
|
||||
# test built in export function with NetCdf output object
|
||||
zbout = "freyberg_mlt.2.csv"
|
||||
ncf_name = zbout + ".bi2" + ".nc"
|
||||
|
||||
zb = ZoneBudgetOutput(os.path.join(zb_ws, zbout), ml.dis, zone_array)
|
||||
export_dict = {"hds": hds}
|
||||
ncfobj = output_helper(os.path.join(outpth, ncf_name), ml, export_dict)
|
||||
zb.export(ncfobj, ml)
|
||||
|
||||
# test with modflow6/zonebudget6
|
||||
sim_ws = os.path.join("..", "examples", 'data',
|
||||
'mf6', 'test005_advgw_tidal')
|
||||
hds = "advgw_tidal.hds"
|
||||
nam = "mfsim"
|
||||
zon = "zonebudget6.csv"
|
||||
ncf_name = zon + ".nc"
|
||||
|
||||
zone_array = np.ones((3, 15, 10), dtype=int)
|
||||
zone_array = np.add.accumulate(zone_array, axis=0)
|
||||
sim = MFSimulation.load(nam, sim_ws=sim_ws, exe_name='mf6')
|
||||
sim.set_sim_path(outpth)
|
||||
sim.write_simulation()
|
||||
sim.run_simulation()
|
||||
hds = HeadFile(os.path.join(outpth, hds))
|
||||
|
||||
ml = sim.get_model("gwf_1")
|
||||
|
||||
zb = ZoneBudgetOutput(os.path.join(zb_ws, zon), sim.tdis, zone_array)
|
||||
vdf = zb.volumetric_flux()
|
||||
|
||||
netobj = zb.dataframe_to_netcdf_fmt(vdf, flux=False)
|
||||
export_dict = {"hds": hds,
|
||||
"zbud": netobj}
|
||||
|
||||
output_helper(os.path.join(outpth, ncf_name), ml, export_dict)
|
||||
|
||||
|
||||
def test_zonbud_active_areas_zone_zero(rtol=1e-2):
|
||||
try:
|
||||
import pandas as pd
|
||||
except ImportError:
|
||||
'Pandas is not available'
|
||||
|
||||
# Read ZoneBudget executable output and reformat
|
||||
zbud_f = os.path.join(loadpth, 'zonef_mlt_active_zone_0.2.csv')
|
||||
zbud = pd.read_csv(zbud_f)
|
||||
zbud.columns = [c.strip() for c in zbud.columns]
|
||||
zbud.columns = ['_'.join(c.split()) for c in zbud.columns]
|
||||
zbud.index = pd.Index(['ZONE_{}'.format(z) for z in zbud.ZONE.values],
|
||||
name='name')
|
||||
cols = [c for c in zbud.columns if 'ZONE_' in c]
|
||||
zbud = zbud[cols]
|
||||
|
||||
# Run ZoneBudget utility and reformat output
|
||||
zon_f = os.path.join(loadpth, 'zonef_mlt_active_zone_0.zbr')
|
||||
zon = read_zbarray(zon_f)
|
||||
zb = ZoneBudget(cbc_f, zon, kstpkper=(0, 1096))
|
||||
fpbud = zb.get_dataframes().reset_index()
|
||||
fpbud = fpbud[['name'] + [c for c in fpbud.columns if 'ZONE' in c]]
|
||||
fpbud = fpbud.set_index('name').T
|
||||
fpbud = fpbud[[c for c in fpbud.columns if 'ZONE' in c]]
|
||||
fpbud = fpbud.loc[['ZONE_{}'.format(z) for z in range(1, 4)]]
|
||||
|
||||
# Test for equality
|
||||
allclose = np.allclose(zbud, fpbud, rtol)
|
||||
s = 'Zonebudget arrays do not match.'
|
||||
assert allclose, s
|
||||
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# test_compare2mflist_mlt()
|
||||
test_compare2zonebudget()
|
||||
|
@ -244,3 +381,5 @@ if __name__ == '__main__':
|
|||
test_dataframes()
|
||||
test_get_budget()
|
||||
test_get_model_shape()
|
||||
test_zonebudget_output_to_netcdf()
|
||||
test_zonbud_active_areas_zone_zero()
|
||||
|
|
|
@ -82,6 +82,7 @@ def test_get_sat_thickness_gradients():
|
|||
|
||||
m = mf.Modflow('junk', version='mfnwt', model_ws='temp')
|
||||
dis = mf.ModflowDis(m, nlay=nl, nrow=nr, ncol=nc, botm=botm, top=top)
|
||||
lpf = mf.ModflowLpf(m, laytyp=np.ones(nl))
|
||||
|
||||
grad = get_gradients(hds, m, nodata=nodata)
|
||||
dh = np.diff(hds[:, 1, 1])
|
||||
|
|
|
@ -1,116 +1,214 @@
|
|||
import shutil
|
||||
import os
|
||||
import numpy as np
|
||||
import os
|
||||
import flopy
|
||||
from flopy.export import vtk
|
||||
|
||||
# Test vtk export
|
||||
# Note: initially thought about asserting that exported file size in bytes is
|
||||
# unchanged, but this seems to be sensitive to the running environment.
|
||||
# Thus, only asserting that the number of lines is unchanged.
|
||||
# Still keeping the file size check commented for development purposes.
|
||||
|
||||
# create output directory
|
||||
cpth = os.path.join('temp', 't050')
|
||||
if os.path.isdir(cpth):
|
||||
shutil.rmtree(cpth)
|
||||
os.makedirs(cpth)
|
||||
|
||||
# binary output directory
|
||||
binot = os.path.join(cpth, 'bin')
|
||||
if os.path.isdir(binot):
|
||||
shutil.rmtree(binot)
|
||||
os.makedirs(binot)
|
||||
|
||||
def count_lines_in_file(filepath, binary=False):
|
||||
if binary:
|
||||
f = open(filepath, 'rb')
|
||||
else:
|
||||
f = open(filepath, 'r')
|
||||
# note this does not mean much for a binary file but still allows for check
|
||||
n = len(f.readlines())
|
||||
f.close()
|
||||
return n
|
||||
|
||||
def test_vtk_export_array2d():
|
||||
"""Export 2d array"""
|
||||
# test mf 2005 freyberg
|
||||
mpath = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
namfile = 'freyberg.nam'
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False)
|
||||
m.dis.top.export(os.path.join(cpth, 'array_2d_test'), fmt='vtk')
|
||||
# with smoothing
|
||||
m.dis.top.export(os.path.join(cpth, 'array_2d_test'), fmt='vtk',
|
||||
name='top_smooth', smooth=True)
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False,
|
||||
load_only=['dis', 'bas6'])
|
||||
output_dir = os.path.join(cpth, 'array_2d_test')
|
||||
|
||||
# export and check
|
||||
m.dis.top.export(output_dir, name='top', fmt='vtk')
|
||||
filetocheck = os.path.join(output_dir, 'top.vtu')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==351846)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==2846)
|
||||
|
||||
# with smoothing
|
||||
m.dis.top.export(output_dir, fmt='vtk', name='top_smooth', smooth=True)
|
||||
filetocheck = os.path.join(output_dir, 'top_smooth.vtu')
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==351715)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==2846)
|
||||
|
||||
return
|
||||
|
||||
def test_vtk_export_array3d():
|
||||
"""Vtk export 3d array"""
|
||||
# test mf 2005 freyberg
|
||||
mpath = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
namfile = 'freyberg.nam'
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False)
|
||||
m.upw.hk.export(os.path.join(cpth, 'array_3d_test'), fmt='vtk')
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False,
|
||||
load_only=['dis', 'bas6', 'upw'])
|
||||
output_dir = os.path.join(cpth, 'array_3d_test')
|
||||
|
||||
# export and check
|
||||
m.upw.hk.export(output_dir, fmt='vtk', name='hk')
|
||||
filetocheck = os.path.join(output_dir, 'hk.vtu')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==992036)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==8486)
|
||||
|
||||
# with point scalars
|
||||
m.upw.hk.export(os.path.join(cpth, 'array_3d_test'), fmt='vtk',
|
||||
name='hk_points', point_scalars=True)
|
||||
# binary test
|
||||
m.upw.hk.export(os.path.join(binot, 'array_3d_test'), fmt='vtk',
|
||||
name='hk_points', point_scalars=True, binary=True)
|
||||
m.upw.hk.export(output_dir, fmt='vtk', name='hk_points',
|
||||
point_scalars=True)
|
||||
filetocheck = os.path.join(output_dir, 'hk_points.vtu')
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==1320666)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==10605)
|
||||
|
||||
# with point scalars and binary
|
||||
m.upw.hk.export(output_dir, fmt='vtk', name='hk_points_bin',
|
||||
point_scalars=True, binary=True)
|
||||
filetocheck = os.path.join(output_dir, 'hk_points_bin.vtu')
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==629401)
|
||||
# nlines2 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines2==2105)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
return
|
||||
|
||||
|
||||
def test_vtk_transient_array_2d():
|
||||
"""VTK export transient 2d array"""
|
||||
# test mf 2005 freyberg
|
||||
mpath = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
namfile = 'freyberg.nam'
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False)
|
||||
m.rch.rech.export(os.path.join(cpth, 'transient_2d_test'), fmt='vtk')
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False,
|
||||
load_only=['dis', 'bas6', 'rch'])
|
||||
output_dir = os.path.join(cpth, 'transient_2d_test')
|
||||
output_dir_bin = os.path.join(cpth, 'transient_2d_test_bin')
|
||||
kpers = [0, 1, 1096]
|
||||
|
||||
# binary test
|
||||
m.rch.rech.export(os.path.join(binot, 'transient_2d_test'), fmt='vtk',
|
||||
binary=True)
|
||||
# export and check
|
||||
m.rch.rech.export(output_dir, fmt='vtk', kpers=kpers)
|
||||
filetocheck = os.path.join(output_dir, 'rech_01.vtu')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==355144)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==2851)
|
||||
filetocheck = os.path.join(output_dir, 'rech_01097.vtu')
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==354442)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==2851)
|
||||
|
||||
# with binary
|
||||
m.rch.rech.export(output_dir_bin, fmt='vtk', binary=True, kpers=kpers)
|
||||
filetocheck = os.path.join(output_dir_bin, 'rech_01.vtu')
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==168339)
|
||||
# nlines2 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines2==846)
|
||||
assert(os.path.exists(filetocheck))
|
||||
filetocheck = os.path.join(output_dir_bin, 'rech_01097.vtu')
|
||||
# totalbytes3 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes3==168339)
|
||||
# nlines3 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines3==846)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
return
|
||||
|
||||
|
||||
def test_vtk_export_packages():
|
||||
"""testing vtk package export"""
|
||||
# test mf 2005 freyberg
|
||||
mpath = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
namfile = 'freyberg.nam'
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False)
|
||||
# test dis export
|
||||
m.dis.export(os.path.join(cpth, 'DIS'), fmt='vtk')
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False,
|
||||
load_only=['dis', 'bas6', 'upw', 'DRN'])
|
||||
|
||||
# dis export and check
|
||||
output_dir = os.path.join(cpth, 'DIS')
|
||||
m.dis.export(output_dir, fmt='vtk')
|
||||
filetocheck = os.path.join(output_dir, 'DIS.vtu')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==1019857)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==8496)
|
||||
|
||||
# upw with point scalar output
|
||||
m.upw.export(os.path.join(cpth, 'UPW'), fmt='vtk', point_scalars=True)
|
||||
output_dir = os.path.join(cpth, 'UPW')
|
||||
m.upw.export(output_dir, fmt='vtk', point_scalars=True)
|
||||
filetocheck = os.path.join(output_dir, 'UPW.vtu')
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==2559173)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==21215)
|
||||
|
||||
# bas with smoothing on
|
||||
m.bas6.export(os.path.join(cpth, 'BAS'), fmt='vtk', smooth=True)
|
||||
output_dir = os.path.join(cpth, 'BAS')
|
||||
m.bas6.export(output_dir, fmt='vtk', smooth=True)
|
||||
filetocheck = os.path.join(output_dir, 'BAS6.vtu')
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==1001580)
|
||||
nlines2 = count_lines_in_file(filetocheck)
|
||||
assert(nlines2==8491)
|
||||
|
||||
# transient package drain
|
||||
m.drn.export(os.path.join(cpth, 'DRN'), fmt='vtk')
|
||||
# binary test
|
||||
m.dis.export(os.path.join(binot, 'DIS'), fmt='vtk', binary=True)
|
||||
# upw with point scalar output
|
||||
m.upw.export(os.path.join(binot, 'UPW'), fmt='vtk', point_scalars=True,
|
||||
binary=True)
|
||||
kpers = [0, 1, 1096]
|
||||
output_dir = os.path.join(cpth, 'DRN')
|
||||
m.drn.export(output_dir, fmt='vtk', kpers=kpers)
|
||||
filetocheck = os.path.join(output_dir, 'DRN_01.vtu')
|
||||
# totalbytes3 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes3==20670)
|
||||
nlines3 = count_lines_in_file(filetocheck)
|
||||
assert(nlines3==191)
|
||||
filetocheck = os.path.join(output_dir, 'DRN_01097.vtu')
|
||||
# totalbytes4 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes4==20670)
|
||||
nlines4 = count_lines_in_file(filetocheck)
|
||||
assert(nlines4==191)
|
||||
|
||||
# dis with binary
|
||||
output_dir = os.path.join(cpth, 'DIS_bin')
|
||||
m.dis.export(output_dir, fmt='vtk', binary=True)
|
||||
filetocheck = os.path.join(output_dir, 'DIS.vtu')
|
||||
# totalbytes5 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes5==519516)
|
||||
# nlines5 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines5==1797)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
# upw with point scalars and binary
|
||||
output_dir = os.path.join(cpth, 'UPW_bin')
|
||||
m.upw.export(output_dir, fmt='vtk', point_scalars=True, binary=True)
|
||||
filetocheck = os.path.join(output_dir, 'UPW.vtu')
|
||||
# totalbytes6 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes6==1349801)
|
||||
# nlines6 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines6==4240)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
return
|
||||
|
||||
|
||||
# add mf2005 model exports
|
||||
def test_export_mf2005_vtk():
|
||||
"""test vtk model export mf2005"""
|
||||
pth = os.path.join('..', 'examples', 'data', 'mf2005_test')
|
||||
namfiles = [namfile for namfile in os.listdir(pth) if
|
||||
namfile.endswith('.nam')]
|
||||
skip = ['bcf2ss.nam']
|
||||
for namfile in namfiles:
|
||||
if namfile in skip:
|
||||
continue
|
||||
print('testing namefile', namfile)
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=pth, verbose=False)
|
||||
m.export(os.path.join(cpth, m.name), fmt='vtk')
|
||||
|
||||
# binary test
|
||||
m.export(os.path.join(binot, m.name), fmt='vtk', binary=True)
|
||||
|
||||
return
|
||||
|
||||
|
||||
def test_vtk_mf6():
|
||||
# test mf6
|
||||
mf6expth = os.path.join('..', 'examples', 'data', 'mf6')
|
||||
# test vtk mf6 export
|
||||
mf6sims = ['test045_lake1ss_table',
|
||||
'test036_twrihfb', 'test045_lake2tr', 'test006_2models_mvr']
|
||||
# mf6sims = ['test005_advgw_tidal']
|
||||
# mf6sims = ['test036_twrihfb']
|
||||
mf6sims = ['test045_lake1ss_table', 'test036_twrihfb', 'test045_lake2tr',
|
||||
'test006_2models_mvr']
|
||||
|
||||
for simnm in mf6sims:
|
||||
print(simnm)
|
||||
|
@ -124,91 +222,596 @@ def test_vtk_mf6():
|
|||
m = loaded_sim.get_model(mname)
|
||||
m.export(os.path.join(cpth, m.name), fmt='vtk')
|
||||
|
||||
# check one
|
||||
filetocheck = os.path.join(cpth, 'twrihfb2015', 'npf.vtr')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==21609)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==76)
|
||||
|
||||
return
|
||||
|
||||
|
||||
def test_vtk_binary_head_export():
|
||||
# test mf 2005 freyberg
|
||||
mpth = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
namfile = 'freyberg.nam'
|
||||
hdsfile = os.path.join(mpth, 'freyberg.hds')
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpth, verbose=False,
|
||||
load_only=['dis', 'bas6'])
|
||||
filenametocheck = 'freyberg_head_KPER455_KSTP1.vtu'
|
||||
|
||||
"""test vet export of heads"""
|
||||
|
||||
freyberg_pth = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
|
||||
hdsfile = os.path.join(freyberg_pth, 'freyberg.hds')
|
||||
|
||||
m = flopy.modflow.Modflow.load('freyberg.nam', model_ws=freyberg_pth,
|
||||
verbose=False)
|
||||
# export and check
|
||||
otfolder = os.path.join(cpth, 'heads_test')
|
||||
|
||||
vtk.export_heads(m, hdsfile, otfolder, nanval=-999.99, kstpkper=[(0, 0),
|
||||
(0, 199),
|
||||
(0, 354),
|
||||
(0, 454),
|
||||
(0,
|
||||
1089)])
|
||||
# test with points
|
||||
filetocheck = os.path.join(otfolder, filenametocheck)
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==993215)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==8486)
|
||||
|
||||
# with point scalars
|
||||
otfolder = os.path.join(cpth, 'heads_test_1')
|
||||
vtk.export_heads(m, hdsfile, otfolder,
|
||||
kstpkper=[(0, 0), (0, 199), (0, 354), (0, 454), (0,
|
||||
1089)],
|
||||
point_scalars=True, nanval=-999.99)
|
||||
filetocheck = os.path.join(otfolder, filenametocheck)
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==1331858)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==10605)
|
||||
|
||||
# test vtk export heads with smoothing and no point scalars
|
||||
# with smoothing
|
||||
otfolder = os.path.join(cpth, 'heads_test_2')
|
||||
vtk.export_heads(m, hdsfile, otfolder,
|
||||
kstpkper=[(0, 0), (0, 199), (0, 354), (0, 454), (0,
|
||||
1089)],
|
||||
point_scalars=False, smooth=True, nanval=-999.99)
|
||||
smooth=True, nanval=-999.99)
|
||||
filetocheck = os.path.join(otfolder, filenametocheck)
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==993077)
|
||||
nlines2 = count_lines_in_file(filetocheck)
|
||||
assert(nlines2==8486)
|
||||
|
||||
# test binary output
|
||||
# with smoothing and binary
|
||||
otfolder = os.path.join(cpth, 'heads_test_3')
|
||||
vtk.export_heads(m, hdsfile, otfolder,
|
||||
kstpkper=[(0, 0), (0, 199), (0, 354), (0, 454), (0,
|
||||
1089)],
|
||||
point_scalars=False, smooth=True, binary=True,
|
||||
nanval=-999.99)
|
||||
smooth=True, binary=True, nanval=-999.99)
|
||||
filetocheck = os.path.join(otfolder, filenametocheck)
|
||||
# totalbytes3 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes3==493853)
|
||||
# nlines3 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines3==1781)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
# with smoothing and binary, single time
|
||||
otfolder = os.path.join(cpth, 'heads_test_4')
|
||||
vtk.export_heads(m, hdsfile, otfolder, kstpkper=(0, 0),
|
||||
point_scalars=False,
|
||||
smooth=True, binary=True, nanval=-999.99)
|
||||
point_scalars=False, smooth=True, binary=True,
|
||||
nanval=-999.99)
|
||||
filetocheck = os.path.join(otfolder, 'freyberg_head_KPER1_KSTP1.vtu')
|
||||
# totalbytes4 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes4==493853)
|
||||
# nlines4 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines4==1787)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
return
|
||||
|
||||
|
||||
def test_vtk_cbc():
|
||||
# test mf 2005 freyberg
|
||||
freyberg_cbc = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient',
|
||||
'freyberg.cbc')
|
||||
mpth = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
namfile = 'freyberg.nam'
|
||||
cbcfile = os.path.join(mpth, 'freyberg.cbc')
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpth, verbose=False,
|
||||
load_only=['dis', 'bas6'])
|
||||
filenametocheck = 'freyberg_CBC_KPER1_KSTP1.vtu'
|
||||
|
||||
freyberg_mpth = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
|
||||
m = flopy.modflow.Modflow.load('freyberg.nam', model_ws=freyberg_mpth,
|
||||
verbose=False)
|
||||
|
||||
vtk.export_cbc(m, freyberg_cbc, os.path.join(cpth, 'freyberg_CBCTEST'),
|
||||
# export and check with point scalar
|
||||
otfolder = os.path.join(cpth, 'freyberg_CBCTEST')
|
||||
vtk.export_cbc(m, cbcfile, otfolder,
|
||||
kstpkper=[(0, 0), (0, 1), (0, 2)], point_scalars=True)
|
||||
filetocheck = os.path.join(otfolder, filenametocheck)
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==2630875)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==19093)
|
||||
|
||||
vtk.export_cbc(m, freyberg_cbc, os.path.join(cpth, 'freyberg_CBCTEST_bin'),
|
||||
# with point scalars and binary
|
||||
otfolder = os.path.join(cpth, 'freyberg_CBCTEST_bin')
|
||||
vtk.export_cbc(m, cbcfile, otfolder,
|
||||
kstpkper=[(0, 0), (0, 1), (0, 2)], point_scalars=True,
|
||||
binary=True)
|
||||
filetocheck = os.path.join(otfolder, filenametocheck)
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==1205818)
|
||||
# nlines1 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines1==3088)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
vtk.export_cbc(m, freyberg_cbc, os.path.join(cpth,
|
||||
'freyberg_CBCTEST_bin2'),
|
||||
# with point scalars and binary, only one budget component
|
||||
otfolder = os.path.join(cpth, 'freyberg_CBCTEST_bin2')
|
||||
vtk.export_cbc(m, cbcfile, otfolder,
|
||||
kstpkper=(0, 0), text='CONSTANT HEAD',
|
||||
point_scalars=True, binary=True)
|
||||
filetocheck = os.path.join(otfolder, filenametocheck)
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==10142)
|
||||
# nlines2 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines2==66)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
return
|
||||
|
||||
def test_vtk_vector():
|
||||
from flopy.utils import postprocessing as pp
|
||||
# test mf 2005 freyberg
|
||||
mpth = os.path.join('..', 'examples', 'data',
|
||||
'freyberg_multilayer_transient')
|
||||
namfile = 'freyberg.nam'
|
||||
cbcfile = os.path.join(mpth, 'freyberg.cbc')
|
||||
hdsfile = os.path.join(mpth, 'freyberg.hds')
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpth, verbose=False,
|
||||
load_only=['dis', 'bas6', 'upw'])
|
||||
q = pp.get_specific_discharge(m, cbcfile=cbcfile)
|
||||
output_dir = os.path.join(cpth, 'freyberg_vector')
|
||||
filenametocheck = 'discharge.vtu'
|
||||
|
||||
# export and check with point scalar
|
||||
vtk.export_vector(m, q, output_dir, 'discharge', point_scalars=True)
|
||||
filetocheck = os.path.join(output_dir, filenametocheck)
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==2247857)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==10605)
|
||||
|
||||
# with point scalars and binary
|
||||
vtk.export_vector(m, q, output_dir + '_bin', 'discharge',
|
||||
point_scalars=True, binary=True)
|
||||
filetocheck = os.path.join(output_dir + '_bin', filenametocheck)
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==942413)
|
||||
# nlines1 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines1==3824)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
# with values directly given at vertices
|
||||
q = pp.get_specific_discharge(m, cbcfile=cbcfile, hdsfile=hdsfile,
|
||||
position='vertices')
|
||||
nancount = np.count_nonzero(np.isnan(q[0]))
|
||||
assert(nancount==308)
|
||||
overall = np.nansum(q[0]) + np.nansum(q[1]) + np.nansum(q[2])
|
||||
assert np.allclose(overall, -15.467904755216372)
|
||||
output_dir = os.path.join(cpth, 'freyberg_vector')
|
||||
filenametocheck = 'discharge_verts.vtu'
|
||||
vtk.export_vector(m, q, output_dir, 'discharge_verts')
|
||||
filetocheck = os.path.join(output_dir, filenametocheck)
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==1990047)
|
||||
nlines2 = count_lines_in_file(filetocheck)
|
||||
assert(nlines2==10598)
|
||||
|
||||
# with values directly given at vertices and binary
|
||||
vtk.export_vector(m, q, output_dir + '_bin', 'discharge_verts',
|
||||
binary=True)
|
||||
filetocheck = os.path.join(output_dir + '_bin', filenametocheck)
|
||||
# totalbytes3 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes3==891486)
|
||||
# nlines3 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines3==3012)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
return
|
||||
|
||||
def test_vtk_vti():
|
||||
# create model with regular and equal grid spacing in x, y and z directions
|
||||
name = 'test_vti'
|
||||
m = flopy.modflow.Modflow(name)
|
||||
nlay, nrow, ncol = 2, 3, 4
|
||||
delr = np.ones(ncol)
|
||||
delc = np.ones(nrow)
|
||||
top = 2. * np.ones((nrow, ncol))
|
||||
botm1 = np.ones((1, nrow, ncol))
|
||||
botm2 = np.zeros((1, nrow, ncol))
|
||||
botm = np.concatenate((botm1, botm2))
|
||||
dis = flopy.modflow.ModflowDis(m, nlay, nrow, ncol, delr=delr, delc=delc,
|
||||
top=top, botm=botm)
|
||||
output_dir = os.path.join(cpth, m.name)
|
||||
filenametocheck = 'DIS.vti'
|
||||
|
||||
# export and check
|
||||
dis.export(output_dir, fmt='vtk')
|
||||
filetocheck = os.path.join(output_dir, filenametocheck)
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==1075)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==21)
|
||||
|
||||
# with point scalar
|
||||
dis.export(output_dir + '_points', fmt='vtk', point_scalars=True)
|
||||
filetocheck = os.path.join(output_dir + '_points', filenametocheck)
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==2474)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==38)
|
||||
|
||||
# with binary
|
||||
dis.export(output_dir + '_bin', fmt='vtk', binary=True)
|
||||
filetocheck = os.path.join(output_dir + '_bin', filenametocheck)
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==1144)
|
||||
# nlines2 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines2==18)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
# force .vtr
|
||||
filenametocheck = 'DIS.vtr'
|
||||
dis.export(output_dir, fmt='vtk', vtk_grid_type='RectilinearGrid')
|
||||
filetocheck = os.path.join(output_dir, filenametocheck)
|
||||
# totalbytes3 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes3==1606)
|
||||
nlines3 = count_lines_in_file(filetocheck)
|
||||
assert(nlines3==41)
|
||||
|
||||
# force .vtu
|
||||
filenametocheck = 'DIS.vtu'
|
||||
dis.export(output_dir, fmt='vtk', vtk_grid_type='UnstructuredGrid')
|
||||
filetocheck = os.path.join(output_dir, filenametocheck)
|
||||
# totalbytes4 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes4==5723)
|
||||
nlines4 = count_lines_in_file(filetocheck)
|
||||
assert(nlines4==129)
|
||||
|
||||
# vector
|
||||
filenametocheck = 'vect.vti'
|
||||
ones_array = np.ones(m.modelgrid.shape)
|
||||
v = (ones_array, 2.*ones_array, 3.*ones_array)
|
||||
vtk.export_vector(m, v, output_dir, 'vect', point_scalars=True)
|
||||
filetocheck = os.path.join(output_dir, filenametocheck)
|
||||
# totalbytes5 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes5==1578)
|
||||
nlines5 = count_lines_in_file(filetocheck)
|
||||
assert(nlines5==20)
|
||||
|
||||
# vector with point scalars and binary
|
||||
vtk.export_vector(m, v, output_dir + '_bin', 'vect', point_scalars=True,
|
||||
binary=True)
|
||||
filetocheck = os.path.join(output_dir + '_bin', filenametocheck)
|
||||
# totalbytes6 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes6==2666)
|
||||
# nlines6 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines6==18)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
return
|
||||
|
||||
def test_vtk_vtr():
|
||||
# test mf 2005 l1a2k
|
||||
mpth = os.path.join('..', 'examples', 'data', 'mf2005_test')
|
||||
namfile = 'l1a2k.nam'
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpth, verbose=False)
|
||||
output_dir = os.path.join(cpth, m.name)
|
||||
filenametocheck = 'EVT_01.vtr'
|
||||
|
||||
# export and check
|
||||
m.export(output_dir, fmt='vtk')
|
||||
filetocheck = os.path.join(output_dir, filenametocheck)
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==79953)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==87)
|
||||
|
||||
# with point scalar
|
||||
m.export(output_dir + '_points', fmt='vtk', point_scalars=True)
|
||||
filetocheck = os.path.join(output_dir + '_points', filenametocheck)
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==182168)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==121)
|
||||
|
||||
# with binary
|
||||
m.export(output_dir + '_bin', fmt='vtk', binary=True)
|
||||
filetocheck = os.path.join(output_dir + '_bin', filenametocheck)
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==47874)
|
||||
# nlines2 = count_lines_in_file(filetocheck, binary=True)
|
||||
# assert(nlines2==28)
|
||||
assert(os.path.exists(filetocheck))
|
||||
|
||||
# force .vtu
|
||||
filenametocheck = 'EVT_01.vtu'
|
||||
m.export(output_dir, fmt='vtk', vtk_grid_type='UnstructuredGrid')
|
||||
filetocheck = os.path.join(output_dir, filenametocheck)
|
||||
# totalbytes3 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes3==78762)
|
||||
nlines3 = count_lines_in_file(filetocheck)
|
||||
assert(nlines3==1105)
|
||||
|
||||
return
|
||||
|
||||
def test_vtk_export_true2d_regular():
|
||||
mpath = os.path.join('..', 'examples', 'data', 'mf2005_test')
|
||||
output_dir = os.path.join(cpth, 'true2d_regular')
|
||||
|
||||
# test mf 2005 test1ss, which has one layer with non-constant elevations
|
||||
namfile = 'test1ss.nam'
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False,
|
||||
load_only=['dis', 'bas6'])
|
||||
|
||||
# export and check (.vti, with point scalars)
|
||||
m.dis.botm.export(output_dir, name='test1ss_botm', fmt='vtk',
|
||||
point_scalars=True, true2d=True)
|
||||
filetocheck = os.path.join(output_dir, 'test1ss_botm.vti')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==3371)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==32)
|
||||
|
||||
# vector (.vti, with point scalars)
|
||||
vect = (m.dis.botm.array, m.dis.botm.array)
|
||||
vtk.export_vector(m, vect, output_dir, 'test1ss_botm_vect',
|
||||
point_scalars=True, true2d=True)
|
||||
filetocheck = os.path.join(output_dir, 'test1ss_botm_vect.vti')
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==6022)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==32)
|
||||
|
||||
# vector directly at vertices (.vti)
|
||||
vect = [m.dis.botm.array, m.dis.botm.array]
|
||||
for i, vcomp in enumerate(vect):
|
||||
vect[i] = m.modelgrid.array_at_verts(vcomp)
|
||||
vtk.export_vector(m, vect, output_dir, 'test1ss_botm_vectv', true2d=True)
|
||||
filetocheck = os.path.join(output_dir, 'test1ss_botm_vectv.vti')
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==3496)
|
||||
nlines2 = count_lines_in_file(filetocheck)
|
||||
assert(nlines2==27)
|
||||
|
||||
# export and check (force .vtu, with point scalars)
|
||||
m.dis.botm.export(output_dir, name='test1ss_botm', fmt='vtk',
|
||||
point_scalars=True, vtk_grid_type='UnstructuredGrid',
|
||||
true2d=True)
|
||||
filetocheck = os.path.join(output_dir, 'test1ss_botm.vtu')
|
||||
# totalbytes3 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes3==23827)
|
||||
nlines3 = count_lines_in_file(filetocheck)
|
||||
assert(nlines3==608)
|
||||
|
||||
# test mf 2005 swiex3, which has one row
|
||||
namfile = 'swiex3.nam'
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=mpath, verbose=False,
|
||||
load_only=['dis', 'bas6'])
|
||||
|
||||
# export and check (.vtr)
|
||||
m.dis.botm.export(output_dir, name='swiex3_botm', fmt='vtk', true2d=True)
|
||||
filetocheck = os.path.join(output_dir, 'swiex3_botm.vtr')
|
||||
# totalbytes4 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes4==8022)
|
||||
nlines4 = count_lines_in_file(filetocheck)
|
||||
assert(nlines4==229)
|
||||
|
||||
# export and check (force .vtu)
|
||||
m.dis.botm.export(output_dir, name='swiex3_botm', fmt='vtk',
|
||||
vtk_grid_type='UnstructuredGrid', true2d=True)
|
||||
filetocheck = os.path.join(output_dir, 'swiex3_botm.vtu')
|
||||
# totalbytes5 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes5==85446)
|
||||
nlines5 = count_lines_in_file(filetocheck)
|
||||
assert(nlines5==2426)
|
||||
|
||||
return
|
||||
|
||||
def test_vtk_export_true2d_nonregxy():
|
||||
import flopy.utils.binaryfile as bf
|
||||
from flopy.utils import postprocessing as pp
|
||||
output_dir = os.path.join(cpth, 'true2d_nonregxy')
|
||||
cbc_unit_nb = 53
|
||||
|
||||
# model with one layer, non-regular grid in x and y
|
||||
name = 'nonregxy'
|
||||
m = flopy.modflow.Modflow(name, model_ws=output_dir, exe_name='mf2005')
|
||||
nlay, nrow, ncol = 1, 10, 10
|
||||
delr = np.concatenate((np.ones((5,)), 2.*np.ones((5,))))
|
||||
delc = delr
|
||||
top = 50.
|
||||
botm = 0.
|
||||
dis = flopy.modflow.ModflowDis(m, nlay, nrow, ncol, delr=delr, delc=delc,
|
||||
top=top, botm=botm)
|
||||
ibound = np.ones((nlay, nrow, ncol), dtype=np.int32)
|
||||
ibound[:, :, 0] = -1
|
||||
ibound[:, :, -1] = -1
|
||||
strt = np.linspace(1., 0., ncol).reshape(1, 1, ncol)
|
||||
strt = strt * np.ones((nlay, nrow, ncol))
|
||||
bas = flopy.modflow.ModflowBas(m, ibound=ibound, strt=strt)
|
||||
lpf = flopy.modflow.ModflowLpf(m, hk=1., vka=1., ipakcb=cbc_unit_nb)
|
||||
spd = {(0, 0): ['print head', 'print budget', 'save head', 'save budget']}
|
||||
oc = flopy.modflow.ModflowOc(m, stress_period_data=spd, compact=True)
|
||||
pcg = flopy.modflow.ModflowPcg(m)
|
||||
m.write_input()
|
||||
m.run_model(silent=True)
|
||||
|
||||
# export and check head with point scalar
|
||||
hdsfile = os.path.join(output_dir, name + '.hds')
|
||||
hds = bf.HeadFile(hdsfile)
|
||||
head = hds.get_data()
|
||||
vtk.export_array(m, head, output_dir, name + '_head', point_scalars=True,
|
||||
true2d=True)
|
||||
filetocheck = os.path.join(output_dir, name + '_head.vtr')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==4997)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==59)
|
||||
|
||||
# export and check specific discharge given at vertices
|
||||
cbcfile = os.path.join(output_dir, name + '.cbc')
|
||||
q = pp.get_specific_discharge(m, cbcfile, position='vertices')
|
||||
vtk.export_vector(m, q, output_dir, name + '_q', point_scalars=True,
|
||||
true2d=True)
|
||||
filetocheck = os.path.join(output_dir, name + '_q.vtr')
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==5772)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==54)
|
||||
|
||||
return
|
||||
|
||||
def test_vtk_export_true2d_nonregxz():
|
||||
import flopy.utils.binaryfile as bf
|
||||
from flopy.utils import postprocessing as pp
|
||||
output_dir = os.path.join(cpth, 'true2d_nonregxz')
|
||||
cbc_unit_nb = 53
|
||||
|
||||
# model with one row, non-regular grid in x and stepwise z
|
||||
name = 'nonregxz'
|
||||
m = flopy.modflow.Modflow(name, model_ws=output_dir, exe_name='mf2005')
|
||||
nlay, nrow, ncol = 2, 1, 10
|
||||
delr = np.concatenate((np.ones((5,)), 2.*np.ones((5,))))
|
||||
delc = 1.
|
||||
top = np.linspace(2., 3., ncol).reshape((1, 1, ncol))
|
||||
botm1 = np.linspace(1., 2.5, ncol).reshape((1, 1, ncol))
|
||||
botm2 = np.linspace(0., 0.5, ncol).reshape((1, 1, ncol))
|
||||
botm = np.concatenate((botm1, botm2))
|
||||
dis = flopy.modflow.ModflowDis(m, nlay, nrow, ncol, delr=delr, delc=delc,
|
||||
top=top, botm=botm)
|
||||
ibound = np.ones((nlay, nrow, ncol), dtype=np.int32)
|
||||
ibound[:, :, 0] = -1
|
||||
ibound[:, :, -1] = -1
|
||||
strt = np.linspace(0., 1., ncol).reshape(1, 1, ncol)
|
||||
strt = strt * np.ones((nlay, nrow, ncol))
|
||||
bas = flopy.modflow.ModflowBas(m, ibound=ibound, strt=strt)
|
||||
lpf = flopy.modflow.ModflowLpf(m, hk=1., vka=1., ipakcb=cbc_unit_nb)
|
||||
spd = {(0, 0): ['print head', 'print budget', 'save head', 'save budget']}
|
||||
oc = flopy.modflow.ModflowOc(m, stress_period_data=spd, compact=True)
|
||||
pcg = flopy.modflow.ModflowPcg(m)
|
||||
m.write_input()
|
||||
m.run_model(silent=True)
|
||||
|
||||
# export and check head
|
||||
hdsfile = os.path.join(output_dir, name + '.hds')
|
||||
hds = bf.HeadFile(hdsfile)
|
||||
head = hds.get_data()
|
||||
vtk.export_array(m, head, output_dir, name + '_head', true2d=True)
|
||||
filetocheck = os.path.join(output_dir, name + '_head.vtu')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==4217)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==105)
|
||||
|
||||
# export and check head with point scalar
|
||||
hdsfile = os.path.join(output_dir, name + '.hds')
|
||||
hds = bf.HeadFile(hdsfile)
|
||||
head = hds.get_data()
|
||||
vtk.export_array(m, head, output_dir, name + '_head_points',
|
||||
point_scalars=True, true2d=True)
|
||||
filetocheck = os.path.join(output_dir, name + '_head_points.vtu')
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==6155)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==129)
|
||||
|
||||
# export and check specific discharge given at vertices
|
||||
cbcfile = os.path.join(output_dir, name + '.cbc')
|
||||
q = pp.get_specific_discharge(m, cbcfile, position='vertices')
|
||||
vtk.export_vector(m, q, output_dir, name + '_q', point_scalars=True,
|
||||
true2d=True)
|
||||
filetocheck = os.path.join(output_dir, name + '_q.vtu')
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==7036)
|
||||
nlines2 = count_lines_in_file(filetocheck)
|
||||
assert(nlines2==123)
|
||||
|
||||
return
|
||||
|
||||
def test_vtk_export_true2d_nonregyz():
|
||||
import flopy.utils.binaryfile as bf
|
||||
from flopy.utils import postprocessing as pp
|
||||
output_dir = os.path.join(cpth, 'true2d_nonregyz')
|
||||
cbc_unit_nb = 53
|
||||
|
||||
# model with one col, non-regular grid in y and stepwise z
|
||||
name = 'nonregyz'
|
||||
m = flopy.modflow.Modflow(name, model_ws=output_dir, exe_name='mf2005')
|
||||
nlay, nrow, ncol = 2, 10, 1
|
||||
delr = 1.
|
||||
delc = np.concatenate((2.*np.ones((5,)), np.ones((5,))))
|
||||
top = np.linspace(3., 2., nrow).reshape((1, nrow, 1))
|
||||
botm1 = np.linspace(2.5, 1., nrow).reshape((1, nrow, 1))
|
||||
botm2 = np.linspace(0.5, 0., nrow).reshape((1, nrow, 1))
|
||||
botm = np.concatenate((botm1, botm2))
|
||||
dis = flopy.modflow.ModflowDis(m, nlay, nrow, ncol, delr=delr, delc=delc,
|
||||
top=top, botm=botm)
|
||||
ibound = np.ones((nlay, nrow, ncol), dtype=np.int32)
|
||||
ibound[:, 0, :] = -1
|
||||
ibound[:, -1, :] = -1
|
||||
strt = np.linspace(1., 0., nrow).reshape(1, nrow, 1)
|
||||
strt = strt * np.ones((nlay, nrow, ncol))
|
||||
bas = flopy.modflow.ModflowBas(m, ibound=ibound, strt=strt)
|
||||
lpf = flopy.modflow.ModflowLpf(m, hk=1., vka=1., ipakcb=cbc_unit_nb)
|
||||
spd = {(0, 0): ['print head', 'print budget', 'save head', 'save budget']}
|
||||
oc = flopy.modflow.ModflowOc(m, stress_period_data=spd, compact=True)
|
||||
pcg = flopy.modflow.ModflowPcg(m)
|
||||
m.write_input()
|
||||
m.run_model(silent=True)
|
||||
|
||||
# export and check head
|
||||
hdsfile = os.path.join(output_dir, name + '.hds')
|
||||
hds = bf.HeadFile(hdsfile)
|
||||
head = hds.get_data()
|
||||
vtk.export_array(m, head, output_dir, name + '_head', true2d=True)
|
||||
filetocheck = os.path.join(output_dir, name + '_head.vtu')
|
||||
# totalbytes = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes==4217)
|
||||
nlines = count_lines_in_file(filetocheck)
|
||||
assert(nlines==105)
|
||||
|
||||
# export and check head with point scalar
|
||||
hdsfile = os.path.join(output_dir, name + '.hds')
|
||||
hds = bf.HeadFile(hdsfile)
|
||||
head = hds.get_data()
|
||||
vtk.export_array(m, head, output_dir, name + '_head_points',
|
||||
point_scalars=True, true2d=True)
|
||||
filetocheck = os.path.join(output_dir, name + '_head_points.vtu')
|
||||
# totalbytes1 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes1==6155)
|
||||
nlines1 = count_lines_in_file(filetocheck)
|
||||
assert(nlines1==129)
|
||||
|
||||
# export and check specific discharge given at vertices
|
||||
cbcfile = os.path.join(output_dir, name + '.cbc')
|
||||
q = pp.get_specific_discharge(m, cbcfile, position='vertices')
|
||||
vtk.export_vector(m, q, output_dir, name + '_q', point_scalars=True,
|
||||
true2d=True)
|
||||
filetocheck = os.path.join(output_dir, name + '_q.vtu')
|
||||
# totalbytes2 = os.path.getsize(filetocheck)
|
||||
# assert(totalbytes2==7032)
|
||||
nlines2 = count_lines_in_file(filetocheck)
|
||||
assert(nlines2==123)
|
||||
|
||||
return
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_vtk_export_array2d()
|
||||
test_vtk_export_array3d()
|
||||
test_vtk_transient_array_2d()
|
||||
test_vtk_export_packages()
|
||||
test_export_mf2005_vtk()
|
||||
test_vtk_mf6()
|
||||
test_vtk_binary_head_export()
|
||||
test_vtk_cbc()
|
||||
test_vtk_vector()
|
||||
test_vtk_vti()
|
||||
test_vtk_vtr()
|
||||
test_vtk_export_true2d_regular()
|
||||
test_vtk_export_true2d_nonregxy()
|
||||
test_vtk_export_true2d_nonregxz()
|
||||
test_vtk_export_true2d_nonregyz()
|
||||
|
|
|
@ -9,7 +9,7 @@ import numpy as np
|
|||
import flopy
|
||||
|
||||
# make the working directory
|
||||
tpth = os.path.join('temp', 't057')
|
||||
tpth = os.path.join('temp', 't060')
|
||||
if not os.path.isdir(tpth):
|
||||
os.makedirs(tpth)
|
||||
|
||||
|
@ -25,7 +25,8 @@ def test_lkt_with_multispecies():
|
|||
mtexe = 'mt3dusgs'
|
||||
|
||||
# Instantiate MODFLOW object in flopy
|
||||
mf = flopy.modflow.Modflow(modelname=modelname, exe_name=mfexe, model_ws=modelpth, version='mfnwt')
|
||||
mf = flopy.modflow.Modflow(modelname=modelname, exe_name=mfexe,
|
||||
model_ws=modelpth, version='mfnwt')
|
||||
|
||||
Lx = 27500.0
|
||||
Ly = 22000.0
|
||||
|
@ -58,8 +59,10 @@ def test_lkt_with_multispecies():
|
|||
iprnwt = 1
|
||||
ibotav = 1
|
||||
|
||||
nwt = flopy.modflow.ModflowNwt(mf, headtol=headtol, fluxtol=fluxtol, maxiterout=maxiterout,
|
||||
thickfact=thickfact, linmeth=linmeth, iprnwt=iprnwt, ibotav=ibotav,
|
||||
nwt = flopy.modflow.ModflowNwt(mf, headtol=headtol,
|
||||
fluxtol=fluxtol, maxiterout=maxiterout,
|
||||
thickfact=thickfact, linmeth=linmeth,
|
||||
iprnwt=iprnwt, ibotav=ibotav,
|
||||
options='SIMPLE')
|
||||
|
||||
## Instantiate discretization (DIS) package for MODFLOW-NWT
|
||||
|
@ -124,16 +127,17 @@ def test_lkt_with_multispecies():
|
|||
|
||||
# Create the discretization object
|
||||
# itmuni = 4 (days); lenuni = 2 (meters)
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay, nrow, ncol, nper=1, delr=delr, delc=delc,
|
||||
top=top1, botm=botm, laycbd=0, itmuni=4, lenuni=2,
|
||||
steady=Steady, nstp=nstp, tsmult=tsmult, perlen=perlen)
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay, nrow, ncol, nper=1,
|
||||
delr=delr, delc=delc,
|
||||
top=top1, botm=botm, laycbd=0,
|
||||
itmuni=4, lenuni=2,
|
||||
steady=Steady, nstp=nstp, tsmult=tsmult,
|
||||
perlen=perlen)
|
||||
|
||||
## Instantiate upstream weighting (UPW) flow package for MODFLOW-NWT
|
||||
|
||||
# UPW parameters
|
||||
# UPW must be instantiated after DIS. Otherwise, during the mf.write_input() procedures,
|
||||
# flopy will crash.
|
||||
|
||||
|
||||
# First line of UPW input is: IUPWCB HDRY NPUPW IPHDRY
|
||||
hdry = -1.e+30
|
||||
iphdry = 0
|
||||
|
@ -141,7 +145,7 @@ def test_lkt_with_multispecies():
|
|||
# Next variables are: LAYTYP, LAYAVG, CHANI, LAYVKA, LAYWET
|
||||
laytyp = [1, 1, 1] # >0: convertible
|
||||
layavg = 0 # 0: harmonic mean
|
||||
chani = 1.0 # >0: CHANI is the horizontal anisotropy for the entire layer
|
||||
chani = 1.0 # >0: CHANI is the horizontal anis for entire layer
|
||||
layvka = 0 # =0: indicates VKA is vertical hydraulic conductivity
|
||||
laywet = 0 # Always set equal to zero in UPW package
|
||||
hk = 3.172E-03
|
||||
|
@ -150,8 +154,10 @@ def test_lkt_with_multispecies():
|
|||
ss = 0.00001
|
||||
sy = 0.30
|
||||
|
||||
upw = flopy.modflow.ModflowUpw(mf, laytyp=laytyp, layavg=layavg, chani=chani, layvka=layvka,
|
||||
laywet=laywet, ipakcb=53, hdry=hdry, iphdry=iphdry, hk=hk,
|
||||
upw = flopy.modflow.ModflowUpw(mf, laytyp=laytyp, layavg=layavg,
|
||||
chani=chani, layvka=layvka,
|
||||
laywet=laywet, ipakcb=53, hdry=hdry,
|
||||
iphdry=iphdry, hk=hk,
|
||||
vka=vka, ss=ss, sy=sy)
|
||||
|
||||
## Instantiate basic (BAS or BA6) package for MODFLOW-NWT
|
||||
|
@ -482,21 +488,30 @@ def test_lkt_with_multispecies():
|
|||
[0.0, 0.0, 0.0, 0.0],
|
||||
[0.0, 0.0, 0.0, 0.0]]}
|
||||
|
||||
lak = flopy.modflow.ModflowLak(mf, nlakes=nlakes, ipakcb=ipakcb, theta=theta,
|
||||
nssitr=nssitr, sscncr=sscncr, surfdep=surfdep,
|
||||
stages=stages, stage_range=stage_range, lakarr=lkarr,
|
||||
bdlknc=bdlknc, flux_data=flux_data, unit_number=16)
|
||||
lak = flopy.modflow.ModflowLak(mf, nlakes=nlakes, ipakcb=ipakcb,
|
||||
theta=theta,
|
||||
nssitr=nssitr, sscncr=sscncr,
|
||||
surfdep=surfdep,
|
||||
stages=stages, stage_range=stage_range,
|
||||
lakarr=lkarr,
|
||||
bdlknc=bdlknc, flux_data=flux_data,
|
||||
unit_number=16)
|
||||
|
||||
## Instantiate linkage with mass transport routing (LMT) package for MODFLOW-NWT (generates linker file)
|
||||
## Instantiate linkage with mass transport routing (LMT) package
|
||||
# for MODFLOW-NWT (generates linker file)
|
||||
|
||||
lmt = flopy.modflow.ModflowLmt(mf, output_file_name='lkttest.ftl', output_file_header='extended',
|
||||
output_file_format='formatted', package_flows = ['lak'])
|
||||
lmt = flopy.modflow.ModflowLmt(mf, output_file_name='lkttest.ftl',
|
||||
output_file_header='extended',
|
||||
output_file_format='formatted',
|
||||
package_flows = ['lak'])
|
||||
|
||||
|
||||
## Now work on MT3D-USGS file creation
|
||||
|
||||
mt = flopy.mt3d.Mt3dms(modflowmodel=mf, modelname=modelname, model_ws=modelpth,
|
||||
version='mt3d-usgs', namefile_ext='mtnam', exe_name=mtexe,
|
||||
mt = flopy.mt3d.Mt3dms(modflowmodel=mf, modelname=modelname,
|
||||
model_ws=modelpth,
|
||||
version='mt3d-usgs', namefile_ext='mtnam',
|
||||
exe_name=mtexe,
|
||||
ftlfilename='lkttest.ftl', ftlfree=True)
|
||||
|
||||
## Instantiate basic transport (BTN) package for MT3D-USGS
|
||||
|
@ -523,8 +538,10 @@ def test_lkt_with_multispecies():
|
|||
|
||||
btn = flopy.mt3d.Mt3dBtn(mt, lunit=lunit, ncomp=ncomp, mcomp=mcomp,
|
||||
sconc=sconc, prsity=prsity, cinact=cinact,
|
||||
laycon=laycon, thkmin=thkmin, nprs=nprs, nprobs=nprobs,
|
||||
chkmas=True,nprmas=nprmas, perlen=perlen, dt0=dt0,
|
||||
laycon=laycon, thkmin=thkmin, nprs=nprs,
|
||||
nprobs=nprobs,
|
||||
chkmas=True,nprmas=nprmas, perlen=perlen,
|
||||
dt0=dt0,
|
||||
nstp=nstp, tsmult=tsmult, mxstrn=mxstrn,
|
||||
ttsmult=ttsmult, ttsmax=ttsmax, sconc2=sconc2)
|
||||
|
||||
|
@ -538,7 +555,8 @@ def test_lkt_with_multispecies():
|
|||
adv = flopy.mt3d.Mt3dAdv(mt, mixelm=mixelm, percel=percel, mxpart=mxpart,
|
||||
nadvfd=nadvfd)
|
||||
|
||||
## Instantiate generalized conjugate gradient solver (GCG) package for MT3D-USGS
|
||||
## Instantiate generalized conjugate gradient solver (GCG)
|
||||
# package for MT3D-USGS
|
||||
|
||||
mxiter = 1
|
||||
iter1 = 50
|
||||
|
@ -572,7 +590,8 @@ def test_lkt_with_multispecies():
|
|||
|
||||
lkt = flopy.mt3d.Mt3dLkt(mt, nlkinit=nlkinit, mxlkbc=mxlkbc, icbclk=icbclk,
|
||||
ietlak=ietlak, coldlak=coldlak,
|
||||
lk_stress_period_data=lkt_flux_data, coldlak2=coldlak2)
|
||||
lk_stress_period_data=lkt_flux_data,
|
||||
coldlak2=coldlak2)
|
||||
|
||||
mf.write_input()
|
||||
mt.write_input()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import sys
|
||||
sys.path.insert(1, "..")
|
||||
import flopy.discretization as fgrid
|
||||
import flopy.plot as fplot
|
||||
import matplotlib.pyplot as plt
|
||||
|
@ -11,20 +13,36 @@ except Exception as e:
|
|||
print("Shapely not installed, tests cannot be run.")
|
||||
from flopy.utils.gridintersect import GridIntersect
|
||||
|
||||
triangle_exe = None
|
||||
|
||||
def get_tri_grid(angrot=0., xyoffset=0., triangle_exe=None):
|
||||
if not triangle_exe:
|
||||
return -1
|
||||
maximum_area = 50.
|
||||
x0, x1, y0, y1 = (0.0, 20.0, 0.0, 20.0)
|
||||
domainpoly = [(x0, y0), (x0, y1), (x1, y1), (x1, y0)]
|
||||
tri = Triangle(maximum_area=maximum_area, angle=45, model_ws=".",
|
||||
exe_name=triangle_exe)
|
||||
tri.add_polygon(domainpoly)
|
||||
tri.build(verbose=False)
|
||||
cell2d = tri.get_cell2d()
|
||||
vertices = tri.get_vertices()
|
||||
cell2d = [[0, 16.666666666666668, 13.333333333333334, 3, 4, 2, 7],
|
||||
[1, 3.3333333333333335, 6.666666666666667, 3, 4, 0, 5],
|
||||
[2, 6.666666666666667, 16.666666666666668, 3, 1, 8, 4],
|
||||
[3, 3.3333333333333335, 13.333333333333334, 3, 5, 1, 4],
|
||||
[4, 6.666666666666667, 3.3333333333333335, 3, 6, 0, 4],
|
||||
[5, 13.333333333333334, 3.3333333333333335, 3, 4, 3, 6],
|
||||
[6, 16.666666666666668, 6.666666666666667, 3, 7, 3, 4],
|
||||
[7, 13.333333333333334, 16.666666666666668, 3, 8, 2, 4]]
|
||||
vertices = [[0, 0.0, 0.0],
|
||||
[1, 0.0, 20.0],
|
||||
[2, 20.0, 20.0],
|
||||
[3, 20.0, 0.0],
|
||||
[4, 10.0, 10.0],
|
||||
[5, 0.0, 10.0],
|
||||
[6, 10.0, 0.0],
|
||||
[7, 20.0, 10.0],
|
||||
[8, 10.0, 20.0]]
|
||||
else:
|
||||
maximum_area = 50.
|
||||
x0, x1, y0, y1 = (0.0, 20.0, 0.0, 20.0)
|
||||
domainpoly = [(x0, y0), (x0, y1), (x1, y1), (x1, y0)]
|
||||
tri = Triangle(maximum_area=maximum_area, angle=45, model_ws=".",
|
||||
exe_name=triangle_exe)
|
||||
tri.add_polygon(domainpoly)
|
||||
tri.build(verbose=False)
|
||||
cell2d = tri.get_cell2d()
|
||||
vertices = tri.get_vertices()
|
||||
tgr = fgrid.VertexGrid(vertices, cell2d,
|
||||
botm=np.atleast_2d(np.zeros(len(cell2d))),
|
||||
top=np.ones(len(cell2d)), xoff=xyoffset,
|
||||
|
@ -33,8 +51,8 @@ def get_tri_grid(angrot=0., xyoffset=0., triangle_exe=None):
|
|||
|
||||
|
||||
def get_rect_grid(angrot=0., xyoffset=0.):
|
||||
delc = 10*np.ones(2, dtype=np.float)
|
||||
delr = 10*np.ones(2, dtype=np.float)
|
||||
delc = 10 * np.ones(2, dtype=np.float)
|
||||
delr = 10 * np.ones(2, dtype=np.float)
|
||||
sgr = fgrid.StructuredGrid(
|
||||
delc, delr, top=None, botm=None, xoff=xyoffset, yoff=xyoffset,
|
||||
angrot=angrot)
|
||||
|
@ -153,69 +171,69 @@ def test_rect_grid_multipoint_in_multiple_cells():
|
|||
# %% test point shapely
|
||||
|
||||
|
||||
def test_rect_grid_point_outside_shapely():
|
||||
def test_rect_grid_point_outside_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_point(Point(25., 25.))
|
||||
assert len(result) == 0
|
||||
return result
|
||||
|
||||
|
||||
def test_rect_grid_point_on_outer_boundary_shapely():
|
||||
def test_rect_grid_point_on_outer_boundary_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_point(Point(20., 10.))
|
||||
assert len(result) == 1
|
||||
assert np.all(result.cellids[0] == (0, 1))
|
||||
return result
|
||||
|
||||
|
||||
def test_rect_grid_point_on_inner_boundary_shapely():
|
||||
def test_rect_grid_point_on_inner_boundary_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_point(Point(10., 10.))
|
||||
assert len(result) == 1
|
||||
assert np.all(result.cellids[0] == (0, 0))
|
||||
return result
|
||||
|
||||
|
||||
def test_rect_grid_multipoint_in_one_cell_shapely():
|
||||
def test_rect_grid_multipoint_in_one_cell_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_point(MultiPoint([Point(1., 1.), Point(2., 2.)]))
|
||||
assert len(result) == 1
|
||||
assert result.cellids[0] == (1, 0)
|
||||
return result
|
||||
|
||||
|
||||
def test_rect_grid_multipoint_in_multiple_cells_shapely():
|
||||
def test_rect_grid_multipoint_in_multiple_cells_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_point(MultiPoint([Point(1., 1.), Point(12., 12.)]))
|
||||
assert len(result) == 2
|
||||
assert result.cellids[0] == (0, 1)
|
||||
|
@ -223,79 +241,79 @@ def test_rect_grid_multipoint_in_multiple_cells_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_point_outside():
|
||||
def test_tri_grid_point_outside(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_point(Point(25., 25.))
|
||||
assert len(result) == 0
|
||||
return result
|
||||
|
||||
|
||||
def test_tri_grid_point_on_outer_boundary():
|
||||
def test_tri_grid_point_on_outer_boundary(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_point(Point(20., 10.))
|
||||
assert len(result) == 1
|
||||
assert np.all(result.cellids[0] == 0)
|
||||
return result
|
||||
|
||||
|
||||
def test_tri_grid_point_on_inner_boundary():
|
||||
def test_tri_grid_point_on_inner_boundary(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_point(Point(10., 10.))
|
||||
assert len(result) == 1
|
||||
assert np.all(result.cellids[0] == 0)
|
||||
return result
|
||||
|
||||
|
||||
def test_tri_grid_multipoint_in_one_cell():
|
||||
def test_tri_grid_multipoint_in_one_cell(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_point(MultiPoint([Point(1., 1.), Point(2., 2.)]))
|
||||
assert len(result) == 1
|
||||
assert result.cellids[0] == 1
|
||||
return result
|
||||
|
||||
|
||||
def test_tri_grid_multipoint_in_multiple_cells():
|
||||
def test_tri_grid_multipoint_in_multiple_cells(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_point(MultiPoint([Point(1., 1.), Point(12., 12.)]))
|
||||
assert len(result) == 2
|
||||
assert result.cellids[0] == 0
|
||||
|
@ -420,27 +438,27 @@ def test_rect_grid_linestring_in_and_out_of_cell2():
|
|||
# %% test linestring shapely
|
||||
|
||||
|
||||
def test_rect_grid_linestring_outside_shapely():
|
||||
def test_rect_grid_linestring_outside_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_linestring(LineString([(25., 25.), (21., 5.)]))
|
||||
assert len(result) == 0
|
||||
return result
|
||||
|
||||
|
||||
def test_rect_grid_linestring_in_2cells_shapely():
|
||||
def test_rect_grid_linestring_in_2cells_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_linestring(LineString([(5., 5.), (15., 5.)]))
|
||||
assert len(result) == 2
|
||||
assert result.lengths.sum() == 10.
|
||||
|
@ -449,14 +467,14 @@ def test_rect_grid_linestring_in_2cells_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_rect_grid_linestring_on_outer_boundary_shapely():
|
||||
def test_rect_grid_linestring_on_outer_boundary_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_linestring(LineString([(15., 20.), (5., 20.)]))
|
||||
assert len(result) == 2
|
||||
assert result.lengths.sum() == 10.
|
||||
|
@ -465,14 +483,14 @@ def test_rect_grid_linestring_on_outer_boundary_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_rect_grid_linestring_on_inner_boundary_shapely():
|
||||
def test_rect_grid_linestring_on_inner_boundary_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_linestring(LineString([(5., 10.), (15., 10.)]))
|
||||
assert len(result) == 2
|
||||
assert result.lengths.sum() == 10.
|
||||
|
@ -481,14 +499,14 @@ def test_rect_grid_linestring_on_inner_boundary_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_rect_grid_multilinestring_in_one_cell_shapely():
|
||||
def test_rect_grid_multilinestring_in_one_cell_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_linestring(MultiLineString(
|
||||
[LineString([(1., 1), (9., 1.)]), LineString([(1., 9.), (9., 9.)])]))
|
||||
assert len(result) == 1
|
||||
|
@ -497,14 +515,14 @@ def test_rect_grid_multilinestring_in_one_cell_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_rect_grid_linestring_in_and_out_of_cell_shapely():
|
||||
def test_rect_grid_linestring_in_and_out_of_cell_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_linestring(
|
||||
LineString([(5., 9), (15., 5.), (5., 1.)]))
|
||||
assert len(result) == 2
|
||||
|
@ -514,31 +532,31 @@ def test_rect_grid_linestring_in_and_out_of_cell_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_linestring_outside():
|
||||
def test_tri_grid_linestring_outside(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_linestring(LineString([(25., 25.), (21., 5.)]))
|
||||
assert len(result) == 0
|
||||
return result
|
||||
|
||||
|
||||
def test_tri_grid_linestring_in_2cells():
|
||||
def test_tri_grid_linestring_in_2cells(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_linestring(LineString([(5., 5.), (5., 15.)]))
|
||||
assert len(result) == 2
|
||||
assert result.lengths.sum() == 10.
|
||||
|
@ -547,16 +565,16 @@ def test_tri_grid_linestring_in_2cells():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_linestring_on_outer_boundary():
|
||||
def test_tri_grid_linestring_on_outer_boundary(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_linestring(LineString([(15., 20.), (5., 20.)]))
|
||||
assert len(result) == 2
|
||||
assert result.lengths.sum() == 10.
|
||||
|
@ -565,16 +583,16 @@ def test_tri_grid_linestring_on_outer_boundary():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_linestring_on_inner_boundary():
|
||||
def test_tri_grid_linestring_on_inner_boundary(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_linestring(LineString([(5., 10.), (15., 10.)]))
|
||||
assert len(result) == 2
|
||||
assert result.lengths.sum() == 10.
|
||||
|
@ -583,16 +601,16 @@ def test_tri_grid_linestring_on_inner_boundary():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_multilinestring_in_one_cell():
|
||||
def test_tri_grid_multilinestring_in_one_cell(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_linestring(MultiLineString(
|
||||
[LineString([(1., 1), (9., 1.)]), LineString([(2., 2.), (9., 2.)])]))
|
||||
assert len(result) == 1
|
||||
|
@ -715,28 +733,28 @@ def test_rect_grid_polygon_with_hole():
|
|||
# %% test polygon shapely
|
||||
|
||||
|
||||
def test_rect_grid_polygon_outside_shapely():
|
||||
def test_rect_grid_polygon_outside_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_polygon(
|
||||
Polygon([(21., 11.), (23., 17.), (25., 11.)]))
|
||||
assert len(result) == 0
|
||||
return result
|
||||
|
||||
|
||||
def test_rect_grid_polygon_in_2cells_shapely():
|
||||
def test_rect_grid_polygon_in_2cells_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_polygon(
|
||||
Polygon([(2.5, 5.0), (7.5, 5.0), (7.5, 15.), (2.5, 15.)]))
|
||||
assert len(result) == 2
|
||||
|
@ -744,28 +762,28 @@ def test_rect_grid_polygon_in_2cells_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_rect_grid_polygon_on_outer_boundary_shapely():
|
||||
def test_rect_grid_polygon_on_outer_boundary_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_polygon(
|
||||
Polygon([(20., 5.0), (25., 5.0), (25., 15.), (20., 15.)]))
|
||||
assert len(result) == 0
|
||||
return result
|
||||
|
||||
|
||||
def test_rect_grid_polygon_on_inner_boundary_shapely():
|
||||
def test_rect_grid_polygon_on_inner_boundary_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
result = ix.intersect_polygon(
|
||||
Polygon([(5., 10.0), (15., 10.0), (15., 5.), (5., 5.)]))
|
||||
assert len(result) == 2
|
||||
|
@ -773,14 +791,14 @@ def test_rect_grid_polygon_on_inner_boundary_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_rect_grid_multipolygon_in_one_cell_shapely():
|
||||
def test_rect_grid_multipolygon_in_one_cell_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
p1 = Polygon([(1., 1.), (8., 1.), (8., 3.), (1., 3.)])
|
||||
p2 = Polygon([(1., 9.), (8., 9.), (8., 7.), (1., 7.)])
|
||||
p = MultiPolygon([p1, p2])
|
||||
|
@ -790,14 +808,14 @@ def test_rect_grid_multipolygon_in_one_cell_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_rect_grid_multipolygon_in_multiple_cells_shapely():
|
||||
def test_rect_grid_multipolygon_in_multiple_cells_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
p1 = Polygon([(1., 1.), (19., 1.), (19., 3.), (1., 3.)])
|
||||
p2 = Polygon([(1., 9.), (19., 9.), (19., 7.), (1., 7.)])
|
||||
p = MultiPolygon([p1, p2])
|
||||
|
@ -807,14 +825,14 @@ def test_rect_grid_multipolygon_in_multiple_cells_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_rect_grid_polygon_with_hole_shapely():
|
||||
def test_rect_grid_polygon_with_hole_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
p = Polygon([(5., 5.), (5., 15.), (25., 15.), (25., -5.),
|
||||
(5., -5.)], holes=[[(9., -1), (9, 11), (21, 11), (21, -1)]])
|
||||
result = ix.intersect_polygon(p)
|
||||
|
@ -823,32 +841,48 @@ def test_rect_grid_polygon_with_hole_shapely():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_polygon_outside():
|
||||
def test_rect_grid_polygon_in_edge_in_cell(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_rect_grid()
|
||||
ix = GridIntersect(gr, method='vertex', rtree=rtree)
|
||||
p = Polygon([(0., 5.), (3., 0.), (7., 0.),
|
||||
(10., 5.), (10., -1.), (0., -1.)])
|
||||
result = ix.intersect_polygon(p)
|
||||
assert len(result) == 1
|
||||
assert result.areas.sum() == 15.
|
||||
return result
|
||||
|
||||
|
||||
def test_tri_grid_polygon_outside(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_polygon(
|
||||
Polygon([(21., 11.), (23., 17.), (25., 11.)]))
|
||||
assert len(result) == 0
|
||||
return result
|
||||
|
||||
|
||||
def test_tri_grid_polygon_in_2cells():
|
||||
def test_tri_grid_polygon_in_2cells(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_polygon(
|
||||
Polygon([(2.5, 5.0), (5.0, 5.0), (5.0, 15.), (2.5, 15.)]))
|
||||
assert len(result) == 2
|
||||
|
@ -856,27 +890,27 @@ def test_tri_grid_polygon_in_2cells():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_polygon_on_outer_boundary():
|
||||
def test_tri_grid_polygon_on_outer_boundary(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_polygon(
|
||||
Polygon([(20., 5.0), (25., 5.0), (25., 15.), (20., 15.)]))
|
||||
assert len(result) == 0
|
||||
return result
|
||||
|
||||
|
||||
def test_tri_grid_polygon_on_inner_boundary():
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
def test_tri_grid_polygon_on_inner_boundary(rtree=True):
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
result = ix.intersect_polygon(
|
||||
Polygon([(5., 10.0), (15., 10.0), (15., 5.), (5., 5.)]))
|
||||
assert len(result) == 4
|
||||
|
@ -884,16 +918,16 @@ def test_tri_grid_polygon_on_inner_boundary():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_multipolygon_in_one_cell():
|
||||
def test_tri_grid_multipolygon_in_one_cell(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
p1 = Polygon([(1., 1.), (8., 1.), (8., 3.), (3., 3.)])
|
||||
p2 = Polygon([(5., 5.), (8., 5.), (8., 8.)])
|
||||
p = MultiPolygon([p1, p2])
|
||||
|
@ -903,16 +937,16 @@ def test_tri_grid_multipolygon_in_one_cell():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_multipolygon_in_multiple_cells():
|
||||
def test_tri_grid_multipolygon_in_multiple_cells(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
p1 = Polygon([(1., 1.), (19., 1.), (19., 3.), (1., 3.)])
|
||||
p2 = Polygon([(1., 9.), (19., 9.), (19., 7.), (1., 7.)])
|
||||
p = MultiPolygon([p1, p2])
|
||||
|
@ -922,16 +956,16 @@ def test_tri_grid_multipolygon_in_multiple_cells():
|
|||
return result
|
||||
|
||||
|
||||
def test_tri_grid_polygon_with_hole():
|
||||
def test_tri_grid_polygon_with_hole(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
gr = get_tri_grid(triangle_exe=triangle_exe)
|
||||
gr = get_tri_grid()
|
||||
if gr == -1:
|
||||
return
|
||||
ix = GridIntersect(gr)
|
||||
ix = GridIntersect(gr, rtree=rtree)
|
||||
p = Polygon([(5., 5.), (5., 15.), (25., 15.), (25., -5.),
|
||||
(5., -5.)], holes=[[(9., -1), (9, 11), (21, 11), (21, -1)]])
|
||||
result = ix.intersect_polygon(p)
|
||||
|
@ -978,15 +1012,17 @@ def test_polygon_offset_rot_structured_grid():
|
|||
except:
|
||||
return
|
||||
sgr = get_rect_grid(angrot=45., xyoffset=10.)
|
||||
p = Polygon([(5, 10. + np.sqrt(200.)), (15, 10. + np.sqrt(200.)),
|
||||
(15, 10. + 1.5*np.sqrt(200.)), (5, 10. + 1.5*np.sqrt(200.))])
|
||||
p = Polygon([(5, 10. + np.sqrt(200.)),
|
||||
(15, 10. + np.sqrt(200.)),
|
||||
(15, 10. + 1.5 * np.sqrt(200.)),
|
||||
(5, 10. + 1.5 * np.sqrt(200.))])
|
||||
ix = GridIntersect(sgr, method="structured")
|
||||
result = ix.intersect_polygon(p)
|
||||
# assert len(result) == 3.
|
||||
return result
|
||||
|
||||
|
||||
def test_point_offset_rot_structured_grid_shapely():
|
||||
def test_point_offset_rot_structured_grid_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
|
@ -994,13 +1030,13 @@ def test_point_offset_rot_structured_grid_shapely():
|
|||
return
|
||||
sgr = get_rect_grid(angrot=45., xyoffset=10.)
|
||||
p = Point(10., 10 + np.sqrt(200.))
|
||||
ix = GridIntersect(sgr, method="strtree")
|
||||
ix = GridIntersect(sgr, method="vertex", rtree=rtree)
|
||||
result = ix.intersect_point(p)
|
||||
# assert len(result) == 1.
|
||||
return result
|
||||
|
||||
|
||||
def test_linestring_offset_rot_structured_grid_shapely():
|
||||
def test_linestring_offset_rot_structured_grid_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
|
@ -1008,26 +1044,91 @@ def test_linestring_offset_rot_structured_grid_shapely():
|
|||
return
|
||||
sgr = get_rect_grid(angrot=45., xyoffset=10.)
|
||||
ls = LineString([(5, 10. + np.sqrt(200.)), (15, 10. + np.sqrt(200.))])
|
||||
ix = GridIntersect(sgr, method="strtree")
|
||||
ix = GridIntersect(sgr, method="vertex", rtree=rtree)
|
||||
result = ix.intersect_linestring(ls)
|
||||
# assert len(result) == 2.
|
||||
return result
|
||||
|
||||
|
||||
def test_polygon_offset_rot_structured_grid_shapely():
|
||||
def test_polygon_offset_rot_structured_grid_shapely(rtree=True):
|
||||
# avoid test fail when shapely not available
|
||||
try:
|
||||
import shapely
|
||||
except:
|
||||
return
|
||||
sgr = get_rect_grid(angrot=45., xyoffset=10.)
|
||||
p = Polygon([(5, 10. + np.sqrt(200.)), (15, 10. + np.sqrt(200.)),
|
||||
(15, 10. + 1.5*np.sqrt(200.)), (5, 10. + 1.5*np.sqrt(200.))])
|
||||
ix = GridIntersect(sgr, method="strtree")
|
||||
p = Polygon([(5, 10. + np.sqrt(200.)),
|
||||
(15, 10. + np.sqrt(200.)),
|
||||
(15, 10. + 1.5 * np.sqrt(200.)),
|
||||
(5, 10. + 1.5 * np.sqrt(200.))])
|
||||
ix = GridIntersect(sgr, method="vertex", rtree=rtree)
|
||||
result = ix.intersect_polygon(p)
|
||||
# assert len(result) == 3.
|
||||
return result
|
||||
|
||||
|
||||
# %% test non strtree shapely intersect
|
||||
|
||||
def test_all_intersections_shapely_no_strtree():
|
||||
"""avoid adding separate tests for rtree=False"""
|
||||
# Points
|
||||
# regular grid
|
||||
test_rect_grid_point_on_inner_boundary_shapely(rtree=False)
|
||||
test_rect_grid_point_on_outer_boundary_shapely(rtree=False)
|
||||
test_rect_grid_point_outside_shapely(rtree=False)
|
||||
test_rect_grid_multipoint_in_one_cell_shapely(rtree=False)
|
||||
test_rect_grid_multipoint_in_multiple_cells_shapely(rtree=False)
|
||||
# vertex grid
|
||||
test_tri_grid_point_on_inner_boundary(rtree=False)
|
||||
test_tri_grid_point_on_outer_boundary(rtree=False)
|
||||
test_tri_grid_point_outside(rtree=False)
|
||||
test_tri_grid_multipoint_in_multiple_cells(rtree=False)
|
||||
test_tri_grid_multipoint_in_one_cell(rtree=False)
|
||||
|
||||
# LineStrings
|
||||
# regular grid
|
||||
test_rect_grid_linestring_on_inner_boundary_shapely(rtree=False)
|
||||
test_rect_grid_linestring_on_outer_boundary_shapely(rtree=False)
|
||||
test_rect_grid_linestring_outside_shapely(rtree=False)
|
||||
test_rect_grid_linestring_in_2cells_shapely(rtree=False)
|
||||
test_rect_grid_linestring_in_and_out_of_cell_shapely(rtree=False)
|
||||
test_rect_grid_multilinestring_in_one_cell_shapely(rtree=False)
|
||||
# vertex grid
|
||||
test_tri_grid_linestring_on_inner_boundary(rtree=False)
|
||||
test_tri_grid_linestring_on_outer_boundary(rtree=False)
|
||||
test_tri_grid_linestring_outside(rtree=False)
|
||||
test_tri_grid_linestring_in_2cells(rtree=False)
|
||||
test_tri_grid_multilinestring_in_one_cell(rtree=False)
|
||||
|
||||
# Polygons
|
||||
# regular grid
|
||||
test_rect_grid_polygon_on_inner_boundary_shapely(rtree=False)
|
||||
test_rect_grid_polygon_on_outer_boundary_shapely(rtree=False)
|
||||
test_rect_grid_polygon_outside_shapely(rtree=False)
|
||||
test_rect_grid_polygon_in_2cells_shapely(rtree=False)
|
||||
test_rect_grid_polygon_with_hole_shapely(rtree=False)
|
||||
test_rect_grid_multipolygon_in_one_cell_shapely(rtree=False)
|
||||
test_rect_grid_multipolygon_in_multiple_cells_shapely(rtree=False)
|
||||
# vertex grid
|
||||
test_tri_grid_polygon_on_inner_boundary(rtree=False)
|
||||
test_tri_grid_polygon_on_outer_boundary(rtree=False)
|
||||
test_tri_grid_polygon_outside(rtree=False)
|
||||
test_tri_grid_polygon_in_2cells(rtree=False)
|
||||
test_tri_grid_polygon_with_hole(rtree=False)
|
||||
test_tri_grid_multipolygon_in_multiple_cells(rtree=False)
|
||||
test_tri_grid_multipolygon_in_one_cell(rtree=False)
|
||||
|
||||
# offset and rotated grids
|
||||
test_point_offset_rot_structured_grid_shapely(rtree=False)
|
||||
test_linestring_offset_rot_structured_grid_shapely(rtree=False)
|
||||
ix = test_polygon_offset_rot_structured_grid_shapely(rtree=False)
|
||||
|
||||
return ix
|
||||
|
||||
|
||||
# %% test rasters
|
||||
|
||||
|
||||
def test_rasters():
|
||||
from flopy.utils import Raster
|
||||
import os
|
||||
|
@ -1038,7 +1139,7 @@ def test_rasters():
|
|||
|
||||
try:
|
||||
rio = Raster.load(os.path.join(ws, "dem", raster_name))
|
||||
except ImportError:
|
||||
except:
|
||||
return
|
||||
|
||||
ml = fp.modflow.Modflow.load("sagehen.nam", version="mfnwt",
|
||||
|
@ -1090,7 +1191,3 @@ def test_rasters():
|
|||
raise AssertionError
|
||||
|
||||
del rio
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_rasters()
|
||||
|
|
|
@ -3,37 +3,45 @@ Test MT3D model creation and file writing
|
|||
"""
|
||||
|
||||
import os
|
||||
import warnings
|
||||
import flopy
|
||||
import numpy as np
|
||||
|
||||
mf_exe_name = 'mf2005'
|
||||
mt_exe_name = 'mt3dms'
|
||||
v1 = flopy.which(mf_exe_name)
|
||||
v2 = flopy.which(mt_exe_name)
|
||||
run = True
|
||||
if v1 is None or v2 is None:
|
||||
run = False
|
||||
|
||||
|
||||
def test_mt3d_ssm_with_nodata_in_1st_sp():
|
||||
model_ws = os.path.join('.', 'temp', 't068')
|
||||
|
||||
nlay, nrow, ncol = 10, 10, 10
|
||||
|
||||
nlay, nrow, ncol = 3, 5, 5
|
||||
perlen = np.zeros((10), dtype=np.float) + 10
|
||||
nper = len(perlen)
|
||||
|
||||
ibound = np.ones((nlay,nrow,ncol), dtype=np.int)
|
||||
|
||||
botm = np.arange(-1,-11,-1)
|
||||
botm = np.arange(-1,-4,-1)
|
||||
top = 0.
|
||||
|
||||
# creating MODFLOW model
|
||||
|
||||
model_ws = 'data'
|
||||
modelname = 'ssm_ex2'
|
||||
model_ws = os.path.join('.', 'temp', 't068a')
|
||||
modelname = 'model_mf'
|
||||
|
||||
mf = flopy.modflow.Modflow(modelname, model_ws=model_ws, version='mfnwt')
|
||||
mf = flopy.modflow.Modflow(modelname, model_ws=model_ws,
|
||||
exe_name=mf_exe_name)
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay=nlay, nrow=nrow, ncol=ncol,
|
||||
perlen=perlen, nper=nper, botm=botm, top=top,
|
||||
steady=False)
|
||||
|
||||
bas = flopy.modflow.ModflowBas(mf, ibound=ibound, strt=top)
|
||||
upw = flopy.modflow.ModflowUpw(mf, hk=100, vka=100, ss=0.00001, sy=0.1)
|
||||
lpf = flopy.modflow.ModflowLpf(mf, hk=100, vka=100, ss=0.00001, sy=0.1)
|
||||
oc = flopy.modflow.ModflowOc(mf)
|
||||
nwt = flopy.modflow.ModflowNwt(mf)
|
||||
pcg = flopy.modflow.ModflowPcg(mf)
|
||||
lmt = flopy.modflow.ModflowLmt(mf)
|
||||
|
||||
# recharge
|
||||
rchrate = {}
|
||||
|
@ -51,18 +59,18 @@ def test_mt3d_ssm_with_nodata_in_1st_sp():
|
|||
# after the first stress period (this was crashing flopy
|
||||
# version 3.2.13
|
||||
ghb_data = {}
|
||||
ghb_data[2] = [(4, 4, 4, 0.1, 1.5)]
|
||||
ssm_data[2] = [(4, 4, 4, 1.0, itype['GHB'], 1.0, 100.0)]
|
||||
ghb_data[5] = [(4, 4, 4, 0.25, 1.5)]
|
||||
ssm_data[5] = [(4, 4, 4, 0.5, itype['GHB'], 0.5, 200.0)]
|
||||
ssm_data[2] = [(nlay - 1, 4, 4, 1.0, itype['GHB'], 1.0, 100.0)]
|
||||
ghb_data[2] = [(nlay - 1, 4, 4, 0.1, 1.5)]
|
||||
ghb_data[5] = [(nlay - 1, 4, 4, 0.25, 1.5)]
|
||||
ssm_data[5] = [(nlay - 1, 4, 4, 0.5, itype['GHB'], 0.5, 200.0)]
|
||||
|
||||
for k in range(nlay):
|
||||
for i in range(nrow):
|
||||
ghb_data[2].append((k, i, 0, 0.0, 100.0))
|
||||
ssm_data[2].append((k, i, 0, 0.0, itype['GHB'], 0.0, 0.0))
|
||||
|
||||
ghb_data[5] = [(4, 4, 4, 0.25, 1.5)]
|
||||
ssm_data[5] = [(4, 4, 4, 0.5, itype['GHB'], 0.5, 200.0)]
|
||||
ghb_data[5] = [(nlay - 1, 4, 4, 0.25, 1.5)]
|
||||
ssm_data[5] = [(nlay - 1, 4, 4, 0.5, itype['GHB'], 0.5, 200.0)]
|
||||
for k in range(nlay):
|
||||
for i in range(nrow):
|
||||
ghb_data[5].append((k, i, 0, -0.5, 100.0))
|
||||
|
@ -72,7 +80,9 @@ def test_mt3d_ssm_with_nodata_in_1st_sp():
|
|||
ghb = flopy.modflow.ModflowGhb(mf, stress_period_data=ghb_data)
|
||||
|
||||
# create MT3D-USGS model
|
||||
mt = flopy.mt3d.Mt3dms(modflowmodel=mf, modelname=modelname, model_ws=model_ws)
|
||||
modelname = 'model_mt'
|
||||
mt = flopy.mt3d.Mt3dms(modflowmodel=mf, modelname=modelname,
|
||||
model_ws=model_ws, exe_name='mt3dms')
|
||||
btn = flopy.mt3d.Mt3dBtn(mt, sconc=0, ncomp=2, sconc2=50.0)
|
||||
adv = flopy.mt3d.Mt3dAdv(mt)
|
||||
ssm = flopy.mt3d.Mt3dSsm(mt, stress_period_data=ssm_data)
|
||||
|
@ -81,17 +91,98 @@ def test_mt3d_ssm_with_nodata_in_1st_sp():
|
|||
# Write the output
|
||||
mf.write_input()
|
||||
mt.write_input()
|
||||
|
||||
# confirm that MT3D files exist
|
||||
assert os.path.isfile(os.path.join(model_ws, '{}.{}'.format(mt.name, btn.extension[0]))) is True
|
||||
assert os.path.isfile(os.path.join(model_ws, '{}.{}'.format(mt.name, adv.extension[0]))) is True
|
||||
assert os.path.isfile(os.path.join(model_ws, '{}.{}'.format(mt.name, ssm.extension[0]))) is True
|
||||
assert os.path.isfile(os.path.join(model_ws, '{}.{}'.format(mt.name, gcg.extension[0]))) is True
|
||||
|
||||
|
||||
# run the models
|
||||
if run:
|
||||
success, buff = mf.run_model(report=True)
|
||||
assert success, 'MODFLOW did not run'
|
||||
success, buff = mt.run_model(report=True, normal_msg='Program completed.')
|
||||
assert success, 'MT3D did not run'
|
||||
|
||||
model_ws2 = os.path.join('.', 'temp', 't068b')
|
||||
mf2 = flopy.modflow.Modflow.load('model_mf.nam', model_ws=model_ws,
|
||||
exe_name='mf2005')
|
||||
mf2.change_model_ws(model_ws2)
|
||||
mt2 = flopy.mt3d.Mt3dms.load('model_mt.nam', model_ws=model_ws,
|
||||
verbose=True, exe_name='mt3dms')
|
||||
mt2.change_model_ws(model_ws2)
|
||||
mf2.write_input()
|
||||
mt2.write_input()
|
||||
success, buff = mf2.run_model(report=True)
|
||||
assert success, 'MODFLOW did not run'
|
||||
success, buff = mt2.run_model(report=True, normal_msg='Program completed.')
|
||||
assert success, 'MT3D did not run'
|
||||
|
||||
fname = os.path.join(model_ws, 'MT3D001.UCN')
|
||||
ucnobj = flopy.utils.UcnFile(fname)
|
||||
conca = ucnobj.get_alldata()
|
||||
|
||||
fname = os.path.join(model_ws2, 'MT3D001.UCN')
|
||||
ucnobj = flopy.utils.UcnFile(fname)
|
||||
concb = ucnobj.get_alldata()
|
||||
|
||||
assert np.allclose(conca, concb)
|
||||
|
||||
return
|
||||
|
||||
|
||||
def test_none_spdtype():
|
||||
# ensure that -1 and None work as valid list entries in the
|
||||
# stress period dictionary
|
||||
model_ws = os.path.join('.', 'temp', 't068c')
|
||||
mf = flopy.modflow.Modflow(model_ws=model_ws, exe_name=mf_exe_name)
|
||||
dis = flopy.modflow.ModflowDis(mf, nper=2)
|
||||
bas = flopy.modflow.ModflowBas(mf)
|
||||
lpf = flopy.modflow.ModflowLpf(mf)
|
||||
spd = {0: -1, 1: None}
|
||||
wel = flopy.modflow.ModflowWel(mf, stress_period_data=spd)
|
||||
pcg = flopy.modflow.ModflowPcg(mf)
|
||||
mf.write_input()
|
||||
mf2 = flopy.modflow.Modflow.load('modflowtest.nam', model_ws=model_ws,
|
||||
verbose=True)
|
||||
if run:
|
||||
success, buff = mf.run_model(report=True)
|
||||
assert success
|
||||
|
||||
def test_ssm_readwrite():
|
||||
|
||||
# Instantiate MODFLOW model
|
||||
mf = flopy.modflow.Modflow()
|
||||
|
||||
# These dimensions work for the SSM file to be loaded
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay=10, nrow=118, ncol=153,
|
||||
nper=100, delr=100, delc=100, perlen=1)
|
||||
bas = flopy.modflow.ModflowBas(mf)
|
||||
|
||||
# Instantiate MT3D model
|
||||
mt = flopy.mt3d.Mt3dms(modflowmodel=mf, modelname='tran_v1',
|
||||
version='mt3d-usgs')
|
||||
btn = flopy.mt3d.Mt3dBtn(mt)
|
||||
|
||||
# Point to ssm file for test load and write
|
||||
pth = os.path.join('..','examples','data','ssm_load_test')
|
||||
fl = os.path.join(pth, 'tran_v1_b1.ssm')
|
||||
|
||||
# Check that example input file with no data specified for crch works
|
||||
# (file comes from: https://github.com/modflowpy/flopy/issues/743)
|
||||
ssm = flopy.mt3d.Mt3dSsm.load(fl, mt)
|
||||
|
||||
# Change to dedicated work directory
|
||||
cwd = os.getcwd()
|
||||
if not os.path.exists(os.path.join('temp','t068_ssm_write')):
|
||||
os.makedirs(os.path.join('temp','t068_ssm_write'))
|
||||
|
||||
os.chdir(os.path.join('temp','t068_ssm_write'))
|
||||
|
||||
# Ensure file is writeable
|
||||
ssm.write_file()
|
||||
|
||||
# Return to starting directory
|
||||
os.chdir(cwd)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_mt3d_ssm_with_nodata_in_1st_sp()
|
||||
test_none_spdtype()
|
||||
test_ssm_readwrite()
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
"""
|
||||
Test vtk export_model function without packages_names definition
|
||||
"""
|
||||
|
||||
import os
|
||||
import flopy
|
||||
from flopy.export import vtk
|
||||
|
||||
mf_exe_name = 'mf6'
|
||||
|
||||
def test_vtk_export_model_without_packages_names():
|
||||
|
||||
ws = os.path.join('.', 'temp', 't069')
|
||||
name = 'mymodel'
|
||||
sim = flopy.mf6.MFSimulation(sim_name=name, sim_ws=ws, exe_name='mf6')
|
||||
tdis = flopy.mf6.ModflowTdis(sim)
|
||||
ims = flopy.mf6.ModflowIms(sim)
|
||||
gwf = flopy.mf6.ModflowGwf(sim, modelname=name, save_flows=True)
|
||||
dis = flopy.mf6.ModflowGwfdis(gwf, nrow=10, ncol=10)
|
||||
ic = flopy.mf6.ModflowGwfic(gwf)
|
||||
npf = flopy.mf6.ModflowGwfnpf(gwf, save_specific_discharge=True)
|
||||
chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=[[(0, 0, 0), 1.],
|
||||
[(0, 9, 9), 0.]])
|
||||
|
||||
# Export model without specifying packages_names parameter
|
||||
vtk.export_model(sim.get_model(), ws)
|
||||
|
||||
# If the function executes without error then test was successful
|
||||
assert True
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_vtk_export_model_without_packages_names()
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Created on Mon Feb 17 12:29:35 2020
|
||||
|
||||
@author: Artesia
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
import numpy as np
|
||||
import flopy
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
def test_plotting_with_quasi3d_layers():
|
||||
modelname = 'model_mf'
|
||||
model_ws = os.path.join('.', 'temp', 't069a')
|
||||
exe_name = 'mf2005'
|
||||
mf = flopy.modflow.Modflow(modelname, model_ws=model_ws, exe_name=exe_name)
|
||||
|
||||
# Model domain and grid definition
|
||||
Lx = 1000.
|
||||
Ly = 1000.
|
||||
ztop = 0.
|
||||
zbot = -30.
|
||||
nlay = 3
|
||||
nrow = 10
|
||||
ncol = 10
|
||||
delr = Lx / ncol
|
||||
delc = Ly / nrow
|
||||
laycbd = [0]*(nlay)
|
||||
laycbd[0] = 1
|
||||
botm = np.linspace(ztop, zbot, nlay + np.sum(laycbd) + 1)[1:]
|
||||
|
||||
# Create the discretization object
|
||||
flopy.modflow.ModflowDis(mf, nlay, nrow, ncol, delr=delr, delc=delc,
|
||||
top=ztop, botm=botm, laycbd=laycbd)
|
||||
|
||||
# Variables for the BAS package
|
||||
ibound = np.ones((nlay, nrow, ncol), dtype=np.int32)
|
||||
ibound[:, :, 0] = -1
|
||||
ibound[:, :, -1] = -1
|
||||
strt = np.ones((nlay, nrow, ncol), dtype=np.float32)
|
||||
strt[:, :, 0] = 10.
|
||||
strt[:, :, -1] = 0.
|
||||
flopy.modflow.ModflowBas(mf, ibound=ibound, strt=strt)
|
||||
|
||||
# Add LPF package to the MODFLOW model
|
||||
flopy.modflow.ModflowLpf(mf, hk=10., vka=10., ipakcb=53, vkcb=10)
|
||||
|
||||
# add a well
|
||||
row = int((nrow-1)/2)
|
||||
col = int((ncol-1)/2)
|
||||
spd = {0:[[1, row, col, -1000]]}
|
||||
flopy.modflow.ModflowWel(mf, stress_period_data=spd)
|
||||
|
||||
# Add OC package to the MODFLOW model
|
||||
spd = {(0, 0): ['save head', 'save budget']}
|
||||
flopy.modflow.ModflowOc(mf, stress_period_data=spd, compact=True)
|
||||
|
||||
# Add PCG package to the MODFLOW model
|
||||
flopy.modflow.ModflowPcg(mf)
|
||||
|
||||
# Write the MODFLOW model input files
|
||||
mf.write_input()
|
||||
|
||||
# Run the MODFLOW model
|
||||
success, buff = mf.run_model()
|
||||
|
||||
# read output
|
||||
hf = flopy.utils.HeadFile(os.path.join(mf.model_ws,'{}.hds'.format(mf.name)))
|
||||
head = hf.get_data(totim=1.0)
|
||||
cbb = flopy.utils.CellBudgetFile(os.path.join(mf.model_ws,'{}.cbc'.format(mf.name)))
|
||||
frf = cbb.get_data(text='FLOW RIGHT FACE', totim=1.0)[0]
|
||||
fff = cbb.get_data(text='FLOW FRONT FACE', totim=1.0)[0]
|
||||
flf = cbb.get_data(text='FLOW LOWER FACE', totim=1.0)[0]
|
||||
|
||||
# plot a map
|
||||
plt.figure()
|
||||
mv = flopy.plot.PlotMapView(model=mf,layer=1)
|
||||
mv.plot_grid()
|
||||
mv.plot_array(head)
|
||||
mv.contour_array(head)
|
||||
mv.plot_ibound()
|
||||
mv.plot_bc('wel')
|
||||
mv.plot_discharge(frf,fff, head=head)
|
||||
plt.close()
|
||||
|
||||
# plot a cross-section
|
||||
plt.figure()
|
||||
cs = flopy.plot.PlotCrossSection(model=mf, line={'row':int((nrow-1)/2)})
|
||||
cs.plot_grid()
|
||||
cs.plot_array(head)
|
||||
cs.contour_array(head)
|
||||
cs.plot_ibound()
|
||||
cs.plot_bc('wel')
|
||||
cs.plot_discharge(frf, fff, flf, head=head)
|
||||
plt.close()
|
||||
|
|
@ -0,0 +1,493 @@
|
|||
# Test postprocessing and plotting functions related to specific discharge:
|
||||
# - get_extended_budget()
|
||||
# - get_specific_discharge()
|
||||
# - PlotMapView.plot_vector()
|
||||
# - PlotCrossSection.plot_vector()
|
||||
|
||||
# More precisely:
|
||||
# - two models are created: one for mf005 and one for mf6
|
||||
# - the two models are virtually identical; in fact, the options are such that
|
||||
# the calculated heads are indeed exactly the same (which is, by the way,
|
||||
# quite remarkable!)
|
||||
# - the model is a very small synthetic test case that just contains enough
|
||||
# things to allow for the functions to be thoroughly tested
|
||||
|
||||
import flopy
|
||||
import os
|
||||
import numpy as np
|
||||
import flopy.utils.binaryfile as bf
|
||||
|
||||
# model names, file names and locations
|
||||
modelname_mf2005 = 't070_mf2005'
|
||||
modelname_mf6 = 't070_mf6'
|
||||
postproc_test_ws = os.path.join('.', 'temp', 't070')
|
||||
modelws_mf2005 = os.path.join(postproc_test_ws, modelname_mf2005)
|
||||
modelws_mf6 = os.path.join(postproc_test_ws, modelname_mf6)
|
||||
cbcfile_mf2005 = os.path.join(modelws_mf2005, modelname_mf2005 + '.cbc')
|
||||
cbcfile_mf6 = os.path.join(modelws_mf6, modelname_mf6 + '.cbc')
|
||||
hdsfile_mf2005 = os.path.join(modelws_mf2005, modelname_mf2005 + '.hds')
|
||||
hdsfile_mf6 = os.path.join(modelws_mf6, modelname_mf6 + '.hds')
|
||||
namfile_mf2005 = os.path.join(modelws_mf2005, modelname_mf2005 + '.nam')
|
||||
namfile_mf6 = os.path.join(modelws_mf6, modelname_mf6 + '.nam')
|
||||
|
||||
# model domain, grid definition and properties
|
||||
Lx = 100.
|
||||
Ly = 100.
|
||||
ztop = 0.
|
||||
zbot = -100.
|
||||
nlay = 4
|
||||
nrow = 4
|
||||
ncol = 4
|
||||
delr = Lx/ncol
|
||||
delc = Ly/nrow
|
||||
delv = (ztop - zbot) / nlay
|
||||
botm = np.linspace(ztop, zbot, nlay + 1)
|
||||
hk=1.
|
||||
rchrate = 0.1
|
||||
lay_to_plot = 1
|
||||
|
||||
# variables for the BAS (mf2005) or DIS (mf6) package
|
||||
ibound = np.ones((nlay, nrow, ncol), dtype=np.int32)
|
||||
ibound[1, 0, 1] = 0 # set a no-flow cell
|
||||
strt = np.ones((nlay, nrow, ncol), dtype=np.float32)
|
||||
|
||||
# add inflow through west boundary using WEL package
|
||||
Q = 100.
|
||||
wel_list = []
|
||||
wel_list_iface = []
|
||||
for k in range(nlay):
|
||||
for i in range(nrow):
|
||||
wel_list.append([k, i, 0, Q])
|
||||
wel_list_iface.append(wel_list[-1] + [1])
|
||||
|
||||
# allow flow through north, south, and bottom boundaries using GHB package
|
||||
ghb_head = -30. # low enough to have dry cells in first layer
|
||||
ghb_cond = hk * delr * delv / (0.5 * delc)
|
||||
ghb_list = []
|
||||
ghb_list_iface = []
|
||||
for k in range(1, nlay):
|
||||
for j in range(ncol):
|
||||
if not (k==1 and j==1): # skip no-flow cell
|
||||
ghb_list.append([k, 0, j, ghb_head, ghb_cond])
|
||||
ghb_list_iface.append(ghb_list[-1] + [4])
|
||||
ghb_list.append([k, nrow-1, j, ghb_head, ghb_cond])
|
||||
ghb_list_iface.append(ghb_list[-1] + [3])
|
||||
for i in range(nrow):
|
||||
for j in range(ncol):
|
||||
ghb_list.append([nlay-1, i, j, ghb_head, ghb_cond])
|
||||
ghb_list_iface.append(ghb_list[-1] + [5])
|
||||
|
||||
# river in the eastern part
|
||||
riv_stage = -30.
|
||||
riv_cond = hk * delr * delc / (0.5 * delv)
|
||||
riv_rbot = riv_stage - 5.
|
||||
riv_list = []
|
||||
for i in range(nrow):
|
||||
riv_list.append([1, i, ncol-1, riv_stage, riv_cond, riv_rbot])
|
||||
|
||||
# drain in the south part
|
||||
drn_stage = -30.
|
||||
drn_cond = hk * delc * delv / (0.5 * delr)
|
||||
drn_list = []
|
||||
for j in range(ncol):
|
||||
drn_list.append([1, i, nrow-1, drn_stage, drn_cond])
|
||||
|
||||
boundary_ifaces = {'WELLS': wel_list_iface,
|
||||
'HEAD DEP BOUNDS': ghb_list_iface,
|
||||
'RIVER LEAKAGE': 2,
|
||||
'DRAIN': 3,
|
||||
'RECHARGE': 6}
|
||||
|
||||
def build_model_mf2005():
|
||||
|
||||
# create folders
|
||||
if not os.path.isdir(modelws_mf2005):
|
||||
os.makedirs(modelws_mf2005)
|
||||
|
||||
# create modflow model
|
||||
mf = flopy.modflow.Modflow(modelname_mf2005, model_ws=modelws_mf2005,
|
||||
exe_name='mf2005')
|
||||
|
||||
# cell by cell flow file unit number
|
||||
cbc_unit_nb = 53
|
||||
|
||||
# create DIS package
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay, nrow, ncol, delr=delr, delc=delc,
|
||||
top=ztop, botm=botm[1:])
|
||||
|
||||
# create BAS package
|
||||
bas = flopy.modflow.ModflowBas(mf, ibound=ibound, strt=strt)
|
||||
|
||||
# create LPF package
|
||||
laytyp = np.zeros(nlay)
|
||||
laytyp[0] = 1
|
||||
laywet = np.zeros(nlay)
|
||||
laywet[0] = 1
|
||||
lpf = flopy.modflow.ModflowLpf(mf, hk=hk, ipakcb=cbc_unit_nb,
|
||||
laytyp=laytyp, laywet=laywet, wetdry=-0.01)
|
||||
|
||||
# create WEL package
|
||||
wel_dict = {0: wel_list}
|
||||
wel = flopy.modflow.ModflowWel(mf, stress_period_data=wel_dict,
|
||||
ipakcb=cbc_unit_nb)
|
||||
|
||||
# create GHB package
|
||||
ghb_dict = {0: ghb_list}
|
||||
ghb = flopy.modflow.ModflowGhb(mf, stress_period_data=ghb_dict,
|
||||
ipakcb=cbc_unit_nb)
|
||||
|
||||
# create RIV package
|
||||
riv_dict = {0: riv_list}
|
||||
riv = flopy.modflow.ModflowRiv(mf, stress_period_data=riv_dict,
|
||||
ipakcb=cbc_unit_nb)
|
||||
|
||||
# create DRN package
|
||||
drn_dict = {0: drn_list}
|
||||
drn = flopy.modflow.ModflowDrn(mf, stress_period_data=drn_dict,
|
||||
ipakcb=cbc_unit_nb)
|
||||
|
||||
# create RCH package
|
||||
rch = flopy.modflow.ModflowRch(mf, rech=rchrate, ipakcb=cbc_unit_nb)
|
||||
|
||||
# create OC package
|
||||
spd = {(0, 0): ['print head', 'print budget', 'save head', 'save budget']}
|
||||
oc = flopy.modflow.ModflowOc(mf, stress_period_data=spd, compact=True)
|
||||
|
||||
# create PCG package
|
||||
pcg = flopy.modflow.ModflowPcg(mf)
|
||||
|
||||
# write the MODFLOW model input files
|
||||
mf.write_input()
|
||||
|
||||
# run the MODFLOW model
|
||||
success, buff = mf.run_model()
|
||||
return
|
||||
|
||||
def build_model_mf6():
|
||||
|
||||
if not os.path.isdir(modelws_mf6):
|
||||
os.makedirs(modelws_mf6)
|
||||
|
||||
# create simulation
|
||||
simname = modelname_mf6
|
||||
sim = flopy.mf6.MFSimulation(sim_name=simname, version='mf6',
|
||||
exe_name='mf6', sim_ws=modelws_mf6)
|
||||
|
||||
# create tdis package
|
||||
tdis_rc = [(1.0, 1, 1.0)]
|
||||
tdis = flopy.mf6.ModflowTdis(sim, pname='tdis', time_units='DAYS',
|
||||
perioddata=tdis_rc)
|
||||
|
||||
# create gwf model
|
||||
gwf = flopy.mf6.ModflowGwf(sim, modelname=modelname_mf6,
|
||||
model_nam_file='{}.nam'.format(modelname_mf6))
|
||||
gwf.name_file.save_flows = True
|
||||
|
||||
# create iterative model solution and register the gwf model with it
|
||||
rcloserecord = [1e-5, 'STRICT']
|
||||
ims = flopy.mf6.ModflowIms(sim, pname='ims', print_option='SUMMARY',
|
||||
complexity='SIMPLE', outer_hclose=1.e-5,
|
||||
outer_maximum=50, under_relaxation='NONE',
|
||||
inner_maximum=30, inner_hclose=1.e-5,
|
||||
rcloserecord=rcloserecord,
|
||||
linear_acceleration='CG',
|
||||
scaling_method='NONE', reordering_method='NONE',
|
||||
relaxation_factor=0.99)
|
||||
sim.register_ims_package(ims, [gwf.name])
|
||||
|
||||
# create dis package
|
||||
dis = flopy.mf6.ModflowGwfdis(gwf, nlay=nlay, nrow=nrow, ncol=ncol,
|
||||
delr=delr, delc=delc,
|
||||
top=ztop, botm=botm[1:], idomain=ibound)
|
||||
|
||||
# initial conditions
|
||||
ic = flopy.mf6.ModflowGwfic(gwf, pname='ic', strt=strt)
|
||||
|
||||
# create node property flow package
|
||||
rewet_record = [('WETFCT', 0.1, 'IWETIT', 1, 'IHDWET', 0)]
|
||||
icelltype = np.zeros(ibound.shape)
|
||||
icelltype[0, :, :] = 1
|
||||
wetdry = np.zeros(ibound.shape)
|
||||
wetdry[0, :, :] = -0.01
|
||||
npf = flopy.mf6.ModflowGwfnpf(gwf,
|
||||
icelltype=icelltype,
|
||||
k=hk,
|
||||
rewet_record=rewet_record,
|
||||
wetdry=wetdry,
|
||||
cvoptions=[()],
|
||||
save_specific_discharge=True)
|
||||
|
||||
# create wel package
|
||||
welspd = [[(wel_i[0], wel_i[1], wel_i[2]), wel_i[3]] for wel_i in wel_list]
|
||||
wel = flopy.mf6.ModflowGwfwel(gwf, print_input=True,
|
||||
stress_period_data=welspd)
|
||||
|
||||
# create ghb package
|
||||
ghbspd = [[(ghb_i[0], ghb_i[1], ghb_i[2]), ghb_i[3], ghb_i[4]]
|
||||
for ghb_i in ghb_list]
|
||||
ghb = flopy.mf6.ModflowGwfghb(gwf, print_input=True,
|
||||
stress_period_data=ghbspd)
|
||||
|
||||
# create riv package
|
||||
rivspd = [[(riv_i[0], riv_i[1], riv_i[2]), riv_i[3], riv_i[4], riv_i[5]]
|
||||
for riv_i in riv_list]
|
||||
riv = flopy.mf6.ModflowGwfriv(gwf, stress_period_data=rivspd)
|
||||
|
||||
# create drn package
|
||||
drnspd = [[(drn_i[0], drn_i[1], drn_i[2]), drn_i[3], drn_i[4]]
|
||||
for drn_i in drn_list]
|
||||
drn = flopy.mf6.ModflowGwfdrn(gwf, print_input=True,
|
||||
stress_period_data=drnspd)
|
||||
|
||||
# create rch package
|
||||
rch = flopy.mf6.ModflowGwfrcha(gwf, recharge=rchrate)
|
||||
|
||||
# output control
|
||||
oc = flopy.mf6.ModflowGwfoc(gwf, pname='oc', budget_filerecord=
|
||||
'{}.cbc'.format(modelname_mf6),
|
||||
head_filerecord='{}.hds'.format(modelname_mf6),
|
||||
headprintrecord=[('COLUMNS', 10, 'WIDTH', 15,
|
||||
'DIGITS', 6, 'GENERAL')],
|
||||
saverecord=[('HEAD', 'ALL'),
|
||||
('BUDGET', 'ALL')],
|
||||
printrecord=[('HEAD', 'ALL'),
|
||||
('BUDGET', 'ALL')])
|
||||
|
||||
# write input files
|
||||
sim.write_simulation()
|
||||
|
||||
# run simulation
|
||||
sim.run_simulation()
|
||||
return
|
||||
|
||||
def basic_check(Qx_ext, Qy_ext, Qz_ext):
|
||||
# check shape
|
||||
assert Qx_ext.shape == (nlay, nrow, ncol+1)
|
||||
assert Qy_ext.shape == (nlay, nrow+1, ncol)
|
||||
assert Qz_ext.shape == (nlay+1, nrow, ncol)
|
||||
|
||||
# check sign
|
||||
assert Qx_ext[2, 1, 1] > 0
|
||||
assert Qy_ext[2, 1, 1] > 0
|
||||
assert Qz_ext[2, 1, 1] < 0
|
||||
return
|
||||
|
||||
def local_balance_check(Qx_ext, Qy_ext, Qz_ext, hdsfile=None, model=None):
|
||||
# calculate water blance at every cell
|
||||
local_balance = Qx_ext[:, :, :-1] - Qx_ext[:, :, 1:] + \
|
||||
Qy_ext[:, 1:, :] - Qy_ext[:, :-1, :] + \
|
||||
Qz_ext[1:, :, :] - Qz_ext[:-1, :, :]
|
||||
|
||||
# calculate total flow through every cell
|
||||
local_total = np.abs(Qx_ext[:, :, :-1]) + np.abs(Qx_ext[:, :, 1:]) + \
|
||||
np.abs(Qy_ext[:, 1:, :]) + np.abs(Qy_ext[:, :-1, :]) + \
|
||||
np.abs(Qz_ext[1:, :, :]) + np.abs(Qz_ext[:-1, :, :])
|
||||
|
||||
# we should disregard no-flow and dry cells
|
||||
if hdsfile is not None and model is not None:
|
||||
hds = bf.HeadFile(hdsfile, precision='single')
|
||||
head = hds.get_data()
|
||||
noflo_or_dry = np.logical_or(head==model.hnoflo, head==model.hdry)
|
||||
local_balance[noflo_or_dry] = np.nan
|
||||
|
||||
# check water balance = 0 at every cell
|
||||
rel_err = local_balance / local_total
|
||||
max_rel_err = np.nanmax(rel_err)
|
||||
assert np.allclose(max_rel_err + 1., 1.)
|
||||
|
||||
def test_extended_budget_default():
|
||||
# build and run MODFLOW 2005 model
|
||||
build_model_mf2005()
|
||||
|
||||
# load and postprocess
|
||||
Qx_ext, Qy_ext, Qz_ext = \
|
||||
flopy.utils.postprocessing.get_extended_budget(cbcfile_mf2005)
|
||||
|
||||
# basic check
|
||||
basic_check(Qx_ext, Qy_ext, Qz_ext)
|
||||
|
||||
# overall check
|
||||
overall = np.sum(Qx_ext) + np.sum(Qy_ext) + np.sum(Qz_ext)
|
||||
assert np.allclose(overall, -1122.4931640625)
|
||||
return
|
||||
|
||||
def test_extended_budget_comprehensive():
|
||||
# load and postprocess
|
||||
mf = flopy.modflow.Modflow.load(namfile_mf2005, check=False)
|
||||
Qx_ext, Qy_ext, Qz_ext = \
|
||||
flopy.utils.postprocessing.get_extended_budget(cbcfile_mf2005,
|
||||
boundary_ifaces=boundary_ifaces,
|
||||
hdsfile=hdsfile_mf2005, model=mf)
|
||||
|
||||
# basic check
|
||||
basic_check(Qx_ext, Qy_ext, Qz_ext)
|
||||
|
||||
# local balance check
|
||||
local_balance_check(Qx_ext, Qy_ext, Qz_ext, hdsfile_mf2005, mf)
|
||||
|
||||
# overall check
|
||||
overall = np.sum(Qx_ext) + np.sum(Qy_ext) + np.sum(Qz_ext)
|
||||
assert np.allclose(overall, -1110.646240234375)
|
||||
return
|
||||
|
||||
def test_specific_discharge_default():
|
||||
# load and postprocess
|
||||
mf = flopy.modflow.Modflow.load(namfile_mf2005, check=False)
|
||||
qx, qy, qz = flopy.utils.postprocessing.get_specific_discharge(mf,
|
||||
cbcfile_mf2005)
|
||||
|
||||
# overall check
|
||||
overall = np.sum(qx) + np.sum(qy) + np.sum(qz)
|
||||
assert np.allclose(overall, -1.7959892749786377)
|
||||
return
|
||||
|
||||
def test_specific_discharge_comprehensive():
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.quiver import Quiver
|
||||
|
||||
# load and postprocess
|
||||
mf = flopy.modflow.Modflow.load(namfile_mf2005, check=False)
|
||||
qx, qy, qz = flopy.utils.postprocessing.get_specific_discharge(mf,
|
||||
cbcfile_mf2005,
|
||||
boundary_ifaces=boundary_ifaces,
|
||||
hdsfile=hdsfile_mf2005)
|
||||
|
||||
# check nan values
|
||||
assert np.isnan(qx[0, 0, 2])
|
||||
assert np.isnan(qx[1, 0, 1])
|
||||
|
||||
# overall check
|
||||
overall = np.nansum(qx) + np.nansum(qy) + np.nansum(qz)
|
||||
assert np.allclose(overall, -0.8558630187423599)
|
||||
|
||||
# plot discharge in map view
|
||||
lay = 1
|
||||
modelmap = flopy.plot.PlotMapView(model=mf, layer=lay)
|
||||
quiver = modelmap.plot_vector(qx, qy, normalize=True,
|
||||
masked_values=[qx[lay, 0, 0]],
|
||||
color='orange')
|
||||
|
||||
# check plot
|
||||
ax = modelmap.ax
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Discharge vector was not drawn")
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, Quiver):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
assert np.sum(quiver.Umask) == 2
|
||||
pos = np.sum(quiver.X) + np.sum(quiver.Y)
|
||||
assert np.allclose(pos, 1600.)
|
||||
val = np.sum(quiver.U) + np.sum(quiver.V)
|
||||
assert np.allclose(val, 10.908548650065649)
|
||||
|
||||
# close figure
|
||||
plt.close()
|
||||
|
||||
# plot discharge in cross-section view
|
||||
hds = bf.HeadFile(hdsfile_mf2005, precision='single')
|
||||
head = hds.get_data()
|
||||
row = 0
|
||||
xsect = flopy.plot.PlotCrossSection(model=mf, line={'row': row})
|
||||
quiver = xsect.plot_vector(qx, qy, qz, head=head, normalize=True,
|
||||
masked_values=qx[0, row, :2], color='orange')
|
||||
|
||||
# check plot
|
||||
ax = xsect.ax
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Discharge vector was not drawn")
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, Quiver):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
assert np.sum(quiver.Umask) == 5
|
||||
X = np.ma.masked_where(quiver.Umask, quiver.X)
|
||||
Y = np.ma.masked_where(quiver.Umask, quiver.Y)
|
||||
pos = X.sum() + Y.sum()
|
||||
assert np.allclose(pos, -153.8352064441874)
|
||||
U = np.ma.masked_where(quiver.Umask, quiver.U)
|
||||
V = np.ma.masked_where(quiver.Umask, quiver.V)
|
||||
val = U.sum() + V.sum()
|
||||
assert np.allclose(val, -3.25453417836753)
|
||||
|
||||
# close figure
|
||||
plt.close()
|
||||
return
|
||||
|
||||
def test_specific_discharge_mf6():
|
||||
from flopy.mf6.modflow.mfsimulation import MFSimulation
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.quiver import Quiver
|
||||
|
||||
# build and run MODFLOW 6 model
|
||||
build_model_mf6()
|
||||
|
||||
# load and postprocess
|
||||
sim = MFSimulation.load(sim_name=modelname_mf6, sim_ws=modelws_mf6,
|
||||
verbosity_level=0)
|
||||
gwf = sim.get_model(modelname_mf6)
|
||||
qx, qy, qz = flopy.utils.postprocessing.get_specific_discharge(gwf,
|
||||
cbcfile_mf6, precision='double',
|
||||
hdsfile=hdsfile_mf6)
|
||||
|
||||
# check nan values
|
||||
assert np.isnan(qx[0, 0, 2])
|
||||
assert np.isnan(qx[1, 0, 1])
|
||||
|
||||
# overall check
|
||||
overall = np.nansum(qx) + np.nansum(qy) + np.nansum(qz)
|
||||
assert np.allclose(overall, -2.5768726154495947)
|
||||
|
||||
# plot discharge in map view
|
||||
lay = 1
|
||||
modelmap = flopy.plot.PlotMapView(model=gwf, layer=lay)
|
||||
quiver = modelmap.plot_vector(qx, qy, normalize=True)
|
||||
|
||||
# check plot
|
||||
ax = modelmap.ax
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Discharge vector was not drawn")
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, Quiver):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
assert np.sum(quiver.Umask) == 1
|
||||
pos = np.sum(quiver.X) + np.sum(quiver.Y)
|
||||
assert np.allclose(pos, 1600.)
|
||||
val = np.sum(quiver.U) + np.sum(quiver.V)
|
||||
assert np.allclose(val, 11.10085455942011)
|
||||
|
||||
# close figure
|
||||
plt.close()
|
||||
|
||||
# plot discharge in cross-section view
|
||||
hds = bf.HeadFile(hdsfile_mf6, precision='double')
|
||||
head = hds.get_data()
|
||||
row = 0
|
||||
xsect = flopy.plot.PlotCrossSection(model=gwf, line={'row': row})
|
||||
quiver = xsect.plot_vector(qx, qy, qz, head=head, normalize=True)
|
||||
|
||||
# check plot
|
||||
ax = xsect.ax
|
||||
if len(ax.collections) == 0:
|
||||
raise AssertionError("Discharge vector was not drawn")
|
||||
for col in ax.collections:
|
||||
if not isinstance(col, Quiver):
|
||||
raise AssertionError("Unexpected collection type")
|
||||
assert np.sum(quiver.Umask) == 3
|
||||
X = np.ma.masked_where(quiver.Umask, quiver.X)
|
||||
Y = np.ma.masked_where(quiver.Umask, quiver.Y)
|
||||
pos = X.sum() + Y.sum()
|
||||
assert np.allclose(pos, -145.94665962387785)
|
||||
U = np.ma.masked_where(quiver.Umask, quiver.U)
|
||||
V = np.ma.masked_where(quiver.Umask, quiver.V)
|
||||
val = U.sum() + V.sum()
|
||||
assert np.allclose(val, -4.49596527119806)
|
||||
|
||||
# close figure
|
||||
plt.close()
|
||||
return
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_extended_budget_default()
|
||||
test_extended_budget_comprehensive()
|
||||
test_specific_discharge_default()
|
||||
test_specific_discharge_comprehensive()
|
||||
test_specific_discharge_mf6()
|
|
@ -0,0 +1,82 @@
|
|||
import os
|
||||
import flopy
|
||||
import platform
|
||||
import shutil
|
||||
import numpy as np
|
||||
|
||||
|
||||
mpth = os.path.join('..', 'examples', 'data', 'ag_test')
|
||||
opth = os.path.join('temp', 't071')
|
||||
if not os.path.exists(opth):
|
||||
os.makedirs(opth)
|
||||
|
||||
|
||||
def test_empty_ag_package():
|
||||
ml = flopy.modflow.Modflow("agtest", version='mfnwt')
|
||||
ag = flopy.modflow.ModflowAg(ml)
|
||||
|
||||
if not isinstance(ag, flopy.pakbase.Package):
|
||||
raise Exception
|
||||
|
||||
|
||||
def test_load_write_agwater():
|
||||
agfile = "Agwater1.ag"
|
||||
ml = flopy.modflow.Modflow("Agwater1", version='mfnwt')
|
||||
ag1 = flopy.modflow.ModflowAg.load(os.path.join(mpth, agfile),
|
||||
ml, nper=49, ext_unit_dict={})
|
||||
|
||||
loaded = False
|
||||
for pak in ml.packagelist:
|
||||
if isinstance(pak, flopy.modflow.ModflowAg):
|
||||
loaded = True
|
||||
break
|
||||
|
||||
if not loaded:
|
||||
raise AssertionError("ModflowAg package not loaded")
|
||||
|
||||
ml.change_model_ws(opth)
|
||||
ag1.write_file()
|
||||
|
||||
ml2 = flopy.modflow.Modflow("Agwater1", version='mfnwt', model_ws=opth)
|
||||
ag2 = flopy.modflow.ModflowAg.load(os.path.join(opth, agfile),
|
||||
ml2, nper=49)
|
||||
|
||||
if repr(ag1) != repr(ag2):
|
||||
raise AssertionError("Ag package comparison failed")
|
||||
|
||||
def test_load_write_agwater_uzf():
|
||||
uzffile = "Agwater1.uzf"
|
||||
ml = flopy.modflow.Modflow("Agwater1", version='mfnwt')
|
||||
dis = flopy.modflow.ModflowDis(ml, nlay=1, nrow=15, ncol=10, nper=49)
|
||||
uzf1 = flopy.modflow.ModflowUzf1.load(os.path.join(mpth, uzffile), ml)
|
||||
|
||||
loaded = False
|
||||
for pak in ml.packagelist:
|
||||
if isinstance(pak, flopy.modflow.ModflowUzf1):
|
||||
loaded = True
|
||||
break
|
||||
|
||||
if not loaded:
|
||||
raise AssertionError("ModflowUzf1 package not loaded")
|
||||
|
||||
ml.change_model_ws(opth)
|
||||
uzf1.write_file()
|
||||
|
||||
ml2 = flopy.modflow.Modflow("Agwater1", version='mfnwt', model_ws=opth)
|
||||
dis2 = flopy.modflow.ModflowDis(ml2, nlay=1, nrow=15, ncol=10, nper=49)
|
||||
uzf2 = flopy.modflow.ModflowUzf1.load(os.path.join(opth, uzffile), ml2)
|
||||
|
||||
if not np.allclose(uzf1.air_entry.array, uzf2.air_entry.array):
|
||||
raise AssertionError("Air entry pressure array comparison failed")
|
||||
|
||||
if not np.allclose(uzf1.hroot.array, uzf2.hroot.array):
|
||||
raise AssertionError("root pressure array comparison failed")
|
||||
|
||||
if not np.allclose(uzf1.rootact.array, uzf2.rootact.array):
|
||||
raise AssertionError("root activity array comparison failed")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_empty_ag_package()
|
||||
test_load_write_agwater()
|
||||
test_load_write_agwater_uzf()
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -29,9 +29,9 @@
|
|||
"downloadURL": "https://code.usgs.gov/usgs/modflow/flopy/archive/master.zip",
|
||||
"vcs": "git",
|
||||
"laborHours": -1,
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"date": {
|
||||
"metadataLastUpdated": "2019-12-14"
|
||||
"metadataLastUpdated": "2020-06-26"
|
||||
},
|
||||
"organization": "U.S. Geological Survey",
|
||||
"permissions": {
|
||||
|
|
|
@ -6,10 +6,21 @@ FloPy includes support for MODFLOW 6, MODFLOW-2005, MODFLOW-NWT, MODFLOW-USG, an
|
|||
For general modeling issues, please consult a modeling forum, such as the [MODFLOW Users Group](https://groups.google.com/forum/#!forum/modflow). Other MODFLOW resources are listed in the [MODFLOW Resources](https://github.com/modflowpy/flopy#modflow-resources) section.
|
||||
|
||||
|
||||
Contributing
|
||||
------------------------------------------------
|
||||
Installation
|
||||
-----------------------------------------------
|
||||
|
||||
Bug reports, code contributions, or improvements to the documentation are welcome from the community. Prior to contributing, please read up on our guidelines for [contributing](CONTRIBUTING.md) and then check out one of our issues in the [hotlist: community-help](https://github.com/modflowpy/flopy/labels/hotlist%3A%20community%20help).
|
||||
FloPy requires **Python** 3.5 (or higher) and **NumPy** 1.9 (or higher). Dependencies for optional FloPy methods are summarized [here](docs/flopy_method_dependencies.md).
|
||||
|
||||
To install FloPy type:
|
||||
|
||||
conda install -c conda-forge flopy
|
||||
|
||||
or
|
||||
|
||||
pip install flopy
|
||||
|
||||
|
||||
The release candidate version can also be installed from the git repository using the instructions provided [below](#relcand).
|
||||
|
||||
|
||||
Documentation
|
||||
|
@ -23,11 +34,11 @@ How to Cite
|
|||
|
||||
*Citation for FloPy:*
|
||||
|
||||
[Bakker, M., Post, V., Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733–739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)
|
||||
[Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733–739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)
|
||||
|
||||
*Software/Code citation for FloPy:*
|
||||
|
||||
[Bakker, M., Post, V., Langevin, C. D., Hughes, J. D., White, J. T., Leaf, A. T., Paulinski, S. R., Larsen, J. D., Toews, M. W., Morway, E. D., Bellino, J. C., Starn, J. J., and Fienen, M. N., 2019, FloPy v3.3.0: U.S. Geological Survey Software Release, 14 December 2019, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
|
||||
[Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Leaf, A. T., Paulinski, S. R., Larsen, J. D., Toews, M. W., Morway, E. D., Bellino, J. C., Starn, J. J., and Fienen, M. N., 2020, FloPy v3.3.1: U.S. Geological Survey Software Release, 26 June 2020, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
|
||||
|
||||
|
||||
Disclaimer
|
||||
|
@ -45,12 +56,12 @@ unauthorized use.
|
|||
|
||||
Installation
|
||||
-----------------------------------------------
|
||||
To install FloPy version 3.3.0:
|
||||
To install FloPy version 3.3.1:
|
||||
```
|
||||
pip install flopy
|
||||
```
|
||||
|
||||
To update to FloPy version 3.3.0:
|
||||
To update to FloPy version 3.3.1:
|
||||
```
|
||||
pip install flopy --upgrade
|
||||
```
|
||||
|
|
|
@ -12,7 +12,7 @@ author:
|
|||
- Michael W. Toews
|
||||
- Eric D. Morway
|
||||
- Jason C. Bellino
|
||||
- Jeffrey J. Starn
|
||||
- Jon J. Starn
|
||||
- Michael N. Fienen
|
||||
header-includes:
|
||||
- \usepackage{fancyhdr}
|
||||
|
@ -21,9 +21,9 @@ header-includes:
|
|||
- \fancyhf{{}}
|
||||
- \fancyhead[LE, LO, RE, RO]{}
|
||||
- \fancyhead[CE, CO]{FloPy Release Notes}
|
||||
- \fancyfoot[LE, RO]{FloPy version 3.3.0}
|
||||
- \fancyfoot[LE, RO]{FloPy version 3.3.1}
|
||||
- \fancyfoot[CO, CE]{\thepage\ of \pageref{LastPage}}
|
||||
- \fancyfoot[RE, LO]{12/14/2019}
|
||||
- \fancyfoot[RE, LO]{06/26/2020}
|
||||
geometry: margin=0.75in
|
||||
---
|
||||
|
||||
|
@ -35,10 +35,21 @@ FloPy includes support for MODFLOW 6, MODFLOW-2005, MODFLOW-NWT, MODFLOW-USG, an
|
|||
For general modeling issues, please consult a modeling forum, such as the [MODFLOW Users Group](https://groups.google.com/forum/#!forum/modflow). Other MODFLOW resources are listed in the [MODFLOW Resources](https://github.com/modflowpy/flopy#modflow-resources) section.
|
||||
|
||||
|
||||
Contributing
|
||||
------------------------------------------------
|
||||
Installation
|
||||
-----------------------------------------------
|
||||
|
||||
Bug reports, code contributions, or improvements to the documentation are welcome from the community. Prior to contributing, please read up on our guidelines for [contributing](CONTRIBUTING.md) and then check out one of our issues in the [hotlist: community-help](https://github.com/modflowpy/flopy/labels/hotlist%3A%20community%20help).
|
||||
FloPy requires **Python** 3.5 (or higher) and **NumPy** 1.9 (or higher). Dependencies for optional FloPy methods are summarized [here](docs/flopy_method_dependencies.md).
|
||||
|
||||
To install FloPy type:
|
||||
|
||||
conda install -c conda-forge flopy
|
||||
|
||||
or
|
||||
|
||||
pip install flopy
|
||||
|
||||
|
||||
The release candidate version can also be installed from the git repository using the instructions provided [below](#relcand).
|
||||
|
||||
|
||||
Documentation
|
||||
|
@ -52,11 +63,11 @@ How to Cite
|
|||
|
||||
##### ***Citation for FloPy:***
|
||||
|
||||
[Bakker, M., Post, V., Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733–739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)
|
||||
[Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Starn, J. J. and Fienen, M. N., 2016, Scripting MODFLOW Model Development Using Python and FloPy: Groundwater, v. 54, p. 733–739, doi:10.1111/gwat.12413.](http://dx.doi.org/10.1111/gwat.12413)
|
||||
|
||||
##### ***Software/Code citation for FloPy:***
|
||||
|
||||
[Bakker, M., Post, V., Langevin, C. D., Hughes, J. D., White, J. T., Leaf, A. T., Paulinski, S. R., Larsen, J. D., Toews, M. W., Morway, E. D., Bellino, J. C., Starn, J. J., and Fienen, M. N., 2019, FloPy v3.3.0: U.S. Geological Survey Software Release, 14 December 2019, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
|
||||
[Bakker, Mark, Post, Vincent, Langevin, C. D., Hughes, J. D., White, J. T., Leaf, A. T., Paulinski, S. R., Larsen, J. D., Toews, M. W., Morway, E. D., Bellino, J. C., Starn, J. J., and Fienen, M. N., 2020, FloPy v3.3.1: U.S. Geological Survey Software Release, 26 June 2020, http://dx.doi.org/10.5066/F7BK19FH](http://dx.doi.org/10.5066/F7BK19FH)
|
||||
|
||||
|
||||
Disclaimer
|
||||
|
@ -74,12 +85,12 @@ unauthorized use.
|
|||
|
||||
Installation
|
||||
-----------------------------------------------
|
||||
To install FloPy version 3.3.0 from the USGS FloPy website:
|
||||
To install FloPy version 3.3.1 from the USGS FloPy website:
|
||||
```
|
||||
pip install https://water.usgs.gov/ogw/flopy/flopy-3.3.0.zip
|
||||
pip install https://water.usgs.gov/ogw/flopy/flopy-3.3.1.zip
|
||||
```
|
||||
|
||||
To update to FloPy version 3.3.0 from the USGS FloPy website:
|
||||
To update to FloPy version 3.3.1 from the USGS FloPy website:
|
||||
```
|
||||
pip install https://water.usgs.gov/ogw/flopy/flopy-3.3.0.zip --upgrade
|
||||
pip install https://water.usgs.gov/ogw/flopy/flopy-3.3.1.zip --upgrade
|
||||
```
|
||||
|
|
Binary file not shown.
|
@ -1,21 +0,0 @@
|
|||
Frequently Asked Questions
|
||||
----------------------------------
|
||||
|
||||
#### Create a new model
|
||||
|
||||
#### Working with existing models
|
||||
|
||||
+ [How do I load an existing MODFLOW-2005 model](../examples/FAQ/load_existing_mf2005.ipynb)
|
||||
+ [How do I load an existing MODFLOW model with auxiliary stress package data](../examples/FAQ/load_existing_model_wAUX.ipynb)
|
||||
|
||||
#### Running a MODFLOW model
|
||||
|
||||
+ [MODFLOW-2005 does not exist or is not executable](../examples/FAQ/mf2005_does_not_exist.ipynb)
|
||||
|
||||
#### Plotting model input and output
|
||||
|
||||
#### Exporting model input and output
|
||||
|
||||
#### Checking MODFLOW datasets
|
||||
|
||||
#### Advanced use of FloPy
|
|
@ -0,0 +1,35 @@
|
|||
Additional dependencies to use optional FloPy helper methods are listed below.
|
||||
|
||||
| Method | Python Package |
|
||||
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
||||
| `.PlotMapView()` in `flopy.plot` | **matplotlib** >= 1.4 |
|
||||
| `.PlotCrossSection()` in `flopy.plot` | **matplotlib** >= 1.4 |
|
||||
| `.plot()` | **matplotlib** >= 1.4 |
|
||||
| `.plot_shapefile()` | **matplotlib** >= 1.4 and **Pyshp** >= 1.2 |
|
||||
| `.to_shapefile()` | **Pyshp** >= 1.2 |
|
||||
| `.export(*.shp)` | **Pyshp** >= 1.2 |
|
||||
| `.export(*.nc)` | **netcdf4** >= 1.1, and **python-dateutil** >= 2.4 |
|
||||
| `.export(*.tif)` | **rasterio** |
|
||||
| `.export(*.asc)` in `flopy.utils.reference` `SpatialReference` class | **scipy.ndimage** |
|
||||
| `.interpolate()` in `flopy.utils.reference` `SpatialReference` class | **scipy.interpolate** |
|
||||
| `.interpolate()` in `flopy.mf6.utils.reference` `StructuredSpatialReference` class | **scipy.interpolate** |
|
||||
| `._parse_units_from_proj4()` in `flopy.utils.reference` `SpatialReference` class | **pyproj** |
|
||||
| `.get_dataframes()` in `flopy.utils.mflistfile` `ListBudget` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframes()` in `flopy.utils.observationfile` `ObsFiles` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframes()` in `flopy.utils.sfroutputfile` `ModflowSfr2` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframes()` in `flopy.utils.util_list` `MfList` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframes()` in `flopy.utils.zonebud` `ZoneBudget` class | **pandas** >= 0.15 |
|
||||
| `.pivot_keyarray()` in `flopy.mf6.utils.arrayutils` `AdvancedPackageUtil` class | **pandas** >= 0.15 |
|
||||
| `._get_vertices()` in `flopy.mf6.utils.binaryfile_utils` `MFOutputRequester` class | **pandas** >= 0.15 |
|
||||
| `.get_dataframe()` in `flopy.mf6.utils.mfobservation` `Observations` class | **pandas** >= 0.15 |
|
||||
| `.df()` in `flopy.modflow.mfsfr2` `SfrFile` class | **pandas** >= 0.15 |
|
||||
| `.time_coverage()` in `flopy.export.metadata` `acc` class - ***used if available*** | **pandas** >= 0.15 |
|
||||
| `.loadtxt()` in `flopy.utils.flopyio` - ***used if available*** | **pandas** >= 0.15 |
|
||||
| `.generate_classes()` in `flopy.mf6.utils` | [**pymake**](https://github.com/modflowpy/pymake) |
|
||||
| `.intersect()` in `flopy.discretization.VertexGrid` | **matplotlib** >= 1.4 |
|
||||
| `GridIntersect()` in `flopy.utils.gridintersect` | **shapely** |
|
||||
| `GridIntersect().plot_polygon()` in `flopy.utils.gridintersect` | **shapely** and **descartes** |
|
||||
| `Raster()` in `flopy.utils.Raster` | **rasterio**, **affine**, and **scipy** |
|
||||
| `Raster().sample_polygon()` in `flopy.utils.Raster` | **shapely** |
|
||||
| `Raster().crop()` in `flopy.utils.Raster` | **shapely** |
|
||||
| `.array_at_verts()` in `flopy.discretization.structuredgrid` `StructuredGrid` class | **scipy.interpolate** |
|
|
@ -20,7 +20,7 @@ Instructions for making a FloPy release
|
|||
|
||||
## Update the Software/Code citation for FloPy
|
||||
|
||||
1. Update the `authors` list in `release/make-release.py` for the Software/Code citation for FloPy, if required.
|
||||
1. Update the `author_dict` in `flopy/version.py` for the Software/Code citation for FloPy, if required.
|
||||
|
||||
|
||||
## Build USGS release notes
|
||||
|
@ -31,7 +31,13 @@ Instructions for making a FloPy release
|
|||
python make-release.py
|
||||
```
|
||||
|
||||
2. Run pandoc from the terminal in the root directory to create USGS release notes using:
|
||||
2. Manually run `update-version_changes.py` in the `release/` directory to update version changes information using:
|
||||
|
||||
```
|
||||
python update-version_changes.py
|
||||
```
|
||||
|
||||
3. Run pandoc from the terminal in the root directory to create USGS release notes using:
|
||||
|
||||
```
|
||||
pandoc -o ./docs/USGS_release.pdf ./docs/USGS_release.md ./docs/supported_packages.md ./docs/model_checks.md ./docs/version_changes.md
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
Introduction
|
||||
-----------------------------------------------
|
||||
|
||||
This file provides an overview of how FloPy for MODFLOW 6 (FPMF6) works under the hood and is intended for anyone who wants to add a new package, new model type, or new features to this library. FloPy library files that support MODFLOW 6 can be found in the flopy/mf6 folder and sub-folders.
|
||||
|
||||
Package Meta-Data and Package Files
|
||||
-----------------------------------------------
|
||||
|
||||
FPMF6 uses meta-data files located in flopy/mf6/data/dfn to define the model and package types supported by MODFLOW 6. When additional model and package types are added to MODFLOW 6, additional meta-data files can be added to this folder and flopy/mf6/utils/createpackages.py can be run to add new packages to the FloPy library. createpackages.py uses flopy/mf6/data/mfstructure.py to read meta-data files (*.dfn) and use that meta-data to create the package files found in flopy/mf6/modflow (do not directly modify any of the files in this folder, they are all automatically generated). The automatically generated package files contain an interface for accessing package data and data documentation generated from the meta-data files. Additionally, meta-data describing package data types and shapes is stored in the dfn attribute. flopy/mf6/data/mfstructure.py can load structure information using the dfn attribute (instead of loading it from the meta-data files). This allows for flopy to be installed without the dfn files.
|
||||
|
||||
All meta-data can be accessed from the flopy.mf6.data.mfstructure.MFStructure class. This is a singleton class, meaning only one instance of this class can be created. The class contains a sim_struct attribute (which is a flopy.mf6.data.mfstructure.MFSimulationStructure object) which contains all of the meta-data for all package files. Meta-data is stored in a structured format. MFSimulationStructure contains MFModelStructure and MFInputFileStructure objects, which contain the meta-data for each model type and each "simulation-level" package (tdis, ims, ...). MFModelStructure contains model specific meta-data and a MFInputFileStructure object for each package in that model. MFInputFileStructure contains package specific meta-data and a MFBlockStructure object for each block contained in the package file. MFBlockStructure contains block specific meta-data and a MFDataStructure object for each data structure defined in the block, and MFDataStructure contains data structure specific meta-data and a MFDataItemStructure object for each data item contained in the data structure. Data structures define the structure of data that is naturally grouped together, for example, the data in a numpy recarray. Data item structures define the structure of specific pieces of data, for example, a single column of a numpy recarray. The meta-data defined in these classes provides all the information FloPy needs to read and write MODFLOW 6 package and name files, create the Flopy interface, and check the data for various constraints.
|
||||
|
||||
|
||||
***
|
||||
MFStructure --+ MFSimulationStructure --+ MFModelStructure --+ MFInputFileStructure --+ MFBlockStructure --+ MFDataStructure --+ MFDataItemStructure
|
||||
|
||||
Figure 1: FPMF6 generic data structure classes. Lines connecting classes show a relationship defined between the two connected classes. A "*" next to the class means that the class is a sub-class of the connected class. A "+" next to the class means that the class is contained within the connected class.
|
||||
***
|
||||
|
||||
Package and Data Base Classes
|
||||
-----------------------------------------------
|
||||
|
||||
The package and data classes are related as shown below in figure 2. On the top of the figure 2 is the MFPackage class, which is the base class for all packages. MFPackage contains generic methods for building data objects and reading and writing the package to a file. MFPackage contains a MFInputFileStructure object that defines how the data is structured in the package file. MFPackage also contains a dictionary of blocks (MFBlock). The MFBlock class is a generic class used to represent a block within a package. MFBlock contains a MFBlockStructure object that defines how the data in the block is structured. MFBlock also contains a dictionary of data objects (subclasses of MFData) contained in the block and a list of block headers (MFBlockHeader) for that block. Block headers contain the block's name and optionally data items (eg. iprn).
|
||||
|
||||
|
||||
***
|
||||
MFPackage --+ MFBlock --+ MFData
|
||||
|
||||
MFPackage --+ MFInputFileStructure
|
||||
|
||||
MFBlock --+ MFBlockStructure
|
||||
|
||||
MFData --+ MFDataStructure
|
||||
|
||||
MFData --* MFArray --* MFTransientArray
|
||||
|
||||
MFData --* MFList --* MFTransientList
|
||||
|
||||
MFData --* MFScalar --* MFTransientScalar
|
||||
|
||||
MFTransientData --* MFTransientArray, MFTransientList, MFTransientScalar
|
||||
|
||||
Figure 2: FPMF6 package and data classes. Lines connecting classes show a relationship defined between the two connected classes. A "*" next to the class means that the class is a sub-class of the connected class. A "+" next to the class means that the class is contained within the connected class.
|
||||
***
|
||||
|
||||
There are three main types of data, MFList, MFArray, and MFScalar data. All three of these data types are derived from the MFData abstract base class. MFList data is the type of data stored in a spreadsheet with different column headings. For example, the data describing a flow barrier are of type MFList. MFList data is stored in numpy recarrays. MFArray data is data of a single type (eg. all integer values). For example, the model's HK values are of type MFArray. MFArrays are stored in numpy ndarrays. MFScalar data is a single data item. Most MFScalar data are options. All MFData subclasses contain an MFDataStructure object that defines the expected structure and types of the data.
|
||||
|
||||
Transient data, or data defined for each stress period (eg. data in the period blocks) is stored in MFTransientArray, MFTransientList, and MFTransientScalar. These classes are sub-classes of MFArray, MFList, and MFScalar, respectively. These classes are also subclasses of MFTransientData.
|
||||
Introduction
|
||||
-----------------------------------------------
|
||||
|
||||
This file provides an overview of how FloPy for MODFLOW 6 (FPMF6) works under the hood and is intended for anyone who wants to add a new package, new model type, or new features to this library. FloPy library files that support MODFLOW 6 can be found in the flopy/mf6 folder and sub-folders.
|
||||
|
||||
Package Meta-Data and Package Files
|
||||
-----------------------------------------------
|
||||
|
||||
FPMF6 uses meta-data files located in flopy/mf6/data/dfn to define the model and package types supported by MODFLOW 6. When additional model and package types are added to MODFLOW 6, additional meta-data files can be added to this folder and flopy/mf6/utils/createpackages.py can be run to add new packages to the FloPy library. createpackages.py uses flopy/mf6/data/mfstructure.py to read meta-data files (*.dfn) and use that meta-data to create the package files found in flopy/mf6/modflow (do not directly modify any of the files in this folder, they are all automatically generated). The automatically generated package files contain an interface for accessing package data and data documentation generated from the meta-data files. Additionally, meta-data describing package data types and shapes is stored in the dfn attribute. flopy/mf6/data/mfstructure.py can load structure information using the dfn attribute (instead of loading it from the meta-data files). This allows for flopy to be installed without the dfn files.
|
||||
|
||||
All meta-data can be accessed from the flopy.mf6.data.mfstructure.MFStructure class. This is a singleton class, meaning only one instance of this class can be created. The class contains a sim_struct attribute (which is a flopy.mf6.data.mfstructure.MFSimulationStructure object) which contains all of the meta-data for all package files. Meta-data is stored in a structured format. MFSimulationStructure contains MFModelStructure and MFInputFileStructure objects, which contain the meta-data for each model type and each "simulation-level" package (tdis, ims, ...). MFModelStructure contains model specific meta-data and a MFInputFileStructure object for each package in that model. MFInputFileStructure contains package specific meta-data and a MFBlockStructure object for each block contained in the package file. MFBlockStructure contains block specific meta-data and a MFDataStructure object for each data structure defined in the block, and MFDataStructure contains data structure specific meta-data and a MFDataItemStructure object for each data item contained in the data structure. Data structures define the structure of data that is naturally grouped together, for example, the data in a numpy recarray. Data item structures define the structure of specific pieces of data, for example, a single column of a numpy recarray. The meta-data defined in these classes provides all the information FloPy needs to read and write MODFLOW 6 package and name files, create the Flopy interface, and check the data for various constraints.
|
||||
|
||||
|
||||
***
|
||||
MFStructure --+ MFSimulationStructure --+ MFModelStructure --+ MFInputFileStructure --+ MFBlockStructure --+ MFDataStructure --+ MFDataItemStructure
|
||||
|
||||
Figure 1: FPMF6 generic data structure classes. Lines connecting classes show a relationship defined between the two connected classes. A "*" next to the class means that the class is a sub-class of the connected class. A "+" next to the class means that the class is contained within the connected class.
|
||||
***
|
||||
|
||||
Package and Data Base Classes
|
||||
-----------------------------------------------
|
||||
|
||||
The package and data classes are related as shown below in figure 2. On the top of the figure 2 is the MFPackage class, which is the base class for all packages. MFPackage contains generic methods for building data objects and reading and writing the package to a file. MFPackage contains a MFInputFileStructure object that defines how the data is structured in the package file. MFPackage also contains a dictionary of blocks (MFBlock). The MFBlock class is a generic class used to represent a block within a package. MFBlock contains a MFBlockStructure object that defines how the data in the block is structured. MFBlock also contains a dictionary of data objects (subclasses of MFData) contained in the block and a list of block headers (MFBlockHeader) for that block. Block headers contain the block's name and optionally data items (eg. iprn).
|
||||
|
||||
|
||||
***
|
||||
MFPackage --+ MFBlock --+ MFData
|
||||
|
||||
MFPackage --+ MFInputFileStructure
|
||||
|
||||
MFBlock --+ MFBlockStructure
|
||||
|
||||
MFData --+ MFDataStructure
|
||||
|
||||
MFData --* MFArray --* MFTransientArray
|
||||
|
||||
MFData --* MFList --* MFTransientList
|
||||
|
||||
MFData --* MFScalar --* MFTransientScalar
|
||||
|
||||
MFTransientData --* MFTransientArray, MFTransientList, MFTransientScalar
|
||||
|
||||
Figure 2: FPMF6 package and data classes. Lines connecting classes show a relationship defined between the two connected classes. A "*" next to the class means that the class is a sub-class of the connected class. A "+" next to the class means that the class is contained within the connected class.
|
||||
***
|
||||
|
||||
There are three main types of data, MFList, MFArray, and MFScalar data. All three of these data types are derived from the MFData abstract base class. MFList data is the type of data stored in a spreadsheet with different column headings. For example, the data describing a flow barrier are of type MFList. MFList data is stored in numpy recarrays. MFArray data is data of a single type (eg. all integer values). For example, the model's HK values are of type MFArray. MFArrays are stored in numpy ndarrays. MFScalar data is a single data item. Most MFScalar data are options. All MFData subclasses contain an MFDataStructure object that defines the expected structure and types of the data.
|
||||
|
||||
Transient data, or data defined for each stress period (eg. data in the period blocks) is stored in MFTransientArray, MFTransientList, and MFTransientScalar. These classes are sub-classes of MFArray, MFList, and MFScalar, respectively. These classes are also subclasses of MFTransientData.
|
||||
|
|
|
@ -1,5 +1,75 @@
|
|||
FloPy Changes
|
||||
-----------------------------------------------
|
||||
### Version 3.3.1
|
||||
|
||||
* New features:
|
||||
|
||||
* [feat(ModflowAg)](https://github.com/modflowpy/flopy/commit/c89b2d83a81125c986c05df57ffc980fe10fd663): Add the modflowag package for nwt (pull request #922). Committed by Joshua Larsen on 2020-06-25.
|
||||
* [feat(GridIntersect)](https://github.com/modflowpy/flopy/commit/176c9b45eb158217b1aeb0657d60ed06739e53e6): #902 (#903). Committed by Davíd Brakenhoff on 2020-06-10.
|
||||
* [feat(mbase)](https://github.com/modflowpy/flopy/commit/4fc61d573c108be7601a2e8479a86c35040998c2): Suppress duplicate package warning if verbose is false (#908). Committed by Hughes, J.D on 2020-06-09.
|
||||
* [feat(ModflowSms)](https://github.com/modflowpy/flopy/commit/f539d072e20cb5654fab8826ac3bbaf7d1f8b52e): Add support for simple, moderate, complex (#906). Committed by langevin-usgs on 2020-06-09.
|
||||
* [feat(str)](https://github.com/modflowpy/flopy/commit/3182f57479c1a45d614151867f419a0d35f7f2c2): Add irdflg and iptflg control to str (#905). Committed by Hughes, J.D on 2020-06-09.
|
||||
* [feat(Mf6ListBudget)](https://github.com/modflowpy/flopy/commit/04b74bd8fb4ed71cf0ed07f721204296b9fd4388): Add support for mf6 budgets with multiple packages with same name (#900). Committed by langevin-usgs on 2020-06-02.
|
||||
* [feat(mfchd.py)](https://github.com/modflowpy/flopy/commit/88fbd4ccdf837dd4b2a70795522fcaa0a2470dfe): Prevent write chk-file always (#869). Committed by Ralf Junghanns on 2020-05-08.
|
||||
* [feat(set all data external)](https://github.com/modflowpy/flopy/commit/0336b5c4f6c62994a7ffea26318240fbaa0ca1fb): Set all data external for simulation (#846). Committed by spaulins-usgs on 2020-04-08.
|
||||
* [feat(vtk)](https://github.com/modflowpy/flopy/commit/e43dccc29d87e182aaa82687968d98391fa78e5d): Improve export at vertices (#844). Committed by Etienne Bresciani on 2020-04-06.
|
||||
* [feat(netcdf)](https://github.com/modflowpy/flopy/commit/fb942b4675c335247b81f9287bdb8cdb3bcf360b): Use modern features from pyproj>=2.2.0 (#840). Committed by Mike Taves on 2020-03-31.
|
||||
* [feat(vtk)](https://github.com/modflowpy/flopy/commit/b975368a9c5a25df616b024a08450056e92b6426): Export vectors to vtk. Committed by Etienne Bresciani on 2020-03-31.
|
||||
* [feat(vtk)](https://github.com/modflowpy/flopy/commit/13c1dd28b9c470c70aac624b70888f5f6badf795): Export in .vti and .vtr when possible. Committed by Etienne Bresciani on 2020-03-28.
|
||||
* [feat(vectors)](https://github.com/modflowpy/flopy/commit/1284871e5b8ed26c9d925e28295c2098a76b1bc9): Vector plots when stresses applied along boundaries (#817). Committed by langevin-usgs on 2020-03-05.
|
||||
* [feat(plot_bc)](https://github.com/modflowpy/flopy/commit/207cd1ee5dde116e5b8912232d9b94a9c9304161): Updated plot_bc for maw, uzf, sfr, and multiple bc packages (#808). Committed by Joshua Larsen on 2020-02-11.
|
||||
* [feat(disl grids)](https://github.com/modflowpy/flopy/commit/469727bcb695ee42611f3df227830ef3b25853f6): Support for 1d vertex grids. fix for writing gridlines to shapefile (#799). Committed by spaulins-usgs on 2020-02-04.
|
||||
* [feat(zb netcdf)](https://github.com/modflowpy/flopy/commit/491f4fe3923a942e9a0d535a7da54173c4df1204): Zonebudget netcdf export support added (#781). Committed by Joshua Larsen on 2020-01-17.
|
||||
* [feat(mf6 checker)](https://github.com/modflowpy/flopy/commit/088f147f1d761875f3a1ffabdda82312c002305a): Input data check for mf6 (#779). Committed by spaulins-usgs on 2020-01-16.
|
||||
|
||||
|
||||
* Bug fixes:
|
||||
|
||||
* [fix(#280, #835)](https://github.com/modflowpy/flopy/commit/6dae1b0ed5df6836ce6ea981de7050621a90477f): Set_all_data_external now includes constants, cellids in list data are checked (#920). Committed by spaulins-usgs on 2020-06-23.
|
||||
* [fix(mfsfr2.check)](https://github.com/modflowpy/flopy/commit/796b7b15385de0181cabd33d3bc1915bfa76a83b): Negative segments for lakes no longer included in segment numbering order check (#915). Committed by aleaf on 2020-06-23.
|
||||
* [fix(GridIntersect)](https://github.com/modflowpy/flopy/commit/d5672f585faa31ead48973834d9b30cf70512cba): Fixes #916 and #917 (#918). Committed by Davíd Brakenhoff on 2020-06-22.
|
||||
* [fix(ZoneBudget)](https://github.com/modflowpy/flopy/commit/0207372769c5389835c555820c11fc377a4370c7): Fix faulty logic in ZoneBudget (#911). Committed by Jason Bellino on 2020-06-22.
|
||||
* [fix(SwtListBudget)](https://github.com/modflowpy/flopy/commit/eed5afdd03917256b097a797ec1137c2b80fb8a1): Totim was not being read correctly for seawat list file (#910). Committed by langevin-usgs on 2020-06-10.
|
||||
* [fix(Seawat.modelgrid)](https://github.com/modflowpy/flopy/commit/7a31a1d7a210894d9970e2e7a3a6a6453518289b): Pass lenuni from dis file into modelgrid instance (#901). Committed by Joshua Larsen on 2020-06-02.
|
||||
* [fix(mfsimulation)](https://github.com/modflowpy/flopy/commit/0958b28added4b572b168c35657f1d5fd968e952): Repair change for case insensitive model names (#897). Committed by langevin-usgs on 2020-06-01.
|
||||
* [fix(_plot_util3d_helper, export_array)](https://github.com/modflowpy/flopy/commit/617b98dd0f5750c7cf4d1a9e8376e00fdb4e94bf): (#895). Committed by Joshua Larsen on 2020-06-01.
|
||||
* [fix()](https://github.com/modflowpy/flopy/commit/8e70c9284490b220ef6fe759b0fafbb5d252f1ae): fix building in clean env (#894). Committed by Ritchie Vink on 2020-05-28.
|
||||
* [fix(setup.py)](https://github.com/modflowpy/flopy/commit/b80a89c18821fe1bc7375c15e4c03d1e0be70916): Read package name, version, etc. from version.py (#893). Committed by Hughes, J.D on 2020-05-26.
|
||||
* [fix(MFSimulation)](https://github.com/modflowpy/flopy/commit/3cec7929f323e7753ef80e95b31a64a6105dce41): Remove case sensitivity from register_ims_package() (#890). Committed by Joshua Larsen on 2020-05-25.
|
||||
* [fix(modelgrid)](https://github.com/modflowpy/flopy/commit/bb861ac2f05e7e8d38a832d03ae0a45a2249d10d): Fix offset for xul and yul in read_usgs_model_reference_file and attribs_from_namfile_header (#889). Committed by Joshua Larsen on 2020-05-19.
|
||||
* [fix(#886)](https://github.com/modflowpy/flopy/commit/f4e5ed39c5316e9bd2b7941c31f1b91253cd51e5): Mfarray aux variable now always returned as an numpy.ndarray. fixed problem with pylistutil not fully supporting numpy.ndarray type. (#887). Committed by spaulins-usgs on 2020-05-19.
|
||||
* [fix(CellBudgetFile)](https://github.com/modflowpy/flopy/commit/29d7f849f8d2f160a537494661bd096a9e1c1253): Update for auto precision with imeth = 5 or 6 (#876). Committed by Joshua Larsen on 2020-05-14.
|
||||
* [fix(#870)](https://github.com/modflowpy/flopy/commit/cbf1f65a8f3389f55bb55249ce8c358ac06cf75c): Update ims name file record after removing ims package (#880). Committed by Joshua Larsen on 2020-05-14.
|
||||
* [fix](https://github.com/modflowpy/flopy/commit/e3a6c26fe8ad39c69cd5fec78064f12d2edbb521): #868, #874, #879 (#881). Committed by spaulins-usgs on 2020-05-14.
|
||||
* [fix(#867)](https://github.com/modflowpy/flopy/commit/265fc7c64956b9165b9be2607680de086a9cf973): Fixed minimum record entry count for lists to never include keywords in the count (#875). Committed by spaulins-usgs on 2020-05-11.
|
||||
* [fix(SfrFile)](https://github.com/modflowpy/flopy/commit/4100de2b80cdb542e820f3b41a88eaf9865fa63d): Update sfrfile for streambed elevation when present (#866). Committed by Joshua Larsen on 2020-05-04.
|
||||
* [fix(#831,#858)](https://github.com/modflowpy/flopy/commit/a177d59c691367e568de07b340d53e8b1f2322fb): Data length check and case-insensitive lookup (#864). Committed by spaulins-usgs on 2020-05-01.
|
||||
* [fix(#856)](https://github.com/modflowpy/flopy/commit/c45a5e5f1fb2f8224d87307564b68dc1c30063d9): Specifying period data with value none now only removes data from that period. also, fixed an unrelated problem by updating the multi-package list. (#857). Committed by spaulins-usgs on 2020-04-22.
|
||||
* [fix(plot_array)](https://github.com/modflowpy/flopy/commit/f6545ff28004f4f6573e07aab939d774230df0a6): Update plot_array method to mask using np.ma.masked_values (#851). Committed by Joshua Larsen on 2020-04-15.
|
||||
* [fix(ModflowDis)](https://github.com/modflowpy/flopy/commit/52ecd98a11fc4f459c9bd0b59cb854ff402eeb08): Zero based get_node() and get_lrc()… (#847). Committed by Joshua Larsen on 2020-04-10.
|
||||
* [fix(binaryfile_utils, CellbudgetFile)](https://github.com/modflowpy/flopy/commit/f514a22a38264dc81c0db6dae62db4beae8df227): Update for imeth == 6 (#823). Committed by Joshua Larsen on 2020-04-10.
|
||||
* [fix(utils.gridintersect)](https://github.com/modflowpy/flopy/commit/14040ff605dfe496d8ec88ca8eeb3f73daeee06e): Bug in gridintersect for vertex grids (#845). Committed by Davíd Brakenhoff on 2020-04-06.
|
||||
* [fix(mflmt.py)](https://github.com/modflowpy/flopy/commit/1f322f0ef50be9dfaa2252cacb091aded4159113): Clean up docstring for package_flows argument in lmt. Committed by emorway-usgs on 2020-03-31.
|
||||
* [fix(str)](https://github.com/modflowpy/flopy/commit/59cac5c0466b497c36e833784b436d4a5e47fcd5): Add consistent fixed and free format approach (#838). Committed by Hughes, J.D on 2020-03-31.
|
||||
* [fix(vtk)](https://github.com/modflowpy/flopy/commit/aa9f3148008dd4c23d86db4e4dae5bae8c8bc564): Issues related to nan and type cast. Committed by Etienne Bresciani on 2020-03-31.
|
||||
* [fix(pyproj)](https://github.com/modflowpy/flopy/commit/9a1b9e344aefad4ed222bd8d10eb6b9000c9c7d0): Pyproj.proj's errcheck keyword option not reliable (#837). Committed by Mike Taves on 2020-03-29.
|
||||
* [fix](https://github.com/modflowpy/flopy/commit/4bfab916592784180d57df59b78d190e28c9099b): (#830): handling 'none' cellids in sfr package (#834). Committed by spaulins-usgs on 2020-03-25.
|
||||
* [fix()](https://github.com/modflowpy/flopy/commit/90a498ea2356e0eca7ddbf1c89a0f5f12f14b5a3): Fix quasi3d plotting (#819). Committed by Ruben Caljé on 2020-03-02.
|
||||
* [fix(ModflowSfr2.export)](https://github.com/modflowpy/flopy/commit/b6c9a3a6668ee8a35fda785da3709bd4842b7ba9): Update modflowsfr2.export() to use grid instead of spatialreference (#820). Committed by Joshua Larsen on 2020-02-28.
|
||||
* [fix(flopy3_MT3DMS_examples.ipynb)](https://github.com/modflowpy/flopy/commit/65e8adaeea55a14a3d61c125801741c5b9ceb699): Wrong indices were indexed (#815). Committed by Eric Morway on 2020-02-20.
|
||||
* [fix(build_exes.py)](https://github.com/modflowpy/flopy/commit/f3136a233274baa63ace7555d862c43bc67894f5): Fix bugs for windows (#810) (#813). Committed by Etienne Bresciani on 2020-02-18.
|
||||
* [fix(mflist)](https://github.com/modflowpy/flopy/commit/4a885a107ee5ead5a116f95bb1f7f60549cba295): Default value not working (#812). Committed by langevin-usgs on 2020-02-13.
|
||||
* [fix(flopy3_MT3DMS_examples.ipynb)](https://github.com/modflowpy/flopy/commit/0d152513d4ecb84fd474cb0495dd0676f05d5b72): Match constant heads to original problem (#809). Committed by Eric Morway on 2020-02-11.
|
||||
* [fix(vtk)](https://github.com/modflowpy/flopy/commit/ab8120bc3dc1214fef90077ade226471900b89d5): Change in export_cbc output file name (#795). Committed by rodrperezi on 2020-01-30.
|
||||
* [fix(mf6)](https://github.com/modflowpy/flopy/commit/84ee8a72b00fbcd8e7f396af9b356170634cfda6): Update create packages to support additional models (#790). Committed by Hughes, J.D on 2020-01-24.
|
||||
* [fix(remove_package)](https://github.com/modflowpy/flopy/commit/102d25b23dc0281cccf65eb0a9d3cc8b05755484): Fixed remove_package to rebuild namefile recarray correctly after removing package - issue #776 (#784). Committed by spaulins-usgs on 2020-01-17.
|
||||
* [fix(gridgen)](https://github.com/modflowpy/flopy/commit/061c72771ae4bc023e970bf9048a4c53bba2ba80): X, y center was not correct for rotated grids (#783). Committed by langevin-usgs on 2020-01-16.
|
||||
* [fix(mtssm.py)](https://github.com/modflowpy/flopy/commit/f7886e2762464f69ae6b1e3ef1124bbee017b8a8): Handle 1st stress period with incrch equal to -1 (#780). Committed by Eric Morway on 2020-01-16.
|
||||
* [fix(vtk)](https://github.com/modflowpy/flopy/commit/73f70518238ff383628ba25066c41647e875dc2e): Change in export_model when packages_names is none (#770). Committed by rodrperezi on 2019-12-30.
|
||||
* [fix()](https://github.com/modflowpy/flopy/commit/ec71e6ce2d2f4bc3d05e3172cccba6c42bf26b87): fix(repeating blocks) (#771). Committed by spaulins-usgs on 2019-12-30.
|
||||
* [fix(replace package)](https://github.com/modflowpy/flopy/commit/cf3586f0602acd20c9c672b2c763f09c6a252e00): When a second package of the same type is added to a model, the model now checks to see if the package type supports multiple packages. if it does not it automatically removes the first package before adding the second (#767). (#768). Committed by spaulins-usgs on 2019-12-18.
|
||||
* [fix(Mflist)](https://github.com/modflowpy/flopy/commit/51d80641e81f844490306d2cddefacb21bda8302): Allow none as a list entry (#765). Committed by langevin-usgs on 2019-12-16.
|
||||
|
||||
### Version 3.3.0
|
||||
|
||||
* Dropped support for python 2.7
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.2.13\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -21,7 +21,7 @@
|
|||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -169,8 +169,8 @@
|
|||
" RCH package: Variable NRCHOP set to value other than 3\n",
|
||||
"\n",
|
||||
" Checks that passed:\n",
|
||||
" Compatible solver package\n",
|
||||
" Unit number conflicts\n",
|
||||
" Compatible solver package\n",
|
||||
" DIS package: zero or negative thickness\n",
|
||||
" DIS package: thin cells (less than checker threshold of 1.0)\n",
|
||||
" DIS package: nan values in top array\n",
|
||||
|
@ -178,7 +178,6 @@
|
|||
" BAS6 package: isolated cells in ibound array\n",
|
||||
" BAS6 package: Not a number\n",
|
||||
" LPF package: zero or negative horizontal hydraulic conductivity values\n",
|
||||
" LPF package: zero or negative vertical hydraulic conductivity values\n",
|
||||
" LPF package: negative horizontal anisotropy values\n",
|
||||
" LPF package: vertical hydraulic conductivity values below checker threshold of 1e-11\n",
|
||||
" LPF package: vertical hydraulic conductivity values above checker threshold of 100000.0\n",
|
||||
|
@ -257,13 +256,16 @@
|
|||
"\n",
|
||||
"test1ss MODEL DATA VALIDATION SUMMARY:\n",
|
||||
" 3 Warnings:\n",
|
||||
" 1 instance of \r",
|
||||
" OC package: action(s) defined in OC stress_period_data ignored as they are not part the stress periods defined by DIS\n",
|
||||
" 1 instance of \r",
|
||||
" RCH package: Mean R/T ratio < checker warning threshold of 2e-08 for 1 stress periods\n",
|
||||
" 1 instance of \r",
|
||||
" RCH package: Variable NRCHOP set to value other than 3\n",
|
||||
"\n",
|
||||
" Checks that passed:\n",
|
||||
" Compatible solver package\n",
|
||||
" Unit number conflicts\n",
|
||||
" Compatible solver package\n",
|
||||
" DIS package: zero or negative thickness\n",
|
||||
" DIS package: thin cells (less than checker threshold of 1.0)\n",
|
||||
" DIS package: nan values in top array\n",
|
||||
|
@ -271,7 +273,6 @@
|
|||
" BAS6 package: isolated cells in ibound array\n",
|
||||
" BAS6 package: Not a number\n",
|
||||
" LPF package: zero or negative horizontal hydraulic conductivity values\n",
|
||||
" LPF package: zero or negative vertical hydraulic conductivity values\n",
|
||||
" LPF package: negative horizontal anisotropy values\n",
|
||||
" LPF package: vertical hydraulic conductivity values below checker threshold of 1e-11\n",
|
||||
" LPF package: vertical hydraulic conductivity values above checker threshold of 100000.0\n",
|
||||
|
@ -292,7 +293,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.utils.check.check at 0x1234fe7b8>"
|
||||
"<flopy.utils.check.check at 0x11fbee400>"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
|
@ -333,7 +334,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.utils.check.check at 0x1235208d0>"
|
||||
"<flopy.utils.check.check at 0x11fbeeef0>"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
|
@ -373,8 +374,8 @@
|
|||
" see data/checksummary.csv for details.\n",
|
||||
"\n",
|
||||
" Checks that passed:\n",
|
||||
" Compatible solver package\n",
|
||||
" Unit number conflicts\n",
|
||||
" Compatible solver package\n",
|
||||
" DIS package: zero or negative thickness\n",
|
||||
" DIS package: thin cells (less than checker threshold of 1.0)\n",
|
||||
" DIS package: nan values in top array\n",
|
||||
|
@ -382,7 +383,6 @@
|
|||
" BAS6 package: isolated cells in ibound array\n",
|
||||
" BAS6 package: Not a number\n",
|
||||
" LPF package: zero or negative horizontal hydraulic conductivity values\n",
|
||||
" LPF package: zero or negative vertical hydraulic conductivity values\n",
|
||||
" LPF package: negative horizontal anisotropy values\n",
|
||||
" LPF package: vertical hydraulic conductivity values below checker threshold of 1e-11\n",
|
||||
" LPF package: vertical hydraulic conductivity values above checker threshold of 100000.0\n",
|
||||
|
@ -398,7 +398,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.utils.check.check at 0x123523d68>"
|
||||
"<flopy.utils.check.check at 0x11fc5a0f0>"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -229,7 +229,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"{'driver': 'GTiff', 'dtype': 'float32', 'nodata': 0.0, 'width': 25, 'height': 25, 'count': 1, 'crs': None, 'transform': Affine(400.0, 0.0, 0.0,\n",
|
||||
" 0.0, -400.0, 0.0)}\n"
|
||||
" 0.0, -400.0, 10000.0)}\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -193,7 +193,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Elapsed run time: 8.450 Seconds\n",
|
||||
" Elapsed run time: 9.030 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of SEAWAT\n"
|
||||
]
|
||||
|
@ -340,7 +340,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"Util2d:hk layer 1: resetting 'how' to external\n",
|
||||
" Elapsed run time: 8.282 Seconds\n",
|
||||
" Elapsed run time: 9.038 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of SEAWAT\n"
|
||||
]
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -208,16 +208,16 @@
|
|||
" MODFLOW-NWT-SWR1 \n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR FINITE-DIFFERENCE GROUNDWATER-FLOW MODEL\n",
|
||||
" WITH NEWTON FORMULATION\n",
|
||||
" Version 1.1.4 4/01/2018 \n",
|
||||
" Version 1.2.0 03/01/2020 \n",
|
||||
" BASED ON MODFLOW-2005 Version 1.12.0 02/03/2017 \n",
|
||||
"\n",
|
||||
" SWR1 Version 1.04.0 09/15/2016 \n",
|
||||
"\n",
|
||||
" Using NAME file: watertable.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 16:05:28\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 10:14:25\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Groundwater-Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 16:05:28\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 10:14:25\n",
|
||||
" Elapsed run time: 0.018 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -145,11 +145,11 @@
|
|||
" Version 1.5.00 02/27/2019 \n",
|
||||
"\n",
|
||||
" Using NAME file: zaidel.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 16:07:31\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 10:16:30\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Groundwater Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 16:07:31\n",
|
||||
" Elapsed run time: 0.011 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 10:16:30\n",
|
||||
" Elapsed run time: 0.012 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
]
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -30,7 +30,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -92,11 +92,11 @@
|
|||
" Version 1.12.00 2/3/2017 \n",
|
||||
"\n",
|
||||
" Using NAME file: freyberg.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:21:38\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:31:29\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:21:38\n",
|
||||
" Elapsed run time: 0.011 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:31:29\n",
|
||||
" Elapsed run time: 0.016 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n",
|
||||
"Output file located: freyberg.hds\n",
|
||||
|
@ -221,11 +221,11 @@
|
|||
" Version 1.12.00 2/3/2017 \n",
|
||||
"\n",
|
||||
" Using NAME file: freyberg.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:21:38\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:31:29\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:21:38\n",
|
||||
" Elapsed run time: 0.011 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:31:29\n",
|
||||
" Elapsed run time: 0.016 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
]
|
||||
|
@ -333,11 +333,11 @@
|
|||
" Version 1.12.00 2/3/2017 \n",
|
||||
"\n",
|
||||
" Using NAME file: freyberg.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:21:38\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:31:29\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:21:38\n",
|
||||
" Elapsed run time: 0.012 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:31:29\n",
|
||||
" Elapsed run time: 0.014 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
]
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -172,7 +172,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.collections.PathCollection at 0x11ff4ca90>"
|
||||
"<matplotlib.collections.PathCollection at 0x12151cd30>"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
|
@ -214,7 +214,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.collections.PathCollection at 0x11ffb7e80>"
|
||||
"<matplotlib.collections.PathCollection at 0x1296376a0>"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
|
@ -300,7 +300,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.collections.PathCollection at 0x12019f6d8>"
|
||||
"<matplotlib.collections.PathCollection at 0x129827fd0>"
|
||||
]
|
||||
},
|
||||
"execution_count": 11,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -82,16 +82,16 @@
|
|||
" MODFLOW-NWT-SWR1 \n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR FINITE-DIFFERENCE GROUNDWATER-FLOW MODEL\n",
|
||||
" WITH NEWTON FORMULATION\n",
|
||||
" Version 1.1.4 4/01/2018 \n",
|
||||
" Version 1.2.0 03/01/2020 \n",
|
||||
" BASED ON MODFLOW-2005 Version 1.12.0 02/03/2017 \n",
|
||||
"\n",
|
||||
" SWR1 Version 1.04.0 09/15/2016 \n",
|
||||
"\n",
|
||||
" Using NAME file: drt_test.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:22:29\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:32:16\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Groundwater-Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:22:30\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:32:16\n",
|
||||
" Elapsed run time: 0.011 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
|
@ -122,7 +122,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.axes._subplots.AxesSubplot at 0x10c9819b0>"
|
||||
"<matplotlib.axes._subplots.AxesSubplot at 0x1240705f8>"
|
||||
]
|
||||
},
|
||||
"execution_count": 5,
|
||||
|
@ -176,17 +176,17 @@
|
|||
" MODFLOW-NWT-SWR1 \n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR FINITE-DIFFERENCE GROUNDWATER-FLOW MODEL\n",
|
||||
" WITH NEWTON FORMULATION\n",
|
||||
" Version 1.1.4 4/01/2018 \n",
|
||||
" Version 1.2.0 03/01/2020 \n",
|
||||
" BASED ON MODFLOW-2005 Version 1.12.0 02/03/2017 \n",
|
||||
"\n",
|
||||
" SWR1 Version 1.04.0 09/15/2016 \n",
|
||||
"\n",
|
||||
" Using NAME file: drt_test.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:22:30\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:32:16\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Groundwater-Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 13:22:30\n",
|
||||
" Elapsed run time: 0.005 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:32:16\n",
|
||||
" Elapsed run time: 0.004 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
]
|
||||
|
@ -216,7 +216,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.axes._subplots.AxesSubplot at 0x121545240>"
|
||||
"<matplotlib.axes._subplots.AxesSubplot at 0x12415f390>"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
|
|
|
@ -21,13 +21,14 @@
|
|||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"import sys\n",
|
||||
"import datetime\n",
|
||||
"\n",
|
||||
"# run installed version of flopy or add local path\n",
|
||||
"try:\n",
|
||||
|
@ -175,17 +176,19 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::nc_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n",
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::nc_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n"
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.export.netcdf.NetCdf at 0x122585208>"
|
||||
"<flopy.export.netcdf.NetCdf at 0x11e6accc0>"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
|
@ -216,8 +219,9 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::nc_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n",
|
||||
"wrote data/netCDF_export/top.shp\n"
|
||||
]
|
||||
}
|
||||
|
@ -273,8 +277,9 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::nc_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n",
|
||||
"wrote data/netCDF_export/hk.shp\n"
|
||||
]
|
||||
}
|
||||
|
@ -302,14 +307,15 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::nc_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n"
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.export.netcdf.NetCdf at 0x127732128>"
|
||||
"<flopy.export.netcdf.NetCdf at 0x11e3255c0>"
|
||||
]
|
||||
},
|
||||
"execution_count": 12,
|
||||
|
@ -344,8 +350,9 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::nc_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n"
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -353,8 +360,8 @@
|
|||
"text/plain": [
|
||||
"<class 'netCDF4._netCDF4.Dataset'>\n",
|
||||
"root group (NETCDF4 data model, file format HDF5):\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.3.0\n",
|
||||
" date_created: 2019-12-14T12:23:00Z\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.3.1\n",
|
||||
" date_created: 2020-06-26T13:32:00Z\n",
|
||||
" geospatial_vertical_positive: up\n",
|
||||
" geospatial_vertical_min: -25.0\n",
|
||||
" geospatial_vertical_max: 4.832500457763672\n",
|
||||
|
@ -408,8 +415,9 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::nc_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n"
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -417,8 +425,8 @@
|
|||
"text/plain": [
|
||||
"<class 'netCDF4._netCDF4.Dataset'>\n",
|
||||
"root group (NETCDF4 data model, file format HDF5):\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.3.0\n",
|
||||
" date_created: 2019-12-14T12:23:00Z\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.3.1\n",
|
||||
" date_created: 2020-06-26T13:32:00Z\n",
|
||||
" geospatial_vertical_positive: up\n",
|
||||
" geospatial_vertical_min: -25.0\n",
|
||||
" geospatial_vertical_max: 4.832500457763672\n",
|
||||
|
@ -452,6 +460,801 @@
|
|||
"fnc = ml.export(os.path.join(pth, 'model.nc'))\n",
|
||||
"fnc.nc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Export output to netcdf\n",
|
||||
"\n",
|
||||
"FloPy has utilities to export model outputs to a netcdf file. Valid output types for export are MODFLOW binary head files, formatted head files, cell budget files, seawat concentration files, and zonebudget output.\n",
|
||||
"\n",
|
||||
"Let's use output from the Freyberg model as an example of these functions"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n",
|
||||
"error getting data for cell_by_cell_flowstorage at time 1.0:list index out of range\n",
|
||||
"error getting data for cell_by_cell_flowstorage at time 1097.0:list index out of range\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<class 'netCDF4._netCDF4.Dataset'>\n",
|
||||
"root group (NETCDF4 data model, file format HDF5):\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.3.1\n",
|
||||
" date_created: 2020-06-26T13:33:00Z\n",
|
||||
" geospatial_vertical_positive: up\n",
|
||||
" geospatial_vertical_min: -25.0\n",
|
||||
" geospatial_vertical_max: 4.832500457763672\n",
|
||||
" geospatial_vertical_resolution: variable\n",
|
||||
" featureType: Grid\n",
|
||||
" namefile: freyberg.nam\n",
|
||||
" model_ws: ../data/freyberg_multilayer_transient\n",
|
||||
" exe_name: mf2005.exe\n",
|
||||
" modflow_version: mfnwt\n",
|
||||
" create_hostname: IGSAAAHMLT40179\n",
|
||||
" create_platform: Darwin\n",
|
||||
" create_directory: /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/examples/Notebooks\n",
|
||||
" solver_head_tolerance: -999\n",
|
||||
" solver_flux_tolerance: -999\n",
|
||||
" flopy_sr_xll: 123456.7\n",
|
||||
" flopy_sr_yll: 765432.1\n",
|
||||
" flopy_sr_rotation: 15.0\n",
|
||||
" flopy_sr_proj4_str: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
" start_datetime: 7/4/1776\n",
|
||||
" dimensions(sizes): time(1097), layer(3), y(40), x(20)\n",
|
||||
" variables(dimensions): int32 crs(), float64 time(time), float64 elevation(layer,y,x), float64 longitude(y,x), float64 latitude(y,x), float64 x_proj(y,x), float64 y_proj(y,x), float32 layer(layer), float32 delc(y), float32 delr(x), |S1 VerticalTransform(), float32 head(time,layer,y,x), float32 constant_head(time,layer,y,x), float32 flow_right_face(time,layer,y,x), float32 flow_front_face(time,layer,y,x), float32 flow_lower_face(time,layer,y,x), float32 storage(time,layer,y,x)\n",
|
||||
" groups: "
|
||||
]
|
||||
},
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# load binary head and cell budget files\n",
|
||||
"fhead = os.path.join(model_ws, 'freyberg.hds')\n",
|
||||
"fcbc = os.path.join(model_ws, 'freyberg.cbc')\n",
|
||||
"\n",
|
||||
"hds = flopy.utils.HeadFile(fhead)\n",
|
||||
"cbc = flopy.utils.CellBudgetFile(fcbc)\n",
|
||||
"\n",
|
||||
"export_dict = {\"hds\": hds,\n",
|
||||
" \"cbc\": cbc}\n",
|
||||
"\n",
|
||||
"# export head and cell budget outputs to netcdf\n",
|
||||
"fnc = flopy.export.utils.output_helper(os.path.join(pth, \"output.nc\"), ml, export_dict)\n",
|
||||
"fnc.nc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Exporting zonebudget output\n",
|
||||
"\n",
|
||||
"zonebudget output can be exported with other modflow outputs, and is placed in a seperate group which allows the user to post-process the zonebudget output before exporting.\n",
|
||||
"\n",
|
||||
"Here are two examples on how to export zonebudget output with a binary head and cell budget file\n",
|
||||
"\n",
|
||||
"__Example 1__: No postprocessing of the zonebudget output"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"ZoneBudgetOutput Class\n",
|
||||
"----------------------\n",
|
||||
"\n",
|
||||
"Number of zones: 4\n",
|
||||
"Unique zones: 0, 1, 2, 3\n",
|
||||
"Number of buget records: 3291"
|
||||
]
|
||||
},
|
||||
"execution_count": 16,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# load the zonebudget output file\n",
|
||||
"zonbud_ws = os.path.join(\"..\", \"data\", \"zonbud_examples\")\n",
|
||||
"fzonbud = os.path.join(zonbud_ws, \"freyberg_mlt.2.csv\")\n",
|
||||
"zon_arrays = flopy.utils.zonbud.read_zbarray(os.path.join(zonbud_ws, \"zonef_mlt.zbr\"))\n",
|
||||
"\n",
|
||||
"zbout = flopy.utils.ZoneBudgetOutput(fzonbud, ml.dis, zon_arrays)\n",
|
||||
"zbout"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n",
|
||||
"error getting data for cell_by_cell_flowstorage at time 1.0:list index out of range\n",
|
||||
"error getting data for cell_by_cell_flowstorage at time 1097.0:list index out of range\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<class 'netCDF4._netCDF4.Dataset'>\n",
|
||||
"root group (NETCDF4 data model, file format HDF5):\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.3.1\n",
|
||||
" date_created: 2020-06-26T13:33:00Z\n",
|
||||
" geospatial_vertical_positive: up\n",
|
||||
" geospatial_vertical_min: -25.0\n",
|
||||
" geospatial_vertical_max: 4.832500457763672\n",
|
||||
" geospatial_vertical_resolution: variable\n",
|
||||
" featureType: Grid\n",
|
||||
" namefile: freyberg.nam\n",
|
||||
" model_ws: ../data/freyberg_multilayer_transient\n",
|
||||
" exe_name: mf2005.exe\n",
|
||||
" modflow_version: mfnwt\n",
|
||||
" create_hostname: IGSAAAHMLT40179\n",
|
||||
" create_platform: Darwin\n",
|
||||
" create_directory: /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/examples/Notebooks\n",
|
||||
" solver_head_tolerance: -999\n",
|
||||
" solver_flux_tolerance: -999\n",
|
||||
" flopy_sr_xll: 123456.7\n",
|
||||
" flopy_sr_yll: 765432.1\n",
|
||||
" flopy_sr_rotation: 15.0\n",
|
||||
" flopy_sr_proj4_str: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
" start_datetime: 7/4/1776\n",
|
||||
" dimensions(sizes): time(1097), layer(3), y(40), x(20)\n",
|
||||
" variables(dimensions): int32 crs(), float64 time(time), float64 elevation(layer,y,x), float64 longitude(y,x), float64 latitude(y,x), float64 x_proj(y,x), float64 y_proj(y,x), float32 layer(layer), float32 delc(y), float32 delr(x), |S1 VerticalTransform(), float32 head(time,layer,y,x), float32 constant_head(time,layer,y,x), float32 flow_right_face(time,layer,y,x), float32 flow_front_face(time,layer,y,x), float32 flow_lower_face(time,layer,y,x), float32 storage(time,layer,y,x), float32 budget_zones(time,layer,y,x)\n",
|
||||
" groups: zonebudget"
|
||||
]
|
||||
},
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"export_dict = {'hds': hds,\n",
|
||||
" 'cbc': cbc}\n",
|
||||
"\n",
|
||||
"fnc = flopy.export.utils.output_helper(os.path.join(pth, \"output_with_zonebudget.nc\"),\n",
|
||||
" ml, export_dict)\n",
|
||||
"\n",
|
||||
"fnc = zbout.export(fnc, ml)\n",
|
||||
"fnc.nc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"A budget_zones variable has been added to the root group and a new zonebudget group has been added to the netcdf file which hosts all of the budget data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"__Example 2__: postprocessing zonebudget output then exporting"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>kper</th>\n",
|
||||
" <th>kstp</th>\n",
|
||||
" <th>zone</th>\n",
|
||||
" <th>storage</th>\n",
|
||||
" <th>constant head</th>\n",
|
||||
" <th>other zones</th>\n",
|
||||
" <th>total</th>\n",
|
||||
" <th>zone 0</th>\n",
|
||||
" <th>zone 1</th>\n",
|
||||
" <th>zone 2</th>\n",
|
||||
" <th>zone 3</th>\n",
|
||||
" <th>tslen</th>\n",
|
||||
" <th>totim</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>0.000000</td>\n",
|
||||
" <td>-821.281900</td>\n",
|
||||
" <td>-1570.821</td>\n",
|
||||
" <td>-2392.103</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-1530.422</td>\n",
|
||||
" <td>-40.3993</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>0.000000</td>\n",
|
||||
" <td>-648.804700</td>\n",
|
||||
" <td>630.730</td>\n",
|
||||
" <td>-18.075</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>1530.4220</td>\n",
|
||||
" <td>0.000</td>\n",
|
||||
" <td>-899.6920</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>3</td>\n",
|
||||
" <td>0.000000</td>\n",
|
||||
" <td>-976.232200</td>\n",
|
||||
" <td>940.092</td>\n",
|
||||
" <td>-36.140</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>40.3993</td>\n",
|
||||
" <td>899.692</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>218.568500</td>\n",
|
||||
" <td>-816.347300</td>\n",
|
||||
" <td>-1173.221</td>\n",
|
||||
" <td>-1770.999</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-1134.937</td>\n",
|
||||
" <td>-38.2835</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>2.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>191.816342</td>\n",
|
||||
" <td>-643.938700</td>\n",
|
||||
" <td>433.628</td>\n",
|
||||
" <td>-18.493</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>1134.9370</td>\n",
|
||||
" <td>0.000</td>\n",
|
||||
" <td>-701.3090</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>2.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>...</th>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3286</th>\n",
|
||||
" <td>1095</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>-626.408120</td>\n",
|
||||
" <td>-505.116270</td>\n",
|
||||
" <td>1113.766</td>\n",
|
||||
" <td>-17.758</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>2489.4040</td>\n",
|
||||
" <td>0.000</td>\n",
|
||||
" <td>-1375.6380</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>1096.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3287</th>\n",
|
||||
" <td>1095</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>3</td>\n",
|
||||
" <td>-627.235750</td>\n",
|
||||
" <td>-801.732376</td>\n",
|
||||
" <td>1393.454</td>\n",
|
||||
" <td>-35.514</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>17.8163</td>\n",
|
||||
" <td>1375.638</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>1096.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3288</th>\n",
|
||||
" <td>1096</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>0.000000</td>\n",
|
||||
" <td>-230.548300</td>\n",
|
||||
" <td>-152.236</td>\n",
|
||||
" <td>-382.784</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-205.822</td>\n",
|
||||
" <td>53.5856</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>1097.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3289</th>\n",
|
||||
" <td>1096</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>0.000000</td>\n",
|
||||
" <td>15.864900</td>\n",
|
||||
" <td>-30.796</td>\n",
|
||||
" <td>-14.931</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>205.8220</td>\n",
|
||||
" <td>0.000</td>\n",
|
||||
" <td>-236.6170</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>1097.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3290</th>\n",
|
||||
" <td>1096</td>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>3</td>\n",
|
||||
" <td>0.000000</td>\n",
|
||||
" <td>-212.896600</td>\n",
|
||||
" <td>183.031</td>\n",
|
||||
" <td>-29.865</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>-53.5856</td>\n",
|
||||
" <td>236.617</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>1097.0</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"<p>3291 rows × 13 columns</p>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" kper kstp zone storage constant head other zones total \\\n",
|
||||
"0 0 0 1 0.000000 -821.281900 -1570.821 -2392.103 \n",
|
||||
"1 0 0 2 0.000000 -648.804700 630.730 -18.075 \n",
|
||||
"2 0 0 3 0.000000 -976.232200 940.092 -36.140 \n",
|
||||
"3 1 0 1 218.568500 -816.347300 -1173.221 -1770.999 \n",
|
||||
"4 1 0 2 191.816342 -643.938700 433.628 -18.493 \n",
|
||||
"... ... ... ... ... ... ... ... \n",
|
||||
"3286 1095 0 2 -626.408120 -505.116270 1113.766 -17.758 \n",
|
||||
"3287 1095 0 3 -627.235750 -801.732376 1393.454 -35.514 \n",
|
||||
"3288 1096 0 1 0.000000 -230.548300 -152.236 -382.784 \n",
|
||||
"3289 1096 0 2 0.000000 15.864900 -30.796 -14.931 \n",
|
||||
"3290 1096 0 3 0.000000 -212.896600 183.031 -29.865 \n",
|
||||
"\n",
|
||||
" zone 0 zone 1 zone 2 zone 3 tslen totim \n",
|
||||
"0 0.0 0.0000 -1530.422 -40.3993 1.0 1.0 \n",
|
||||
"1 0.0 1530.4220 0.000 -899.6920 1.0 1.0 \n",
|
||||
"2 0.0 40.3993 899.692 0.0000 1.0 1.0 \n",
|
||||
"3 0.0 0.0000 -1134.937 -38.2835 1.0 2.0 \n",
|
||||
"4 0.0 1134.9370 0.000 -701.3090 1.0 2.0 \n",
|
||||
"... ... ... ... ... ... ... \n",
|
||||
"3286 0.0 2489.4040 0.000 -1375.6380 1.0 1096.0 \n",
|
||||
"3287 0.0 17.8163 1375.638 0.0000 1.0 1096.0 \n",
|
||||
"3288 0.0 0.0000 -205.822 53.5856 1.0 1097.0 \n",
|
||||
"3289 0.0 205.8220 0.000 -236.6170 1.0 1097.0 \n",
|
||||
"3290 0.0 -53.5856 236.617 0.0000 1.0 1097.0 \n",
|
||||
"\n",
|
||||
"[3291 rows x 13 columns]"
|
||||
]
|
||||
},
|
||||
"execution_count": 18,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# load the zonebudget output and get the budget information\n",
|
||||
"zbout = flopy.utils.ZoneBudgetOutput(fzonbud, ml.dis, zon_arrays)\n",
|
||||
"df = zbout.dataframe\n",
|
||||
"df"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Let's calculate a yearly volumetric budget from the zonebudget data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 19,
|
||||
"metadata": {
|
||||
"scrolled": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>year</th>\n",
|
||||
" <th>zone</th>\n",
|
||||
" <th>storage</th>\n",
|
||||
" <th>constant head</th>\n",
|
||||
" <th>other zones</th>\n",
|
||||
" <th>zone 1</th>\n",
|
||||
" <th>zone 2</th>\n",
|
||||
" <th>zone 3</th>\n",
|
||||
" <th>totim</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>1776</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>81203.267170</td>\n",
|
||||
" <td>-134930.451200</td>\n",
|
||||
" <td>-176631.7910</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-172310.4031</td>\n",
|
||||
" <td>-4321.3803</td>\n",
|
||||
" <td>181.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>1776</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>37268.485533</td>\n",
|
||||
" <td>-102758.917473</td>\n",
|
||||
" <td>62223.7540</td>\n",
|
||||
" <td>172310.4031</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-110086.6556</td>\n",
|
||||
" <td>181.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>1776</td>\n",
|
||||
" <td>3</td>\n",
|
||||
" <td>37296.183058</td>\n",
|
||||
" <td>-158237.438437</td>\n",
|
||||
" <td>114408.0385</td>\n",
|
||||
" <td>4321.3803</td>\n",
|
||||
" <td>110086.6556</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>181.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>1777</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>91777.777222</td>\n",
|
||||
" <td>-265545.355300</td>\n",
|
||||
" <td>-407281.7640</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-398769.3120</td>\n",
|
||||
" <td>-8512.4548</td>\n",
|
||||
" <td>546.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>1777</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>42820.852999</td>\n",
|
||||
" <td>-200142.961123</td>\n",
|
||||
" <td>150829.2320</td>\n",
|
||||
" <td>398769.3120</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-247940.0845</td>\n",
|
||||
" <td>546.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>5</th>\n",
|
||||
" <td>1777</td>\n",
|
||||
" <td>3</td>\n",
|
||||
" <td>42818.153555</td>\n",
|
||||
" <td>-312276.958409</td>\n",
|
||||
" <td>256452.5519</td>\n",
|
||||
" <td>8512.4548</td>\n",
|
||||
" <td>247940.0845</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>546.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>6</th>\n",
|
||||
" <td>1778</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>108226.799462</td>\n",
|
||||
" <td>-255186.105500</td>\n",
|
||||
" <td>-378440.1290</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-371720.4820</td>\n",
|
||||
" <td>-6719.6672</td>\n",
|
||||
" <td>911.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>7</th>\n",
|
||||
" <td>1778</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>44930.564942</td>\n",
|
||||
" <td>-188836.557151</td>\n",
|
||||
" <td>137315.0100</td>\n",
|
||||
" <td>371720.4820</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-234405.4742</td>\n",
|
||||
" <td>911.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>8</th>\n",
|
||||
" <td>1778</td>\n",
|
||||
" <td>3</td>\n",
|
||||
" <td>44936.970500</td>\n",
|
||||
" <td>-299267.807443</td>\n",
|
||||
" <td>241125.1428</td>\n",
|
||||
" <td>6719.6672</td>\n",
|
||||
" <td>234405.4742</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>911.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>9</th>\n",
|
||||
" <td>1779</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>5348.709896</td>\n",
|
||||
" <td>-129448.085100</td>\n",
|
||||
" <td>-231291.1680</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-227734.8190</td>\n",
|
||||
" <td>-3556.3570</td>\n",
|
||||
" <td>1097.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>10</th>\n",
|
||||
" <td>1779</td>\n",
|
||||
" <td>2</td>\n",
|
||||
" <td>3241.895778</td>\n",
|
||||
" <td>-95653.391040</td>\n",
|
||||
" <td>88972.3010</td>\n",
|
||||
" <td>227734.8190</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>-138762.5241</td>\n",
|
||||
" <td>1097.0</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>11</th>\n",
|
||||
" <td>1779</td>\n",
|
||||
" <td>3</td>\n",
|
||||
" <td>3233.272516</td>\n",
|
||||
" <td>-152427.866886</td>\n",
|
||||
" <td>142318.8767</td>\n",
|
||||
" <td>3556.3570</td>\n",
|
||||
" <td>138762.5241</td>\n",
|
||||
" <td>0.0000</td>\n",
|
||||
" <td>1097.0</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" year zone storage constant head other zones zone 1 \\\n",
|
||||
"0 1776 1 81203.267170 -134930.451200 -176631.7910 0.0000 \n",
|
||||
"1 1776 2 37268.485533 -102758.917473 62223.7540 172310.4031 \n",
|
||||
"2 1776 3 37296.183058 -158237.438437 114408.0385 4321.3803 \n",
|
||||
"3 1777 1 91777.777222 -265545.355300 -407281.7640 0.0000 \n",
|
||||
"4 1777 2 42820.852999 -200142.961123 150829.2320 398769.3120 \n",
|
||||
"5 1777 3 42818.153555 -312276.958409 256452.5519 8512.4548 \n",
|
||||
"6 1778 1 108226.799462 -255186.105500 -378440.1290 0.0000 \n",
|
||||
"7 1778 2 44930.564942 -188836.557151 137315.0100 371720.4820 \n",
|
||||
"8 1778 3 44936.970500 -299267.807443 241125.1428 6719.6672 \n",
|
||||
"9 1779 1 5348.709896 -129448.085100 -231291.1680 0.0000 \n",
|
||||
"10 1779 2 3241.895778 -95653.391040 88972.3010 227734.8190 \n",
|
||||
"11 1779 3 3233.272516 -152427.866886 142318.8767 3556.3570 \n",
|
||||
"\n",
|
||||
" zone 2 zone 3 totim \n",
|
||||
"0 -172310.4031 -4321.3803 181.0 \n",
|
||||
"1 0.0000 -110086.6556 181.0 \n",
|
||||
"2 110086.6556 0.0000 181.0 \n",
|
||||
"3 -398769.3120 -8512.4548 546.0 \n",
|
||||
"4 0.0000 -247940.0845 546.0 \n",
|
||||
"5 247940.0845 0.0000 546.0 \n",
|
||||
"6 -371720.4820 -6719.6672 911.0 \n",
|
||||
"7 0.0000 -234405.4742 911.0 \n",
|
||||
"8 234405.4742 0.0000 911.0 \n",
|
||||
"9 -227734.8190 -3556.3570 1097.0 \n",
|
||||
"10 0.0000 -138762.5241 1097.0 \n",
|
||||
"11 138762.5241 0.0000 1097.0 "
|
||||
]
|
||||
},
|
||||
"execution_count": 19,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# get a dataframe of volumetric budget information\n",
|
||||
"vol_df = zbout.volumetric_flux()\n",
|
||||
"\n",
|
||||
"# add a year field to the dataframe using datetime\n",
|
||||
"start_date = ml.modeltime.start_datetime\n",
|
||||
"start_date = datetime.datetime.strptime(start_date, \"%m/%d/%Y\")\n",
|
||||
"nzones = len(zbout.zones) - 1\n",
|
||||
"\n",
|
||||
"year = [start_date.year] * nzones\n",
|
||||
"for totim in vol_df.totim.values[:-nzones]:\n",
|
||||
" t = start_date + datetime.timedelta(days=totim)\n",
|
||||
" year.append(t.year)\n",
|
||||
"\n",
|
||||
"vol_df['year'] = year\n",
|
||||
" \n",
|
||||
"# calculate yearly volumetric change using pandas\n",
|
||||
"totim_df = vol_df.groupby(['year', 'zone'], as_index=False)['totim'].max()\n",
|
||||
"yearly = vol_df.groupby(['year', 'zone'], as_index=False)[['storage', 'constant head', 'other zones',\n",
|
||||
" 'zone 1', 'zone 2', 'zone 3']].sum()\n",
|
||||
"yearly['totim'] = totim_df['totim']\n",
|
||||
"yearly"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"And finally, export the pandas dataframe to netcdf"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 20,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
"initialize_geometry::self.grid_crs = +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +type=crs\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n",
|
||||
"error getting data for cell_by_cell_flowstorage at time 1.0:list index out of range\n",
|
||||
"error getting data for cell_by_cell_flowstorage at time 1097.0:list index out of range\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<class 'netCDF4._netCDF4.Dataset'>\n",
|
||||
"root group (NETCDF4 data model, file format HDF5):\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.3.1\n",
|
||||
" date_created: 2020-06-26T13:33:00Z\n",
|
||||
" geospatial_vertical_positive: up\n",
|
||||
" geospatial_vertical_min: -25.0\n",
|
||||
" geospatial_vertical_max: 4.832500457763672\n",
|
||||
" geospatial_vertical_resolution: variable\n",
|
||||
" featureType: Grid\n",
|
||||
" namefile: freyberg.nam\n",
|
||||
" model_ws: ../data/freyberg_multilayer_transient\n",
|
||||
" exe_name: mf2005.exe\n",
|
||||
" modflow_version: mfnwt\n",
|
||||
" create_hostname: IGSAAAHMLT40179\n",
|
||||
" create_platform: Darwin\n",
|
||||
" create_directory: /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/examples/Notebooks\n",
|
||||
" solver_head_tolerance: -999\n",
|
||||
" solver_flux_tolerance: -999\n",
|
||||
" flopy_sr_xll: 123456.7\n",
|
||||
" flopy_sr_yll: 765432.1\n",
|
||||
" flopy_sr_rotation: 15.0\n",
|
||||
" flopy_sr_proj4_str: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\n",
|
||||
" start_datetime: 7/4/1776\n",
|
||||
" dimensions(sizes): time(1097), layer(3), y(40), x(20)\n",
|
||||
" variables(dimensions): int32 crs(), float64 time(time), float64 elevation(layer,y,x), float64 longitude(y,x), float64 latitude(y,x), float64 x_proj(y,x), float64 y_proj(y,x), float32 layer(layer), float32 delc(y), float32 delr(x), |S1 VerticalTransform(), float32 head(time,layer,y,x), float32 constant_head(time,layer,y,x), float32 flow_right_face(time,layer,y,x), float32 flow_front_face(time,layer,y,x), float32 flow_lower_face(time,layer,y,x), float32 storage(time,layer,y,x), float32 budget_zones(time,layer,y,x)\n",
|
||||
" groups: zonebudget"
|
||||
]
|
||||
},
|
||||
"execution_count": 20,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# process the new dataframe into a format that is compatible with netcdf exporting\n",
|
||||
"zbncf = zbout.dataframe_to_netcdf_fmt(yearly, flux=False)\n",
|
||||
"\n",
|
||||
"# export to netcdf\n",
|
||||
"export_dict = {\"hds\": hds,\n",
|
||||
" \"cbc\": cbc,\n",
|
||||
" \"zbud\": zbncf}\n",
|
||||
"\n",
|
||||
"fnc = flopy.export.utils.output_helper(os.path.join(pth, \"output_with_zonebudget.2.nc\"),\n",
|
||||
" ml, export_dict)\n",
|
||||
"fnc.nc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -712,7 +712,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.3.0.\\n',\n",
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.3.1.\\n',\n",
|
||||
" '#xll:0.0; yll:0.0; rotation:0.0; units:meters; lenuni:2; start_datetime:1-1-1970\\n',\n",
|
||||
" 'LIST 2 modflowtest.list\\n',\n",
|
||||
" 'DIS 11 modflowtest.dis\\n',\n",
|
||||
|
@ -791,73 +791,28 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"Util2d:delr: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/delr.ref\n",
|
||||
"Util2d:delc: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/delc.ref\n",
|
||||
"Util2d:model_top: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/model_top.ref\n",
|
||||
"Util2d:botm layer 1: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_1.ref\n",
|
||||
"Util2d:botm layer 2: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_2.ref\n",
|
||||
"Util2d:botm layer 3: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_3.ref\n",
|
||||
"Util2d:botm layer 4: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_4.ref\n",
|
||||
"Util2d:botm layer 5: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_5.ref\n",
|
||||
"Util2d:botm layer 6: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_6.ref\n",
|
||||
"Util2d:botm layer 7: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_7.ref\n",
|
||||
"Util2d:botm layer 8: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_8.ref\n",
|
||||
"Util2d:botm layer 9: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_9.ref\n",
|
||||
"Util2d:botm layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka1.ref\n",
|
||||
"Util2d:ss layer 1: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka2.ref\n",
|
||||
"Util2d:ss layer 2: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka3.ref\n",
|
||||
"Util2d:ss layer 3: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka4.ref\n",
|
||||
"Util2d:ss layer 4: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka5.ref\n",
|
||||
"Util2d:ss layer 5: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka6.ref\n",
|
||||
"Util2d:ss layer 6: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka7.ref\n",
|
||||
"Util2d:ss layer 7: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka8.ref\n",
|
||||
"Util2d:ss layer 8: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka9.ref\n",
|
||||
"Util2d:ss layer 9: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka10.ref\n",
|
||||
"Util2d:ss layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/rech_0.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/important_recharge.ref\n"
|
||||
"Util2d:ss layer 10: resetting 'how' to external\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -874,7 +829,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.3.0.\\n',\n",
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.3.1.\\n',\n",
|
||||
" '#xll:0.0; yll:0.0; rotation:0.0; units:meters; lenuni:2; start_datetime:1-1-1970\\n',\n",
|
||||
" 'LIST 2 modflowtest.list\\n',\n",
|
||||
" 'DIS 11 modflowtest.dis\\n',\n",
|
||||
|
@ -1018,31 +973,18 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"Util2d:delr: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/delr.ref\n",
|
||||
"Util2d:delc: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/delc.ref\n",
|
||||
"Util2d:model_top: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/model_top.ref\n",
|
||||
"Util2d:botm layer 1: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_1.ref\n",
|
||||
"Util2d:botm layer 2: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_2.ref\n",
|
||||
"Util2d:botm layer 3: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_3.ref\n",
|
||||
"Util2d:botm layer 4: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_4.ref\n",
|
||||
"Util2d:botm layer 5: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_5.ref\n",
|
||||
"Util2d:botm layer 6: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_6.ref\n",
|
||||
"Util2d:botm layer 7: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_7.ref\n",
|
||||
"Util2d:botm layer 8: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_8.ref\n",
|
||||
"Util2d:botm layer 9: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_9.ref\n",
|
||||
"Util2d:botm layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_10.ref\n",
|
||||
"\n",
|
||||
" Util2d error: 'how' is openclose,but model doesn't support free fmt \n",
|
||||
"\n"
|
||||
|
@ -1105,72 +1047,27 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"Util2d:delr: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/delr.ref\n",
|
||||
"Util2d:delc: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/delc.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/model_top.ref\n",
|
||||
"Util2d:botm layer 1: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_1.ref\n",
|
||||
"Util2d:botm layer 2: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_2.ref\n",
|
||||
"Util2d:botm layer 3: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_3.ref\n",
|
||||
"Util2d:botm layer 4: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_4.ref\n",
|
||||
"Util2d:botm layer 5: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_5.ref\n",
|
||||
"Util2d:botm layer 6: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_6.ref\n",
|
||||
"Util2d:botm layer 7: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_7.ref\n",
|
||||
"Util2d:botm layer 8: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_8.ref\n",
|
||||
"Util2d:botm layer 9: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_9.ref\n",
|
||||
"Util2d:botm layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka1.ref\n",
|
||||
"Util2d:ss layer 1: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka2.ref\n",
|
||||
"Util2d:ss layer 2: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka3.ref\n",
|
||||
"Util2d:ss layer 3: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka4.ref\n",
|
||||
"Util2d:ss layer 4: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka5.ref\n",
|
||||
"Util2d:ss layer 5: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka6.ref\n",
|
||||
"Util2d:ss layer 6: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka7.ref\n",
|
||||
"Util2d:ss layer 7: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka8.ref\n",
|
||||
"Util2d:ss layer 8: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka9.ref\n",
|
||||
"Util2d:ss layer 9: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka10.ref\n",
|
||||
"Util2d:ss layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/rech_0.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/important_recharge.ref\n"
|
||||
"Util2d:ss layer 10: resetting 'how' to external\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -1279,7 +1176,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.3.0.\\n',\n",
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.3.1.\\n',\n",
|
||||
" '#xll:0.0; yll:0.0; rotation:0.0; units:meters; lenuni:2; start_datetime:1-1-1970\\n',\n",
|
||||
" 'LIST 2 modflowtest.list\\n',\n",
|
||||
" 'DIS 11 modflowtest.dis\\n',\n",
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -208,7 +208,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.legend.Legend at 0x11af60908>"
|
||||
"<matplotlib.legend.Legend at 0x128fd80b8>"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -173,11 +173,11 @@
|
|||
" Version 1.12.00 2/3/2017 \n",
|
||||
"\n",
|
||||
" Using NAME file: lake_example.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:19:30\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:36:05\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:19:30\n",
|
||||
" Elapsed run time: 0.278 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:36:05\n",
|
||||
" Elapsed run time: 0.305 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
]
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -32,7 +32,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -556,9 +556,9 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mf6\n",
|
||||
" MODFLOW 6\n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL\n",
|
||||
" VERSION 6.1.0 12/12/2019\n",
|
||||
" VERSION 6.1.1 06/12/2020\n",
|
||||
"\n",
|
||||
" MODFLOW 6 compiled Dec 13 2019 12:29:49 with IFORT compiler (ver. 19.0.5)\n",
|
||||
" MODFLOW 6 compiled Jun 12 2020 12:02:16 with IFORT compiler (ver. 19.0.5)\n",
|
||||
"\n",
|
||||
"This software has been approved for release by the U.S. Geological \n",
|
||||
"Survey (USGS). Although the software has been subjected to rigorous \n",
|
||||
|
@ -573,386 +573,395 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:39:07\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:37:00\n",
|
||||
" \n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 2\n",
|
||||
" Solving: Stress period: 2 Time step: 3\n",
|
||||
" Solving: Stress period: 2 Time step: 4\n",
|
||||
" Solving: Stress period: 2 Time step: 5\n",
|
||||
" Solving: Stress period: 2 Time step: 6\n",
|
||||
" Solving: Stress period: 2 Time step: 7\n",
|
||||
" Solving: Stress period: 2 Time step: 8\n",
|
||||
" Solving: Stress period: 2 Time step: 9\n",
|
||||
" Solving: Stress period: 2 Time step: 10\n",
|
||||
" Solving: Stress period: 2 Time step: 11\n",
|
||||
" Solving: Stress period: 2 Time step: 12\n",
|
||||
" Solving: Stress period: 2 Time step: 13\n",
|
||||
" Solving: Stress period: 2 Time step: 14\n",
|
||||
" Solving: Stress period: 2 Time step: 15\n",
|
||||
" Solving: Stress period: 2 Time step: 16\n",
|
||||
" Solving: Stress period: 2 Time step: 17\n",
|
||||
" Solving: Stress period: 2 Time step: 18\n",
|
||||
" Solving: Stress period: 2 Time step: 19\n",
|
||||
" Solving: Stress period: 2 Time step: 20\n",
|
||||
" Solving: Stress period: 2 Time step: 21\n",
|
||||
" Solving: Stress period: 2 Time step: 22\n",
|
||||
" Solving: Stress period: 2 Time step: 23\n",
|
||||
" Solving: Stress period: 2 Time step: 24\n",
|
||||
" Solving: Stress period: 2 Time step: 25\n",
|
||||
" Solving: Stress period: 2 Time step: 26\n",
|
||||
" Solving: Stress period: 2 Time step: 27\n",
|
||||
" Solving: Stress period: 2 Time step: 28\n",
|
||||
" Solving: Stress period: 2 Time step: 29\n",
|
||||
" Solving: Stress period: 2 Time step: 30\n",
|
||||
" Solving: Stress period: 2 Time step: 31\n",
|
||||
" Solving: Stress period: 2 Time step: 32\n",
|
||||
" Solving: Stress period: 2 Time step: 33\n",
|
||||
" Solving: Stress period: 2 Time step: 34\n",
|
||||
" Solving: Stress period: 2 Time step: 35\n",
|
||||
" Solving: Stress period: 2 Time step: 36\n",
|
||||
" Solving: Stress period: 2 Time step: 37\n",
|
||||
" Solving: Stress period: 2 Time step: 38\n",
|
||||
" Solving: Stress period: 2 Time step: 39\n",
|
||||
" Solving: Stress period: 2 Time step: 40\n",
|
||||
" Solving: Stress period: 2 Time step: 41\n",
|
||||
" Solving: Stress period: 2 Time step: 42\n",
|
||||
" Solving: Stress period: 2 Time step: 43\n",
|
||||
" Solving: Stress period: 2 Time step: 44\n",
|
||||
" Solving: Stress period: 2 Time step: 45\n",
|
||||
" Solving: Stress period: 2 Time step: 46\n",
|
||||
" Solving: Stress period: 2 Time step: 47\n",
|
||||
" Solving: Stress period: 2 Time step: 48\n",
|
||||
" Solving: Stress period: 2 Time step: 49\n",
|
||||
" Solving: Stress period: 2 Time step: 50\n",
|
||||
" Solving: Stress period: 2 Time step: 51\n",
|
||||
" Solving: Stress period: 2 Time step: 52\n",
|
||||
" Solving: Stress period: 2 Time step: 53\n",
|
||||
" Solving: Stress period: 2 Time step: 54\n",
|
||||
" Solving: Stress period: 2 Time step: 55\n",
|
||||
" Solving: Stress period: 2 Time step: 56\n",
|
||||
" Solving: Stress period: 2 Time step: 57\n",
|
||||
" Solving: Stress period: 2 Time step: 58\n",
|
||||
" Solving: Stress period: 2 Time step: 59\n",
|
||||
" Solving: Stress period: 2 Time step: 60\n",
|
||||
" Solving: Stress period: 2 Time step: 61\n",
|
||||
" Solving: Stress period: 2 Time step: 62\n",
|
||||
" Solving: Stress period: 2 Time step: 63\n",
|
||||
" Solving: Stress period: 2 Time step: 64\n",
|
||||
" Solving: Stress period: 2 Time step: 65\n",
|
||||
" Solving: Stress period: 2 Time step: 66\n",
|
||||
" Solving: Stress period: 2 Time step: 67\n",
|
||||
" Solving: Stress period: 2 Time step: 68\n",
|
||||
" Solving: Stress period: 2 Time step: 69\n",
|
||||
" Solving: Stress period: 2 Time step: 70\n",
|
||||
" Solving: Stress period: 2 Time step: 71\n",
|
||||
" Solving: Stress period: 2 Time step: 72\n",
|
||||
" Solving: Stress period: 2 Time step: 73\n",
|
||||
" Solving: Stress period: 2 Time step: 74\n",
|
||||
" Solving: Stress period: 2 Time step: 75\n",
|
||||
" Solving: Stress period: 2 Time step: 76\n",
|
||||
" Solving: Stress period: 2 Time step: 77\n",
|
||||
" Solving: Stress period: 2 Time step: 78\n",
|
||||
" Solving: Stress period: 2 Time step: 79\n",
|
||||
" Solving: Stress period: 2 Time step: 80\n",
|
||||
" Solving: Stress period: 2 Time step: 81\n",
|
||||
" Solving: Stress period: 2 Time step: 82\n",
|
||||
" Solving: Stress period: 2 Time step: 83\n",
|
||||
" Solving: Stress period: 2 Time step: 84\n",
|
||||
" Solving: Stress period: 2 Time step: 85\n",
|
||||
" Solving: Stress period: 2 Time step: 86\n",
|
||||
" Solving: Stress period: 2 Time step: 87\n",
|
||||
" Solving: Stress period: 2 Time step: 88\n",
|
||||
" Solving: Stress period: 2 Time step: 89\n",
|
||||
" Solving: Stress period: 2 Time step: 90\n",
|
||||
" Solving: Stress period: 2 Time step: 91\n",
|
||||
" Solving: Stress period: 2 Time step: 92\n",
|
||||
" Solving: Stress period: 2 Time step: 93\n",
|
||||
" Solving: Stress period: 2 Time step: 94\n",
|
||||
" Solving: Stress period: 2 Time step: 95\n",
|
||||
" Solving: Stress period: 2 Time step: 96\n",
|
||||
" Solving: Stress period: 2 Time step: 97\n",
|
||||
" Solving: Stress period: 2 Time step: 98\n",
|
||||
" Solving: Stress period: 2 Time step: 99\n",
|
||||
" Solving: Stress period: 2 Time step: 100\n",
|
||||
" Solving: Stress period: 2 Time step: 101\n",
|
||||
" Solving: Stress period: 2 Time step: 102\n",
|
||||
" Solving: Stress period: 2 Time step: 103\n",
|
||||
" Solving: Stress period: 2 Time step: 104\n",
|
||||
" Solving: Stress period: 2 Time step: 105\n",
|
||||
" Solving: Stress period: 2 Time step: 106\n",
|
||||
" Solving: Stress period: 2 Time step: 107\n",
|
||||
" Solving: Stress period: 2 Time step: 108\n",
|
||||
" Solving: Stress period: 2 Time step: 109\n",
|
||||
" Solving: Stress period: 2 Time step: 110\n",
|
||||
" Solving: Stress period: 2 Time step: 111\n",
|
||||
" Solving: Stress period: 2 Time step: 112\n",
|
||||
" Solving: Stress period: 2 Time step: 113\n",
|
||||
" Solving: Stress period: 2 Time step: 114\n",
|
||||
" Solving: Stress period: 2 Time step: 115\n",
|
||||
" Solving: Stress period: 2 Time step: 116\n",
|
||||
" Solving: Stress period: 2 Time step: 117\n",
|
||||
" Solving: Stress period: 2 Time step: 118\n",
|
||||
" Solving: Stress period: 2 Time step: 119\n",
|
||||
" Solving: Stress period: 2 Time step: 120\n",
|
||||
" Solving: Stress period: 3 Time step: 1\n",
|
||||
" Solving: Stress period: 3 Time step: 2\n",
|
||||
" Solving: Stress period: 3 Time step: 3\n",
|
||||
" Solving: Stress period: 3 Time step: 4\n",
|
||||
" Solving: Stress period: 3 Time step: 5\n",
|
||||
" Solving: Stress period: 3 Time step: 6\n",
|
||||
" Solving: Stress period: 3 Time step: 7\n",
|
||||
" Solving: Stress period: 3 Time step: 8\n",
|
||||
" Solving: Stress period: 3 Time step: 9\n",
|
||||
" Solving: Stress period: 3 Time step: 10\n",
|
||||
" Solving: Stress period: 3 Time step: 11\n",
|
||||
" Solving: Stress period: 3 Time step: 12\n",
|
||||
" Solving: Stress period: 3 Time step: 13\n",
|
||||
" Solving: Stress period: 3 Time step: 14\n",
|
||||
" Solving: Stress period: 3 Time step: 15\n",
|
||||
" Solving: Stress period: 3 Time step: 16\n",
|
||||
" Solving: Stress period: 3 Time step: 17\n",
|
||||
" Solving: Stress period: 3 Time step: 18\n"
|
||||
" \n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 2\n",
|
||||
" Solving: Stress period: 2 Time step: 3\n",
|
||||
" Solving: Stress period: 2 Time step: 4\n",
|
||||
" Solving: Stress period: 2 Time step: 5\n",
|
||||
" Solving: Stress period: 2 Time step: 6\n",
|
||||
" Solving: Stress period: 2 Time step: 7\n",
|
||||
" Solving: Stress period: 2 Time step: 8\n",
|
||||
" Solving: Stress period: 2 Time step: 9\n",
|
||||
" Solving: Stress period: 2 Time step: 10\n",
|
||||
" Solving: Stress period: 2 Time step: 11\n",
|
||||
" Solving: Stress period: 2 Time step: 12\n",
|
||||
" Solving: Stress period: 2 Time step: 13\n",
|
||||
" Solving: Stress period: 2 Time step: 14\n",
|
||||
" Solving: Stress period: 2 Time step: 15\n",
|
||||
" Solving: Stress period: 2 Time step: 16\n",
|
||||
" Solving: Stress period: 2 Time step: 17\n",
|
||||
" Solving: Stress period: 2 Time step: 18\n",
|
||||
" Solving: Stress period: 2 Time step: 19\n",
|
||||
" Solving: Stress period: 2 Time step: 20\n",
|
||||
" Solving: Stress period: 2 Time step: 21\n",
|
||||
" Solving: Stress period: 2 Time step: 22\n",
|
||||
" Solving: Stress period: 2 Time step: 23\n",
|
||||
" Solving: Stress period: 2 Time step: 24\n",
|
||||
" Solving: Stress period: 2 Time step: 25\n",
|
||||
" Solving: Stress period: 2 Time step: 26\n",
|
||||
" Solving: Stress period: 2 Time step: 27\n",
|
||||
" Solving: Stress period: 2 Time step: 28\n",
|
||||
" Solving: Stress period: 2 Time step: 29\n",
|
||||
" Solving: Stress period: 2 Time step: 30\n",
|
||||
" Solving: Stress period: 2 Time step: 31\n",
|
||||
" Solving: Stress period: 2 Time step: 32\n",
|
||||
" Solving: Stress period: 2 Time step: 33\n",
|
||||
" Solving: Stress period: 2 Time step: 34\n",
|
||||
" Solving: Stress period: 2 Time step: 35\n",
|
||||
" Solving: Stress period: 2 Time step: 36\n",
|
||||
" Solving: Stress period: 2 Time step: 37\n",
|
||||
" Solving: Stress period: 2 Time step: 38\n",
|
||||
" Solving: Stress period: 2 Time step: 39\n",
|
||||
" Solving: Stress period: 2 Time step: 40\n",
|
||||
" Solving: Stress period: 2 Time step: 41\n",
|
||||
" Solving: Stress period: 2 Time step: 42\n",
|
||||
" Solving: Stress period: 2 Time step: 43\n",
|
||||
" Solving: Stress period: 2 Time step: 44\n",
|
||||
" Solving: Stress period: 2 Time step: 45\n",
|
||||
" Solving: Stress period: 2 Time step: 46\n",
|
||||
" Solving: Stress period: 2 Time step: 47\n",
|
||||
" Solving: Stress period: 2 Time step: 48\n",
|
||||
" Solving: Stress period: 2 Time step: 49\n",
|
||||
" Solving: Stress period: 2 Time step: 50\n",
|
||||
" Solving: Stress period: 2 Time step: 51\n",
|
||||
" Solving: Stress period: 2 Time step: 52\n",
|
||||
" Solving: Stress period: 2 Time step: 53\n",
|
||||
" Solving: Stress period: 2 Time step: 54\n",
|
||||
" Solving: Stress period: 2 Time step: 55\n",
|
||||
" Solving: Stress period: 2 Time step: 56\n",
|
||||
" Solving: Stress period: 2 Time step: 57\n",
|
||||
" Solving: Stress period: 2 Time step: 58\n",
|
||||
" Solving: Stress period: 2 Time step: 59\n",
|
||||
" Solving: Stress period: 2 Time step: 60\n",
|
||||
" Solving: Stress period: 2 Time step: 61\n",
|
||||
" Solving: Stress period: 2 Time step: 62\n",
|
||||
" Solving: Stress period: 2 Time step: 63\n",
|
||||
" Solving: Stress period: 2 Time step: 64\n",
|
||||
" Solving: Stress period: 2 Time step: 65\n",
|
||||
" Solving: Stress period: 2 Time step: 66\n",
|
||||
" Solving: Stress period: 2 Time step: 67\n",
|
||||
" Solving: Stress period: 2 Time step: 68\n",
|
||||
" Solving: Stress period: 2 Time step: 69\n",
|
||||
" Solving: Stress period: 2 Time step: 70\n",
|
||||
" Solving: Stress period: 2 Time step: 71\n",
|
||||
" Solving: Stress period: 2 Time step: 72\n",
|
||||
" Solving: Stress period: 2 Time step: 73\n",
|
||||
" Solving: Stress period: 2 Time step: 74\n",
|
||||
" Solving: Stress period: 2 Time step: 75\n",
|
||||
" Solving: Stress period: 2 Time step: 76\n",
|
||||
" Solving: Stress period: 2 Time step: 77\n",
|
||||
" Solving: Stress period: 2 Time step: 78\n",
|
||||
" Solving: Stress period: 2 Time step: 79\n",
|
||||
" Solving: Stress period: 2 Time step: 80\n",
|
||||
" Solving: Stress period: 2 Time step: 81\n",
|
||||
" Solving: Stress period: 2 Time step: 82\n",
|
||||
" Solving: Stress period: 2 Time step: 83\n",
|
||||
" Solving: Stress period: 2 Time step: 84\n",
|
||||
" Solving: Stress period: 2 Time step: 85\n",
|
||||
" Solving: Stress period: 2 Time step: 86\n",
|
||||
" Solving: Stress period: 2 Time step: 87\n",
|
||||
" Solving: Stress period: 2 Time step: 88\n",
|
||||
" Solving: Stress period: 2 Time step: 89\n",
|
||||
" Solving: Stress period: 2 Time step: 90\n",
|
||||
" Solving: Stress period: 2 Time step: 91\n",
|
||||
" Solving: Stress period: 2 Time step: 92\n",
|
||||
" Solving: Stress period: 2 Time step: 93\n",
|
||||
" Solving: Stress period: 2 Time step: 94\n",
|
||||
" Solving: Stress period: 2 Time step: 95\n",
|
||||
" Solving: Stress period: 2 Time step: 96\n",
|
||||
" Solving: Stress period: 2 Time step: 97\n",
|
||||
" Solving: Stress period: 2 Time step: 98\n",
|
||||
" Solving: Stress period: 2 Time step: 99\n",
|
||||
" Solving: Stress period: 2 Time step: 100\n",
|
||||
" Solving: Stress period: 2 Time step: 101\n",
|
||||
" Solving: Stress period: 2 Time step: 102\n",
|
||||
" Solving: Stress period: 2 Time step: 103\n",
|
||||
" Solving: Stress period: 2 Time step: 104\n",
|
||||
" Solving: Stress period: 2 Time step: 105\n",
|
||||
" Solving: Stress period: 2 Time step: 106\n",
|
||||
" Solving: Stress period: 2 Time step: 107\n",
|
||||
" Solving: Stress period: 2 Time step: 108\n",
|
||||
" Solving: Stress period: 2 Time step: 109\n",
|
||||
" Solving: Stress period: 2 Time step: 110\n",
|
||||
" Solving: Stress period: 2 Time step: 111\n",
|
||||
" Solving: Stress period: 2 Time step: 112\n",
|
||||
" Solving: Stress period: 2 Time step: 113\n",
|
||||
" Solving: Stress period: 2 Time step: 114\n",
|
||||
" Solving: Stress period: 2 Time step: 115\n",
|
||||
" Solving: Stress period: 2 Time step: 116\n",
|
||||
" Solving: Stress period: 2 Time step: 117\n",
|
||||
" Solving: Stress period: 2 Time step: 118\n",
|
||||
" Solving: Stress period: 2 Time step: 119\n",
|
||||
" Solving: Stress period: 2 Time step: 120\n",
|
||||
" Solving: Stress period: 3 Time step: 1\n",
|
||||
" Solving: Stress period: 3 Time step: 2\n",
|
||||
" Solving: Stress period: 3 Time step: 3\n",
|
||||
" Solving: Stress period: 3 Time step: 4\n",
|
||||
" Solving: Stress period: 3 Time step: 5\n",
|
||||
" Solving: Stress period: 3 Time step: 6\n",
|
||||
" Solving: Stress period: 3 Time step: 7\n",
|
||||
" Solving: Stress period: 3 Time step: 8\n",
|
||||
" Solving: Stress period: 3 Time step: 9\n",
|
||||
" Solving: Stress period: 3 Time step: 10\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Solving: Stress period: 3 Time step: 19\n",
|
||||
" Solving: Stress period: 3 Time step: 20\n",
|
||||
" Solving: Stress period: 3 Time step: 21\n",
|
||||
" Solving: Stress period: 3 Time step: 22\n",
|
||||
" Solving: Stress period: 3 Time step: 23\n",
|
||||
" Solving: Stress period: 3 Time step: 24\n",
|
||||
" Solving: Stress period: 3 Time step: 25\n",
|
||||
" Solving: Stress period: 3 Time step: 26\n",
|
||||
" Solving: Stress period: 3 Time step: 27\n",
|
||||
" Solving: Stress period: 3 Time step: 28\n",
|
||||
" Solving: Stress period: 3 Time step: 29\n",
|
||||
" Solving: Stress period: 3 Time step: 30\n",
|
||||
" Solving: Stress period: 3 Time step: 31\n",
|
||||
" Solving: Stress period: 3 Time step: 32\n",
|
||||
" Solving: Stress period: 3 Time step: 33\n",
|
||||
" Solving: Stress period: 3 Time step: 34\n",
|
||||
" Solving: Stress period: 3 Time step: 35\n",
|
||||
" Solving: Stress period: 3 Time step: 36\n",
|
||||
" Solving: Stress period: 3 Time step: 37\n",
|
||||
" Solving: Stress period: 3 Time step: 38\n",
|
||||
" Solving: Stress period: 3 Time step: 39\n",
|
||||
" Solving: Stress period: 3 Time step: 40\n",
|
||||
" Solving: Stress period: 3 Time step: 41\n",
|
||||
" Solving: Stress period: 3 Time step: 42\n",
|
||||
" Solving: Stress period: 3 Time step: 43\n",
|
||||
" Solving: Stress period: 3 Time step: 44\n",
|
||||
" Solving: Stress period: 3 Time step: 45\n",
|
||||
" Solving: Stress period: 3 Time step: 46\n",
|
||||
" Solving: Stress period: 3 Time step: 47\n",
|
||||
" Solving: Stress period: 3 Time step: 48\n",
|
||||
" Solving: Stress period: 3 Time step: 49\n",
|
||||
" Solving: Stress period: 3 Time step: 50\n",
|
||||
" Solving: Stress period: 3 Time step: 51\n",
|
||||
" Solving: Stress period: 3 Time step: 52\n",
|
||||
" Solving: Stress period: 3 Time step: 53\n",
|
||||
" Solving: Stress period: 3 Time step: 54\n",
|
||||
" Solving: Stress period: 3 Time step: 55\n",
|
||||
" Solving: Stress period: 3 Time step: 56\n",
|
||||
" Solving: Stress period: 3 Time step: 57\n",
|
||||
" Solving: Stress period: 3 Time step: 58\n",
|
||||
" Solving: Stress period: 3 Time step: 59\n",
|
||||
" Solving: Stress period: 3 Time step: 60\n",
|
||||
" Solving: Stress period: 3 Time step: 61\n",
|
||||
" Solving: Stress period: 3 Time step: 62\n",
|
||||
" Solving: Stress period: 3 Time step: 63\n",
|
||||
" Solving: Stress period: 3 Time step: 64\n",
|
||||
" Solving: Stress period: 3 Time step: 65\n",
|
||||
" Solving: Stress period: 3 Time step: 66\n",
|
||||
" Solving: Stress period: 3 Time step: 67\n",
|
||||
" Solving: Stress period: 3 Time step: 68\n",
|
||||
" Solving: Stress period: 3 Time step: 69\n",
|
||||
" Solving: Stress period: 3 Time step: 70\n",
|
||||
" Solving: Stress period: 3 Time step: 71\n",
|
||||
" Solving: Stress period: 3 Time step: 72\n",
|
||||
" Solving: Stress period: 3 Time step: 73\n",
|
||||
" Solving: Stress period: 3 Time step: 74\n",
|
||||
" Solving: Stress period: 3 Time step: 75\n",
|
||||
" Solving: Stress period: 3 Time step: 76\n",
|
||||
" Solving: Stress period: 3 Time step: 77\n",
|
||||
" Solving: Stress period: 3 Time step: 78\n",
|
||||
" Solving: Stress period: 3 Time step: 79\n",
|
||||
" Solving: Stress period: 3 Time step: 80\n",
|
||||
" Solving: Stress period: 3 Time step: 81\n",
|
||||
" Solving: Stress period: 3 Time step: 82\n",
|
||||
" Solving: Stress period: 3 Time step: 83\n",
|
||||
" Solving: Stress period: 3 Time step: 84\n",
|
||||
" Solving: Stress period: 3 Time step: 85\n",
|
||||
" Solving: Stress period: 3 Time step: 86\n",
|
||||
" Solving: Stress period: 3 Time step: 87\n",
|
||||
" Solving: Stress period: 3 Time step: 88\n",
|
||||
" Solving: Stress period: 3 Time step: 89\n",
|
||||
" Solving: Stress period: 3 Time step: 90\n",
|
||||
" Solving: Stress period: 3 Time step: 91\n",
|
||||
" Solving: Stress period: 3 Time step: 92\n",
|
||||
" Solving: Stress period: 3 Time step: 93\n",
|
||||
" Solving: Stress period: 3 Time step: 94\n",
|
||||
" Solving: Stress period: 3 Time step: 95\n",
|
||||
" Solving: Stress period: 3 Time step: 96\n",
|
||||
" Solving: Stress period: 3 Time step: 97\n",
|
||||
" Solving: Stress period: 3 Time step: 98\n",
|
||||
" Solving: Stress period: 3 Time step: 99\n",
|
||||
" Solving: Stress period: 3 Time step: 100\n",
|
||||
" Solving: Stress period: 3 Time step: 101\n",
|
||||
" Solving: Stress period: 3 Time step: 102\n",
|
||||
" Solving: Stress period: 3 Time step: 103\n",
|
||||
" Solving: Stress period: 3 Time step: 104\n",
|
||||
" Solving: Stress period: 3 Time step: 105\n",
|
||||
" Solving: Stress period: 3 Time step: 106\n",
|
||||
" Solving: Stress period: 3 Time step: 107\n",
|
||||
" Solving: Stress period: 3 Time step: 108\n",
|
||||
" Solving: Stress period: 3 Time step: 109\n",
|
||||
" Solving: Stress period: 3 Time step: 110\n",
|
||||
" Solving: Stress period: 3 Time step: 111\n",
|
||||
" Solving: Stress period: 3 Time step: 112\n",
|
||||
" Solving: Stress period: 3 Time step: 113\n",
|
||||
" Solving: Stress period: 3 Time step: 114\n",
|
||||
" Solving: Stress period: 3 Time step: 115\n",
|
||||
" Solving: Stress period: 3 Time step: 116\n",
|
||||
" Solving: Stress period: 3 Time step: 117\n",
|
||||
" Solving: Stress period: 3 Time step: 118\n",
|
||||
" Solving: Stress period: 3 Time step: 119\n",
|
||||
" Solving: Stress period: 3 Time step: 120\n",
|
||||
" Solving: Stress period: 4 Time step: 1\n",
|
||||
" Solving: Stress period: 4 Time step: 2\n",
|
||||
" Solving: Stress period: 4 Time step: 3\n",
|
||||
" Solving: Stress period: 4 Time step: 4\n",
|
||||
" Solving: Stress period: 4 Time step: 5\n",
|
||||
" Solving: Stress period: 4 Time step: 6\n",
|
||||
" Solving: Stress period: 4 Time step: 7\n",
|
||||
" Solving: Stress period: 4 Time step: 8\n",
|
||||
" Solving: Stress period: 4 Time step: 9\n",
|
||||
" Solving: Stress period: 4 Time step: 10\n",
|
||||
" Solving: Stress period: 4 Time step: 11\n",
|
||||
" Solving: Stress period: 4 Time step: 12\n",
|
||||
" Solving: Stress period: 4 Time step: 13\n",
|
||||
" Solving: Stress period: 4 Time step: 14\n",
|
||||
" Solving: Stress period: 4 Time step: 15\n",
|
||||
" Solving: Stress period: 4 Time step: 16\n",
|
||||
" Solving: Stress period: 4 Time step: 17\n",
|
||||
" Solving: Stress period: 4 Time step: 18\n",
|
||||
" Solving: Stress period: 4 Time step: 19\n",
|
||||
" Solving: Stress period: 4 Time step: 20\n",
|
||||
" Solving: Stress period: 4 Time step: 21\n",
|
||||
" Solving: Stress period: 4 Time step: 22\n",
|
||||
" Solving: Stress period: 4 Time step: 23\n",
|
||||
" Solving: Stress period: 4 Time step: 24\n",
|
||||
" Solving: Stress period: 4 Time step: 25\n",
|
||||
" Solving: Stress period: 4 Time step: 26\n",
|
||||
" Solving: Stress period: 4 Time step: 27\n",
|
||||
" Solving: Stress period: 4 Time step: 28\n",
|
||||
" Solving: Stress period: 4 Time step: 29\n",
|
||||
" Solving: Stress period: 4 Time step: 30\n",
|
||||
" Solving: Stress period: 4 Time step: 31\n",
|
||||
" Solving: Stress period: 4 Time step: 32\n",
|
||||
" Solving: Stress period: 4 Time step: 33\n",
|
||||
" Solving: Stress period: 4 Time step: 34\n",
|
||||
" Solving: Stress period: 4 Time step: 35\n",
|
||||
" Solving: Stress period: 4 Time step: 36\n",
|
||||
" Solving: Stress period: 4 Time step: 37\n",
|
||||
" Solving: Stress period: 4 Time step: 38\n",
|
||||
" Solving: Stress period: 4 Time step: 39\n",
|
||||
" Solving: Stress period: 4 Time step: 40\n",
|
||||
" Solving: Stress period: 4 Time step: 41\n",
|
||||
" Solving: Stress period: 4 Time step: 42\n",
|
||||
" Solving: Stress period: 4 Time step: 43\n",
|
||||
" Solving: Stress period: 4 Time step: 44\n",
|
||||
" Solving: Stress period: 4 Time step: 45\n",
|
||||
" Solving: Stress period: 4 Time step: 46\n",
|
||||
" Solving: Stress period: 4 Time step: 47\n",
|
||||
" Solving: Stress period: 4 Time step: 48\n",
|
||||
" Solving: Stress period: 4 Time step: 49\n",
|
||||
" Solving: Stress period: 4 Time step: 50\n",
|
||||
" Solving: Stress period: 4 Time step: 51\n",
|
||||
" Solving: Stress period: 4 Time step: 52\n",
|
||||
" Solving: Stress period: 4 Time step: 53\n",
|
||||
" Solving: Stress period: 4 Time step: 54\n",
|
||||
" Solving: Stress period: 4 Time step: 55\n",
|
||||
" Solving: Stress period: 4 Time step: 56\n",
|
||||
" Solving: Stress period: 4 Time step: 57\n",
|
||||
" Solving: Stress period: 4 Time step: 58\n"
|
||||
" Solving: Stress period: 3 Time step: 11\n",
|
||||
" Solving: Stress period: 3 Time step: 12\n",
|
||||
" Solving: Stress period: 3 Time step: 13\n",
|
||||
" Solving: Stress period: 3 Time step: 14\n",
|
||||
" Solving: Stress period: 3 Time step: 15\n",
|
||||
" Solving: Stress period: 3 Time step: 16\n",
|
||||
" Solving: Stress period: 3 Time step: 17\n",
|
||||
" Solving: Stress period: 3 Time step: 18\n",
|
||||
" Solving: Stress period: 3 Time step: 19\n",
|
||||
" Solving: Stress period: 3 Time step: 20\n",
|
||||
" Solving: Stress period: 3 Time step: 21\n",
|
||||
" Solving: Stress period: 3 Time step: 22\n",
|
||||
" Solving: Stress period: 3 Time step: 23\n",
|
||||
" Solving: Stress period: 3 Time step: 24\n",
|
||||
" Solving: Stress period: 3 Time step: 25\n",
|
||||
" Solving: Stress period: 3 Time step: 26\n",
|
||||
" Solving: Stress period: 3 Time step: 27\n",
|
||||
" Solving: Stress period: 3 Time step: 28\n",
|
||||
" Solving: Stress period: 3 Time step: 29\n",
|
||||
" Solving: Stress period: 3 Time step: 30\n",
|
||||
" Solving: Stress period: 3 Time step: 31\n",
|
||||
" Solving: Stress period: 3 Time step: 32\n",
|
||||
" Solving: Stress period: 3 Time step: 33\n",
|
||||
" Solving: Stress period: 3 Time step: 34\n",
|
||||
" Solving: Stress period: 3 Time step: 35\n",
|
||||
" Solving: Stress period: 3 Time step: 36\n",
|
||||
" Solving: Stress period: 3 Time step: 37\n",
|
||||
" Solving: Stress period: 3 Time step: 38\n",
|
||||
" Solving: Stress period: 3 Time step: 39\n",
|
||||
" Solving: Stress period: 3 Time step: 40\n",
|
||||
" Solving: Stress period: 3 Time step: 41\n",
|
||||
" Solving: Stress period: 3 Time step: 42\n",
|
||||
" Solving: Stress period: 3 Time step: 43\n",
|
||||
" Solving: Stress period: 3 Time step: 44\n",
|
||||
" Solving: Stress period: 3 Time step: 45\n",
|
||||
" Solving: Stress period: 3 Time step: 46\n",
|
||||
" Solving: Stress period: 3 Time step: 47\n",
|
||||
" Solving: Stress period: 3 Time step: 48\n",
|
||||
" Solving: Stress period: 3 Time step: 49\n",
|
||||
" Solving: Stress period: 3 Time step: 50\n",
|
||||
" Solving: Stress period: 3 Time step: 51\n",
|
||||
" Solving: Stress period: 3 Time step: 52\n",
|
||||
" Solving: Stress period: 3 Time step: 53\n",
|
||||
" Solving: Stress period: 3 Time step: 54\n",
|
||||
" Solving: Stress period: 3 Time step: 55\n",
|
||||
" Solving: Stress period: 3 Time step: 56\n",
|
||||
" Solving: Stress period: 3 Time step: 57\n",
|
||||
" Solving: Stress period: 3 Time step: 58\n",
|
||||
" Solving: Stress period: 3 Time step: 59\n",
|
||||
" Solving: Stress period: 3 Time step: 60\n",
|
||||
" Solving: Stress period: 3 Time step: 61\n",
|
||||
" Solving: Stress period: 3 Time step: 62\n",
|
||||
" Solving: Stress period: 3 Time step: 63\n",
|
||||
" Solving: Stress period: 3 Time step: 64\n",
|
||||
" Solving: Stress period: 3 Time step: 65\n",
|
||||
" Solving: Stress period: 3 Time step: 66\n",
|
||||
" Solving: Stress period: 3 Time step: 67\n",
|
||||
" Solving: Stress period: 3 Time step: 68\n",
|
||||
" Solving: Stress period: 3 Time step: 69\n",
|
||||
" Solving: Stress period: 3 Time step: 70\n",
|
||||
" Solving: Stress period: 3 Time step: 71\n",
|
||||
" Solving: Stress period: 3 Time step: 72\n",
|
||||
" Solving: Stress period: 3 Time step: 73\n",
|
||||
" Solving: Stress period: 3 Time step: 74\n",
|
||||
" Solving: Stress period: 3 Time step: 75\n",
|
||||
" Solving: Stress period: 3 Time step: 76\n",
|
||||
" Solving: Stress period: 3 Time step: 77\n",
|
||||
" Solving: Stress period: 3 Time step: 78\n",
|
||||
" Solving: Stress period: 3 Time step: 79\n",
|
||||
" Solving: Stress period: 3 Time step: 80\n",
|
||||
" Solving: Stress period: 3 Time step: 81\n",
|
||||
" Solving: Stress period: 3 Time step: 82\n",
|
||||
" Solving: Stress period: 3 Time step: 83\n",
|
||||
" Solving: Stress period: 3 Time step: 84\n",
|
||||
" Solving: Stress period: 3 Time step: 85\n",
|
||||
" Solving: Stress period: 3 Time step: 86\n",
|
||||
" Solving: Stress period: 3 Time step: 87\n",
|
||||
" Solving: Stress period: 3 Time step: 88\n",
|
||||
" Solving: Stress period: 3 Time step: 89\n",
|
||||
" Solving: Stress period: 3 Time step: 90\n",
|
||||
" Solving: Stress period: 3 Time step: 91\n",
|
||||
" Solving: Stress period: 3 Time step: 92\n",
|
||||
" Solving: Stress period: 3 Time step: 93\n",
|
||||
" Solving: Stress period: 3 Time step: 94\n",
|
||||
" Solving: Stress period: 3 Time step: 95\n",
|
||||
" Solving: Stress period: 3 Time step: 96\n",
|
||||
" Solving: Stress period: 3 Time step: 97\n",
|
||||
" Solving: Stress period: 3 Time step: 98\n",
|
||||
" Solving: Stress period: 3 Time step: 99\n",
|
||||
" Solving: Stress period: 3 Time step: 100\n",
|
||||
" Solving: Stress period: 3 Time step: 101\n",
|
||||
" Solving: Stress period: 3 Time step: 102\n",
|
||||
" Solving: Stress period: 3 Time step: 103\n",
|
||||
" Solving: Stress period: 3 Time step: 104\n",
|
||||
" Solving: Stress period: 3 Time step: 105\n",
|
||||
" Solving: Stress period: 3 Time step: 106\n",
|
||||
" Solving: Stress period: 3 Time step: 107\n",
|
||||
" Solving: Stress period: 3 Time step: 108\n",
|
||||
" Solving: Stress period: 3 Time step: 109\n",
|
||||
" Solving: Stress period: 3 Time step: 110\n",
|
||||
" Solving: Stress period: 3 Time step: 111\n",
|
||||
" Solving: Stress period: 3 Time step: 112\n",
|
||||
" Solving: Stress period: 3 Time step: 113\n",
|
||||
" Solving: Stress period: 3 Time step: 114\n",
|
||||
" Solving: Stress period: 3 Time step: 115\n",
|
||||
" Solving: Stress period: 3 Time step: 116\n",
|
||||
" Solving: Stress period: 3 Time step: 117\n",
|
||||
" Solving: Stress period: 3 Time step: 118\n",
|
||||
" Solving: Stress period: 3 Time step: 119\n",
|
||||
" Solving: Stress period: 3 Time step: 120\n",
|
||||
" Solving: Stress period: 4 Time step: 1\n",
|
||||
" Solving: Stress period: 4 Time step: 2\n",
|
||||
" Solving: Stress period: 4 Time step: 3\n",
|
||||
" Solving: Stress period: 4 Time step: 4\n",
|
||||
" Solving: Stress period: 4 Time step: 5\n",
|
||||
" Solving: Stress period: 4 Time step: 6\n",
|
||||
" Solving: Stress period: 4 Time step: 7\n",
|
||||
" Solving: Stress period: 4 Time step: 8\n",
|
||||
" Solving: Stress period: 4 Time step: 9\n",
|
||||
" Solving: Stress period: 4 Time step: 10\n",
|
||||
" Solving: Stress period: 4 Time step: 11\n",
|
||||
" Solving: Stress period: 4 Time step: 12\n",
|
||||
" Solving: Stress period: 4 Time step: 13\n",
|
||||
" Solving: Stress period: 4 Time step: 14\n",
|
||||
" Solving: Stress period: 4 Time step: 15\n",
|
||||
" Solving: Stress period: 4 Time step: 16\n",
|
||||
" Solving: Stress period: 4 Time step: 17\n",
|
||||
" Solving: Stress period: 4 Time step: 18\n",
|
||||
" Solving: Stress period: 4 Time step: 19\n",
|
||||
" Solving: Stress period: 4 Time step: 20\n",
|
||||
" Solving: Stress period: 4 Time step: 21\n",
|
||||
" Solving: Stress period: 4 Time step: 22\n",
|
||||
" Solving: Stress period: 4 Time step: 23\n",
|
||||
" Solving: Stress period: 4 Time step: 24\n",
|
||||
" Solving: Stress period: 4 Time step: 25\n",
|
||||
" Solving: Stress period: 4 Time step: 26\n",
|
||||
" Solving: Stress period: 4 Time step: 27\n",
|
||||
" Solving: Stress period: 4 Time step: 28\n",
|
||||
" Solving: Stress period: 4 Time step: 29\n",
|
||||
" Solving: Stress period: 4 Time step: 30\n",
|
||||
" Solving: Stress period: 4 Time step: 31\n",
|
||||
" Solving: Stress period: 4 Time step: 32\n",
|
||||
" Solving: Stress period: 4 Time step: 33\n",
|
||||
" Solving: Stress period: 4 Time step: 34\n",
|
||||
" Solving: Stress period: 4 Time step: 35\n",
|
||||
" Solving: Stress period: 4 Time step: 36\n",
|
||||
" Solving: Stress period: 4 Time step: 37\n",
|
||||
" Solving: Stress period: 4 Time step: 38\n",
|
||||
" Solving: Stress period: 4 Time step: 39\n",
|
||||
" Solving: Stress period: 4 Time step: 40\n",
|
||||
" Solving: Stress period: 4 Time step: 41\n",
|
||||
" Solving: Stress period: 4 Time step: 42\n",
|
||||
" Solving: Stress period: 4 Time step: 43\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Solving: Stress period: 4 Time step: 59\n",
|
||||
" Solving: Stress period: 4 Time step: 60\n",
|
||||
" Solving: Stress period: 4 Time step: 61\n",
|
||||
" Solving: Stress period: 4 Time step: 62\n",
|
||||
" Solving: Stress period: 4 Time step: 63\n",
|
||||
" Solving: Stress period: 4 Time step: 64\n",
|
||||
" Solving: Stress period: 4 Time step: 65\n",
|
||||
" Solving: Stress period: 4 Time step: 66\n",
|
||||
" Solving: Stress period: 4 Time step: 67\n",
|
||||
" Solving: Stress period: 4 Time step: 68\n",
|
||||
" Solving: Stress period: 4 Time step: 69\n",
|
||||
" Solving: Stress period: 4 Time step: 70\n",
|
||||
" Solving: Stress period: 4 Time step: 71\n",
|
||||
" Solving: Stress period: 4 Time step: 72\n",
|
||||
" Solving: Stress period: 4 Time step: 73\n",
|
||||
" Solving: Stress period: 4 Time step: 74\n",
|
||||
" Solving: Stress period: 4 Time step: 75\n",
|
||||
" Solving: Stress period: 4 Time step: 76\n",
|
||||
" Solving: Stress period: 4 Time step: 77\n",
|
||||
" Solving: Stress period: 4 Time step: 78\n",
|
||||
" Solving: Stress period: 4 Time step: 79\n",
|
||||
" Solving: Stress period: 4 Time step: 80\n",
|
||||
" Solving: Stress period: 4 Time step: 81\n",
|
||||
" Solving: Stress period: 4 Time step: 82\n",
|
||||
" Solving: Stress period: 4 Time step: 83\n",
|
||||
" Solving: Stress period: 4 Time step: 84\n",
|
||||
" Solving: Stress period: 4 Time step: 85\n",
|
||||
" Solving: Stress period: 4 Time step: 86\n",
|
||||
" Solving: Stress period: 4 Time step: 87\n",
|
||||
" Solving: Stress period: 4 Time step: 88\n",
|
||||
" Solving: Stress period: 4 Time step: 89\n",
|
||||
" Solving: Stress period: 4 Time step: 90\n",
|
||||
" Solving: Stress period: 4 Time step: 91\n",
|
||||
" Solving: Stress period: 4 Time step: 92\n",
|
||||
" Solving: Stress period: 4 Time step: 93\n",
|
||||
" Solving: Stress period: 4 Time step: 94\n",
|
||||
" Solving: Stress period: 4 Time step: 95\n",
|
||||
" Solving: Stress period: 4 Time step: 96\n",
|
||||
" Solving: Stress period: 4 Time step: 97\n",
|
||||
" Solving: Stress period: 4 Time step: 98\n",
|
||||
" Solving: Stress period: 4 Time step: 99\n",
|
||||
" Solving: Stress period: 4 Time step: 100\n",
|
||||
" Solving: Stress period: 4 Time step: 101\n",
|
||||
" Solving: Stress period: 4 Time step: 102\n",
|
||||
" Solving: Stress period: 4 Time step: 103\n",
|
||||
" Solving: Stress period: 4 Time step: 104\n",
|
||||
" Solving: Stress period: 4 Time step: 105\n",
|
||||
" Solving: Stress period: 4 Time step: 106\n",
|
||||
" Solving: Stress period: 4 Time step: 107\n",
|
||||
" Solving: Stress period: 4 Time step: 108\n",
|
||||
" Solving: Stress period: 4 Time step: 109\n",
|
||||
" Solving: Stress period: 4 Time step: 110\n",
|
||||
" Solving: Stress period: 4 Time step: 111\n",
|
||||
" Solving: Stress period: 4 Time step: 112\n",
|
||||
" Solving: Stress period: 4 Time step: 113\n",
|
||||
" Solving: Stress period: 4 Time step: 114\n",
|
||||
" Solving: Stress period: 4 Time step: 115\n",
|
||||
" Solving: Stress period: 4 Time step: 116\n",
|
||||
" Solving: Stress period: 4 Time step: 117\n",
|
||||
" Solving: Stress period: 4 Time step: 118\n",
|
||||
" Solving: Stress period: 4 Time step: 119\n",
|
||||
" Solving: Stress period: 4 Time step: 120\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:39:09\n",
|
||||
" Elapsed run time: 1.855 Seconds\n",
|
||||
" Solving: Stress period: 4 Time step: 44\n",
|
||||
" Solving: Stress period: 4 Time step: 45\n",
|
||||
" Solving: Stress period: 4 Time step: 46\n",
|
||||
" Solving: Stress period: 4 Time step: 47\n",
|
||||
" Solving: Stress period: 4 Time step: 48\n",
|
||||
" Solving: Stress period: 4 Time step: 49\n",
|
||||
" Solving: Stress period: 4 Time step: 50\n",
|
||||
" Solving: Stress period: 4 Time step: 51\n",
|
||||
" Solving: Stress period: 4 Time step: 52\n",
|
||||
" Solving: Stress period: 4 Time step: 53\n",
|
||||
" Solving: Stress period: 4 Time step: 54\n",
|
||||
" Solving: Stress period: 4 Time step: 55\n",
|
||||
" Solving: Stress period: 4 Time step: 56\n",
|
||||
" Solving: Stress period: 4 Time step: 57\n",
|
||||
" Solving: Stress period: 4 Time step: 58\n",
|
||||
" Solving: Stress period: 4 Time step: 59\n",
|
||||
" Solving: Stress period: 4 Time step: 60\n",
|
||||
" Solving: Stress period: 4 Time step: 61\n",
|
||||
" Solving: Stress period: 4 Time step: 62\n",
|
||||
" Solving: Stress period: 4 Time step: 63\n",
|
||||
" Solving: Stress period: 4 Time step: 64\n",
|
||||
" Solving: Stress period: 4 Time step: 65\n",
|
||||
" Solving: Stress period: 4 Time step: 66\n",
|
||||
" Solving: Stress period: 4 Time step: 67\n",
|
||||
" Solving: Stress period: 4 Time step: 68\n",
|
||||
" Solving: Stress period: 4 Time step: 69\n",
|
||||
" Solving: Stress period: 4 Time step: 70\n",
|
||||
" Solving: Stress period: 4 Time step: 71\n",
|
||||
" Solving: Stress period: 4 Time step: 72\n",
|
||||
" Solving: Stress period: 4 Time step: 73\n",
|
||||
" Solving: Stress period: 4 Time step: 74\n",
|
||||
" Solving: Stress period: 4 Time step: 75\n",
|
||||
" Solving: Stress period: 4 Time step: 76\n",
|
||||
" Solving: Stress period: 4 Time step: 77\n",
|
||||
" Solving: Stress period: 4 Time step: 78\n",
|
||||
" Solving: Stress period: 4 Time step: 79\n",
|
||||
" Solving: Stress period: 4 Time step: 80\n",
|
||||
" Solving: Stress period: 4 Time step: 81\n",
|
||||
" Solving: Stress period: 4 Time step: 82\n",
|
||||
" Solving: Stress period: 4 Time step: 83\n",
|
||||
" Solving: Stress period: 4 Time step: 84\n",
|
||||
" Solving: Stress period: 4 Time step: 85\n",
|
||||
" Solving: Stress period: 4 Time step: 86\n",
|
||||
" Solving: Stress period: 4 Time step: 87\n",
|
||||
" Solving: Stress period: 4 Time step: 88\n",
|
||||
" Solving: Stress period: 4 Time step: 89\n",
|
||||
" Solving: Stress period: 4 Time step: 90\n",
|
||||
" Solving: Stress period: 4 Time step: 91\n",
|
||||
" Solving: Stress period: 4 Time step: 92\n",
|
||||
" Solving: Stress period: 4 Time step: 93\n",
|
||||
" Solving: Stress period: 4 Time step: 94\n",
|
||||
" Solving: Stress period: 4 Time step: 95\n",
|
||||
" Solving: Stress period: 4 Time step: 96\n",
|
||||
" Solving: Stress period: 4 Time step: 97\n",
|
||||
" Solving: Stress period: 4 Time step: 98\n",
|
||||
" Solving: Stress period: 4 Time step: 99\n",
|
||||
" Solving: Stress period: 4 Time step: 100\n",
|
||||
" Solving: Stress period: 4 Time step: 101\n",
|
||||
" Solving: Stress period: 4 Time step: 102\n",
|
||||
" Solving: Stress period: 4 Time step: 103\n",
|
||||
" Solving: Stress period: 4 Time step: 104\n",
|
||||
" Solving: Stress period: 4 Time step: 105\n",
|
||||
" Solving: Stress period: 4 Time step: 106\n",
|
||||
" Solving: Stress period: 4 Time step: 107\n",
|
||||
" Solving: Stress period: 4 Time step: 108\n",
|
||||
" Solving: Stress period: 4 Time step: 109\n",
|
||||
" Solving: Stress period: 4 Time step: 110\n",
|
||||
" Solving: Stress period: 4 Time step: 111\n",
|
||||
" Solving: Stress period: 4 Time step: 112\n",
|
||||
" Solving: Stress period: 4 Time step: 113\n",
|
||||
" Solving: Stress period: 4 Time step: 114\n",
|
||||
" Solving: Stress period: 4 Time step: 115\n",
|
||||
" Solving: Stress period: 4 Time step: 116\n",
|
||||
" Solving: Stress period: 4 Time step: 117\n",
|
||||
" Solving: Stress period: 4 Time step: 118\n",
|
||||
" Solving: Stress period: 4 Time step: 119\n",
|
||||
" Solving: Stress period: 4 Time step: 120\n",
|
||||
" \n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:37:02\n",
|
||||
" Elapsed run time: 1.932 Seconds\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"WARNING REPORT:\n",
|
||||
"\n",
|
||||
" 1. NONLINEAR BLOCK VARIABLE 'OUTER_HCLOSE' IN FILE 'advgw_tidal.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING OUTER_DVCLOSE TO OUTER_HCLOSE VALUE.\n",
|
||||
" 2. LINEAR BLOCK VARIABLE 'INNER_HCLOSE' IN FILE 'advgw_tidal.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING INNER_DVCLOSE TO INNER_HCLOSE VALUE.\n",
|
||||
" Normal termination of simulation.\n",
|
||||
"\n",
|
||||
"Success is: True\n"
|
||||
|
@ -1330,7 +1339,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.legend.Legend at 0x11dd444e0>"
|
||||
"<matplotlib.legend.Legend at 0x122a8b080>"
|
||||
]
|
||||
},
|
||||
"execution_count": 25,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -44,7 +44,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -582,9 +582,9 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mf6\n",
|
||||
" MODFLOW 6\n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL\n",
|
||||
" VERSION 6.1.0 12/12/2019\n",
|
||||
" VERSION 6.1.1 06/12/2020\n",
|
||||
"\n",
|
||||
" MODFLOW 6 compiled Dec 13 2019 12:29:49 with IFORT compiler (ver. 19.0.5)\n",
|
||||
" MODFLOW 6 compiled Jun 12 2020 12:02:16 with IFORT compiler (ver. 19.0.5)\n",
|
||||
"\n",
|
||||
"This software has been approved for release by the U.S. Geological \n",
|
||||
"Survey (USGS). Although the software has been subjected to rigorous \n",
|
||||
|
@ -599,19 +599,28 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:40:24\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:37:43\n",
|
||||
" \n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 2\n",
|
||||
" Solving: Stress period: 2 Time step: 3\n",
|
||||
" Solving: Stress period: 2 Time step: 4\n",
|
||||
" Solving: Stress period: 2 Time step: 5\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:40:24\n",
|
||||
" Elapsed run time: 0.040 Seconds\n",
|
||||
" \n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 2\n",
|
||||
" Solving: Stress period: 2 Time step: 3\n",
|
||||
" Solving: Stress period: 2 Time step: 4\n",
|
||||
" Solving: Stress period: 2 Time step: 5\n",
|
||||
" \n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:37:43\n",
|
||||
" Elapsed run time: 0.045 Seconds\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"WARNING REPORT:\n",
|
||||
"\n",
|
||||
" 1. NONLINEAR BLOCK VARIABLE 'OUTER_HCLOSE' IN FILE 'example_sim.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING OUTER_DVCLOSE TO OUTER_HCLOSE VALUE.\n",
|
||||
" 2. LINEAR BLOCK VARIABLE 'INNER_HCLOSE' IN FILE 'example_sim.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING INNER_DVCLOSE TO INNER_HCLOSE VALUE.\n",
|
||||
" Normal termination of simulation.\n"
|
||||
]
|
||||
},
|
||||
|
@ -658,8 +667,9 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"initialize_geometry::proj4_str = epsg:4326\n",
|
||||
"initialize_geometry::self.grid_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::nc_crs = Proj('+proj=longlat +datum=WGS84 +no_defs', preserve_units=True)\n",
|
||||
"initialize_geometry::self.grid_crs = epsg:4326\n",
|
||||
"initialize_geometry::nc_crs = epsg:4326\n",
|
||||
"transforming coordinates using = proj=noop ellps=GRS80\n",
|
||||
"wrote data/netCDF_export/botm.shp\n"
|
||||
]
|
||||
}
|
||||
|
@ -714,7 +724,6 @@
|
|||
" loading package oc...\n",
|
||||
" loading package chd...\n",
|
||||
" loading package rch...\n",
|
||||
"WARNING: Block header for block \"continuous\" is not a unique block header ('example_model', 'rch', 'obs', 'continuous')\n",
|
||||
" loading ims package example_model...\n"
|
||||
]
|
||||
}
|
||||
|
@ -999,9 +1008,9 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mf6\n",
|
||||
" MODFLOW 6\n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL\n",
|
||||
" VERSION 6.1.0 12/12/2019\n",
|
||||
" VERSION 6.1.1 06/12/2020\n",
|
||||
"\n",
|
||||
" MODFLOW 6 compiled Dec 13 2019 12:29:49 with IFORT compiler (ver. 19.0.5)\n",
|
||||
" MODFLOW 6 compiled Jun 12 2020 12:02:16 with IFORT compiler (ver. 19.0.5)\n",
|
||||
"\n",
|
||||
"This software has been approved for release by the U.S. Geological \n",
|
||||
"Survey (USGS). Although the software has been subjected to rigorous \n",
|
||||
|
@ -1016,19 +1025,28 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:40:25\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:37:43\n",
|
||||
" \n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 2\n",
|
||||
" Solving: Stress period: 2 Time step: 3\n",
|
||||
" Solving: Stress period: 2 Time step: 4\n",
|
||||
" Solving: Stress period: 2 Time step: 5\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:40:25\n",
|
||||
" Elapsed run time: 0.036 Seconds\n",
|
||||
" \n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 1\n",
|
||||
" Solving: Stress period: 2 Time step: 2\n",
|
||||
" Solving: Stress period: 2 Time step: 3\n",
|
||||
" Solving: Stress period: 2 Time step: 4\n",
|
||||
" Solving: Stress period: 2 Time step: 5\n",
|
||||
" \n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:37:43\n",
|
||||
" Elapsed run time: 0.045 Seconds\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"WARNING REPORT:\n",
|
||||
"\n",
|
||||
" 1. NONLINEAR BLOCK VARIABLE 'OUTER_HCLOSE' IN FILE 'example_sim.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING OUTER_DVCLOSE TO OUTER_HCLOSE VALUE.\n",
|
||||
" 2. LINEAR BLOCK VARIABLE 'INNER_HCLOSE' IN FILE 'example_sim.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING INNER_DVCLOSE TO INNER_HCLOSE VALUE.\n",
|
||||
" Normal termination of simulation.\n"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"pandas version: 0.25.2\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -721,17 +721,7 @@
|
|||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"WARNING: unit 34 of package MNW2 already in use\n",
|
||||
"****Warning -- two packages of the same type: <class 'flopy.modflow.mfmnw2.ModflowMnw2'> <class 'flopy.modflow.mfmnw2.ModflowMnw2'>\n",
|
||||
"replacing existing Package...\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"tmp = flopy.modflow.ModflowMnw2(model=m,\n",
|
||||
" itmp=[1, 1, -1], # reuse second per pumping for last stress period\n",
|
||||
|
@ -793,8 +783,8 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'well1': <flopy.modflow.mfmnw2.Mnw at 0x11deda668>,\n",
|
||||
" 'well2': <flopy.modflow.mfmnw2.Mnw at 0x11de95518>}"
|
||||
"{'well1': <flopy.modflow.mfmnw2.Mnw at 0x12650ca58>,\n",
|
||||
" 'well2': <flopy.modflow.mfmnw2.Mnw at 0x1264db630>}"
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
|
@ -943,13 +933,13 @@
|
|||
" gwt = False ('bool)\n",
|
||||
" ipakcb = 0 ('int)\n",
|
||||
" itmp (list, items = 3)\n",
|
||||
" mnw = {'well1': <flopy.modflow.mfmnw2.Mnw object at 0x11deda668>, 'well2': <flopy.modflow.mfmnw2.Mnw object at 0x11de95518>} ('dict)\n",
|
||||
" mnw = {'well1': <flopy.modflow.mfmnw2.Mnw object at 0x12650ca58>, 'well2': <flopy.modflow.mfmnw2.Mnw object at 0x1264db630>} ('dict)\n",
|
||||
" mnwmax = 2 ('int)\n",
|
||||
" mnwprnt = 0 ('int)\n",
|
||||
" node_data (array, shape = 3,)\n",
|
||||
" nodtot = 3 ('int)\n",
|
||||
" nper = 3 ('int)\n",
|
||||
" stress_period_data = <flopy.utils.util_list.MfList object at 0x11deda2e8> ('flopy.utils.util_list.MfList)\n",
|
||||
" stress_period_data = <flopy.utils.util_list.MfList object at 0x12650c320> ('flopy.utils.util_list.MfList)\n",
|
||||
" structured = True ('bool)\n",
|
||||
" unit_number = 34, 'aux': [], 'wellid': 'well1', 'nnodes': -2, 'losstype': 'skin', 'pumploc': -1, 'qlimit': 0, 'ppflag': 0, 'pumpcap': 0, 'rw': [1.0,\n",
|
||||
" 0.5], 'rskin': [2.0, 2.0], 'kskin': [5.0,\n",
|
||||
|
@ -1226,17 +1216,7 @@
|
|||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"WARNING: unit 34 of package MNW2 already in use\n",
|
||||
"****Warning -- two packages of the same type: <class 'flopy.modflow.mfmnw2.ModflowMnw2'> <class 'flopy.modflow.mfmnw2.ModflowMnw2'>\n",
|
||||
"replacing existing Package...\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"mnw2fromobj = flopy.modflow.ModflowMnw2(model=m, mnwmax=2,\n",
|
||||
" mnw=mnw2.mnw,\n",
|
||||
|
@ -1658,13 +1638,6 @@
|
|||
"### Load some example MNW2 packages"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
|
@ -1885,7 +1858,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'well-a': <flopy.modflow.mfmnw2.Mnw at 0x11df21ba8>}"
|
||||
"{'well-a': <flopy.modflow.mfmnw2.Mnw at 0x126573240>}"
|
||||
]
|
||||
},
|
||||
"execution_count": 30,
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -609,9 +609,6 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"WARNING: unit 20 of package WEL already in use\n",
|
||||
"****Warning -- two packages of the same type: <class 'flopy.modflow.mfwel.ModflowWel'> <class 'flopy.modflow.mfwel.ModflowWel'>\n",
|
||||
"replacing existing Package...\n",
|
||||
"# WEL package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 1 0 \r\n",
|
||||
" 1 0 # stress period 1\r\n",
|
||||
|
@ -648,9 +645,6 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"WARNING: unit 20 of package WEL already in use\n",
|
||||
"****Warning -- two packages of the same type: <class 'flopy.modflow.mfwel.ModflowWel'> <class 'flopy.modflow.mfwel.ModflowWel'>\n",
|
||||
"replacing existing Package...\n",
|
||||
"# WEL package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 2 0 \r\n",
|
||||
" 1 0 # stress period 1\r\n",
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"pandas version: 0.25.2\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -258,7 +258,7 @@
|
|||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy/plot/map.py:525: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n",
|
||||
"/Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy/plot/map.py:553: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n",
|
||||
" pa[list(idx[1:])] = 1\n"
|
||||
]
|
||||
},
|
||||
|
@ -397,7 +397,7 @@
|
|||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy/plot/map.py:525: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n",
|
||||
"/Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy/plot/map.py:553: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n",
|
||||
" pa[list(idx[1:])] = 1\n"
|
||||
]
|
||||
},
|
||||
|
@ -698,7 +698,7 @@
|
|||
" Version 1.12.00 2/3/2017 \n",
|
||||
"\n",
|
||||
" Using NAME file: Example_mnw.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:42:25\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:39:32\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 2 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
|
@ -712,8 +712,8 @@
|
|||
" Solving: Stress period: 2 Time step: 9 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 2 Time step: 10 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 3 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:42:25\n",
|
||||
" Elapsed run time: 0.067 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:39:32\n",
|
||||
" Elapsed run time: 0.074 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
]
|
||||
|
@ -818,7 +818,7 @@
|
|||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy/plot/map.py:525: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n",
|
||||
"/Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy/plot/map.py:553: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n",
|
||||
" pa[list(idx[1:])] = 1\n"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -145,9 +145,9 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mf6\n",
|
||||
" MODFLOW 6\n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL\n",
|
||||
" VERSION 6.1.0 12/12/2019\n",
|
||||
" VERSION 6.1.1 06/12/2020\n",
|
||||
"\n",
|
||||
" MODFLOW 6 compiled Dec 13 2019 12:29:49 with IFORT compiler (ver. 19.0.5)\n",
|
||||
" MODFLOW 6 compiled Jun 12 2020 12:02:16 with IFORT compiler (ver. 19.0.5)\n",
|
||||
"\n",
|
||||
"This software has been approved for release by the U.S. Geological \n",
|
||||
"Survey (USGS). Although the software has been subjected to rigorous \n",
|
||||
|
@ -162,14 +162,23 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:42:51\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:39:48\n",
|
||||
" \n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:42:51\n",
|
||||
" Elapsed run time: 0.033 Seconds\n",
|
||||
" \n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" \n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:39:48\n",
|
||||
" Elapsed run time: 0.032 Seconds\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"WARNING REPORT:\n",
|
||||
"\n",
|
||||
" 1. NONLINEAR BLOCK VARIABLE 'OUTER_HCLOSE' IN FILE 'ex01_mf6.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING OUTER_DVCLOSE TO OUTER_HCLOSE VALUE.\n",
|
||||
" 2. LINEAR BLOCK VARIABLE 'INNER_HCLOSE' IN FILE 'ex01_mf6.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING INNER_DVCLOSE TO INNER_HCLOSE VALUE.\n",
|
||||
" Normal termination of simulation.\n"
|
||||
]
|
||||
}
|
||||
|
@ -285,7 +294,7 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mp7\n",
|
||||
"\n",
|
||||
"MODPATH Version 7.2.001 \n",
|
||||
"Program compiled Dec 13 2019 12:32:13 with IFORT compiler (ver. 19.0.5) \n",
|
||||
"Program compiled Jun 12 2020 12:05:21 with IFORT compiler (ver. 19.0.5) \n",
|
||||
" \n",
|
||||
" \n",
|
||||
"Run particle tracking simulation ...\n",
|
||||
|
@ -352,7 +361,7 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mp7\n",
|
||||
"\n",
|
||||
"MODPATH Version 7.2.001 \n",
|
||||
"Program compiled Dec 13 2019 12:32:13 with IFORT compiler (ver. 19.0.5) \n",
|
||||
"Program compiled Jun 12 2020 12:05:21 with IFORT compiler (ver. 19.0.5) \n",
|
||||
" \n",
|
||||
" \n",
|
||||
"Run particle tracking simulation ...\n",
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.2.13\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -158,11 +158,11 @@
|
|||
" Version 1.12.00 2/3/2017 \n",
|
||||
"\n",
|
||||
" Using NAME file: ex01_mf2005.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/11/15 16:49:21\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:40:36\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/11/15 16:49:21\n",
|
||||
" Elapsed run time: 0.014 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:40:36\n",
|
||||
" Elapsed run time: 0.018 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
]
|
||||
|
@ -234,7 +234,7 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mp7\n",
|
||||
"\n",
|
||||
"MODPATH Version 7.2.001 \n",
|
||||
"Program compiled Mar 19 2019 16:49:28 with IFORT compiler (ver. 19.0.0) \n",
|
||||
"Program compiled Jun 12 2020 12:05:21 with IFORT compiler (ver. 19.0.5) \n",
|
||||
" \n",
|
||||
" \n",
|
||||
"Run particle tracking simulation ...\n",
|
||||
|
@ -494,9 +494,9 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mf6\n",
|
||||
" MODFLOW 6\n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL\n",
|
||||
" VERSION 6.0.4 03/13/2019\n",
|
||||
" VERSION 6.1.1 06/12/2020\n",
|
||||
"\n",
|
||||
" MODFLOW 6 compiled Mar 19 2019 16:46:21 with IFORT compiler (ver. 19.0.0)\n",
|
||||
" MODFLOW 6 compiled Jun 12 2020 12:02:16 with IFORT compiler (ver. 19.0.5)\n",
|
||||
"\n",
|
||||
"This software has been approved for release by the U.S. Geological \n",
|
||||
"Survey (USGS). Although the software has been subjected to rigorous \n",
|
||||
|
@ -511,14 +511,23 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/11/15 16:49:44\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:41:00\n",
|
||||
" \n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/11/15 16:49:44\n",
|
||||
" Elapsed run time: 0.031 Seconds\n",
|
||||
" \n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" \n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:41:00\n",
|
||||
" Elapsed run time: 0.034 Seconds\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"WARNING REPORT:\n",
|
||||
"\n",
|
||||
" 1. NONLINEAR BLOCK VARIABLE 'OUTER_HCLOSE' IN FILE 'ex01_mf6.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING OUTER_DVCLOSE TO OUTER_HCLOSE VALUE.\n",
|
||||
" 2. LINEAR BLOCK VARIABLE 'INNER_HCLOSE' IN FILE 'ex01_mf6.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING INNER_DVCLOSE TO INNER_HCLOSE VALUE.\n",
|
||||
" Normal termination of simulation.\n"
|
||||
]
|
||||
}
|
||||
|
@ -615,7 +624,7 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mp7\n",
|
||||
"\n",
|
||||
"MODPATH Version 7.2.001 \n",
|
||||
"Program compiled Mar 19 2019 16:49:28 with IFORT compiler (ver. 19.0.0) \n",
|
||||
"Program compiled Jun 12 2020 12:05:21 with IFORT compiler (ver. 19.0.5) \n",
|
||||
" \n",
|
||||
" \n",
|
||||
"Run particle tracking simulation ...\n",
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -174,7 +174,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.collections.PatchCollection at 0x11d839da0>"
|
||||
"<matplotlib.collections.PatchCollection at 0x127e64198>"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
|
@ -221,7 +221,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.collections.PatchCollection at 0x11ddb0fd0>"
|
||||
"<matplotlib.collections.PatchCollection at 0x1303df518>"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
|
@ -402,9 +402,9 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mf6\n",
|
||||
" MODFLOW 6\n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL\n",
|
||||
" VERSION 6.1.0 12/12/2019\n",
|
||||
" VERSION 6.1.1 06/12/2020\n",
|
||||
"\n",
|
||||
" MODFLOW 6 compiled Dec 13 2019 12:29:49 with IFORT compiler (ver. 19.0.5)\n",
|
||||
" MODFLOW 6 compiled Jun 12 2020 12:02:16 with IFORT compiler (ver. 19.0.5)\n",
|
||||
"\n",
|
||||
"This software has been approved for release by the U.S. Geological \n",
|
||||
"Survey (USGS). Although the software has been subjected to rigorous \n",
|
||||
|
@ -419,14 +419,23 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:47:12\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:41:45\n",
|
||||
" \n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 15:47:12\n",
|
||||
" Elapsed run time: 0.123 Seconds\n",
|
||||
" \n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" \n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:41:45\n",
|
||||
" Elapsed run time: 0.139 Seconds\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"WARNING REPORT:\n",
|
||||
"\n",
|
||||
" 1. NONLINEAR BLOCK VARIABLE 'OUTER_HCLOSE' IN FILE 'mp7p2.ims' WAS\n",
|
||||
" DEPRECATED IN VERSION 6.1.1. SETTING OUTER_DVCLOSE TO OUTER_HCLOSE VALUE.\n",
|
||||
" 2. LINEAR BLOCK VARIABLE 'INNER_HCLOSE' IN FILE 'mp7p2.ims' WAS DEPRECATED\n",
|
||||
" IN VERSION 6.1.1. SETTING INNER_DVCLOSE TO INNER_HCLOSE VALUE.\n",
|
||||
" Normal termination of simulation.\n"
|
||||
]
|
||||
},
|
||||
|
@ -730,7 +739,7 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mp7\n",
|
||||
"\n",
|
||||
"MODPATH Version 7.2.001 \n",
|
||||
"Program compiled Dec 13 2019 12:32:13 with IFORT compiler (ver. 19.0.5) \n",
|
||||
"Program compiled Jun 12 2020 12:05:21 with IFORT compiler (ver. 19.0.5) \n",
|
||||
" \n",
|
||||
" \n",
|
||||
"Run particle tracking simulation ...\n",
|
||||
|
@ -871,7 +880,7 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mp7\n",
|
||||
"\n",
|
||||
"MODPATH Version 7.2.001 \n",
|
||||
"Program compiled Dec 13 2019 12:32:13 with IFORT compiler (ver. 19.0.5) \n",
|
||||
"Program compiled Jun 12 2020 12:05:21 with IFORT compiler (ver. 19.0.5) \n",
|
||||
" \n",
|
||||
" \n",
|
||||
"Run particle tracking simulation ...\n",
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"3.7.7 (default, Mar 26 2020, 10:32:53) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"numpy version: 1.18.5\n",
|
||||
"matplotlib version: 3.2.2\n",
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -74,7 +74,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"modelpth = os.path.join('no3')\n",
|
||||
"modelpth = os.path.join('.', 'temp', 'no3')\n",
|
||||
"modelname = 'no3'\n",
|
||||
"mfexe = 'mfnwt'\n",
|
||||
"mtexe = 'mt3dusgs'\n",
|
||||
|
@ -85,7 +85,7 @@
|
|||
"\n",
|
||||
"# Make sure modelpth directory exists\n",
|
||||
"if not os.path.exists(modelpth):\n",
|
||||
" os.mkdir(modelpth)\n",
|
||||
" os.makedirs(modelpth)\n",
|
||||
"\n",
|
||||
"# Instantiate MODFLOW object in flopy\n",
|
||||
"mf = flopy.modflow.Modflow(modelname=modelname, exe_name=mfexe, model_ws=modelpth, version='mfnwt')"
|
||||
|
@ -898,7 +898,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.3"
|
||||
"version": "3.7.7"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -52,7 +52,7 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"load_ws = os.path.join(\"..\", \"data\", \"options\", \"sagehen\")\n",
|
||||
"model_ws = os.path.join(load_ws, \"output\")"
|
||||
"model_ws = os.path.join(\"temp\", \"nwt_options\", \"output\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -83,8 +83,11 @@
|
|||
" loading finf array...\n",
|
||||
"stress period 2:\n",
|
||||
"\n",
|
||||
"creating model workspace...\n",
|
||||
" temp/nwt_options/output\n",
|
||||
"\n",
|
||||
"changing model workspace...\n",
|
||||
" ../data/options/sagehen/output\n",
|
||||
" temp/nwt_options/output\n",
|
||||
"Something bad happened.\n"
|
||||
]
|
||||
}
|
||||
|
@ -319,9 +322,7 @@
|
|||
" loading thts array...\n",
|
||||
"stress period 1:\n",
|
||||
" loading finf array...\n",
|
||||
"stress period 2:\n",
|
||||
"****Warning -- two packages of the same type: <class 'flopy.modflow.mfuzf1.ModflowUzf1'> <class 'flopy.modflow.mfuzf1.ModflowUzf1'>\n",
|
||||
"replacing existing Package...\n"
|
||||
"stress period 2:\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -602,16 +603,7 @@
|
|||
"cell_type": "code",
|
||||
"execution_count": 20,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"****Warning -- two packages of the same type: <class 'flopy.modflow.mfwel.ModflowWel'> <class 'flopy.modflow.mfwel.ModflowWel'>\n",
|
||||
"replacing existing Package...\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"wel3 = flopy.modflow.ModflowWel(ml, stress_period_data=wel.stress_period_data,\n",
|
||||
" options=options, unitnumber=99)\n",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -23,7 +23,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,12 +24,12 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"Resetting /Users/jdhughes/.flopy/epsgref.json\n",
|
||||
"Resetting /Users/jdhughes/Library/Application Support/flopy/epsgref.json\n",
|
||||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -307,8 +307,8 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"rec.array([('Error', 'DIS', 1, 5, 5, -2.5, 'zero or negative thickness', <flopy.utils.geometry.Polygon object at 0x1286d64e0>),\n",
|
||||
" ('Error', 'DIS', 1, 6, 6, -2.5, 'zero or negative thickness', <flopy.utils.geometry.Polygon object at 0x1286d6668>)],\n",
|
||||
"rec.array([('Error', 'DIS', 1, 5, 5, -2.5, 'zero or negative thickness', <flopy.utils.geometry.Polygon object at 0x123b9d5f8>),\n",
|
||||
" ('Error', 'DIS', 1, 6, 6, -2.5, 'zero or negative thickness', <flopy.utils.geometry.Polygon object at 0x123b73160>)],\n",
|
||||
" dtype=[('type', 'O'), ('package', 'O'), ('k', '<i8'), ('i', '<i8'), ('j', '<i8'), ('value', '<f8'), ('desc', 'O'), ('geometry', 'O')])"
|
||||
]
|
||||
},
|
||||
|
@ -527,7 +527,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Resetting /Users/jdhughes/.flopy/epsgref.json\n"
|
||||
"Resetting /Users/jdhughes/Library/Application Support/flopy/epsgref.json\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -628,7 +628,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.utils.geometry.LineString at 0x12865a208>"
|
||||
"<flopy.utils.geometry.LineString at 0x123cce860>"
|
||||
]
|
||||
},
|
||||
"execution_count": 27,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -495,9 +495,9 @@
|
|||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mf6\n",
|
||||
" MODFLOW 6\n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL\n",
|
||||
" VERSION 6.1.0 12/12/2019\n",
|
||||
" VERSION 6.1.1 06/12/2020\n",
|
||||
"\n",
|
||||
" MODFLOW 6 compiled Dec 13 2019 12:29:49 with IFORT compiler (ver. 19.0.5)\n",
|
||||
" MODFLOW 6 compiled Jun 12 2020 12:02:16 with IFORT compiler (ver. 19.0.5)\n",
|
||||
"\n",
|
||||
"This software has been approved for release by the U.S. Geological \n",
|
||||
"Survey (USGS). Although the software has been subjected to rigorous \n",
|
||||
|
@ -512,14 +512,23 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 16:02:04\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:56:01\n",
|
||||
" \n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 16:02:04\n",
|
||||
" \n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" \n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:56:01\n",
|
||||
" Elapsed run time: 0.021 Seconds\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"WARNING REPORT:\n",
|
||||
"\n",
|
||||
" 1. NONLINEAR BLOCK VARIABLE 'OUTER_HCLOSE' IN FILE 'mf.ims' WAS DEPRECATED\n",
|
||||
" IN VERSION 6.1.1. SETTING OUTER_DVCLOSE TO OUTER_HCLOSE VALUE.\n",
|
||||
" 2. LINEAR BLOCK VARIABLE 'INNER_HCLOSE' IN FILE 'mf.ims' WAS DEPRECATED IN\n",
|
||||
" VERSION 6.1.1. SETTING INNER_DVCLOSE TO INNER_HCLOSE VALUE.\n",
|
||||
" Normal termination of simulation.\n"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"numpy version: 1.17.3\n",
|
||||
"matplotlib version: 3.1.1\n",
|
||||
"pandas version: 0.25.2\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -517,7 +517,7 @@
|
|||
" Version 1.12.00 2/3/2017 \n",
|
||||
"\n",
|
||||
" Using NAME file: UZFtest2.nam \n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 16:02:31\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:56:23\n",
|
||||
"\n",
|
||||
" Solving: Stress period: 1 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 2 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
|
@ -619,16 +619,16 @@
|
|||
" Solving: Stress period: 8 Time step: 7 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 8 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 9 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 10 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 11 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 12 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 13 Ground-Water Flow Eqn.\n"
|
||||
" Solving: Stress period: 8 Time step: 10 Ground-Water Flow Eqn.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Solving: Stress period: 8 Time step: 11 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 12 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 13 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 14 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 8 Time step: 15 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 9 Time step: 1 Ground-Water Flow Eqn.\n",
|
||||
|
@ -691,8 +691,8 @@
|
|||
" Solving: Stress period: 12 Time step: 13 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 12 Time step: 14 Ground-Water Flow Eqn.\n",
|
||||
" Solving: Stress period: 12 Time step: 15 Ground-Water Flow Eqn.\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2019/12/14 16:02:33\n",
|
||||
" Elapsed run time: 2.432 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2020/06/26 9:56:26\n",
|
||||
" Elapsed run time: 2.891 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation\n"
|
||||
]
|
||||
|
@ -861,13 +861,7 @@
|
|||
"(5, 10, b' UZF RECHARGE', 10, 15, -1, 4, 121100.21, 504971.6, 24156966., b'', b'', b'', b'')\n",
|
||||
"(5, 10, b' SURFACE LEAKAGE', 10, 15, -1, 4, 121100.21, 504971.6, 24156966., b'', b'', b'', b'')\n",
|
||||
"(5, 10, b' HORT+DUNN', 10, 15, -1, 4, 121100.21, 504971.6, 24156966., b'', b'', b'', b'')\n",
|
||||
"(5, 10, b' STORAGE CHANGE', 10, 15, -1, 4, 121100.21, 504971.6, 24156966., b'', b'', b'', b'')\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"(5, 10, b' STORAGE CHANGE', 10, 15, -1, 4, 121100.21, 504971.6, 24156966., b'', b'', b'', b'')\n",
|
||||
"(10, 10, b' GW ET', 10, 15, -1, 4, 195033.11, 1318233.4, 24970228., b'', b'', b'', b'')\n",
|
||||
"(10, 10, b' UZF RECHARGE', 10, 15, -1, 4, 195033.11, 1318233.4, 24970228., b'', b'', b'', b'')\n",
|
||||
"(10, 10, b' SURFACE LEAKAGE', 10, 15, -1, 4, 195033.11, 1318233.4, 24970228., b'', b'', b'', b'')\n",
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"flopy is installed in /Users/jdhughes/Documents/Development/flopy_git/flopy_fork/flopy\n",
|
||||
"3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56) \n",
|
||||
"3.7.7 (default, Mar 26 2020, 10:32:53) \n",
|
||||
"[Clang 4.0.1 (tags/RELEASE_401/final)]\n",
|
||||
"flopy version: 3.3.0\n"
|
||||
"flopy version: 3.3.1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -67,9 +67,9 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"# output folder to store the outputs from the notebook\n",
|
||||
"workspace = os.path.join(\".\", \"VTK_EXAMPLE_OUTPUTS\")\n",
|
||||
"workspace = os.path.join(\".\", \"temp\", \"VTK_EXAMPLE_OUTPUTS\")\n",
|
||||
"if not os.path.exists(workspace):\n",
|
||||
" os.mkdir(workspace)"
|
||||
" os.makedirs(workspace)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -248,7 +248,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'./VTK_EXAMPLE_OUTPUTS/model_output_test'"
|
||||
"'./temp/VTK_EXAMPLE_OUTPUTS/model_output_test'"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
|
@ -380,7 +380,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.3"
|
||||
"version": "3.7.7"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,185 +1,185 @@
|
|||
# OAHU island-wide GWRP model
|
||||
# using retarded units (ft) and a coarse test grid
|
||||
# simulating 1 short stress period (eventually steady-state)
|
||||
# simulating 1 layer of volcanic rock referenced to sea level
|
||||
# simulating 50% seawater salinity with SWI2
|
||||
# uses GH relation for initial salinity conditions
|
||||
# apply crude mask of Oahu coastline as ocean boundary
|
||||
# uniform recharge, add 2 wells, and 1 horizontal flow barrier
|
||||
# changed origin of grid in plot to upper left corner.
|
||||
#
|
||||
# uses FLOPY3, modified from FLOPY2 tutorial 2
|
||||
#
|
||||
# Kolja Rotzoll (kolja@usgs.gov), 1/15/2015
|
||||
# ----------------------------------------------------
|
||||
import os
|
||||
import sys
|
||||
import numpy as np
|
||||
from pylab import *
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
flopypath = os.path.join('..', '..')
|
||||
if flopypath not in sys.path:
|
||||
print('Adding to sys.path: ', flopypath)
|
||||
sys.path.append(flopypath)
|
||||
|
||||
import flopy
|
||||
|
||||
workspace = os.path.join('data')
|
||||
#make sure workspace directory exists
|
||||
if not os.path.exists(workspace):
|
||||
os.makedirs(workspace)
|
||||
|
||||
|
||||
# flopy objects
|
||||
modelname = 'Oahu_01'
|
||||
mf = flopy.modflow.Modflow(modelname, exe_name='mf2005', model_ws=workspace)
|
||||
|
||||
# model domain and grid definition
|
||||
ztop = 30. # top of layer (ft rel to msl)
|
||||
botm = -1000. # bottom of layer (ft rel to msl)
|
||||
nlay = 1 # number of layers (z)
|
||||
nrow = 18 # number of rows (y)
|
||||
ncol = 20 # number of columns (x)
|
||||
delr = 16000 # row width of cell, in ft
|
||||
delc = delr # column width of cell, in ft
|
||||
Lx = delr * ncol # length of x model domain, in ft
|
||||
Ly = delc * nrow # length of y model domain, in ft
|
||||
|
||||
# define the stress periods
|
||||
nper = 1
|
||||
ts = 1 # length of time step, in days
|
||||
nstp = 1000 # number of time steps
|
||||
perlen = nstp * ts # length of simulation, in days
|
||||
steady = True # steady state or transient
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay, nrow, ncol, delr=delr, delc=delc,
|
||||
top=ztop, botm=botm, nper=nper,
|
||||
perlen=perlen, nstp=nstp, steady=steady)
|
||||
|
||||
# hydraulic parameters (lpf or bcf)
|
||||
hk = 1500. # horizontal K
|
||||
sy = 0.05 # specific yield
|
||||
ss = 1.e-5 # specific storage
|
||||
layavg = 0 # 0 = harmonic mean, 1 = logarithmic mean,
|
||||
# 2 = arithmetic mean of sat b and log-mean K
|
||||
laytyp = 1 # 0 = confined, 1 = convertible
|
||||
lpf = flopy.modflow.ModflowLpf(mf, hk=hk, sy=sy, ss=ss, laytyp=laytyp, layavg=layavg)
|
||||
laycon = 2 # 0 = confined, 1 = unconfined T varies,
|
||||
# 2 = convertible T const, 3 = convertible T varies
|
||||
|
||||
# water/land interface (now replaced with coarse Oahu coastline)
|
||||
polyg = [(6, 13), (3, 6), (6, 6), (9, 3), (12, 8), (14, 9), (16, 13), (13, 14), (11, 13),
|
||||
(6, 13)] # referenced to row/col
|
||||
px, py = zip(*polyg)
|
||||
colcell, rowcell = meshgrid(range(ncol), range(nrow))
|
||||
mask = Image.new('L', (ncol, nrow), 0)
|
||||
ImageDraw.Draw(mask).polygon(polyg, outline=1, fill=1)
|
||||
index = np.array(mask)
|
||||
|
||||
# BAS package
|
||||
ibound = np.ones((nlay, nrow, ncol), dtype=np.int32) # active cells
|
||||
h_start = np.zeros((nrow, ncol), dtype=float)
|
||||
peak = 15 # maximum expected water level
|
||||
h_start[:, :][index == 1] = peak # starting heads over land
|
||||
h_start[:, :][index == 0] = 0 # starting heads over ocean
|
||||
#print h_start
|
||||
bas = flopy.modflow.ModflowBas(mf, ibound=ibound, strt=h_start)
|
||||
|
||||
# general head boundary
|
||||
nghb = ncol * nrow - np.sum(index)
|
||||
lrchc = np.zeros((nghb, 5))
|
||||
lrchc[:, 0] = 0
|
||||
lrchc[:, 1] = rowcell[index == 0]
|
||||
lrchc[:, 2] = colcell[index == 0]
|
||||
lrchc[:, 3] = 0.
|
||||
lrchc[:, 4] = hk * 10
|
||||
#print lrchc
|
||||
ghb = flopy.modflow.ModflowGhb(mf, stress_period_data={0: lrchc})
|
||||
|
||||
# recharge & withdrawal
|
||||
Recharge = 600 * 133680.56 # Total recharge over the island, in ft^3/d
|
||||
nrech = np.sum(index)
|
||||
lrcq = np.zeros((nrech, 4))
|
||||
lrcq[:, 0] = 0
|
||||
lrcq[:, 1] = rowcell[index == 1]
|
||||
lrcq[:, 2] = colcell[index == 1]
|
||||
lrcq[:, 3] = Recharge / nrech
|
||||
lrcq = np.vstack((lrcq, [0, 8, 7, -90 * 133680], [0, 10, 9, -80 * 133680])) # add wells (row/col, zero-based)
|
||||
#print lrcq
|
||||
wel = flopy.modflow.ModflowWel(mf, stress_period_data={0: lrcq})
|
||||
|
||||
# horizontal flow barrier
|
||||
nhfb = 12
|
||||
lrcrch = np.zeros((nhfb, 6))
|
||||
lrcrch[:, 0] = 0 # layer
|
||||
lrcrch[:, 1] = arange(2, nhfb + 2) # row 1
|
||||
lrcrch[:, 2] = ones(nhfb) * (ncol / 2 - 1) # col 1
|
||||
lrcrch[:, 3] = arange(2, nhfb + 2) # row 2
|
||||
lrcrch[:, 4] = ones(nhfb) * (ncol / 2) # col 2
|
||||
lrcrch[:, 5] = 0.000001 # hydrologic characteristics
|
||||
#print lrcrch
|
||||
hfb = flopy.modflow.ModflowHfb(mf, hfb_data=lrcrch)
|
||||
|
||||
# SWI input
|
||||
z1 = np.zeros((nrow, ncol))
|
||||
z1[index == 1] = peak * (-40) # 50% salinity from starting head
|
||||
z = array([z1]) # zeta interfaces
|
||||
#print z
|
||||
iso = np.zeros((nrow, ncol), dtype=np.int32) # water type of sinks and sources
|
||||
iso[:, :][index == 1] = 1 # land
|
||||
iso[:, :][index == 0] = -2 # ocean (ghb)
|
||||
#print iso
|
||||
swi = flopy.modflow.ModflowSwi2(mf, nsrf=1, istrat=1, toeslope=0.04, tipslope=0.04,
|
||||
nu=[0, 0.025], zeta=z, ssz=0.05, isource=iso, nsolver=1)
|
||||
|
||||
# output control & solver
|
||||
spd = {(0, 0): ['print head'],
|
||||
(0, 1): [],
|
||||
(0, 249): ['print head'],
|
||||
(0, 250): [],
|
||||
(0, 499): ['print head', 'save ibound'],
|
||||
(0, 500): [],
|
||||
(0, 749): ['print head', 'ddreference'],
|
||||
(0, 750): [],
|
||||
(0, 999): ['print head']}
|
||||
#oc = flopy.modflow.ModflowOc(mf, stress_period_data=spd, cboufm='(20i5)')
|
||||
oc = flopy.modflow.ModflowOc88(mf, save_head_every=100,
|
||||
item2=[[0, 1, 0, 0]], item3=[[0, 1, 0, 0]])
|
||||
pcg = flopy.modflow.ModflowPcg(mf, hclose=1.0e-4, rclose=5.0e-0) # pre-conjugate gradient solver
|
||||
#de4 = flopy.modflow.ModflowDe4(mf, itmx=1, hclose=1e-5) # direct solver
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
# write the model input files
|
||||
mf.write_input()
|
||||
|
||||
print('\n\nfinished write...\n')
|
||||
|
||||
m2 = flopy.modflow.Modflow.load(modelname, exe_name='mf2005', model_ws=workspace, verbose=True)
|
||||
|
||||
print('\nfinished read...\n')
|
||||
|
||||
oc2 = m2.get_package('OC')
|
||||
|
||||
#print(oc2.stress_period_data.keys())
|
||||
|
||||
oc2.write_file()
|
||||
|
||||
ax = m2.plot(colorbar=True)
|
||||
print(len(ax))
|
||||
plt.show()
|
||||
|
||||
#m2.dis.plot(colorbar=True)
|
||||
#plt.show()
|
||||
|
||||
#m2.lpf.plot(colorbar=True)
|
||||
#plt.show()
|
||||
|
||||
#m2.ghb.plot(key='cond', colorbar=True, masked_values=[0])
|
||||
#plt.show()
|
||||
|
||||
#m2.ghb.plot()
|
||||
#plt.show()
|
||||
|
||||
print('\nthis is the end...my friend\n')
|
||||
|
||||
|
||||
# OAHU island-wide GWRP model
|
||||
# using retarded units (ft) and a coarse test grid
|
||||
# simulating 1 short stress period (eventually steady-state)
|
||||
# simulating 1 layer of volcanic rock referenced to sea level
|
||||
# simulating 50% seawater salinity with SWI2
|
||||
# uses GH relation for initial salinity conditions
|
||||
# apply crude mask of Oahu coastline as ocean boundary
|
||||
# uniform recharge, add 2 wells, and 1 horizontal flow barrier
|
||||
# changed origin of grid in plot to upper left corner.
|
||||
#
|
||||
# uses FLOPY3, modified from FLOPY2 tutorial 2
|
||||
#
|
||||
# Kolja Rotzoll (kolja@usgs.gov), 1/15/2015
|
||||
# ----------------------------------------------------
|
||||
import os
|
||||
import sys
|
||||
import numpy as np
|
||||
from pylab import *
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
flopypath = os.path.join('..', '..')
|
||||
if flopypath not in sys.path:
|
||||
print('Adding to sys.path: ', flopypath)
|
||||
sys.path.append(flopypath)
|
||||
|
||||
import flopy
|
||||
|
||||
workspace = os.path.join('data')
|
||||
#make sure workspace directory exists
|
||||
if not os.path.exists(workspace):
|
||||
os.makedirs(workspace)
|
||||
|
||||
|
||||
# flopy objects
|
||||
modelname = 'Oahu_01'
|
||||
mf = flopy.modflow.Modflow(modelname, exe_name='mf2005', model_ws=workspace)
|
||||
|
||||
# model domain and grid definition
|
||||
ztop = 30. # top of layer (ft rel to msl)
|
||||
botm = -1000. # bottom of layer (ft rel to msl)
|
||||
nlay = 1 # number of layers (z)
|
||||
nrow = 18 # number of rows (y)
|
||||
ncol = 20 # number of columns (x)
|
||||
delr = 16000 # row width of cell, in ft
|
||||
delc = delr # column width of cell, in ft
|
||||
Lx = delr * ncol # length of x model domain, in ft
|
||||
Ly = delc * nrow # length of y model domain, in ft
|
||||
|
||||
# define the stress periods
|
||||
nper = 1
|
||||
ts = 1 # length of time step, in days
|
||||
nstp = 1000 # number of time steps
|
||||
perlen = nstp * ts # length of simulation, in days
|
||||
steady = True # steady state or transient
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay, nrow, ncol, delr=delr, delc=delc,
|
||||
top=ztop, botm=botm, nper=nper,
|
||||
perlen=perlen, nstp=nstp, steady=steady)
|
||||
|
||||
# hydraulic parameters (lpf or bcf)
|
||||
hk = 1500. # horizontal K
|
||||
sy = 0.05 # specific yield
|
||||
ss = 1.e-5 # specific storage
|
||||
layavg = 0 # 0 = harmonic mean, 1 = logarithmic mean,
|
||||
# 2 = arithmetic mean of sat b and log-mean K
|
||||
laytyp = 1 # 0 = confined, 1 = convertible
|
||||
lpf = flopy.modflow.ModflowLpf(mf, hk=hk, sy=sy, ss=ss, laytyp=laytyp, layavg=layavg)
|
||||
laycon = 2 # 0 = confined, 1 = unconfined T varies,
|
||||
# 2 = convertible T const, 3 = convertible T varies
|
||||
|
||||
# water/land interface (now replaced with coarse Oahu coastline)
|
||||
polyg = [(6, 13), (3, 6), (6, 6), (9, 3), (12, 8), (14, 9), (16, 13), (13, 14), (11, 13),
|
||||
(6, 13)] # referenced to row/col
|
||||
px, py = zip(*polyg)
|
||||
colcell, rowcell = meshgrid(range(ncol), range(nrow))
|
||||
mask = Image.new('L', (ncol, nrow), 0)
|
||||
ImageDraw.Draw(mask).polygon(polyg, outline=1, fill=1)
|
||||
index = np.array(mask)
|
||||
|
||||
# BAS package
|
||||
ibound = np.ones((nlay, nrow, ncol), dtype=np.int32) # active cells
|
||||
h_start = np.zeros((nrow, ncol), dtype=float)
|
||||
peak = 15 # maximum expected water level
|
||||
h_start[:, :][index == 1] = peak # starting heads over land
|
||||
h_start[:, :][index == 0] = 0 # starting heads over ocean
|
||||
#print h_start
|
||||
bas = flopy.modflow.ModflowBas(mf, ibound=ibound, strt=h_start)
|
||||
|
||||
# general head boundary
|
||||
nghb = ncol * nrow - np.sum(index)
|
||||
lrchc = np.zeros((nghb, 5))
|
||||
lrchc[:, 0] = 0
|
||||
lrchc[:, 1] = rowcell[index == 0]
|
||||
lrchc[:, 2] = colcell[index == 0]
|
||||
lrchc[:, 3] = 0.
|
||||
lrchc[:, 4] = hk * 10
|
||||
#print lrchc
|
||||
ghb = flopy.modflow.ModflowGhb(mf, stress_period_data={0: lrchc})
|
||||
|
||||
# recharge & withdrawal
|
||||
Recharge = 600 * 133680.56 # Total recharge over the island, in ft^3/d
|
||||
nrech = np.sum(index)
|
||||
lrcq = np.zeros((nrech, 4))
|
||||
lrcq[:, 0] = 0
|
||||
lrcq[:, 1] = rowcell[index == 1]
|
||||
lrcq[:, 2] = colcell[index == 1]
|
||||
lrcq[:, 3] = Recharge / nrech
|
||||
lrcq = np.vstack((lrcq, [0, 8, 7, -90 * 133680], [0, 10, 9, -80 * 133680])) # add wells (row/col, zero-based)
|
||||
#print lrcq
|
||||
wel = flopy.modflow.ModflowWel(mf, stress_period_data={0: lrcq})
|
||||
|
||||
# horizontal flow barrier
|
||||
nhfb = 12
|
||||
lrcrch = np.zeros((nhfb, 6))
|
||||
lrcrch[:, 0] = 0 # layer
|
||||
lrcrch[:, 1] = arange(2, nhfb + 2) # row 1
|
||||
lrcrch[:, 2] = ones(nhfb) * (ncol / 2 - 1) # col 1
|
||||
lrcrch[:, 3] = arange(2, nhfb + 2) # row 2
|
||||
lrcrch[:, 4] = ones(nhfb) * (ncol / 2) # col 2
|
||||
lrcrch[:, 5] = 0.000001 # hydrologic characteristics
|
||||
#print lrcrch
|
||||
hfb = flopy.modflow.ModflowHfb(mf, hfb_data=lrcrch)
|
||||
|
||||
# SWI input
|
||||
z1 = np.zeros((nrow, ncol))
|
||||
z1[index == 1] = peak * (-40) # 50% salinity from starting head
|
||||
z = array([z1]) # zeta interfaces
|
||||
#print z
|
||||
iso = np.zeros((nrow, ncol), dtype=np.int32) # water type of sinks and sources
|
||||
iso[:, :][index == 1] = 1 # land
|
||||
iso[:, :][index == 0] = -2 # ocean (ghb)
|
||||
#print iso
|
||||
swi = flopy.modflow.ModflowSwi2(mf, nsrf=1, istrat=1, toeslope=0.04, tipslope=0.04,
|
||||
nu=[0, 0.025], zeta=z, ssz=0.05, isource=iso, nsolver=1)
|
||||
|
||||
# output control & solver
|
||||
spd = {(0, 0): ['print head'],
|
||||
(0, 1): [],
|
||||
(0, 249): ['print head'],
|
||||
(0, 250): [],
|
||||
(0, 499): ['print head', 'save ibound'],
|
||||
(0, 500): [],
|
||||
(0, 749): ['print head', 'ddreference'],
|
||||
(0, 750): [],
|
||||
(0, 999): ['print head']}
|
||||
#oc = flopy.modflow.ModflowOc(mf, stress_period_data=spd, cboufm='(20i5)')
|
||||
oc = flopy.modflow.ModflowOc88(mf, save_head_every=100,
|
||||
item2=[[0, 1, 0, 0]], item3=[[0, 1, 0, 0]])
|
||||
pcg = flopy.modflow.ModflowPcg(mf, hclose=1.0e-4, rclose=5.0e-0) # pre-conjugate gradient solver
|
||||
#de4 = flopy.modflow.ModflowDe4(mf, itmx=1, hclose=1e-5) # direct solver
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
# write the model input files
|
||||
mf.write_input()
|
||||
|
||||
print('\n\nfinished write...\n')
|
||||
|
||||
m2 = flopy.modflow.Modflow.load(modelname, exe_name='mf2005', model_ws=workspace, verbose=True)
|
||||
|
||||
print('\nfinished read...\n')
|
||||
|
||||
oc2 = m2.get_package('OC')
|
||||
|
||||
#print(oc2.stress_period_data.keys())
|
||||
|
||||
oc2.write_file()
|
||||
|
||||
ax = m2.plot(colorbar=True)
|
||||
print(len(ax))
|
||||
plt.show()
|
||||
|
||||
#m2.dis.plot(colorbar=True)
|
||||
#plt.show()
|
||||
|
||||
#m2.lpf.plot(colorbar=True)
|
||||
#plt.show()
|
||||
|
||||
#m2.ghb.plot(key='cond', colorbar=True, masked_values=[0])
|
||||
#plt.show()
|
||||
|
||||
#m2.ghb.plot()
|
||||
#plt.show()
|
||||
|
||||
print('\nthis is the end...my friend\n')
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import flopy
|
|||
# Assign name and create modflow model object
|
||||
modelname = 'units'
|
||||
mf = flopy.modflow.Modflow(modelname, exe_name='mf2005', model_ws=os.path.join('data'))
|
||||
cbc_unit_nb = 1053
|
||||
|
||||
# Model domain and grid definition
|
||||
Lx = 1000.
|
||||
|
@ -34,10 +35,10 @@ strt[:, :, -1] = 0.
|
|||
bas = flopy.modflow.ModflowBas(mf, ibound=ibound, strt=strt)
|
||||
|
||||
# Add LPF package to the MODFLOW model
|
||||
lpf = flopy.modflow.ModflowLpf(mf, hk=10., vka=10.)
|
||||
lpf = flopy.modflow.ModflowLpf(mf, hk=10., vka=10., ipakcb=cbc_unit_nb)
|
||||
|
||||
# add well
|
||||
wel = flopy.modflow.ModflowWel(mf, ipakcb=1053, stress_period_data={0:[0, 4, 4, -100.]})
|
||||
wel = flopy.modflow.ModflowWel(mf, ipakcb=cbc_unit_nb, stress_period_data={0:[0, 4, 4, -100.]})
|
||||
|
||||
# Add OC package to the MODFLOW model
|
||||
spd = {(0, 0): ['print head', 'print budget', 'save head', 'save budget']}
|
||||
|
|
|
@ -0,0 +1,567 @@
|
|||
# AG options
|
||||
options
|
||||
etdemand
|
||||
irrigation_diversion 1 6
|
||||
supplemental_well 6 1
|
||||
irrigation_well 6 1
|
||||
maxwells 6
|
||||
diversionlist -2
|
||||
welllist -2
|
||||
wellirrlist -2
|
||||
diversionirrlist -2
|
||||
timeseries_well
|
||||
timeseries_diversion
|
||||
timeseries_diversionet
|
||||
end
|
||||
# AG time series
|
||||
time series
|
||||
well 5 105
|
||||
diversion 9 107
|
||||
diversionet 9 108
|
||||
end
|
||||
# AG segment list
|
||||
segment list
|
||||
9
|
||||
end
|
||||
# AG well list
|
||||
well list
|
||||
1 6 4 -100.00
|
||||
1 6 5 -100.00
|
||||
1 7 4 -100.00
|
||||
1 7 5 -100.00
|
||||
1 8 4 -100.00
|
||||
1 8 5 -100.00
|
||||
end
|
||||
# AG stress period
|
||||
stress period 1
|
||||
IRRdiversion
|
||||
0
|
||||
IRRWELL
|
||||
0
|
||||
SUPWELL
|
||||
0
|
||||
END
|
||||
stress period 2
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 3
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 4
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 5
|
||||
IRRdiversion
|
||||
1 NUMIRRSEGSP
|
||||
9 6 0.0 0.0 #SEGID NUMCELLSEG IRRPERIODSEG TRIGGERFACTSEG
|
||||
6 4 0.0 0.16667 IRRROW IRRCOL EFF_FACT FIELD_FACT
|
||||
6 5 0.0 0.16667
|
||||
7 4 0.0 0.16667
|
||||
7 5 0.0 0.16667
|
||||
8 4 0.0 0.16667
|
||||
8 5 0.0 0.16667
|
||||
IRRWELL
|
||||
6
|
||||
1 1 0.0 0.0 #IRRWELLLID NUMCELLWELL IRRPERIODWELL TRIGGERPERIODWELL
|
||||
6 4 0.0 1.0 IRRROW IRRCOL EFF_FACT FIELD_FACT
|
||||
2 1
|
||||
6 5 0.0 1.0
|
||||
3 1
|
||||
7 4 0.0 1.0
|
||||
4 1
|
||||
7 5 0.0 1.0
|
||||
5 1
|
||||
8 4 0.0 1.0
|
||||
6 1
|
||||
8 5 0.0 1.0
|
||||
SUPWELL
|
||||
6 NUMSUPWELLLSP
|
||||
1 1 SUPWELLLNUM NUMSEGWELL
|
||||
9 1.0 1.0 #SEGWELLID FACSUP FACSUPMAX
|
||||
2 1
|
||||
9 1.0 1.0
|
||||
3 1
|
||||
9 1.0 1.0
|
||||
4 1
|
||||
9 1.0 1.0
|
||||
5 1
|
||||
9 1.0 1.0
|
||||
6 1
|
||||
9 1.0 1.0
|
||||
end
|
||||
stress period 6
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 7
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 8
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 9
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 10
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 11
|
||||
IRRdiversion
|
||||
0
|
||||
IRRWELL
|
||||
0
|
||||
SUPWELL
|
||||
0
|
||||
END
|
||||
stress period 12
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 13
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 14
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 15
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 16
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 17
|
||||
IRRdiversion
|
||||
1 NUMIRRSEGSP
|
||||
9 6 0.0 0.0 #SEGID NUMCELLSEG IRRPERIODSEG TRIGGERFACTSEG
|
||||
6 4 0.0 0.16667 IRRROW IRRCOL EFF_FACT FIELD_FACT
|
||||
6 5 0.0 0.16667
|
||||
7 4 0.0 0.16667
|
||||
7 5 0.0 0.16667
|
||||
8 4 0.0 0.16667
|
||||
8 5 0.0 0.16667
|
||||
IRRWELL
|
||||
6
|
||||
1 1 0.0 0.0 #IRRWELLLID NUMCELLWELL IRRPERIODWELL TRIGGERPERIODWELL
|
||||
6 4 0.0 1.0 IRRROW IRRCOL EFF_FACT FIELD_FACT
|
||||
2 1
|
||||
6 5 0.0 1.0
|
||||
3 1
|
||||
7 4 0.0 1.0
|
||||
4 1
|
||||
7 5 0.0 1.0
|
||||
5 1
|
||||
8 4 0.0 1.0
|
||||
6 1
|
||||
8 5 0.0 1.0
|
||||
SUPWELL
|
||||
6 NUMSUPWELLLSP
|
||||
1 1 SUPWELLLNUM NUMSEGWELL
|
||||
9 1.0 1.0 #SEGWELLID FACSUP FACSUPMAX
|
||||
2 1
|
||||
9 1.0 1.0
|
||||
3 1
|
||||
9 1.0 1.0
|
||||
4 1
|
||||
9 1.0 1.0
|
||||
5 1
|
||||
9 1.0 1.0
|
||||
6 1
|
||||
9 1.0 1.0
|
||||
end
|
||||
stress period 18
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 19
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 20
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 21
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 22
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 23
|
||||
IRRdiversion
|
||||
0
|
||||
IRRWELL
|
||||
0
|
||||
SUPWELL
|
||||
0
|
||||
END
|
||||
stress period 24
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 25
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 26
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 27
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 28
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 29
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 30
|
||||
IRRdiversion
|
||||
1 NUMIRRSEGSP
|
||||
9 6 0.0 0.0 #SEGID NUMCELLSEG IRRPERIODSEG TRIGGERFACTSEG
|
||||
6 4 0.0 0.16667 IRRROW IRRCOL EFF_FACT FIELD_FACT
|
||||
6 5 0.0 0.16667
|
||||
7 4 0.0 0.16667
|
||||
7 5 0.0 0.16667
|
||||
8 4 0.0 0.16667
|
||||
8 5 0.0 0.16667
|
||||
IRRWELL
|
||||
6
|
||||
1 1 0.0 0.0 #IRRWELLLID NUMCELLWELL IRRPERIODWELL TRIGGERPERIODWELL
|
||||
6 4 0.0 1.0 IRRROW IRRCOL EFF_FACT FIELD_FACT
|
||||
2 1
|
||||
6 5 0.0 1.0
|
||||
3 1
|
||||
7 4 0.0 1.0
|
||||
4 1
|
||||
7 5 0.0 1.0
|
||||
5 1
|
||||
8 4 0.0 1.0
|
||||
6 1
|
||||
8 5 0.0 1.0
|
||||
SUPWELL
|
||||
6 NUMSUPWELLLSP
|
||||
1 1 SUPWELLLNUM NUMSEGWELL
|
||||
9 1.0 1.0 #SEGWELLID FACSUP FACSUPMAX
|
||||
2 1
|
||||
9 1.0 1.0
|
||||
3 1
|
||||
9 1.0 1.0
|
||||
4 1
|
||||
9 1.0 1.0
|
||||
5 1
|
||||
9 1.0 1.0
|
||||
6 1
|
||||
9 1.0 1.0
|
||||
end
|
||||
stress period 31
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 32
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 33
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 34
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 35
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 36
|
||||
IRRdiversion
|
||||
0
|
||||
IRRWELL
|
||||
0
|
||||
SUPWELL
|
||||
0
|
||||
END
|
||||
stress period 37
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 38
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 39
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 40
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 41
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 42
|
||||
IRRdiversion
|
||||
1 NUMIRRSEGSP
|
||||
9 6 0.0 0.0 #SEGID NUMCELLSEG IRRPERIODSEG TRIGGERFACTSEG
|
||||
6 4 0.0 0.16667 IRRROW IRRCOL EFF_FACT FIELD_FACT
|
||||
6 5 0.0 0.16667
|
||||
7 4 0.0 0.16667
|
||||
7 5 0.0 0.16667
|
||||
8 4 0.0 0.16667
|
||||
8 5 0.0 0.16667
|
||||
IRRWELL
|
||||
6
|
||||
1 1 0.0 0.0 #IRRWELLLID NUMCELLWELL IRRPERIODWELL TRIGGERPERIODWELL
|
||||
6 4 0.0 1.0 IRRROW IRRCOL EFF_FACT FIELD_FACT
|
||||
2 1
|
||||
6 5 0.0 1.0
|
||||
3 1
|
||||
7 4 0.0 1.0
|
||||
4 1
|
||||
7 5 0.0 1.0
|
||||
5 1
|
||||
8 4 0.0 1.0
|
||||
6 1
|
||||
8 5 0.0 1.0
|
||||
SUPWELL
|
||||
6 NUMSUPWELLLSP
|
||||
1 1 SUPWELLLNUM NUMSEGWELL
|
||||
9 1.0 1.0 #SEGWELLID FACSUP FACSUPMAX
|
||||
2 1
|
||||
9 1.0 1.0
|
||||
3 1
|
||||
9 1.0 1.0
|
||||
4 1
|
||||
9 1.0 1.0
|
||||
5 1
|
||||
9 1.0 1.0
|
||||
6 1
|
||||
9 1.0 1.0
|
||||
end
|
||||
stress period 43
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 44
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 45
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 46
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 47
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 48
|
||||
IRRdiversion
|
||||
0
|
||||
IRRWELL
|
||||
0
|
||||
SUPWELL
|
||||
0
|
||||
END
|
||||
stress period 49
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 50
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
||||
stress period 51
|
||||
IRRdiversion
|
||||
-1
|
||||
IRRWELL
|
||||
-1
|
||||
SUPWELL
|
||||
-1
|
||||
END
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
1 1 1 1 4500. 12 8.6767896E-04 1093.048 3.0 0.00003 0.03 1 1.0 0
|
||||
2 1 2 2 7000. 12 8.6767896E-04 1088.059 3.0 0.00003 0.03 2 1.0 0
|
||||
2 None 7000. 12 8.6767896E-04 1088.059 3.0 0.00003 0.03 2 1.0 0
|
||||
3 1 3 3 6000. 12 8.6767896E-04 1082.419 3.0 0.00003 0.03 2 1.0 0
|
||||
4 1 3 4 5550. 12 8.6767896E-04 1077.408 3.0 0.00003 0.03 3 1.0 1
|
||||
5 1 4 5 6500. 12 9.4339624E-04 1071.934 3.0 0.00003 0.03 2 1.0 0
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# comment
|
||||
3 1 1 -25.0000000
|
||||
3 1 10 -25.0000000
|
|
@ -9,6 +9,5 @@ BEGIN Dimensions
|
|||
END Dimensions
|
||||
|
||||
BEGIN Period 1
|
||||
3 1 1 -25.0000000
|
||||
3 1 10 -25.0000000
|
||||
OPEN/CLOSE 'chd_spd.txt'
|
||||
END Period
|
||||
|
|
|
@ -4,6 +4,7 @@ Begin options
|
|||
boundnames
|
||||
PRINT_FLOWS
|
||||
OBS6 FILEIN test001e_UZF_3lay.obs
|
||||
BUDGET FILEOUT test001e_UZF_3lay.uzf.cbc
|
||||
SIMULATE_GWSEEP
|
||||
SIMULATE_ET
|
||||
LINEAR_GWET
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,296 @@
|
|||
MODFLOW 6
|
||||
U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL
|
||||
GROUNDWATER FLOW MODEL (GWF)
|
||||
VERSION 6.0.4 03/13/2019
|
||||
|
||||
MODFLOW 6 compiled Mar 14 2019 09:20:00 with GFORTRAN compiler (ver. 8.2.0)
|
||||
|
||||
This software has been approved for release by the U.S. Geological
|
||||
Survey (USGS). Although the software has been subjected to rigorous
|
||||
review, the USGS reserves the right to update the software as needed
|
||||
pursuant to further analysis and review. No warranty, expressed or
|
||||
implied, is made by the USGS or the U.S. Government as to the
|
||||
functionality of the software and related material nor shall the
|
||||
fact of release constitute any such warranty. Furthermore, the
|
||||
software is released on condition that neither the USGS nor the U.S.
|
||||
Government shall be held liable for any damages resulting from its
|
||||
authorized or unauthorized use. Also refer to the USGS Water
|
||||
Resources Software User Rights Notice for complete use, copyright,
|
||||
and distribution information.
|
||||
|
||||
|
||||
MODFLOW was compiled using uniform precision.
|
||||
Precision of REAL variables: 15
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.ic
|
||||
FILE TYPE:IC6 UNIT 1005 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.npf
|
||||
FILE TYPE:NPF6 UNIT 1006 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.wel
|
||||
FILE TYPE:WEL6 UNIT 1007 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.riv
|
||||
FILE TYPE:RIV6 UNIT 1008 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal_1.rch
|
||||
FILE TYPE:RCH6 UNIT 1009 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal_2.rch
|
||||
FILE TYPE:RCH6 UNIT 1010 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal_3.rch
|
||||
FILE TYPE:RCH6 UNIT 1011 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.oc
|
||||
FILE TYPE:OC6 UNIT 1012 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.dis
|
||||
FILE TYPE:DIS6 UNIT 1013 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.ghb
|
||||
FILE TYPE:GHB6 UNIT 1014 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.sto
|
||||
FILE TYPE:STO6 UNIT 1015 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.evt
|
||||
FILE TYPE:EVT6 UNIT 1016 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
OPENED AdvGW_tidal.obs
|
||||
FILE TYPE:OBS6 UNIT 1017 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
VOLUME BUDGET FOR ENTIRE MODEL AT END OF TIME STEP 1, STRESS PERIOD 1
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
CUMULATIVE VOLUME L**3 RATES FOR THIS TIME STEP L**3/T PACKAGE NAME
|
||||
------------------ ------------------------ ----------------
|
||||
|
||||
IN: IN:
|
||||
--- ---
|
||||
STO-SS = 0.0000 STO-SS = 0.0000 STORAGE
|
||||
STO-SY = 0.0000 STO-SY = 0.0000 STORAGE
|
||||
WEL = 0.0000 WEL = 0.0000 WEL
|
||||
RIV = 19677.9327 RIV = 19677.9327 RIV
|
||||
GHB = 0.0000 GHB = 0.0000 GHB-TIDAL
|
||||
RCH = 30750.0000 RCH = 30750.0000 RCH-ZONE_1
|
||||
RCH = 6800.0000 RCH = 6800.0000 RCH-ZONE_2
|
||||
RCH = 24050.0000 RCH = 24050.0000 RCH-ZONE_3
|
||||
EVT = 0.0000 EVT = 0.0000 EVT
|
||||
|
||||
TOTAL IN = 81277.9327 TOTAL IN = 81277.9327
|
||||
|
||||
OUT: OUT:
|
||||
---- ----
|
||||
STO-SS = 0.0000 STO-SS = 0.0000 STORAGE
|
||||
STO-SY = 0.0000 STO-SY = 0.0000 STORAGE
|
||||
WEL = 0.0000 WEL = 0.0000 WEL
|
||||
RIV = 4891.5846 RIV = 4891.5846 RIV
|
||||
GHB = 76116.3012 GHB = 76116.3012 GHB-TIDAL
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_1
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_2
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_3
|
||||
EVT = 270.0459 EVT = 270.0459 EVT
|
||||
|
||||
TOTAL OUT = 81277.9317 TOTAL OUT = 81277.9317
|
||||
|
||||
IN - OUT = 1.0332E-03 IN - OUT = 1.0332E-03
|
||||
|
||||
PERCENT DISCREPANCY = 0.00 PERCENT DISCREPANCY = 0.00
|
||||
|
||||
|
||||
|
||||
|
||||
TIME SUMMARY AT END OF TIME STEP 1 IN STRESS PERIOD 1
|
||||
SECONDS MINUTES HOURS DAYS YEARS
|
||||
-----------------------------------------------------------
|
||||
TIME STEP LENGTH 86400. 1440.0 24.000 1.0000 2.73785E-03
|
||||
STRESS PERIOD TIME 86400. 1440.0 24.000 1.0000 2.73785E-03
|
||||
TOTAL TIME 86400. 1440.0 24.000 1.0000 2.73785E-03
|
||||
|
||||
VOLUME BUDGET FOR ENTIRE MODEL AT END OF TIME STEP 120, STRESS PERIOD 2
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
CUMULATIVE VOLUME L**3 RATES FOR THIS TIME STEP L**3/T PACKAGE NAME
|
||||
------------------ ------------------------ ----------------
|
||||
|
||||
IN: IN:
|
||||
--- ---
|
||||
STO-SS = 45634.5133 STO-SS = 53.4129 STORAGE
|
||||
STO-SY = 85658.9163 STO-SY = 8692.4699 STORAGE
|
||||
WEL = 0.0000 WEL = 0.0000 WEL
|
||||
RIV = 521527.7300 RIV = 28541.3439 RIV
|
||||
GHB = 0.0000 GHB = 0.0000 GHB-TIDAL
|
||||
RCH = 235750.0000 RCH = 20500.0000 RCH-ZONE_1
|
||||
RCH = 80800.0000 RCH = 7598.3333 RCH-ZONE_2
|
||||
RCH = 264550.0000 RCH = 22116.2500 RCH-ZONE_3
|
||||
EVT = 0.0000 EVT = 0.0000 EVT
|
||||
|
||||
TOTAL IN = 1233921.1596 TOTAL IN = 87501.8100
|
||||
|
||||
OUT: OUT:
|
||||
---- ----
|
||||
STO-SS = 46352.6550 STO-SS = 14308.0596 STORAGE
|
||||
STO-SY = 336599.3388 STO-SY = 10116.9414 STORAGE
|
||||
WEL = 2500.0000 WEL = 250.0000 WEL
|
||||
RIV = 6829.5406 RIV = 2028.7842 RIV
|
||||
GHB = 838630.3721 GHB = 60521.4761 GHB-TIDAL
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_1
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_2
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_3
|
||||
EVT = 3009.2429 EVT = 276.5487 EVT
|
||||
|
||||
TOTAL OUT = 1233921.1494 TOTAL OUT = 87501.8100
|
||||
|
||||
IN - OUT = 1.0215E-02 IN - OUT = 1.3167E-05
|
||||
|
||||
PERCENT DISCREPANCY = 0.00 PERCENT DISCREPANCY = 0.00
|
||||
|
||||
|
||||
|
||||
|
||||
TIME SUMMARY AT END OF TIME STEP 120 IN STRESS PERIOD 2
|
||||
SECONDS MINUTES HOURS DAYS YEARS
|
||||
-----------------------------------------------------------
|
||||
TIME STEP LENGTH 7200.0 120.00 2.0000 8.33333E-02 2.28154E-04
|
||||
STRESS PERIOD TIME 8.64000E+05 14400. 240.00 10.000 2.73785E-02
|
||||
TOTAL TIME 9.50400E+05 15840. 264.00 11.000 3.01164E-02
|
||||
|
||||
VOLUME BUDGET FOR ENTIRE MODEL AT END OF TIME STEP 120, STRESS PERIOD 3
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
CUMULATIVE VOLUME L**3 RATES FOR THIS TIME STEP L**3/T PACKAGE NAME
|
||||
------------------ ------------------------ ----------------
|
||||
|
||||
IN: IN:
|
||||
--- ---
|
||||
STO-SS = 92326.1229 STO-SS = 13063.9452 STORAGE
|
||||
STO-SY = 142015.7165 STO-SY = 8904.1423 STORAGE
|
||||
WEL = 0.0000 WEL = 0.0000 WEL
|
||||
RIV = 719514.5899 RIV = 19131.2997 RIV
|
||||
GHB = 0.0000 GHB = 0.0000 GHB-TIDAL
|
||||
RCH = 543250.0000 RCH = 30750.0000 RCH-ZONE_1
|
||||
RCH = 150800.0000 RCH = 6405.0000 RCH-ZONE_2
|
||||
RCH = 492050.0000 RCH = 23394.5833 RCH-ZONE_3
|
||||
EVT = 0.0000 EVT = 0.0000 EVT
|
||||
|
||||
TOTAL IN = 2139956.4293 TOTAL IN = 101648.9705
|
||||
|
||||
OUT: OUT:
|
||||
---- ----
|
||||
STO-SS = 91010.2622 STO-SS = 16.2689 STORAGE
|
||||
STO-SY = 368213.1394 STO-SY = 2025.1984 STORAGE
|
||||
WEL = 25500.0000 WEL = 2300.0000 WEL
|
||||
RIV = 53227.3651 RIV = 5928.1102 RIV
|
||||
GHB = 1596232.3720 GHB = 91103.3212 GHB-TIDAL
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_1
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_2
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_3
|
||||
EVT = 5773.2782 EVT = 276.0718 EVT
|
||||
|
||||
TOTAL OUT = 2139956.4170 TOTAL OUT = 101648.9705
|
||||
|
||||
IN - OUT = 1.2296E-02 IN - OUT = 6.8287E-05
|
||||
|
||||
PERCENT DISCREPANCY = 0.00 PERCENT DISCREPANCY = 0.00
|
||||
|
||||
|
||||
|
||||
|
||||
TIME SUMMARY AT END OF TIME STEP 120 IN STRESS PERIOD 3
|
||||
SECONDS MINUTES HOURS DAYS YEARS
|
||||
-----------------------------------------------------------
|
||||
TIME STEP LENGTH 7200.0 120.00 2.0000 8.33333E-02 2.28154E-04
|
||||
STRESS PERIOD TIME 8.64000E+05 14400. 240.00 10.000 2.73785E-02
|
||||
TOTAL TIME 1.81440E+06 30240. 504.00 21.000 5.74949E-02
|
||||
|
||||
|
||||
VOLUME BUDGET FOR ENTIRE MODEL AT END OF TIME STEP 120, STRESS PERIOD 4
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
||||
CUMULATIVE VOLUME L**3 RATES FOR THIS TIME STEP L**3/T PACKAGE NAME
|
||||
------------------ ------------------------ ----------------
|
||||
|
||||
IN: IN:
|
||||
--- ---
|
||||
STO-SS = 136641.8243 STO-SS = 12.0295 STORAGE
|
||||
STO-SY = 201207.5005 STO-SY = 6276.0852 STORAGE
|
||||
WEL = 0.0000 WEL = 0.0000 WEL
|
||||
RIV = 905396.1710 RIV = 18103.0142 RIV
|
||||
GHB = 0.0000 GHB = 0.0000 GHB-TIDAL
|
||||
RCH = 1055750.0000 RCH = 51250.0000 RCH-ZONE_1
|
||||
RCH = 218800.0000 RCH = 7196.6667 RCH-ZONE_2
|
||||
RCH = 739050.0000 RCH = 25989.1667 RCH-ZONE_3
|
||||
EVT = 0.0000 EVT = 0.0000 EVT
|
||||
|
||||
TOTAL IN = 3256845.4958 TOTAL IN = 108826.9623
|
||||
|
||||
OUT: OUT:
|
||||
---- ----
|
||||
STO-SS = 137620.6061 STO-SS = 11424.0679 STORAGE
|
||||
STO-SY = 593759.5707 STO-SY = 24995.5298 STORAGE
|
||||
WEL = 32200.0000 WEL = 670.0000 WEL
|
||||
RIV = 128064.8995 RIV = 8958.9833 RIV
|
||||
GHB = 2356641.5987 GHB = 62497.5547 GHB-TIDAL
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_1
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_2
|
||||
RCH = 0.0000 RCH = 0.0000 RCH-ZONE_3
|
||||
EVT = 8558.8104 EVT = 280.8262 EVT
|
||||
|
||||
TOTAL OUT = 3256845.4854 TOTAL OUT = 108826.9618
|
||||
|
||||
IN - OUT = 1.0424E-02 IN - OUT = 4.9647E-04
|
||||
|
||||
PERCENT DISCREPANCY = 0.00 PERCENT DISCREPANCY = 0.00
|
||||
|
||||
|
||||
|
||||
|
||||
TIME SUMMARY AT END OF TIME STEP 120 IN STRESS PERIOD 4
|
||||
SECONDS MINUTES HOURS DAYS YEARS
|
||||
-----------------------------------------------------------
|
||||
TIME STEP LENGTH 7200.0 120.00 2.0000 8.33333E-02 2.28154E-04
|
||||
STRESS PERIOD TIME 8.64000E+05 14400. 240.00 10.000 2.73785E-02
|
||||
TOTAL TIME 2.67840E+06 44640. 744.00 31.000 8.48734E-02
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue