From e70989fea071c6560c897cd01768e00edaeb073c Mon Sep 17 00:00:00 2001 From: James Warner Date: Thu, 20 Aug 2026 11:44:12 +0100 Subject: [PATCH 1/3] remove parallisation test --- tests/operators/test_ageofair.py | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/tests/operators/test_ageofair.py b/tests/operators/test_ageofair.py index b3cd33f3c..dcac45e43 100644 --- a/tests/operators/test_ageofair.py +++ b/tests/operators/test_ageofair.py @@ -77,22 +77,8 @@ def test_calc_dist(): assert np.allclose(dist, actual_distance, rtol=1e-06, atol=20000) -@pytest.mark.slow def test_aoa_nocyclic(xwind, ywind, wwind, geopot): """Test case when not cyclic.""" - assert np.allclose( - ageofair.compute_ageofair( - xwind, ywind, wwind, geopot, plev=500, cyclic=False - ).data, - read.read_cube("tests/test_data/ageofair/aoa_out_nocyclic.nc").data, - rtol=1e-06, - atol=1e-02, - ) - - -@pytest.mark.slow -def test_aoa_cyclic_parallel_processing(xwind, ywind, wwind, geopot): - """Test case when cyclic with parallel processing.""" assert np.allclose( ageofair.compute_ageofair( xwind, @@ -100,10 +86,10 @@ def test_aoa_cyclic_parallel_processing(xwind, ywind, wwind, geopot): wwind, geopot, plev=500, - cyclic=True, - multicore=True, + cyclic=False, + multicore=False, ).data, - read.read_cube("tests/test_data/ageofair/aoa_out_cyclic.nc").data, + read.read_cube("tests/test_data/ageofair/aoa_out_nocyclic.nc").data, rtol=1e-06, atol=1e-02, ) From f13d64c5bc5b52868296c9d5d475a0004b0d5f0b Mon Sep 17 00:00:00 2001 From: James Warner Date: Thu, 20 Aug 2026 11:44:38 +0100 Subject: [PATCH 2/3] update names --- .../recipes/derived_diagnostics/age_of_air/ageofair.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CSET/recipes/derived_diagnostics/age_of_air/ageofair.yaml b/src/CSET/recipes/derived_diagnostics/age_of_air/ageofair.yaml index 42f07a220..e31f74852 100644 --- a/src/CSET/recipes/derived_diagnostics/age_of_air/ageofair.yaml +++ b/src/CSET/recipes/derived_diagnostics/age_of_air/ageofair.yaml @@ -28,7 +28,7 @@ steps: operator: constraints.combine_constraints variable_constraint: operator: constraints.generate_var_constraint - varname: x_wind + varname: zonal_wind_at_pressure_levels pressure_level_constraint: operator: constraints.generate_level_constraint coordinate: pressure @@ -44,7 +44,7 @@ steps: operator: constraints.combine_constraints variable_constraint: operator: constraints.generate_var_constraint - varname: y_wind + varname: meridional_wind_at_pressure_levels pressure_level_constraint: operator: constraints.generate_level_constraint coordinate: pressure @@ -60,7 +60,7 @@ steps: operator: constraints.combine_constraints variable_constraint: operator: constraints.generate_var_constraint - varname: upward_air_velocity + varname: vertical_wind_at_pressure_levels pressure_level_constraint: operator: constraints.generate_level_constraint coordinate: pressure @@ -76,7 +76,7 @@ steps: operator: constraints.combine_constraints variable_constraint: operator: constraints.generate_var_constraint - varname: geopotential_height + varname: geopotential_height_at_pressure_levels pressure_level_constraint: operator: constraints.generate_level_constraint coordinate: pressure From 6625ab823d7ac899bc83ac979e2d2fefbaded934 Mon Sep 17 00:00:00 2001 From: James Warner Date: Thu, 20 Aug 2026 11:46:39 +0100 Subject: [PATCH 3/3] fix tests --- tests/operators/test_ageofair.py | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/tests/operators/test_ageofair.py b/tests/operators/test_ageofair.py index dcac45e43..780867eeb 100644 --- a/tests/operators/test_ageofair.py +++ b/tests/operators/test_ageofair.py @@ -130,6 +130,7 @@ def test_aoa_timefreq(xwind, ywind, wwind, geopot): geopot[[1, 2, 4, 5], :, :, :], plev=500, cyclic=True, + multicore=False, ) @@ -164,25 +165,6 @@ def test_aoa_ens(ens_regridded, ens_regridded_out): ) -@pytest.mark.slow -def test_aoa_ens_multicore(ens_regridded, ens_regridded_out): - """Test case with ensembles ensuring that single core and multicore produce identical values.""" - assert np.allclose( - ageofair.compute_ageofair( - ens_regridded.extract("x_wind")[0], - ens_regridded.extract("y_wind")[0], - ens_regridded.extract("upward_air_velocity")[0], - ens_regridded.extract("geopotential_height")[0], - plev=200, - cyclic=False, - multicore=True, - ).data, - ens_regridded_out.data, - rtol=1e-06, - atol=1e-02, - ) - - def test_aoa_misordered_dims(xwind, ywind, wwind, geopot): """Dimensions in input cubes do not match expected ordering.""" xwind.transpose([0, 1, 3, 2]) @@ -197,6 +179,7 @@ def test_aoa_misordered_dims(xwind, ywind, wwind, geopot): geopot, plev=500, cyclic=True, + multicore=False, ) @@ -218,4 +201,5 @@ def test_aoa_misordered_dims_ens(ens_regridded): geopot, plev=500, cyclic=True, + multicore=False, )