Commit 5228085a authored by GROUAZEL's avatar GROUAZEL
Browse files

secure the meshgrid for source data on an irregular grid

parent 6804a809
......@@ -457,7 +457,7 @@ class Resampler(object):
source_lons = source.get_lon().astype('float32')
source_lats = source.get_lat().astype('float32')
source_times = source.get_times()
if isinstance(source, Grid):
if isinstance(source, Grid) and len(source_lons.shape) == 1:
source_lons, source_lats = numpy.meshgrid(source_lons, source_lats)
source_times = numpy.resize(source_times, source_lons.shape)
target_lons = target.get_lon().astype('float32')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment