From 435553cba9f3183a376c933804606cf48d21eeca Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Fri, 15 Mar 2024 13:35:07 -0300 Subject: [PATCH 1/2] port change from #35 --- ioos_qc/qartod.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ioos_qc/qartod.py b/ioos_qc/qartod.py index c256dfc..0eaf2e5 100644 --- a/ioos_qc/qartod.py +++ b/ioos_qc/qartod.py @@ -372,8 +372,9 @@ def check(self, tinp, inp, zinp): with np.errstate(invalid='ignore'): z_idx = (~zinp.mask) & (zinp >= m.zspan.minv) & (zinp <= m.zspan.maxv) else: - # Only test the values with masked Z, ie values with no Z - z_idx = zinp.mask + # If there is no z data in the config, don't try to filter by depth! + # Set z_idx to all True to prevent filtering + z_idx = np.ones(inp.size, dtype=bool) # Combine the T and Z indexes values_idx = (t_idx & z_idx) From f2ec6b20f4b7074de7b73d519ad10b5b2513e7bd Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Fri, 15 Mar 2024 13:47:25 -0300 Subject: [PATCH 2/2] my guess is that this should be 3, fail --- tests/test_qartod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_qartod.py b/tests/test_qartod.py index 51c2bcc..26e2e4e 100644 --- a/tests/test_qartod.py +++ b/tests/test_qartod.py @@ -857,7 +857,7 @@ def test_climatology_test_depths(self): 101 ) ] - expected_result = [1, 1, 1, 3, 3, 2] + expected_result = [1, 1, 1, 3, 3, 3] self._run_test(test_inputs, expected_result)