Skip to content

Commit 1f21a86

Browse files
committed
Merge remote-tracking branch 'origin/release3.3.4'
2 parents 446008d + 1342aa3 commit 1f21a86

File tree

406 files changed

+52820
-23511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+52820
-23511
lines changed

.docs/code.rst

Lines changed: 177 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,22 @@ Flopy Code
44
MODFLOW 6
55
---------
66

7-
MODFLOW 6 Base Packages
7+
FloPy for MODFLOW 6 allows for the construction of multi-model simulations.
8+
In order to construct a MODFLOW 6 simulation using FloPy, first construct a
9+
simulation (MFSimulation) object. Then construct the MODFLOW 6 models
10+
(Modflowgwf and Modflowgwt) and the packages, like TDIS, that are associated
11+
with the simulation. Finally, construct the packages that are associated with
12+
each of your models.
13+
14+
15+
MODFLOW 6 Base Classes
816
^^^^^^^^^^^^^^^^^^^^^^^
917

18+
FloPy for MODFLOW 6 is object oriented code that uses inheritance. The FloPy classes
19+
used to define different types models and packages share common code that is defined
20+
in these base classes.
21+
22+
1023
Contents:
1124

1225
.. toctree::
@@ -16,9 +29,30 @@ Contents:
1629
./source/flopy.mf6.mf*
1730

1831

32+
MODFLOW 6 Simulation
33+
^^^^^^^^^^^^^^^^^^^^
34+
35+
MODFLOW 6 allows you to create simulations that can contain multiple models and
36+
packages. The FloPy for MODFLOW 6 simulation classes define functionality that applies
37+
to the entire MODFLOW 6 simulation. When using FloPy for MODFLOW 6 the first object
38+
you will most likely create is a simulation (MFSimulation) object.
39+
40+
Contents:
41+
42+
.. toctree::
43+
:glob:
44+
:maxdepth: 4
45+
46+
./source/flopy.mf6.modflow.mfsimulation
47+
:exclude-members: register_model
48+
1949
MODFLOW 6 Simulation Packages
2050
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2151

52+
MODFLOW 6 simulation packages are the packages that are not necessarily tied to a
53+
specific model and can apply to the entire simulation or a group of models in the
54+
simulation.
55+
2256
Contents:
2357

2458
.. toctree::
@@ -31,32 +65,112 @@ Contents:
3165
./source/flopy.mf6.modflow.mftdis
3266

3367

34-
MODFLOW 6 Groundwater Flow Packages
35-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68+
MODFLOW 6 Models
69+
^^^^^^^^^^^^^^^^
70+
71+
MODFLOW 6 supports both groundwater flow (mfgwf.ModflowGwf) and groundwater
72+
transport (mfgwt.ModflowGwt) models. FloPy for MODFLOW 6 model objects can be
73+
constructed after a FloPy simulation (MFSimulation) object has been constructed.
3674

3775
Contents:
3876

3977
.. toctree::
4078
:glob:
4179
:maxdepth: 4
4280

43-
./source/flopy.mf6.modflow.mfgwf*
81+
./source/flopy.mf6.modflow.mfgwf
82+
./source/flopy.mf6.modflow.mfgwt
4483

4584

46-
MODFLOW 6 Groundwater Transport Packages
47-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85+
MODFLOW 6 Groundwater Flow Model Packages
86+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87+
88+
MODFLOW 6 groundwater flow models support a number of required and optional packages.
89+
Once a MODFLOW 6 groundwater flow model object (mfgwf.ModflowGwf) has been constructed
90+
various packages associated with the groundwater flow model can be constructed.
4891

4992
Contents:
5093

5194
.. toctree::
5295
:glob:
5396
:maxdepth: 4
5497

55-
./source/flopy.mf6.modflow.mfgwt*
98+
./source/flopy.mf6.modflow.mfgwfa*
99+
./source/flopy.mf6.modflow.mfgwfb*
100+
./source/flopy.mf6.modflow.mfgwfc*
101+
./source/flopy.mf6.modflow.mfgwfd*
102+
./source/flopy.mf6.modflow.mfgwfe*
103+
./source/flopy.mf6.modflow.mfgwff*
104+
./source/flopy.mf6.modflow.mfgwfg*
105+
./source/flopy.mf6.modflow.mfgwfh*
106+
./source/flopy.mf6.modflow.mfgwfi*
107+
./source/flopy.mf6.modflow.mfgwfj*
108+
./source/flopy.mf6.modflow.mfgwfk*
109+
./source/flopy.mf6.modflow.mfgwfl*
110+
./source/flopy.mf6.modflow.mfgwfm*
111+
./source/flopy.mf6.modflow.mfgwfn*
112+
./source/flopy.mf6.modflow.mfgwfo*
113+
./source/flopy.mf6.modflow.mfgwfp*
114+
./source/flopy.mf6.modflow.mfgwfq*
115+
./source/flopy.mf6.modflow.mfgwfr*
116+
./source/flopy.mf6.modflow.mfgwfs*
117+
./source/flopy.mf6.modflow.mfgwft*
118+
./source/flopy.mf6.modflow.mfgwfu*
119+
./source/flopy.mf6.modflow.mfgwfv*
120+
./source/flopy.mf6.modflow.mfgwfw*
121+
./source/flopy.mf6.modflow.mfgwfx*
122+
./source/flopy.mf6.modflow.mfgwfy*
123+
./source/flopy.mf6.modflow.mfgwfz*
124+
125+
126+
MODFLOW 6 Groundwater Transport Model Packages
127+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128+
129+
MODFLOW 6 groundwater transport models support a number of required and optional packages.
130+
Once a MODFLOW 6 groundwater transport model object (mfgwt.ModflowGwt) has been constructed
131+
various packages associated with the groundwater transport model can be constructed.
56132

133+
Contents:
57134

58-
MODFLOW 6 Utilities
59-
^^^^^^^^^^^^^^^^^^^
135+
.. toctree::
136+
:glob:
137+
:maxdepth: 4
138+
139+
./source/flopy.mf6.modflow.mfgwta*
140+
./source/flopy.mf6.modflow.mfgwtb*
141+
./source/flopy.mf6.modflow.mfgwtc*
142+
./source/flopy.mf6.modflow.mfgwtd*
143+
./source/flopy.mf6.modflow.mfgwte*
144+
./source/flopy.mf6.modflow.mfgwtf*
145+
./source/flopy.mf6.modflow.mfgwtg*
146+
./source/flopy.mf6.modflow.mfgwth*
147+
./source/flopy.mf6.modflow.mfgwti*
148+
./source/flopy.mf6.modflow.mfgwtj*
149+
./source/flopy.mf6.modflow.mfgwtk*
150+
./source/flopy.mf6.modflow.mfgwtl*
151+
./source/flopy.mf6.modflow.mfgwtm*
152+
./source/flopy.mf6.modflow.mfgwtn*
153+
./source/flopy.mf6.modflow.mfgwto*
154+
./source/flopy.mf6.modflow.mfgwtp*
155+
./source/flopy.mf6.modflow.mfgwtq*
156+
./source/flopy.mf6.modflow.mfgwtr*
157+
./source/flopy.mf6.modflow.mfgwts*
158+
./source/flopy.mf6.modflow.mfgwtt*
159+
./source/flopy.mf6.modflow.mfgwtu*
160+
./source/flopy.mf6.modflow.mfgwtv*
161+
./source/flopy.mf6.modflow.mfgwtw*
162+
./source/flopy.mf6.modflow.mfgwtx*
163+
./source/flopy.mf6.modflow.mfgwty*
164+
./source/flopy.mf6.modflow.mfgwtz*
165+
166+
167+
MODFLOW 6 Utility Packages
168+
^^^^^^^^^^^^^^^^^^^^^^^^^^
169+
170+
MODFLOW 6 has several utility packages that can be associated with other packages.
171+
This includes the obs package, which can be used to output model results specific
172+
to its parent package, and the time series and time array series packages, which
173+
can be used to provide time series input for other packages.
60174

61175
Contents:
62176

@@ -67,6 +181,60 @@ Contents:
67181
./source/flopy.mf6.modflow.mfutl*
68182

69183

184+
MODFLOW 6 Utility Functions
185+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
186+
187+
MODFLOW 6 has several utility functions that can be used to process MODFLOW 6
188+
results.
189+
190+
Contents:
191+
192+
.. toctree::
193+
:maxdepth: 4
194+
195+
./source/flopy.mf6.utils.binaryfile_utils.rst
196+
./source/flopy.mf6.utils.binarygrid_util.rst
197+
./source/flopy.mf6.utils.mfobservation.rst
198+
./source/flopy.mf6.utils.output_util.rst
199+
./source/flopy.mf6.utils.postprocessing.rst
200+
./source/flopy.mf6.utils.reference.rst
201+
./source/flopy.mf6.utils.lakpak_utils.rst
202+
203+
204+
MODFLOW 6 Data
205+
^^^^^^^^^^^^^^
206+
207+
FloPy for MODFLOW 6 data objects (MFDataArray, MFDataList, MFDataScalar) are
208+
automatically constructed by FloPy when you construct a package. These data
209+
objects provide an interface for getting MODFLOW 6 data in different formats
210+
and setting MODFLOW 6 data.
211+
212+
Contents:
213+
214+
.. toctree::
215+
:glob:
216+
:maxdepth: 4
217+
218+
./source/flopy.mf6.data.mfdataarray
219+
./source/flopy.mf6.data.mfdatalist
220+
./source/flopy.mf6.data.mfdatascalar
221+
222+
Build MODFLOW 6 Classes
223+
^^^^^^^^^^^^^^^^^^^^^^^
224+
225+
MODFLOW 6 FloPy classes can be rebuild from MODFLOW 6 definition files. This
226+
will allow creation of MODFLOW 6 FloPy classes for development versions of
227+
MODFLOW 6.
228+
229+
Contents:
230+
231+
.. toctree::
232+
:maxdepth: 4
233+
234+
./source/flopy.mf6.utils.createpackages.rst
235+
./source/flopy.mf6.utils.generate_classes.rst
236+
237+
70238
Previous Versions of MODFLOW
71239
----------------------------
72240

.docs/conf.py

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,70 @@
1515

1616
# add flopy root directory to the python path
1717
sys.path.insert(0, os.path.abspath(".."))
18-
from flopy import __version__
18+
from flopy import __version__, __author__
1919

2020
# -- determine if running on readthedocs ------------------------------------
2121
on_rtd = os.environ.get('READTHEDOCS') == 'True'
2222

23+
# -- determine if this version is a release candidate
24+
with open("../README.md", "r") as f:
25+
lines = f.readlines()
26+
rc_text = ""
27+
for line in lines:
28+
if line.startswith("### Version"):
29+
if "release candidate" in line:
30+
rc_text = "release candidate"
31+
break
32+
33+
# -- update version number in main.rst
34+
rst_name = "main.rst"
35+
with open(rst_name, "r") as f:
36+
lines = f.readlines()
37+
with open(rst_name, "w") as f:
38+
for line in lines:
39+
if line.startswith("**Documentation for version"):
40+
line = "**Documentation for version {}".format(__version__)
41+
if rc_text != "":
42+
line += " --- {}".format(rc_text)
43+
line += "**\n"
44+
f.write(line)
45+
46+
# -- update authors in introduction.rst
47+
rst_name = "introduction.rst"
48+
with open(rst_name, "r") as f:
49+
lines = f.readlines()
50+
tag_start = "FloPy Development Team"
51+
tag_end = "How to Cite"
52+
write_line = True
53+
with open(rst_name, "w") as f:
54+
for line in lines:
55+
if line.startswith(tag_start):
56+
write_line = False
57+
# update author list
58+
line += (
59+
"======================\n\n"
60+
"FloPy is developed by a team of MODFLOW users that have "
61+
"switched over to using\nPython for model development and "
62+
"post-processing. Members of the team\n"
63+
"currently include:\n\n"
64+
)
65+
authors = __author__.split(sep=",")
66+
for author in authors:
67+
line += " * {}\n".format(author.strip())
68+
line += " * and others\n\n"
69+
f.write(line)
70+
elif line.startswith(tag_end):
71+
write_line = True
72+
if write_line:
73+
f.write(line)
74+
75+
2376
# -- create source rst files ------------------------------------------------
2477
cmd = "sphinx-apidoc -e -o source/ ../flopy/"
2578
print(cmd)
2679
os.system(cmd)
2780

28-
# -- programatically create rst files ---------------------------------------
81+
# -- programmatically create rst files ---------------------------------------
2982
cmd = ("python", "create_rstfiles.py")
3083
print(" ".join(cmd))
3184
os.system(" ".join(cmd))
@@ -38,8 +91,8 @@
3891

3992
# -- Project information -----------------------------------------------------
4093
project = "flopy Documentation"
41-
copyright = "2020, 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."
42-
author = "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."
94+
copyright = "2021, {}".format(__author__)
95+
author = __author__
4396

4497
# The version.
4598
version = __version__
@@ -125,11 +178,11 @@
125178
# Add any paths that contain custom static files (such as style sheets) here,
126179
# relative to this directory. They are copied after the builtin static files,
127180
# so a file named "default.css" will overwrite the builtin "default.css".
128-
html_static_path = ["_static"]
181+
# html_static_path = ["_static"]
129182

130183
html_theme_options = {
131-
"github_url": "https://github.com/modflowpy/flopy",
132-
"use_edit_page_button": False,
184+
# "github_url": "https://github.com/modflowpy/flopy",
185+
# "use_edit_page_button": False,
133186
}
134187

135188
autosummary_generate = True
@@ -169,7 +222,7 @@
169222
html_split_index = False
170223

171224
# If true, links to the reST sources are added to the pages.
172-
# html_show_sourcelink = True
225+
html_show_sourcelink = False
173226

174227
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
175228
html_show_sphinx = True

.docs/create_rstfiles.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import os
22

33

4-
def create_section(f, title, filenames):
5-
title = "{} Tutorials".format(title.upper())
4+
def create_section(f, title, filenames, upper_case=False):
5+
if upper_case:
6+
title = title.upper()
7+
title = "{} Tutorials".format(title)
68
line = "{}\n".format(title) + len(title) * "-" + "\n\n"
79
line += "Contents:\n\n.. toctree::\n :maxdepth: 2\n\n"
810
for filename in filenames:
@@ -32,14 +34,24 @@ def create_tutorial_rst():
3234
create_section(f, "MODFLOW 6", tutorial_dict[key])
3335
keys.remove(key)
3436

37+
key = "modflow6data"
38+
if key in keys:
39+
create_section(f, "MODFLOW 6 FloPy Use", tutorial_dict[key])
40+
keys.remove(key)
41+
42+
key = "modflow6output"
43+
if key in keys:
44+
create_section(f, "MODFLOW 6 Output", tutorial_dict[key])
45+
keys.remove(key)
46+
3547
key = "modflow"
3648
if key in keys:
3749
create_section(f, "MODFLOW", tutorial_dict[key])
3850
keys.remove(key)
3951

4052
# create the remaining tutorial sections
4153
for key in keys:
42-
create_section(f, key, tutorial_dict[key])
54+
create_section(f, key, tutorial_dict[key], upper_case=True)
4355

4456
# close the file
4557
f.close()

.docs/create_tutorials.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def create_notebooks():
1616
for dirpath, _, filenames in os.walk(pth):
1717
py_files += [os.path.join(dirpath, filename) for filename in
1818
sorted(filenames) if filename.endswith(".py")]
19+
# sort the python files
20+
py_files = sorted(py_files)
21+
1922
# copy the python files
2023
for src in py_files:
2124
dst = os.path.join(wpth, os.path.basename(src))

0 commit comments

Comments
 (0)