Skip to content

Commit cfc5a94

Browse files
authored
Merge pull request #2450 from modflowpy/v3.9.2
Release 3.9.2
2 parents fe04db9 + 1938dec commit cfc5a94

File tree

223 files changed

+27214
-10252
lines changed

Some content is hidden

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

223 files changed

+27214
-10252
lines changed

.docs/Notebooks/array_output_tutorial.py

-16
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@
1717
# - name: Jeremy White
1818
# ---
1919

20-
# + [markdown] pycharm={"name": "#%% md\n"}
2120
# # Formatting ASCII output arrays
2221
#
2322
# ### Configuring numeric arrays written by FloPy
2423

25-
# + [markdown] pycharm={"name": "#%% md\n"}
2624
# load and run the Freyberg model
2725

2826

29-
# + pycharm={"name": "#%%\n"}
3027
import os
3128
import sys
3229
from pathlib import Path
@@ -111,26 +108,20 @@
111108
errmsg = f"Error. Output file cannot be found: {f}"
112109
print(errmsg)
113110

114-
# + [markdown] pycharm={"name": "#%% md\n"}
115111
# Each ``Util2d`` instance now has a ```.format``` attribute, which is an ```ArrayFormat``` instance:
116112

117-
# + pycharm={"name": "#%%\n"}
118113
print(ml.lpf.hk[0].format)
119114

120-
# + [markdown] pycharm={"name": "#%% md\n"}
121115
# The ```ArrayFormat``` class exposes each of the attributes seen in the ```ArrayFormat.___str___()``` call. ```ArrayFormat``` also exposes ``.fortran``, ``.py`` and ``.numpy`` atrributes, which are the respective format descriptors:
122116

123-
# + pycharm={"name": "#%%\n"}
124117
print(ml.dis.botm[0].format.fortran)
125118
print(ml.dis.botm[0].format.py)
126119
print(ml.dis.botm[0].format.numpy)
127120

128-
# + [markdown] pycharm={"name": "#%% md\n"}
129121
# #### (re)-setting ```.format```
130122
#
131123
# We can reset the format using a standard fortran type format descriptor
132124

133-
# + pycharm={"name": "#%%\n"}
134125
ml.dis.botm[0].format.free = False
135126
ml.dis.botm[0].format.fortran = "(20f10.4)"
136127
print(ml.dis.botm[0].format.fortran)
@@ -147,25 +138,19 @@
147138
else:
148139
raise ValueError("Failed to run.")
149140

150-
# + [markdown] pycharm={"name": "#%% md\n"}
151141
# Let's load the model we just wrote and check that the desired ```botm[0].format``` was used:
152142

153-
# + pycharm={"name": "#%%\n"}
154143
ml1 = flopy.modflow.Modflow.load("freyberg.nam", model_ws=modelpth)
155144
print(ml1.dis.botm[0].format)
156145

157-
# + [markdown] pycharm={"name": "#%% md\n"}
158146
# We can also reset individual format components (we can also generate some warnings):
159147

160-
# + pycharm={"name": "#%%\n"}
161148
ml.dis.botm[0].format.width = 9
162149
ml.dis.botm[0].format.decimal = 1
163150
print(ml1.dis.botm[0].format)
164151

165-
# + [markdown] pycharm={"name": "#%% md\n"}
166152
# We can also select ``free`` format. Note that setting to free format resets the format attributes to the default, max precision:
167153

168-
# + pycharm={"name": "#%%\n"}
169154
ml.dis.botm[0].format.free = True
170155
print(ml1.dis.botm[0].format)
171156
# -
@@ -178,6 +163,5 @@
178163
else:
179164
raise ValueError("Failed to run.")
180165

181-
# + pycharm={"name": "#%%\n"}
182166
ml1 = flopy.modflow.Modflow.load("freyberg.nam", model_ws=modelpth)
183167
print(ml1.dis.botm[0].format)

.docs/Notebooks/export_vtk_tutorial.py

+7-11
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,6 @@
122122
model_bottom_dir = output_dir / "BOTM"
123123
ml.dis.botm.export(model_bottom_dir, fmt="vtk")
124124

125-
# ### Export transient array recharge
126-
127-
# transient 2d array
128-
# export recharge
129-
model_recharge_dir = output_dir / "RECH"
130-
ml.rch.rech.export(model_recharge_dir, fmt="vtk", pvd=True)
131-
132125
# ### Export HK with point scalars
133126
#
134127

@@ -245,7 +238,8 @@
245238
vtkobj = vtk.Vtk(ml, xml=True, pvd=True, vertical_exageration=10)
246239

247240
## add recharge to the VTK object
248-
recharge = ml.rch.rech.transient_2ds
241+
subset = list(range(10))
242+
recharge = {k: v for k, v in ml.rch.rech.transient_2ds.items() if k in subset}
249243
vtkobj.add_transient_array(recharge, "recharge", masked_values=[0])
250244

251245
## write vtk files
@@ -268,8 +262,8 @@
268262
spd = ml.wel.stress_period_data
269263
vtkobj.add_transient_list(spd, masked_values=[0])
270264

271-
## write vtk files
272-
vtkobj.write(output_dir / "tr_list_example" / "wel_flux.vtu")
265+
## write vtk files (skipped, slow)
266+
# vtkobj.write(output_dir / "tr_list_example" / "wel_flux.vtu")
273267
# -
274268

275269
# ### Adding packages to the `Vtk` object
@@ -320,7 +314,9 @@
320314
# create the vtk object and export heads
321315
vtkobj = vtk.Vtk(ml, xml=True, pvd=True, vertical_exageration=10)
322316
vtkobj.add_heads(hds)
323-
vtkobj.write(workspace / "heads_output_test" / "freyberg_head.vtu")
317+
318+
# skipped, slow
319+
# vtkobj.write(workspace / "heads_output_test" / "freyberg_head.vtu")
324320
# -
325321

326322
# ### Export heads as point scalar arrays

.docs/Notebooks/mt3dms_sft_lkt_uzt_tutorial.py

-1
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,6 @@
841841

842842
# #### Write the MT3D-USGS input files for inspecting and running
843843

844-
# + pycharm={"name": "#%%\n"}
845844
mf.write_input()
846845
mt.write_input()
847846

0 commit comments

Comments
 (0)