Skip to content
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

refactor(plot): remove deprecated dis and disu thickness property #1195

Merged
merged 2 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .docs/main.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
FloPy Documentation
===================

**Documentation for version 3.3.4 --- release candidate**
**Documentation for version 3.3.5 --- release candidate**

Return to the Github `FloPy <https://github.com/modflowpy/flopy>`_ website where the code resides.

Expand Down
12 changes: 12 additions & 0 deletions .docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ Contents:
_notebooks/tutorial02_mf


.IPYNB_CHECKPOINTS Tutorials
----------------------------

Contents:

.. toctree::
:maxdepth: 2

_notebooks/tutorial01_mf-checkpoint
_notebooks/tutorial02_mf-checkpoint


SEAWAT Tutorials
----------------

Expand Down
26 changes: 17 additions & 9 deletions autotest/t007_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def test_mg():
botm=botm,
)
bas = flopy.modflow.ModflowBas(ms, ifrefm=True)
t = dis.thickness
t = ms.modelgrid.thick

# test instantiation of an empty basic Structured Grid
mg = flopy.discretization.StructuredGrid(dis.delc.array, dis.delr.array)
Expand Down Expand Up @@ -1503,20 +1503,28 @@ def test_model_dot_plot():
import matplotlib.pyplot as plt

loadpth = os.path.join("..", "examples", "data", "mf2005_test")
ml = flopy.modflow.Modflow.load("ibs2k.nam", "mf2k", model_ws=loadpth)
ml = flopy.modflow.Modflow.load(
"ibs2k.nam", "mf2k", model_ws=loadpth, check=False
)
ax = ml.plot()
assert isinstance(ax, list)
assert len(ax) == 20
assert isinstance(ax, list), "ml.plot() ax is is not a list"
assert len(ax) == 18, "number of axes ({}) is " "not equal to 18".format(
len(ax)
)
plt.close("all")

# plot specific dataset
ax = ml.bcf6.hy.plot()
assert isinstance(ax, list)
assert len(ax) == 2
assert isinstance(ax, list), "ml.bcf6.hy.plot() ax is is not a list"
assert len(ax) == 2, "number of hy axes ({}) " "is not equal to 2".format(
len(ax)
)

# special case where nlay != plottable
ax = ml.bcf6.vcont.plot()
assert isinstance(ax, plt.Axes)
assert isinstance(
ax, plt.Axes
), "ml.bcf6.vcont.plot() ax is is not of type plt.Axes"
plt.close("all")


Expand Down Expand Up @@ -1783,12 +1791,12 @@ def main():
# test_netcdf_classmethods()
# build_netcdf()
# build_sfr_netcdf()
test_twri_mg()
# test_twri_mg()
# test_mg()
# test_mbase_modelgrid()
# test_mt_modelgrid()
# test_rotation()
# test_model_dot_plot()
test_model_dot_plot()
# test_get_lrc_get_node()
# test_vertex_model_dot_plot()
# test_sr_with_Map()
Expand Down
36 changes: 18 additions & 18 deletions autotest/t050_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test_vtk_export_packages():
# totalbytes = os.path.getsize(filetocheck)
# assert(totalbytes==1019857)
nlines = count_lines_in_file(filetocheck)
assert nlines == 8496
assert nlines == 8491, "nlines ({}) not equal to 8491".format(nlines)

# upw with point scalar output
output_dir = os.path.join(cpth, "UPW")
Expand All @@ -184,7 +184,7 @@ def test_vtk_export_packages():
# totalbytes1 = os.path.getsize(filetocheck)
# assert(totalbytes1==2559173)
nlines1 = count_lines_in_file(filetocheck)
assert nlines1 == 21215
assert nlines1 == 21215, "nlines ({}) not equal to 21215".format(nlines)

# bas with smoothing on
output_dir = os.path.join(cpth, "BAS")
Expand Down Expand Up @@ -528,15 +528,15 @@ def test_vtk_vti():
# totalbytes = os.path.getsize(filetocheck)
# assert(totalbytes==1075)
nlines = count_lines_in_file(filetocheck)
assert nlines == 21
assert nlines == 17, "nlines ({}) not equal to 17".format(nlines)

# 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
assert nlines1 == 29, "nlines1 ({}) not equal to 29".format(nlines1)

# with binary
dis.export(output_dir + "_bin", fmt="vtk", binary=True)
Expand All @@ -554,7 +554,7 @@ def test_vtk_vti():
# totalbytes3 = os.path.getsize(filetocheck)
# assert(totalbytes3==1606)
nlines3 = count_lines_in_file(filetocheck)
assert nlines3 == 41
assert nlines3 == 37, "nlines3 ({}) not equal to 37".format(nlines3)

# force .vtu
filenametocheck = "DIS.vtu"
Expand All @@ -563,7 +563,7 @@ def test_vtk_vti():
# totalbytes4 = os.path.getsize(filetocheck)
# assert(totalbytes4==5723)
nlines4 = count_lines_in_file(filetocheck)
assert nlines4 == 129
assert nlines4 == 125, "nlines4 ({}) not equal to 125".format(nlines4)

# vector
filenametocheck = "vect.vti"
Expand Down Expand Up @@ -954,17 +954,17 @@ def test_vtk_export_true2d_nonregyz():


if __name__ == "__main__":
test_vtk_export_array2d()
test_vtk_export_array3d()
test_vtk_transient_array_2d()
# test_vtk_export_array2d()
# test_vtk_export_array3d()
# test_vtk_transient_array_2d()
test_vtk_export_packages()
test_vtk_mf6()
test_vtk_binary_head_export()
test_vtk_cbc()
test_vtk_vector()
# 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()
# test_vtk_vtr()
# test_vtk_export_true2d_regular()
# test_vtk_export_true2d_nonregxy()
# test_vtk_export_true2d_nonregxz()
# test_vtk_export_true2d_nonregyz()
Loading