From e480d3666079e9a75d6d7788533ae8a38953c3ed Mon Sep 17 00:00:00 2001 From: daflack Date: Tue, 21 Jan 2025 13:17:48 +0000 Subject: [PATCH] Apply suggestions from code review --- src/CSET/operators/collapse.py | 3 ++- tests/operators/test_collapse.py | 2 +- ...perature.nc => long_forecast_air_temp_fcst_1.nc} | Bin 3 files changed, 3 insertions(+), 2 deletions(-) rename tests/test_data/{long_forecast_air_temperature.nc => long_forecast_air_temp_fcst_1.nc} (100%) diff --git a/src/CSET/operators/collapse.py b/src/CSET/operators/collapse.py index 374551ab3..71bb03a8c 100644 --- a/src/CSET/operators/collapse.py +++ b/src/CSET/operators/collapse.py @@ -108,7 +108,8 @@ def collapse_by_hour_of_day( Collapsing of the cube is around the 'time' coordinate. The coordinates are first grouped by the hour of day, and then aggregated by the hour of day to create a diurnal cycle. This operator is applicable for both single - forecasts and for multiple forecasts. + forecasts and for multiple forecasts. The hour used is based on the units of + the time coordinate. If the time coordinate is in UTC, hour will be in UTC. To apply this operator successfully there must only be one time dimension. Should a MultiDim exception be raised the user first needs to apply the diff --git a/tests/operators/test_collapse.py b/tests/operators/test_collapse.py index 43d5be05e..7b28660a2 100644 --- a/tests/operators/test_collapse.py +++ b/tests/operators/test_collapse.py @@ -25,7 +25,7 @@ def long_forecast() -> iris.cube.Cube: """Get long_forecast to run tests on.""" return iris.load_cube( - "tests/test_data/long_forecast_air_temperature.nc", "air_temperature" + "tests/test_data/long_forecast_air_temp_fcst_1.nc", "air_temperature" ) diff --git a/tests/test_data/long_forecast_air_temperature.nc b/tests/test_data/long_forecast_air_temp_fcst_1.nc similarity index 100% rename from tests/test_data/long_forecast_air_temperature.nc rename to tests/test_data/long_forecast_air_temp_fcst_1.nc