From c5a2fe10d4189c517f686b5c276317e02fa77f90 Mon Sep 17 00:00:00 2001 From: Joshua Larsen Date: Wed, 17 Jul 2019 17:26:30 -0700 Subject: [PATCH] fix(modflowpy#615): plotutil masked_values hnoflo, hdry fix --- flopy/mf6/mfmodel.py | 2 +- flopy/plot/plotutil.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/flopy/mf6/mfmodel.py b/flopy/mf6/mfmodel.py index 03cb597de8..a8df530d66 100644 --- a/flopy/mf6/mfmodel.py +++ b/flopy/mf6/mfmodel.py @@ -438,7 +438,7 @@ def hdry(self): return None @property - def hnoflow(self): + def hnoflo(self): return None @property diff --git a/flopy/plot/plotutil.py b/flopy/plot/plotutil.py index efbaf4b7a8..06759e2fd1 100644 --- a/flopy/plot/plotutil.py +++ b/flopy/plot/plotutil.py @@ -1201,6 +1201,21 @@ def _plot_array_helper(plotarray, model=None, modelgrid=None, axes=None, # test if this is vertex or structured grid if model is not None: grid_type = model.modelgrid.grid_type + hnoflo = model.hnoflo + hdry = model.hdry + if defaults['masked_values'] is None: + t = [] + if hnoflo is not None: + t.append(hnoflo) + if hdry is not None: + t.append(hdry) + if t: + defaults['masked_values'] = t + else: + if hnoflo is not None: + defaults['masked_values'].append(hnoflo) + if hdry is not None: + defaults['masked_values'].append(hdry) elif modelgrid is not None: grid_type = modelgrid.grid_type