From 009a985e215dc8f33282c841795b056b435b72c2 Mon Sep 17 00:00:00 2001 From: Rebecca Jean Herman Date: Wed, 17 Jan 2024 15:51:42 +0100 Subject: [PATCH] Allow contiguous representation of extracted regions (#2230) --- esmvalcore/preprocessor/_area.py | 1 - tests/unit/preprocessor/_area/test_area.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/esmvalcore/preprocessor/_area.py b/esmvalcore/preprocessor/_area.py index ae78526a2d..145b87ec38 100644 --- a/esmvalcore/preprocessor/_area.py +++ b/esmvalcore/preprocessor/_area.py @@ -84,7 +84,6 @@ def extract_region( latitude=(start_latitude, end_latitude), ignore_bounds=True, ) - region_subset = region_subset.intersection(longitude=(0., 360.)) else: region_subset = _extract_irregular_region( cube, diff --git a/tests/unit/preprocessor/_area/test_area.py b/tests/unit/preprocessor/_area/test_area.py index a74ac8ba06..3939437f33 100644 --- a/tests/unit/preprocessor/_area/test_area.py +++ b/tests/unit/preprocessor/_area/test_area.py @@ -770,7 +770,7 @@ def test_crop_cube_with_ne_file(ne_ocean_shapefile): result = _crop_cube(cube, *geometries.bounds, cmor_coords=False) result = (result.coord("latitude").points[-1], result.coord("longitude").points[-1]) - expected = (89., 359.) + expected = (89., 179.) np.testing.assert_allclose(result, expected)