From b4340fb35978f2646c13635ffbbbf2365101a9a9 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Mon, 27 Nov 2023 15:01:33 -0500 Subject: [PATCH] restore seqn_key usage in to_mp7_pathlines, ignore irpt in roundtrip test --- autotest/test_plotutil.py | 8 ++++++-- flopy/plot/plotutil.py | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/autotest/test_plotutil.py b/autotest/test_plotutil.py index 7e5a5532c5..66ca79a608 100644 --- a/autotest/test_plotutil.py +++ b/autotest/test_plotutil.py @@ -299,9 +299,13 @@ def test_to_prt_pathlines_roundtrip(): mp7_pls = to_mp7_pathlines(inp_pls) prt_pls = to_prt_pathlines(mp7_pls) inp_pls.drop( - ["imdl", "iprp", "name", "istatus", "ireason"], axis=1, inplace=True + ["imdl", "iprp", "irpt", "name", "istatus", "ireason"], + axis=1, + inplace=True, ) prt_pls.drop( - ["imdl", "iprp", "name", "istatus", "ireason"], axis=1, inplace=True + ["imdl", "iprp", "irpt", "name", "istatus", "ireason"], + axis=1, + inplace=True, ) assert np.allclose(inp_pls, prt_pls) diff --git a/flopy/plot/plotutil.py b/flopy/plot/plotutil.py index 4dcb013656..b862331693 100644 --- a/flopy/plot/plotutil.py +++ b/flopy/plot/plotutil.py @@ -2691,8 +2691,7 @@ def to_mp7_pathlines( # build mp7 format recarray ret = np.core.records.fromarrays( [ - data["irpt"], - # data[seqn_key], + data[seqn_key], data["iprp"], data[seqn_key], data["irpt"], @@ -2924,7 +2923,7 @@ def to_prt_pathlines( data["timestep"], np.zeros(data.shape[0]), data["particlegroup"], - data["particleid"], + data["sequencenumber"], data["k"], data["node"], np.zeros(data.shape[0]), # todo izone?