Skip to content

Commit

Permalink
restore minimal modpath fields for plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Feb 14, 2024
1 parent 8e9193b commit f364787
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions flopy/plot/plotutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -2681,6 +2681,7 @@ def parse_modpath_selection_options(
("cellface", np.int32),
]
)
MP_MIN_PLOT_FIELDS = ["x", "y", "z", "time", "k", "particleid"]


def to_mp7_pathlines(
Expand Down Expand Up @@ -2709,12 +2710,12 @@ def to_mp7_pathlines(
# check format
dt = data.dtypes
if not (
all(n in dt for n in MP7_PATHLINE_DTYPE.fields.keys())
all(n in dt for n in MP_MIN_PLOT_FIELDS)
or all(n in dt for n in PRT_PATHLINE_DTYPE.fields.keys())
):
raise ValueError(
"Pathline data must contain the following fields: "
f"{MP7_PATHLINE_DTYPE.fields.keys()} for MODPATH 7, or "
f"{MP_MIN_PLOT_FIELDS} for MODPATH 7, or "
f"{PRT_PATHLINE_DTYPE.fields.keys()} for MODFLOW 6 PRT"
)

Expand Down Expand Up @@ -2795,12 +2796,12 @@ def to_mp7_endpoints(
data if ret_type == pd.DataFrame else data.to_records(index=False)
)
if not (
all(n in dt for n in MP7_PATHLINE_DTYPE.fields.keys())
all(n in dt for n in MP_MIN_PLOT_FIELDS)
or all(n in dt for n in PRT_PATHLINE_DTYPE.fields.keys())
):
raise ValueError(
"Pathline data must contain the following fields: "
f"{MP7_PATHLINE_DTYPE.fields.keys()} for MODPATH 7, or "
f"{MP_MIN_PLOT_FIELDS} for MODPATH 7, or "
f"{PRT_PATHLINE_DTYPE.fields.keys()} for MODFLOW 6 PRT"
)

Expand Down

0 comments on commit f364787

Please sign in to comment.