Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop non-dimensional coordinates in Compositor #796

Merged
merged 8 commits into from
Jun 12, 2019
11 changes: 10 additions & 1 deletion satpy/composites/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,16 @@ def check_areas(self, data_arrays):
"'{}'".format(self.attrs['name']))
raise IncompatibleAreas("Areas are different")

return data_arrays
# Drop non-dimensional coordinates
new_arrays = []
for ds in data_arrays:
non_dimensional = [coord for coord in ds.coords if coord not in ds.dims]
if non_dimensional:
new_arrays.append(ds.drop(non_dimensional))
else:
new_arrays.append(ds)

return new_arrays


class SunZenithCorrectorBase(CompositeBase):
Expand Down