From b6d006e01f8c4e17fb5db8be48a655d3930c7c83 Mon Sep 17 00:00:00 2001 From: Brioch Date: Fri, 17 Sep 2021 09:03:49 +1200 Subject: [PATCH 1/2] Think mg extent is x0,x1,y0,y1? --- flopy/export/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flopy/export/utils.py b/flopy/export/utils.py index 0ded8e0052..f2bdf5f9e5 100644 --- a/flopy/export/utils.py +++ b/flopy/export/utils.py @@ -1488,7 +1488,7 @@ def export_array( if rotate is not None: a = rotate(a, modelgrid.angrot, cval=nodata) height_rot, width_rot = a.shape - xmin, ymin, xmax, ymax = modelgrid.extent + xmin, xmax, ymin, ymax = modelgrid.extent dx = (xmax - xmin) / width_rot dy = (ymax - ymin) / height_rot cellsize = np.max((dx, dy)) From 4d12588e0cc355638aa0da1b2bdf3723d41f2d9b Mon Sep 17 00:00:00 2001 From: Joshua Larsen Date: Tue, 5 Oct 2021 11:51:26 -0700 Subject: [PATCH 2/2] Update t007_test.py for ASCII grid extent bugfix --- autotest/t007_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autotest/t007_test.py b/autotest/t007_test.py index 520c8c57d3..3d11d454ad 100644 --- a/autotest/t007_test.py +++ b/autotest/t007_test.py @@ -426,7 +426,7 @@ def test_export_array(): if "yllcorner" in line.lower(): val = float(line.strip().split()[-1]) if rotate: - assert np.abs(val - m.modelgrid.extent[1]) < 1e-6 + assert np.abs(val - m.modelgrid.extent[2]) < 1e-6 else: assert np.abs(val - m.modelgrid.yoffset) < 1e-6 if "cellsize" in line.lower():