File tree Expand file tree Collapse file tree
src/ref_sample_data/data_request Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,14 +106,17 @@ def decimate_dataset(self, dataset: xr.Dataset) -> xr.Dataset | None:
106106 has_latlon = "lat" in dataset .dims and "lon" in dataset .dims
107107 has_ij = "i" in dataset .dims and "j" in dataset .dims
108108
109+ # The AMOC variable `msftmz` has these strange dims and we do not want to decimate
110+ skip_decimate = {"time" , "basin" , "lev" , "lat" }.issubset (dataset .dims )
111+
109112 if has_latlon :
110113 assert len (dataset .lat .dims ) == 1 and len (dataset .lon .dims ) == 1
111114
112115 result = decimate_rectilinear (dataset )
113116 elif has_ij :
114117 # 2d curvilinear grid (generally ocean variables)
115118 result = decimate_curvilinear (dataset )
116- else :
119+ elif not skip_decimate :
117120 raise ValueError ("Cannot decimate this grid: too many dimensions" )
118121
119122 if "time" in dataset .dims and self .time_span is not None :
You can’t perform that action at this time.
0 commit comments