From 80a13a998cd6d306207433e0af9b7bdc8af9552d Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Thu, 10 Oct 2024 22:13:29 +0000 Subject: [PATCH] #2673 Check None of met_data.shape --- scripts/python/met/dataplane.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/python/met/dataplane.py b/scripts/python/met/dataplane.py index a28661b365..9e25740781 100644 --- a/scripts/python/met/dataplane.py +++ b/scripts/python/met/dataplane.py @@ -178,7 +178,11 @@ def validate_met_data(met_data, fill_value=None): met_base.quit(f"{method_name} The met_data is None") sys.exit(1) - nx, ny = met_data.shape + if hasattr(met_data, 'shape'): + nx, ny = met_data.shape + else: + met_base.quit(f"{method_name} The met_data does not have shape member") + sys.exit(1) met_fill_value = met_base.MET_FILL_VALUE if dataplane.is_xarray_dataarray(met_data):