Skip to content

Commit 0d9a51c

Browse files
authored
Merge pull request #1742 from MetOffice/1738_dialy_min_temperature_difference
Add spatial difference for min temperature
2 parents 1d3ce66 + 6e16f15 commit 0d9a51c

File tree

4 files changed

+77
-1
lines changed

4 files changed

+77
-1
lines changed

src/CSET/cset_workflow/meta/diagnostics/rose-meta.conf

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,20 @@ description=IMPACT-BASED DIAGNOSTIC.
941941
help=This diagnostic identifies the daily minimum temperature at each grid point.
942942
type=python_boolean
943943
compulsory=true
944-
sort-key=dw9
944+
sort-key=dw12
945+
946+
[template variables=DAILY_09_MINIMUM_TEMPERATURE_SPATIAL_DIFFERENCE]
947+
ns=Diagnostics/Derived/Daily
948+
title=Daily minimum temperature: spatial difference
949+
description=IMPACT-BASED DIAGNOSTIC.
950+
Determines the daily minimum temperature defined between 0900 UTC
951+
and 0900 UTC the following day and takes the difference between
952+
two models. Requires temperature_at_screen_level with cell_method
953+
of minimum.
954+
help=This diangostic identifies the daily minimum temperature at each grid point.
955+
type=python_boolean
956+
compulsory=true
957+
sort-key=dw13
945958

946959
###################################
947960
# Aviation

src/CSET/cset_workflow/rose-suite.conf.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ CSET_MODEL_COUNT=1
2121
DAILY_09_MAXIMUM_TEMPERATURE_SPATIAL_PLOT=False
2222
DAILY_09_MAXIMUM_TEMPERATURE_SPATIAL_DIFFERENCE=False
2323
DAILY_09_MINIMUM_TEMPERATURE_SPATIAL_PLOT=False
24+
DAILY_09_MINIMUM_TEMPERATURE_SPATIAL_DIFFERENCE=False
2425
DETERMINISTIC_PLOT_CAPE_RATIO=False
2526
DETERMINISTIC_PLOT_INFLOW_PROPERTIES=False
2627
EXTRACT_MLEVEL_TRANSECT=False

src/CSET/loaders/spatial_difference_field.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,24 @@ def load(conf: Config):
246246
aggregation=False,
247247
)
248248

249+
# Daily minimum temperature.
250+
if conf.DAILY_09_MINIMUM_TEMPERATURE_SPATIAL_DIFFERENCE:
251+
base_model = models[0]
252+
for model in models[1:]:
253+
yield RawRecipe(
254+
recipe="daily_09_minimum_temperature_spatial_difference.yaml",
255+
variables={
256+
"BASE_MODEL": base_model["name"],
257+
"OTHER_MODEL": model["name"],
258+
"SUBAREA_TYPE": conf.SUBAREA_TYPE if conf.SELECT_SUBAREA else None,
259+
"SUBAREA_EXTENT": conf.SUBAREA_EXTENT
260+
if conf.SELECT_SUBAREA
261+
else None,
262+
},
263+
model_ids=[base_model["id"], model["id"]],
264+
aggregation=False,
265+
)
266+
249267
# Create a list of case aggregation types.
250268
AGGREGATION_TYPES = ["lead_time", "hour_of_day", "validity_time", "all"]
251269

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
category: Daily Weather
2+
title: "Daily minimum temperature at 0900 UTC\nDifference ($BASE_MODEL - $OTHER_MODEL)"
3+
description: |
4+
Extracts and plots the daily minimum temperature between 0900 UTC and 0900 UTC
5+
the following day as per observation measurements and plots the difference. The minimum
6+
is created from a rolling 24 h window, adds hour of day coordinate, and then
7+
selects the 21 UTC hour from the rolling window as this represents the validity
8+
time of the required range. The minimum temperature can occur any time in the 24
9+
h window.
10+
11+
steps:
12+
- operator: read.read_cubes
13+
file_paths: $INPUT_PATHS
14+
model_names: [$BASE_MODEL, $OTHER_MODEL]
15+
constraint:
16+
operator: constraints.combine_constraints
17+
varname_constraint:
18+
operator: constraints.generate_var_constraint
19+
varname: 'temperature_at_screen_level'
20+
cell_methods_constraint:
21+
operator: constraints.generate_cell_methods_constraint
22+
cell_methods: ['minimum']
23+
coord: 'time'
24+
interval: '1 hour'
25+
subarea_type: $SUBAREA_TYPE
26+
subarea_extent: $SUBAREA_EXTENT
27+
28+
- operator: aggregate.rolling_window_time_aggregation
29+
method: 'MIN'
30+
window: 24
31+
32+
- operator: misc.difference
33+
34+
- operator: aggregate.add_hour_coordinate
35+
36+
- operator: filters.filter_multiple_cubes
37+
constraint:
38+
operator: constraints.generate_hour_constraint
39+
hour_start: 21
40+
41+
- operator: plot.spatial_pcolormesh_plot
42+
43+
- operator: write.write_cube_to_nc
44+
overwrite: True

0 commit comments

Comments
 (0)