Skip to content

Commit

Permalink
fix(plotutil.py, grid.py): fix .plot() method using mflay parameter (#…
Browse files Browse the repository at this point in the history
…1134)

* update docstrings in Grid() class
* Close #1132 
* Close #1119
  • Loading branch information
jlarsen-usgs committed Jun 16, 2021
1 parent 1552d11 commit e566845
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
23 changes: 14 additions & 9 deletions flopy/discretization/grid.py
Expand Up @@ -38,16 +38,19 @@ class Grid:
ibound/idomain value for each cell
lenuni : ndarray(int)
model length units
origin_loc : str
Corner of the model grid that is the model origin
'ul' (upper left corner) or 'll' (lower left corner)
origin_x : float
espg : str, int
optional espg projection code
proj4 : str
optional proj4 projection string code
prj : str
optional projection file name path
xoff : float
x coordinate of the origin point (lower left corner of model grid)
in the spatial reference coordinate system
origin_y : float
yoff : float
y coordinate of the origin point (lower left corner of model grid)
in the spatial reference coordinate system
rotation : float
angrot : float
rotation angle of model grid, as it is rotated around the origin point
Attributes
Expand All @@ -66,14 +69,16 @@ class Grid:
spatial reference locates the grid in a coordinate system
lenuni : int
modflow lenuni parameter
origin_x : float
xoffset : float
x coordinate of the origin point in the spatial reference coordinate
system
origin_y : float
yoffset : float
y coordinate of the origin point in the spatial reference coordinate
system
rotation : float
angrot : float
rotation angle of model grid, as it is rotated around the origin point
angrot_radians : float
rotation angle of model grid, in radians
xgrid : ndarray
returns numpy meshgrid of x edges in reference frame defined by
point_type
Expand Down
10 changes: 1 addition & 9 deletions flopy/plot/plotutil.py
Expand Up @@ -866,18 +866,10 @@ def _plot_util3d_helper(

filenames = None
if filename_base is not None:
if mflay is not None:
i0 = int(mflay)
if i0 + 1 >= nplottable_layers:
i0 = nplottable_layers - 1
i1 = i0 + 1
else:
i0 = 0
i1 = nplottable_layers
# build filenames, use local "name" variable (flopy6 adaptation)
filenames = [
"{}_{}_Layer{}.{}".format(filename_base, name[k], k + 1, fext)
for k in range(i0, i1)
for k in range(nplottable_layers)
]

axes = PlotUtilities._plot_array_helper(
Expand Down

0 comments on commit e566845

Please sign in to comment.