Skip to content
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 autotest/t007_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def test_mg():
ms.modelgrid.set_coord_info()

xll, yll = 321., 123.
angrot = 20
angrot = 20.
ms.modelgrid = flopy.discretization.StructuredGrid(delc=ms.dis.delc.array,
delr=ms.dis.delr.array,
xoff=xll, yoff=xll,
Expand Down
17 changes: 9 additions & 8 deletions flopy/discretization/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,20 @@ def __init__(self, grid_type=None, top=None, botm=None, idomain=None,
# access to basic grid properties
###################################
def __repr__(self):
items = []
if self.xoffset is not None and self.yoffset is not None \
and self.angrot is not None:
s = "xll:{0:<.10G}; yll:{1:<.10G}; rotation:{2:<G}; ". \
format(self.xoffset, self.yoffset, self.angrot)
else:
s = ''
items += [
"xll:" + str(self.xoffset),
"yll:" + str(self.yoffset),
"rotation:" + str(self.angrot)]
if self.proj4 is not None:
s += "proj4_str:{0}; ".format(self.proj4)
items.append("proj4_str:" + str(self.proj4))
if self.units is not None:
s += "units:{0}; ".format(self.units)
items.append("units:" + str(self.units))
if self.lenuni is not None:
s += "lenuni:{0}; ".format(self.lenuni)
return s
items.append("lenuni:" + str(self.lenuni))
return '; '.join(items)

@property
def is_valid(self):
Expand Down