diff --git a/satpy/readers/yaml_reader.py b/satpy/readers/yaml_reader.py index f98cc60e83..631451c6f9 100644 --- a/satpy/readers/yaml_reader.py +++ b/satpy/readers/yaml_reader.py @@ -739,8 +739,11 @@ def _load_dataset_with_area(self, dsid, coords): if area is not None: ds.attrs['area'] = area - if (('x' not in ds.coords) or('y' not in ds.coords)) and \ - hasattr(area, 'get_proj_vectors_dask'): + calc_coords = (('x' not in ds.coords) or('y' not in ds.coords)) and hasattr(area, 'get_proj_vectors_dask') + if calc_coords and hasattr(area, 'get_proj_vectors'): + ds['x'], ds['y'] = area.get_proj_vectors() + elif calc_coords: + # older pyresample with dask-only method ds['x'], ds['y'] = area.get_proj_vectors_dask(CHUNK_SIZE) return ds diff --git a/satpy/resample.py b/satpy/resample.py index 04e892696e..bcd33398d6 100644 --- a/satpy/resample.py +++ b/satpy/resample.py @@ -790,8 +790,11 @@ def compute(self, data, expand=True, **kwargs): # Update coords if we can if ('y' in data.coords or 'x' in data.coords) and isinstance(target_geo_def, AreaDefinition): coord_chunks = (d_arr.chunks[y_axis], d_arr.chunks[x_axis]) - x_coord, y_coord = target_geo_def.get_proj_vectors_dask( - chunks=coord_chunks) + if hasattr(target_geo_def, 'get_proj_vectors'): + x_coord, y_coord = target_geo_def.get_proj_vectors() + else: + # older version of pyresample + x_coord, y_coord = target_geo_def.get_proj_vectors_dask(chunks=coord_chunks) if 'y' in data.coords: coords['y'] = y_coord if 'x' in data.coords: