Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
98158e8
Update cset-workflow logic for mlevel changes
ukmo-huw-lewis Apr 15, 2025
1be1a19
Further rationalisation of includes files - merging surface, plevel and
ukmo-huw-lewis Apr 15, 2025
faf4314
Consolidate generic recipes for pressure level and model level, ensuring
ukmo-huw-lewis Apr 16, 2025
b3f22ee
Update recipes to add generic level type in output titles and webpage
ukmo-huw-lewis Apr 16, 2025
39f4bbd
long plot labels
ukmo-huw-lewis Apr 16, 2025
67fd9e0
Merge remote-tracking branch 'origin/main' into 1317-fix-mlevel-plot-…
ukmo-huw-lewis Apr 17, 2025
de46a6d
Tidy workflow family settings for #1317, to ensure families not created
ukmo-huw-lewis Apr 17, 2025
613502d
Push update to stats branch
ukmo-huw-lewis Apr 24, 2025
2143746
Update example recipe file
ukmo-huw-lewis Apr 24, 2025
bd7f38d
Merge branch 'main' into 1317-fix-mlevel-plot-options
ukmo-huw-lewis Apr 24, 2025
cdebfbe
Updated changeset for #1285, introducing $METHOD env variable to general
ukmo-huw-lewis May 9, 2025
42d7d94
Add new aggregation over all data outputs
ukmo-huw-lewis May 9, 2025
4b7de2d
Merge remote-tracking branch 'origin/HEAD' into 1285-add-summary-stat…
ukmo-huw-lewis May 9, 2025
313c0a5
Update to add statistic changes, including switch ordering for diff
ukmo-huw-lewis May 20, 2025
e52847f
Merge branch 'main' into 1285-add-summary-statistic-plots
ukmo-huw-lewis May 20, 2025
75bef1b
Remove redundant histogram aggregation file. Now replaced with
ukmo-huw-lewis May 20, 2025
d6bebf1
Add time processing options for profile and histogram plotting within
ukmo-huw-lewis May 21, 2025
56f96a1
Merge branch 'main' into 1285-add-summary-statistic-plots
ukmo-huw-lewis May 21, 2025
3b93d4f
Add missing runtime statement
ukmo-huw-lewis May 21, 2025
dbf06a0
Interim update ahead of main merge
ukmo-huw-lewis May 22, 2025
3bc579b
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis May 22, 2025
d336ede
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis May 23, 2025
b092770
2 changes to enable time-statistics for UM vs LFRic comparisons: a)
ukmo-huw-lewis May 24, 2025
a43e8a3
Add non-impacted forcast period cubes back into cubelist (otherwise
ukmo-huw-lewis May 24, 2025
9ab832d
Move time0 treatement to preprocessing (i.e. only called from
ukmo-huw-lewis May 24, 2025
404bb01
Additional functionality for preprocess relevant variables only, to
ukmo-huw-lewis May 25, 2025
2973d4a
Add local changes to include files
ukmo-huw-lewis May 27, 2025
d4c6915
Updated plot.py, local commit
ukmo-huw-lewis May 27, 2025
a67d6e3
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis May 27, 2025
bd15543
Remove local 'old' directory from repo
ukmo-huw-lewis May 27, 2025
a2f54ee
Update plot.py
ukmo-huw-lewis May 28, 2025
b7a73f3
Update histogram recipe files for cutout
ukmo-huw-lewis May 28, 2025
f322257
Add local code changes [note not all tied to MEAN changes]
ukmo-huw-lewis May 28, 2025
a817dfa
Add local changes
ukmo-huw-lewis May 28, 2025
c537713
Commit local changes keeping track with #1403 for testing
ukmo-huw-lewis May 29, 2025
851702a
Bugfixes for creating DimCoord
ukmo-huw-lewis May 29, 2025
1c738be
Bugfixes to creation DimCoord
ukmo-huw-lewis May 29, 2025
13d1a58
Further lat-lon testing
ukmo-huw-lewis May 29, 2025
845dc60
Local commit
ukmo-huw-lewis May 29, 2025
143ec13
Code dump for unpicking further variable/aggregation plotting gaps for
ukmo-huw-lewis May 30, 2025
98ad4ce
Update plot titles in generic recipes
ukmo-huw-lewis May 30, 2025
bdd0273
Update checking for valid subarea cutout + tidy ymin,ymax ranges
ukmo-huw-lewis May 31, 2025
a1b7750
Typo
ukmo-huw-lewis May 31, 2025
5c784fb
Update preproc checks
ukmo-huw-lewis May 31, 2025
3f77d44
Updates for running across cases
ukmo-huw-lewis Jun 2, 2025
322f40e
Update for lat-lon wrapping
ukmo-huw-lewis Jun 2, 2025
120c8f7
Update lat/lon wrapping
ukmo-huw-lewis Jun 3, 2025
2e67f51
Update for plot range changes
ukmo-huw-lewis Jun 4, 2025
02fea12
Update treatment of new DimCoord attributes
ukmo-huw-lewis Jun 5, 2025
c1b0f31
Add update for control of histogram plot ranges for auto variables
ukmo-huw-lewis Jun 5, 2025
3add315
Update
ukmo-huw-lewis Jun 5, 2025
51ba178
Update um_radtime callback
ukmo-huw-lewis Jun 5, 2025
19e42bb
Adding gridcell cutout method
ukmo-huw-lewis Jun 6, 2025
6ed8b19
new function
jwarner8 Mar 28, 2025
c128188
Update src/CSET/operators/collapse.py
jwarner8 Jun 3, 2025
406dfbf
remove common time points func
jwarner8 Jun 3, 2025
8eb9012
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis Jun 6, 2025
16764df
Updates to other PR in development to address testing failures
ukmo-huw-lewis Jun 6, 2025
767cd75
Update for misc testing
ukmo-huw-lewis Jun 6, 2025
3f88a33
Update for SELECT_AREA by trim cells
ukmo-huw-lewis Jun 6, 2025
95a2555
Updates to stay in line with #1429
ukmo-huw-lewis Jun 6, 2025
40aded5
Update rose meta in line with #1433
ukmo-huw-lewis Jun 6, 2025
2a770f0
Updates for a) fix to aggregate by hour_of_day; b) update cutout by
ukmo-huw-lewis Jun 7, 2025
eb78138
Dropping code changes related to issues/PR ahead. Required for CSET
ukmo-huw-lewis Jun 9, 2025
6aae4d9
Tracking changes in #1433
ukmo-huw-lewis Jun 9, 2025
5ee78c0
Commit local changes
ukmo-huw-lewis Jun 10, 2025
33e37f3
Updating to follow #1450 and re-test
ukmo-huw-lewis Jun 11, 2025
a8c52de
Time processing update
ukmo-huw-lewis Jun 13, 2025
0c58fc9
Add prototype for: RANGE method
ukmo-huw-lewis Jun 14, 2025
a2b9571
Add prototype RANGE method + other fixes in line with #1450
ukmo-huw-lewis Jun 14, 2025
dbb6a9c
Update for radiation forecast_period
ukmo-huw-lewis Jun 14, 2025
ff95b25
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis Jun 16, 2025
201ce44
Update for aggregation_by_hour
ukmo-huw-lewis Jun 16, 2025
1d578e5
Updated collapse.py - enables PR testing to succeed
ukmo-huw-lewis Jun 16, 2025
f09a24a
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis Jun 16, 2025
6875aaf
Remove draft codes
ukmo-huw-lewis Jun 16, 2025
a3c3bc0
Tidy spatial difference recipes
ukmo-huw-lewis Jun 16, 2025
53cea51
Update tests in line with code changes
ukmo-huw-lewis Jun 16, 2025
19e54f3
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis Jun 18, 2025
4077316
Add prototype for cell_method
ukmo-huw-lewis Jun 24, 2025
b455585
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis Jun 24, 2025
5085e9f
Update optional varname in constraints
ukmo-huw-lewis Jun 24, 2025
6267a88
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis Jun 26, 2025
65203a1
Rationalise differences relative to latest main
ukmo-huw-lewis Jun 26, 2025
f627dbf
Merge branch 'main' into 1285-add-summary-statistic-plots
ukmo-huw-lewis Jun 30, 2025
d864dfd
Equalise attributes to fix cube merging
ukmo-huw-lewis Jun 30, 2025
3bce673
Update attribute test - fails if no cubes
ukmo-huw-lewis Jun 30, 2025
3391f32
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis Jul 2, 2025
dacfd0e
Merge remote-tracking branch 'origin/main' into 1285-add-summary-stat…
ukmo-huw-lewis Jul 3, 2025
8ce9f44
Revert colobar to main
ukmo-huw-lewis Jul 3, 2025
c150bc8
Updates to reduce changes relative to main.
ukmo-huw-lewis Jul 3, 2025
1c827cb
Update new ALL recipes to catchup with cell_methods and model_name
ukmo-huw-lewis Jul 3, 2025
ae56379
Tidying up cube merging - all workflow tasks succeeding except for
ukmo-huw-lewis Jul 3, 2025
6d5eb7c
Use the "SEQ" collapse method in time_series_case_aggregation_all to
ukmo-huw-lewis Jul 3, 2025
c31b628
Update RAL3LFRIC config defaults
ukmo-huw-lewis Jul 3, 2025
f560b7e
Update aggregate timeseries all for level fields
ukmo-huw-lewis Jul 3, 2025
5dd48d6
Update rose-meta for averaging
ukmo-huw-lewis Jul 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/CSET/operators/collapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def collapse(
ValueError
If additional_percent wasn't supplied while using PERCENTILE method.
"""
if method == "SEQ" or method == "" or method is None:
return cubes
if method == "PERCENTILE" and additional_percent is None:
raise ValueError("Must specify additional_percent")
collapsed_cubes = iris.cube.CubeList([])
Expand All @@ -88,6 +90,10 @@ def collapse(
percent=additional_percent,
)
)
elif method == "RANGE":
cube_max = cube.collapsed(coordinate, iris.analysis.MAX)
cube_min = cube.collapsed(coordinate, iris.analysis.MIN)
collapsed_cubes.append(cube_max - cube_min)
else:
collapsed_cubes.append(
cube.collapsed(coordinate, getattr(iris.analysis, method))
Expand Down
46 changes: 42 additions & 4 deletions src/CSET/operators/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ def _colorbar_map_levels(cube: iris.cube.Cube, axis: Literal["x", "y"] | None =
norm = mpl.colors.BoundaryNorm(levels, ncolors=cmap.N)
logging.debug("Using levels for %s colorbar.", varname)
logging.info("Using levels: %s", levels)

except KeyError:
# Get the range for this variable.
vmin, vmax = var_colorbar["min"], var_colorbar["max"]
Expand Down Expand Up @@ -529,6 +528,11 @@ def _plot_and_save_postage_stamp_spatial_plot(
else:
raise TypeError("Unknown vmin and vmax range.")
vmin, vmax = None, None
# pcolormesh plot of the field and ensure to use norm and not vmin/vmax
# if levels are defined.
if norm is not None:
vmin = None
vmax = None
# pcolormesh plot of the field.
plot = iplt.pcolormesh(member, cmap=cmap, norm=norm, vmin=vmin, vmax=vmax)
else:
Expand Down Expand Up @@ -597,6 +601,9 @@ def _plot_and_save_line_series(
# Store min/max ranges.
y_levels = []

# Check match-up across sequence coords gives consistent sizes
_validate_cubes_coords(cubes, coords)

for cube, coord in zip(cubes, coords, strict=True):
label = None
color = "black"
Expand Down Expand Up @@ -681,6 +688,9 @@ def _plot_and_save_vertical_line_series(

model_colors_map = _get_model_colors_map(cubes)

# Check match-up across sequence coords gives consistent sizes
_validate_cubes_coords(cubes, coords)

for cube, coord in zip(cubes, coords, strict=True):
label = None
color = "black"
Expand Down Expand Up @@ -1076,13 +1086,18 @@ def _spatial_plot(

# Create a plot for each value of the sequence coordinate.
plot_index = []
nplot = np.size(cube.coord(sequence_coordinate).points)
for cube_slice in cube.slices_over(sequence_coordinate):
# Use sequence value so multiple sequences can merge.
sequence_value = cube_slice.coord(sequence_coordinate).points[0]
plot_filename = f"{filename.rsplit('.', 1)[0]}_{sequence_value}.png"
coord = cube_slice.coord(sequence_coordinate)
# Format the coordinate value in a unit appropriate way.
title = f"{recipe_title}\n{coord.units.title(coord.points[0])}"
title = f"{recipe_title}\n [{coord.units.title(coord.points[0])}]"
# Use sequence (e.g. time) bounds if plotting single non-sequence outputs
if nplot == 1 and coord.has_bounds:
if np.size(coord.bounds) > 1:
title = f"{recipe_title}\n [{coord.units.title(coord.bounds[0][0])} to {coord.units.title(coord.bounds[0][1])}]"
# Do the actual plotting.
plotting_func(
cube_slice,
Expand Down Expand Up @@ -1201,6 +1216,19 @@ def _validate_cube_shape(
)


def _validate_cubes_coords(
cubes: iris.cube.CubeList, coords: list[iris.coords.Coord]
) -> None:
"""Check same number of cubes as sequence coordinate for zip functions."""
if len(cubes) != len(coords):
raise ValueError(
f"The number of CubeList entries ({len(cubes)}) should equal the number "
f"of sequence coordinates ({len(coords)})."
f"Check that number of time entries in input data are consistent if "
f"performing time-averaging steps prior to plotting outputs."
)


####################
# Public functions #
####################
Expand Down Expand Up @@ -1514,13 +1542,18 @@ def filter_cube_iterables(cube_iterables) -> bool:
# for similar values of the sequence coordinate. cube_slice can be an iris.cube.Cube
# or an iris.cube.CubeList.
plot_index = []
nplot = np.size(cubes[0].coord(sequence_coordinate).points)
for cubes_slice in cube_iterables:
# Use sequence value so multiple sequences can merge.
seq_coord = cubes_slice[0].coord(sequence_coordinate)
sequence_value = seq_coord.points[0]
plot_filename = f"{filename.rsplit('.', 1)[0]}_{sequence_value}.png"
# Format the coordinate value in a unit appropriate way.
title = f"{recipe_title}\n{seq_coord.units.title(sequence_value)}"
title = f"{recipe_title}\n [{seq_coord.units.title(sequence_value)}]"
# Use sequence (e.g. time) bounds if plotting single non-sequence outputs
if nplot == 1 and seq_coord.has_bounds:
if np.size(seq_coord.bounds) > 1:
title = f"{recipe_title}\n [{seq_coord.units.title(seq_coord.bounds[0][0])} to {seq_coord.units.title(seq_coord.bounds[0][1])}]"
# Do the actual plotting.
_plot_and_save_vertical_line_series(
cubes_slice,
Expand Down Expand Up @@ -1778,6 +1811,7 @@ def plot_histogram_series(
]

plot_index = []
nplot = np.size(cube.coord(sequence_coordinate).points)
# Create a plot for each value of the sequence coordinate. Allowing for
# multiple cubes in a CubeList to be plotted in the same plot for similar
# sequence values. Passing a CubeList into the internal plotting function
Expand All @@ -1793,7 +1827,11 @@ def plot_histogram_series(
plot_filename = f"{filename.rsplit('.', 1)[0]}_{sequence_value}.png"
coord = single_cube.coord(sequence_coordinate)
# Format the coordinate value in a unit appropriate way.
title = f"{recipe_title}\n{coord.units.title(coord.points[0])}"
title = f"{recipe_title}\n [{coord.units.title(coord.points[0])}]"
# Use sequence (e.g. time) bounds if plotting single non-sequence outputs
if nplot == 1 and coord.has_bounds:
if np.size(coord.bounds) > 1:
title = f"{recipe_title}\n [{coord.units.title(coord.bounds[0][0])} to {coord.units.title(coord.bounds[0][1])}]"
# Do the actual plotting.
plotting_func(
cube_slice,
Expand Down
35 changes: 31 additions & 4 deletions src/CSET/operators/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def read_cube(
Constraints to filter data by. Defaults to unconstrained.
model_names: str | list[str], optional
Names of the models that correspond to respective paths in file_paths.
subarea_type: "realworld" | "modelrelative", optional
subarea_type: "gridcells" | "modelrelative" | "realworld", optional
Whether to constrain data by model relative coordinates or real world
coordinates.
subarea_extent: list, optional
Expand Down Expand Up @@ -187,7 +187,6 @@ def read_cubes(

# Select sub region.
cubes = _cutout_cubes(cubes, subarea_type, subarea_extent)

# Merge and concatenate cubes now metadata has been fixed.
cubes = cubes.merge()
cubes = cubes.concatenate()
Expand Down Expand Up @@ -540,7 +539,7 @@ def _longitude_fix_callback(cube: iris.cube.Cube):
long_points -= 180.0
long_coord.points = long_points

# Update coord bounds to be consistent with wrapping
# Update coord bounds to be consistent with wrapping.
if long_coord.has_bounds() and np.size(long_coord) > 1:
long_coord.bounds = None
long_coord.guess_bounds()
Expand Down Expand Up @@ -685,6 +684,7 @@ def _fix_um_radtime(cube: iris.cube.Cube):
"""
try:
if cube.attributes["STASH"] in [
"m01s01i207",
"m01s01i208",
"m01s02i205",
"m01s02i201",
Expand All @@ -697,7 +697,6 @@ def _fix_um_radtime(cube: iris.cube.Cube):
# Convert time points to datetime objects
time_unit = time_coord.units
time_points = time_unit.num2date(time_coord.points)

# Skip if times don't need fixing.
if time_points[0].minute == 0 and time_points[0].second == 0:
return
Expand Down Expand Up @@ -869,6 +868,7 @@ def _lfric_time_callback(cube: iris.cube.Cube):
# Construct forecast_reference time if it doesn't exist.
try:
tcoord = cube.coord("time")
# Set time coordinate to common basis "hours since 1970"
try:
tcoord.convert_units("hours since 1970-01-01 00:00:00")
except ValueError:
Expand Down Expand Up @@ -941,3 +941,30 @@ def _lfric_forecast_period_standard_name_callback(cube: iris.cube.Cube):
coord.standard_name = "forecast_period"
except iris.exceptions.CoordinateNotFoundError:
pass


def _remove_time0(cubes: iris.cube.CubeList):
"""Remove T0 from UM inputs to allow time-averaged comparison with LFRic.

A number of UM outputs contain T=0 initial time diagnostic fields, while
LFRic diagnostics begin from T=1 output step. This does not cause issues
for comparing UM with LFRic for hour-by-hour comparisons, for which times
are matched up in code. However, for any recipes requiring collapse by
time ahead of comparison, computing averages over e.g. 24h vs 25h window
results in different timestamps in each collapsed cube, breaking subsequent
CSET time-checking steps to compare like-with-like.

This function removes any outputs at T=0 to support time-processed comparisons.
"""
valid_cubes = iris.cube.CubeList()
for cube in cubes:
if cube.coords("forecast_period"):
valid_cube = cube.extract(
iris.Constraint(forecast_period=lambda cell: cell >= 0.25)
)
if valid_cube:
valid_cubes.append(valid_cube)
else:
valid_cubes.append(cube)

return valid_cubes
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
category: $LEVELTYPE Level Time Series
title: "$VARNAME $LEVEL domain mean time series\n Aggregation over all cases"
description: Plots a time series of the domain mean $VARNAME at $LEVELTYPE $LEVEL by using all available times.

steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names: $MODEL_NAME
constraint:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: $VARNAME
level_constraint:
operator: constraints.generate_level_constraint
coordinate: $LEVELTYPE
levels: $LEVEL

- operator: collapse.collapse
coordinate: [grid_latitude, grid_longitude]
method: MEAN

- operator: aggregate.ensure_aggregatable_across_cases

- operator: collapse.collapse_by_validity_time
method: SEQ

# Make a single NetCDF with all the data inside it.
- operator: write.write_cube_to_nc
overwrite: True

# Plot the data.
- operator: plot.plot_line_series
series_coordinate: time
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
category: Profiles
title: Domain mean $VARNAME vertical profile
description: Plots a time series of vertical profiles for the domain horizontal mean $VARNAME using a $LEVELTYPE coordinate.
title: Domain mean $VARNAME vertical profile $METHOD
description: Plots the $METHOD of vertical profiles for the domain horizontal mean
$VARNAME using a $LEVELTYPE coordinate.

steps:
- operator: read.read_cubes
Expand All @@ -22,6 +23,11 @@ steps:
coordinate: [grid_latitude, grid_longitude]
method: MEAN

# If required, collapse data using specified time analysis method (or sequence)
- operator: collapse.collapse
coordinate: [time]
method: $METHOD

# Plot the vertical line series.
- operator: plot.plot_vertical_line_series
series_coordinate: $LEVELTYPE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
category: Profiles
title: "Domain mean $VARNAME vertical profile\n Aggregation over all cases"
description: |
Plots a vertical profile for the domain horizontal mean $VARNAME using a
$LEVELTYPE coordinate. Multiple cases are aggregated together for all available times.

steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names: $MODEL_NAME
constraint:
operator: constraints.combine_constraints
variable_constraint:
operator: constraints.generate_var_constraint
varname: $VARNAME
level_constraint:
operator: constraints.generate_level_constraint
coordinate: $LEVELTYPE
levels: "*"

- operator: collapse.collapse
coordinate: [grid_latitude, grid_longitude]
method: MEAN

- operator: aggregate.ensure_aggregatable_across_cases

- operator: collapse.collapse
coordinate: [time]
method: MEAN

# Plot the vertical line series.
- operator: plot.plot_vertical_line_series
series_coordinate: $LEVELTYPE
sequence_coordinate: time

# Make a single NetCDF with all the data inside it.
- operator: write.write_cube_to_nc
overwrite: True
2 changes: 1 addition & 1 deletion src/CSET/recipes/generic_level_histogram_series.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ steps:
subarea_extent: $SUBAREA_EXTENT

- operator: plot.plot_histogram_series
sequence_coordinate: time
sequence_coordinate: $SEQUENCE
# stamp_coordinate and single_plot optional and only required for ensemble data
stamp_coordinate: "realization"
single_plot: False
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
category: Histogram
title: $VARNAME $LEVELTYPE $LEVEL histogram case aggregation
title: "Histogram $VARNAME $LEVELTYPE $LEVEL\n Aggregation over all cases"
description: |
Extracts and plots the probability density of $LEVEL level $VARNAME from a
file at $LEVELTYPE level $LEVEL of $MODEL_NAME. It uses
Expand Down
8 changes: 6 additions & 2 deletions src/CSET/recipes/generic_level_spatial_plot_sequence.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
category: $LEVELTYPE Level Spatial
title: $MODEL_NAME $VARNAME $LEVELTYPE$LEVEL
title: $MODEL_NAME $VARNAME $LEVELTYPE$LEVEL $METHOD
description: |
Extracts ands plots the $VARNAME from $MODEL_NAME at $LEVELTYPE level $LEVEL.
Extracts and plots the $METHOD of $VARNAME from $MODEL_NAME at $LEVELTYPE level $LEVEL.

steps:
- operator: read.read_cube
Expand All @@ -18,6 +18,10 @@ steps:
subarea_type: $SUBAREA_TYPE
subarea_extent: $SUBAREA_EXTENT

- operator: collapse.collapse
coordinate: [time]
method: $METHOD

- operator: plot.spatial_contour_plot
sequence_coordinate: time

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
category: $LEVELTYPE Level Spatial
title: "$MODEL_NAME $VARNAME $LEVELTYPE$LEVEL\n Aggregation over all cases"
description: |
Extracts ands plots the $VARNAME from $MODEL_NAME at $LEVELTYPE level $LEVEL.
Multiple cases are aggregated together for all available times.

steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
constraint:
operator: constraints.combine_constraints
variable_constraint:
operator: constraints.generate_var_constraint
varname: $VARNAME
level_constraint:
operator: constraints.generate_level_constraint
coordinate: $LEVELTYPE
levels: $LEVEL

- operator: aggregate.ensure_aggregatable_across_cases

- operator: collapse.collapse
coordinate: time
method: MEAN

- operator: plot.spatial_contour_plot
sequence_coordinate: time

- operator: write.write_cube_to_nc
overwrite: True
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
category: Surface Time Series
title: Domain mean $VARNAME time series
description: Plots a time series of the domain mean $VARNAME.
description: Plots a time series of the domain horizontal mean $VARNAME.

steps:
- operator: read.read_cubes
Expand Down
Loading