Skip to content

Release 3.5.0 #2016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 103 commits into from
Nov 25, 2023
Merged
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
7014486
ci(release): update version to 3.dev4
wpbonelli Jun 29, 2023
a644b52
Merge pull request #1859 from modflowpy/post-release-3.4.1-reset
wpbonelli Jun 29, 2023
6475074
chore(version): update dev version to 3.4.2.dev0 (#1861)
wpbonelli Jun 30, 2023
2bbdfb1
test: minor fixes to notebook/script tests (#1862)
wpbonelli Jun 30, 2023
0e13703
ci(release): fix publish to PyPi step (#1863)
wpbonelli Jul 1, 2023
a16a379
feat(simulation+model options): Dynamically generate simulation opti…
spaulins-usgs Jul 10, 2023
a84d885
fix(exchange and gnc package cellids): #1866 (#1871)
spaulins-usgs Jul 11, 2023
90f87f2
fix(binaryfile/gridutil): avoid numpy deprecation warnings (#1868)
wpbonelli Jul 12, 2023
e2efcfc
chore: add .vscode to .gitignore, update version to 3.5.0.dev0 (#1875)
wpbonelli Jul 14, 2023
9168b3a
update(_set_neighbors): check for closed iverts and remove closing iv…
jlarsen-usgs Jul 14, 2023
ed54979
fix(binary): fix binary header information (#1877)
jdhughes-dev Jul 16, 2023
64cd26c
docs(release): add note to review deprecations (#1878)
wpbonelli Jul 18, 2023
02fae7d
refactor(crs): provide support without pyproj, other deprecations (#1…
mwtoews Jul 19, 2023
8b03916
fix(time series): fix for multiple time series attached to single pac…
spaulins-usgs Jul 20, 2023
c261ee8
refactor(Notebooks): apply pyformat and black QA tools (#1879)
mwtoews Jul 24, 2023
8c330a7
fix(check): check now works properly with confined conditions (#1880)…
spaulins-usgs Jul 27, 2023
7931112
feat(binaryfile): add reverse() method to HeadFile, CellBudgetFile (#…
wpbonelli Jul 29, 2023
8c3d7db
refactor: require pandas>=2.0.0 as core dependency (#1887)
wpbonelli Aug 1, 2023
47e5e35
refactor(expired deprecation): raise AttributeError with Grid.thick a…
mwtoews Aug 1, 2023
54d6099
refactor(pathline/endpoint plots): support recarray or dataframe (#1888)
wpbonelli Aug 1, 2023
70b9a37
refactor(expired deprecation): remove warning for third parameter of …
mwtoews Aug 1, 2023
0c5f143
docs: add deprecation policy to dev docs and release guide (#1889)
wpbonelli Aug 2, 2023
3cc6626
docs: remove sphinx-rtd-theme jquery workaround (#1897)
wpbonelli Aug 2, 2023
dd77e72
refactor(dependencies): constrain sphinx >=4 (#1898)
wpbonelli Aug 2, 2023
03fa01f
refactor(dependencies): constrain sphinx-rtd-theme >=1 (#1900)
wpbonelli Aug 3, 2023
809e624
refactor(mf6): remove deprecated features (#1894)
wpbonelli Aug 3, 2023
cf675c6
refactor(plotutil): remove deprecated utilities (#1891)
wpbonelli Aug 3, 2023
6f2da88
refactor(shapefile_utils): remove deprecated SpatialReference usages …
wpbonelli Aug 3, 2023
ca838b1
refactor(vtk): remove deprecated export_* functions (#1890)
wpbonelli Aug 3, 2023
cf5e498
test: add requires_pkg marker to model splitter test (#1902)
wpbonelli Aug 3, 2023
9a22f63
fix(mtlistfile): fix reading MT3D budget (#1899)
rabbl Aug 3, 2023
8084b67
test(generate_classes): parametrize, allow configuring via CLI/env (#…
wpbonelli Aug 3, 2023
68f0c3b
fix(check): Updated flopy's check to work with cellid -1 values (#1885)
spaulins-usgs Aug 6, 2023
c25c0b3
fix(BaseModel): don't suppress error if exe not found (#1901)
wpbonelli Aug 7, 2023
6585a1b
readme: update flopy citation with Hughes and others (2023) (#1908)
jdhughes-dev Aug 8, 2023
1cb7594
feat(get-modflow): allow specifying repo owner (#1910)
wpbonelli Aug 8, 2023
7237026
refactor(generate_classes): deprecate branch for ref, introduce repo,…
wpbonelli Aug 9, 2023
99f680f
fix(modelgrid): retain crs data from classic nam files (#1904)
mwtoews Aug 10, 2023
ed3a0cd
refactor(expired deprecation): remaining references to SpatialReferen…
mwtoews Aug 11, 2023
0418f85
ci: test without optional dependencies (#1918)
wpbonelli Aug 16, 2023
3cef778
fix(keyword data): optional keywords (#1920)
spaulins-usgs Aug 16, 2023
e020308
feat(generate_classes): create a command-line interface (#1912)
mwtoews Aug 16, 2023
f2064d8
fix(GridIntersect): combine list of geometries using unary_union (#1923)
mwtoews Aug 21, 2023
3a1ae0b
updates(Mf6Splitter): control record and additional splitting checks …
jlarsen-usgs Aug 21, 2023
021ffaa
fix(gridintersect): add multilinestring tests (#1924)
dbrakenhoff Aug 21, 2023
6cda49c
docs: miscellaneous fixes/cleanup (#1932)
wpbonelli Aug 25, 2023
66b0903
fix(binary file): Was writing binary file information twice to extern…
scottrp Aug 25, 2023
51b2ecc
docs: update markdown parser, add sections to RTD site (#1934)
wpbonelli Aug 25, 2023
5d57fb7
fix(ParticleData): fix docstring, structured default is False (#1935)
wpbonelli Aug 25, 2023
4f6cd47
fix(generate_classes): use branch arg if provided (#1938)
wpbonelli Aug 31, 2023
db8da05
chore(deps): bump actions/checkout from 3 to 4 (#1941)
dependabot[bot] Sep 5, 2023
71855bd
fix(remove_model): remove_model method fix and tests (#1945)
scottrp Sep 14, 2023
2fa32da
docs(binder): remove configuration, links, badges (#1947)
wpbonelli Sep 15, 2023
e20a298
feat(gridutil): add function to help create DISV grid (#1952)
christianlangevin Sep 18, 2023
9e9d730
fix(export_contours/f): support matplotlib 3.8+ (#1951)
wpbonelli Sep 19, 2023
06eefd7
Fix usgbcf (#1959)
cnicol-gwlogic Sep 22, 2023
1aa2c45
test: split plot tests into more narrowly-scoped files (#1949)
wpbonelli Sep 22, 2023
9ca6012
refactor(triangle): raise if output files not found (#1954)
wpbonelli Sep 22, 2023
1a862d3
docs: remove redundant example scripts, update RTD layout (#1937)
wpbonelli Sep 23, 2023
b0a9481
chore: format tests, colorize pytest CI output (#1961)
wpbonelli Sep 23, 2023
0d17ae5
docs(code.rst): add model splitter to API docs (#1962)
wpbonelli Sep 23, 2023
d7d7f66
fix(resolve_exe): support extensionless abs/rel paths on windows (#1957)
wpbonelli Sep 24, 2023
5b5eb4e
fix(model_splitter.py): standardizing naming of iuzno, rno, lakeno, &…
emorway-usgs Sep 25, 2023
a3fb59b
docs(mf6io): update .dfn files corresponding to similar change in mf6…
emorway-usgs Sep 26, 2023
637632c
fix(mbase): warn if duplicate pkgs or units (#1964)
wpbonelli Sep 26, 2023
941a5f1
refactor(recarray_utils): deprecate functions, use numpy builtins (#1…
wpbonelli Sep 27, 2023
6e23400
ci: add color=yes to addopts in pytest.ini (#1967)
wpbonelli Sep 28, 2023
158d2d6
fix(get_structured_faceflows): cover edge cases, expand tests (#1968)
wpbonelli Sep 29, 2023
4b105e8
fix(CellBudgetFile): detect compact fmt by negative nlay (#1966)
wpbonelli Sep 30, 2023
1197094
test(generate_classes): skip on master and release branches (#1971)
wpbonelli Sep 30, 2023
1eddf86
docs: use html for notebook download links (#1976)
wpbonelli Oct 4, 2023
f82fdf6
feat(pandas support) (#1955)
scottrp Oct 4, 2023
f77989d
fix(pandas list): deal with cellids with inconsistent types (#1980)
scottrp Oct 6, 2023
6a46a9b
feat(pandas list): fix for handling special case where boundname set …
scottrp Oct 6, 2023
f3b9410
test(modpathfile): test shapefile export with custom fields (#1981)
wpbonelli Oct 6, 2023
0853ef8
ci(mf6.yml): include more mf6 autotests (#1983)
wpbonelli Oct 7, 2023
ff9e224
test(model_splitter): use tempdirs (#1984)
wpbonelli Oct 12, 2023
d0ddf2a
ci: swap setup-fortran for install-gfortran-action (#1985)
wpbonelli Oct 13, 2023
04da63a
ci: fix awvwgk/setup-fortran -> fortran-lang/setup-fortran (#1986)
wpbonelli Oct 13, 2023
3e176d0
ci: remove branch filters from push trigger (#1987)
wpbonelli Oct 16, 2023
4ed68a2
refactor(contour_array): add layer param, update docstrings, expand t…
wpbonelli Oct 18, 2023
4ef699e
update(model_splitter.py): (#1994)
jlarsen-usgs Nov 1, 2023
696a209
refactor(modflow): remove deprecated features (#1893)
wpbonelli Nov 3, 2023
5ebc216
fix(model_splitter): check keys in mftransient array (#1998)
jdhughes-dev Nov 13, 2023
af8954b
refactor: support python3.12, simplify tests and dependencies (#1999)
wpbonelli Nov 13, 2023
4eea187
refactor(msfsr2): write sfr_botm_conflicts.chk to model workspace (#2…
wpbonelli Nov 14, 2023
0f8b521
refactor(shapefile_utils): warn if fieldname truncated per 10 char li…
wpbonelli Nov 14, 2023
16183c3
fix(benchmarks): fix benchmark post-processing (#2004)
wpbonelli Nov 14, 2023
b34f154
feat(MfSimulationList): add functionality to parse the mfsim.lst file…
jdhughes-dev Nov 14, 2023
7cc5e6f
fix(MfSimulationList): add missing seek to get_runtime method (#2006)
mjr-deltares Nov 15, 2023
419ae0e
fix(get_disu_kwargs): incorrect indexing of delr and delc (#2011)
christianlangevin Nov 21, 2023
6e3c791
fix(PlotCrossSection): boundary conditions not plotting for DISU (#2012)
christianlangevin Nov 21, 2023
d0546ce
docs(notebooks): fix cell center for Simple MODFLOW 6 Model (#2013)
mwtoews Nov 22, 2023
be104c4
feat(modflow): support dataframe for pkg data (#2010)
wpbonelli Nov 22, 2023
121ca78
feat(mfsimlist): add functionality to parse memory_print_options (#2009)
jdhughes-dev Nov 22, 2023
0ffe85c
docs(datafiles): clarify 0-based vs 1-based indexing (#2000)
wpbonelli Nov 22, 2023
09b59ce
refactor(pakbase): standardize ipakcb docstrings/defaults (#2001)
wpbonelli Nov 22, 2023
11f518c
fix(release.yml): don't regenerate pkgs from mf6 main on release (#2014)
wpbonelli Nov 24, 2023
0da6b8e
fix(release.yml): fix update changelog step (#2015)
wpbonelli Nov 25, 2023
338f6d0
refactor(.gitattributes): exclude examples/data from linguist (#2017)
wpbonelli Nov 25, 2023
84c0ee8
Merge remote-tracking branch 'origin/master' into v3.5.0
wpbonelli Nov 25, 2023
89698c5
ci(release): set version to 3.5.0, update plugins from DFN files, upd…
github-actions[bot] Nov 25, 2023
e906f1b
deduplicate fixes from v3.4.[2,3] in changelog
wpbonelli Nov 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .docs/Notebooks/array_output_tutorial.py
Original file line number Diff line number Diff line change
@@ -53,9 +53,9 @@
os.makedirs(modelpth)

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"flopy version: {flopy.__version__}")

# +
ml = flopy.modflow.Modflow.load(
@@ -73,10 +73,10 @@
files = ["freyberg.hds", "freyberg.cbc"]
for f in files:
if os.path.isfile(os.path.join(modelpth, f)):
msg = "Output file located: {}".format(f)
msg = f"Output file located: {f}"
print(msg)
else:
errmsg = "Error. Output file cannot be found: {}".format(f)
errmsg = f"Error. Output file cannot be found: {f}"
print(errmsg)

# + [markdown] pycharm={"name": "#%% md\n"}
10 changes: 5 additions & 5 deletions .docs/Notebooks/dis_triangle_example.py
Original file line number Diff line number Diff line change
@@ -37,9 +37,9 @@
workspace = Path(temp_dir.name)

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"flopy version: {flopy.__version__}")
# -

# ## Creating Meshes with the Triangle Class
@@ -247,8 +247,8 @@ def chdhead(x):
chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=chdlist)
oc = flopy.mf6.ModflowGwfoc(
gwf,
budget_filerecord="{}.cbc".format(name),
head_filerecord="{}.hds".format(name),
budget_filerecord=f"{name}.cbc",
head_filerecord=f"{name}.hds",
saverecord=[("HEAD", "LAST"), ("BUDGET", "LAST")],
printrecord=[("HEAD", "LAST"), ("BUDGET", "LAST")],
)
14 changes: 7 additions & 7 deletions .docs/Notebooks/dis_voronoi_example.py
Original file line number Diff line number Diff line change
@@ -41,9 +41,9 @@
workspace = Path(temp_dir.name)

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"flopy version: {flopy.__version__}")
# -

# ### Use Triangle to Generate Points for Voronoi Grid
@@ -164,8 +164,8 @@
chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=chdlist)
oc = flopy.mf6.ModflowGwfoc(
gwf,
budget_filerecord="{}.bud".format(name),
head_filerecord="{}.hds".format(name),
budget_filerecord=f"{name}.bud",
head_filerecord=f"{name}.hds",
saverecord=[("HEAD", "ALL"), ("BUDGET", "ALL")],
printrecord=[("HEAD", "LAST"), ("BUDGET", "LAST")],
)
@@ -229,8 +229,8 @@
fmi = flopy.mf6.ModflowGwtfmi(gwt, packagedata=pd)
oc = flopy.mf6.ModflowGwtoc(
gwt,
budget_filerecord="{}.cbc".format(name),
concentration_filerecord="{}.ucn".format(name),
budget_filerecord=f"{name}.cbc",
concentration_filerecord=f"{name}.ucn",
saverecord=[("CONCENTRATION", "ALL"), ("BUDGET", "ALL")],
)

10 changes: 5 additions & 5 deletions .docs/Notebooks/drain_return_example.py
Original file line number Diff line number Diff line change
@@ -29,9 +29,9 @@
import flopy

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"flopy version: {flopy.__version__}")

# +
# temporary directory
@@ -78,7 +78,7 @@
raise ValueError("Failed to run.")

# plot heads for the drt model
hds = flopy.utils.HeadFile(os.path.join(m.model_ws, m.name + ".hds"))
hds = flopy.utils.HeadFile(os.path.join(m.model_ws, f"{m.name}.hds"))
hds.plot(colorbar=True)

# remove the drt package and create a standard drain file
@@ -98,7 +98,7 @@
raise ValueError("Failed to run.")

# plot the heads for the model with the drain
hds = flopy.utils.HeadFile(os.path.join(m.model_ws, m.name + ".hds"))
hds = flopy.utils.HeadFile(os.path.join(m.model_ws, f"{m.name}.hds"))
hds.plot(colorbar=True)

try:
6 changes: 3 additions & 3 deletions .docs/Notebooks/export_tutorial.py
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
import flopy

print(sys.version)
print("flopy version: {}".format(flopy.__version__))
print(f"flopy version: {flopy.__version__}")
# -

# Load our old friend...the Freyberg model
@@ -60,12 +60,12 @@
pth = temp_dir.name

# export the whole model (inputs and outputs)
fnc = ml.export(os.path.join(pth, ml.name + ".in.nc"))
fnc = ml.export(os.path.join(pth, f"{ml.name}.in.nc"))

# export outputs using spatial reference info
hds = flopy.utils.HeadFile(os.path.join(model_ws, "freyberg.hds"))
flopy.export.utils.output_helper(
os.path.join(pth, ml.name + ".out.nc"), ml, {"hds": hds}
os.path.join(pth, f"{ml.name}.out.nc"), ml, {"hds": hds}
)

# ### Export an array to netCDF or shapefile
6 changes: 3 additions & 3 deletions .docs/Notebooks/export_vtk_tutorial.py
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@
import notebook_utils

print(sys.version)
print("flopy version: {}".format(flopy.__version__))
print(f"flopy version: {flopy.__version__}")
# -

# load model for examples
@@ -384,10 +384,10 @@
files = ["mp7p2.hds", "mp7p2.cbb"]
for f in files:
if os.path.isfile(modelpth / f):
msg = "Output file located: {}".format(f)
msg = f"Output file located: {f}"
print(msg)
else:
errmsg = "Error. Output file cannot be found: {}".format(f)
errmsg = f"Error. Output file cannot be found: {f}"
print(errmsg)

# +
24 changes: 12 additions & 12 deletions .docs/Notebooks/external_file_handling_tutorial.py
Original file line number Diff line number Diff line change
@@ -32,8 +32,8 @@
from flopy.utils import flopy_io

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"flopy version: {flopy.__version__}")

# +
# make a model
@@ -57,7 +57,7 @@
vka = np.zeros_like(hk)
fnames = []
for i, h in enumerate(hk):
fname = os.path.join(array_dir, "hk_{0}.ref".format(i + 1))
fname = os.path.join(array_dir, f"hk_{i + 1}.ref")
fnames.append(fname)
np.savetxt(fname, h)
vka[i] = i + 1
@@ -84,7 +84,7 @@

# We see that a copy of the ``hk`` files as well as the important recharge file were made in the ```model_ws```.Let's looks at the ```lpf``` file

open(os.path.join(ml.model_ws, ml.name + ".lpf"), "r").readlines()[:20]
open(os.path.join(ml.model_ws, f"{ml.name}.lpf")).readlines()[:20]

# We see that the ```open/close``` approach was used - this is because ``ml.array_free_format`` is ``True``. Notice that ```vka``` is written internally

@@ -137,7 +137,7 @@
vka = np.zeros_like(hk)
fnames = []
for i, h in enumerate(hk):
fname = os.path.join(array_dir, "hk_{0}.ref".format(i + 1))
fname = os.path.join(array_dir, f"hk_{i + 1}.ref")
fnames.append(fname)
np.savetxt(fname, h)
vka[i] = i + 1
@@ -189,7 +189,7 @@
vka = np.zeros_like(hk)
fnames = []
for i, h in enumerate(hk):
fname = os.path.join(array_dir, "hk_{0}.ref".format(i + 1))
fname = os.path.join(array_dir, f"hk_{i + 1}.ref")
fnames.append(fname)
np.savetxt(fname, h)
vka[i] = i + 1
@@ -206,16 +206,16 @@

# We see that now the external arrays are being handled through the name file. Let's look at the name file

open(os.path.join(ml.model_ws, ml.name + ".nam"), "r").readlines()
open(os.path.join(ml.model_ws, f"{ml.name}.nam")).readlines()

# ### Free and binary format

ml.dis.botm[0].format.binary = True
ml.write_input()

open(os.path.join(ml.model_ws, ml.name + ".nam"), "r").readlines()
open(os.path.join(ml.model_ws, f"{ml.name}.nam")).readlines()

open(os.path.join(ml.model_ws, ml.name + ".dis"), "r").readlines()
open(os.path.join(ml.model_ws, f"{ml.name}.dis")).readlines()

# ### The ```.how``` attribute
# ```Util2d``` includes a ```.how``` attribute that gives finer grained control of how arrays will written
@@ -240,11 +240,11 @@

ml.write_input()

open(os.path.join(ml.model_ws, ml.name + ".dis"), "r").readlines()
open(os.path.join(ml.model_ws, f"{ml.name}.dis")).readlines()

open(os.path.join(ml.model_ws, ml.name + ".lpf"), "r").readlines()
open(os.path.join(ml.model_ws, f"{ml.name}.lpf")).readlines()

open(os.path.join(ml.model_ws, ml.name + ".nam"), "r").readlines()
open(os.path.join(ml.model_ws, f"{ml.name}.nam")).readlines()

try:
# ignore PermissionError on Windows
8 changes: 4 additions & 4 deletions .docs/Notebooks/feat_working_stack_examples.py
Original file line number Diff line number Diff line change
@@ -40,10 +40,10 @@
import flopy

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("pandas version: {}".format(pd.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"pandas version: {pd.__version__}")
print(f"flopy version: {flopy.__version__}")
# -

# ### Model Inputs
8 changes: 4 additions & 4 deletions .docs/Notebooks/get_transmissivities_example.py
Original file line number Diff line number Diff line change
@@ -39,9 +39,9 @@
import flopy

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"flopy version: {flopy.__version__}")
# -

# ### Make up some open interval tops and bottoms and some heads
@@ -104,7 +104,7 @@
fig, ax = plt.subplots()
plt.plot(m.dis.top.array[r, c], label="model top")
for i, l in enumerate(m.dis.botm.array[:, r, c]):
label = "layer {} bot".format(i + 1)
label = f"layer {i + 1} bot"
if i == m.nlay - 1:
label = "model bot"
plt.plot(l, label=label)
8 changes: 4 additions & 4 deletions .docs/Notebooks/grid_intersection_example.py
Original file line number Diff line number Diff line change
@@ -60,10 +60,10 @@
from flopy.utils import GridIntersect

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version: {}".format(flopy.__version__))
print("shapely version: {}".format(shapely.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"flopy version: {flopy.__version__}")
print(f"shapely version: {shapely.__version__}")
# -

# ## <a id="gridclass"></a>[GridIntersect Class](#top)
28 changes: 13 additions & 15 deletions .docs/Notebooks/gridgen_example.py
Original file line number Diff line number Diff line change
@@ -45,9 +45,9 @@
from flopy.utils.gridgen import Gridgen

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"flopy version: {flopy.__version__}")
# -

# The Flopy GRIDGEN module requires that the gridgen executable can be called using subprocess **(i.e., gridgen is in your path)**.
@@ -62,9 +62,7 @@
print(msg)
else:
print(
"gridgen executable was found at: {}".format(
flopy_io.relpath_safe(gridgen_exe)
)
f"gridgen executable was found at: {flopy_io.relpath_safe(gridgen_exe)}"
)

# +
@@ -75,8 +73,8 @@
gridgen_ws = os.path.join(model_ws, "gridgen")
if not os.path.exists(gridgen_ws):
os.makedirs(gridgen_ws, exist_ok=True)
print("Model workspace is : {}".format(flopy_io.scrub_login(model_ws)))
print("Gridgen workspace is : {}".format(flopy_io.scrub_login(gridgen_ws)))
print(f"Model workspace is : {flopy_io.scrub_login(model_ws)}")
print(f"Gridgen workspace is : {flopy_io.scrub_login(gridgen_ws)}")
# -

# ## Basic Gridgen Operations
@@ -276,8 +274,8 @@
gwf, xt3doptions=True, save_specific_discharge=True
)
chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=chdspd)
budget_file = name + ".bud"
head_file = name + ".hds"
budget_file = f"{name}.bud"
head_file = f"{name}.hds"
oc = flopy.mf6.ModflowGwfoc(
gwf,
budget_filerecord=budget_file,
@@ -378,8 +376,8 @@
gwf, xt3doptions=True, save_specific_discharge=True
)
chd = flopy.mf6.ModflowGwfchd(gwf, stress_period_data=chdspd)
budget_file = name + ".bud"
head_file = name + ".hds"
budget_file = f"{name}.bud"
head_file = f"{name}.hds"
oc = flopy.mf6.ModflowGwfoc(
gwf,
budget_filerecord=budget_file,
@@ -406,7 +404,7 @@
pmv.contour_array(
head, levels=[0.2, 0.4, 0.6, 0.8], linewidths=3.0, vmin=vmin, vmax=vmax
)
ax.set_title("Layer {}".format(ilay + 1))
ax.set_title(f"Layer {ilay + 1}")
pmv.plot_vector(spdis["qx"], spdis["qy"], color="white")
# -

@@ -452,7 +450,7 @@
raise ValueError("Failed to run.")

# head is returned as a list of head arrays for each layer
head_file = os.path.join(ws, name + ".hds")
head_file = os.path.join(ws, f"{name}.hds")
head = flopy.utils.HeadUFile(head_file).get_data()

# MODFLOW-USG does not have vertices, so we need to create
@@ -472,7 +470,7 @@
pmv.plot_array(head[ilay], cmap="jet", vmin=vmin, vmax=vmax)
pmv.plot_grid(colors="k", alpha=0.1)
pmv.contour_array(head[ilay], levels=[0.2, 0.4, 0.6, 0.8], linewidths=3.0)
ax.set_title("Layer {}".format(ilay + 1))
ax.set_title(f"Layer {ilay + 1}")
# -

try:
6 changes: 3 additions & 3 deletions .docs/Notebooks/groundwater2023_watershed_example.py
Original file line number Diff line number Diff line change
@@ -39,9 +39,9 @@
from flopy.utils.voronoi import VoronoiGrid

print(sys.version)
print("numpy version: {}".format(np.__version__))
print("matplotlib version: {}".format(mpl.__version__))
print("flopy version: {}".format(flopy.__version__))
print(f"numpy version: {np.__version__}")
print(f"matplotlib version: {mpl.__version__}")
print(f"flopy version: {flopy.__version__}")

# import all plot style information from defaults.py
sys.path.append("../common")
Loading