From 933403fe5d3a78aaad675dbe4f9b54a7d9a53baf Mon Sep 17 00:00:00 2001 From: Lee de Mora Date: Tue, 25 Jun 2019 12:02:35 +0100 Subject: [PATCH] Fixed problem when multi_model fails when the cube has no latitude or longitude component. --- esmvalcore/preprocessor/_multimodel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/esmvalcore/preprocessor/_multimodel.py b/esmvalcore/preprocessor/_multimodel.py index f76425e471..fb50e6c243 100644 --- a/esmvalcore/preprocessor/_multimodel.py +++ b/esmvalcore/preprocessor/_multimodel.py @@ -107,15 +107,17 @@ def _put_in_cube(template_cube, cube_data, statistic, t_axis): t_axis, standard_name='time', units=template_cube.coord('time').units) - lats = template_cube.coord('latitude') - lons = template_cube.coord('longitude') # no plevs if len(template_cube.shape) == 3: + lats = template_cube.coord('latitude') + lons = template_cube.coord('longitude') cspec = [(times, 0), (lats, 1), (lons, 2)] # plevs elif len(template_cube.shape) == 4: plev = template_cube.coord('air_pressure') + lats = template_cube.coord('latitude') + lons = template_cube.coord('longitude') cspec = [(times, 0), (plev, 1), (lats, 2), (lons, 3)] elif len(template_cube.shape) == 1: cspec = [