Skip to content

Commit

Permalink
#2673 Check None of met_data.shape
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Oct 10, 2024
1 parent f7bcce0 commit 80a13a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/python/met/dataplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 80a13a9

Please sign in to comment.