Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
43 changes: 43 additions & 0 deletions src/CSET/cset_workflow/meta/diagnostics/rose-meta.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,20 @@ type=python_boolean
compulsory=true
sort-key=dw1c

[template variables=VIOLENT_RAIN_PRESENCE_SPATIAL_PLOT]
ns=Diagnostics/Derived/Daily
title=Violent rain presence: spatial plot
description=IMPACT-BASED DIAGNOSTIC.
Determines whether violent rain is located at a point.
Violent rain is defined as exceeding 50 mm/h.
Requires surface_microphysical_rainfall_rate.
help=This diagnostic identifies only whether there is violent rain or not, regardless
of the amount of rain that is falling. It can be particularly useful for
considering the model from the viewpoint of a customer.
type=python_boolean
compulsory=true
sort-key=dw1d

[template variables=MODERATE_RAIN_PRESENCE_DOMAIN_MEAN_TIMESERIES]
ns=Diagnostics/Derived/Daily
title=Moderate rain presence: domain mean timeseries
Expand Down Expand Up @@ -1119,6 +1133,21 @@ type=python_boolean
compulsory=true
sort-key=dw2c

[template variables=VIOLENT_RAIN_PRESENCE_DOMAIN_MEAN_TIMESERIES]
ns=Diagnostics/Derived/Daily
title=Violent presence: domain mean timeseries
description=IMPACT-BASED DIAGNOSTIC.
Determines whether violent rain is located at a point and creates a
timeseries representing the chance of violent rain anywhere in the domain.
Violent rain is defined as exceeding 50 mm/h.
Requires surface_microphysical_rainfall_rate.
help=This diagnostic identifies only whether there is violent rain or not, regardless
of the amount of rain that is falling. It can be particularly useful for
considering the model from the viewpoint of a customer.
type=python_boolean
compulsory=true
sort-key=dw2d

[template variables=MODERATE_RAIN_PRESENCE_SPATIAL_DIFFERENCE]
ns=Diagnostics/Derived/Daily
title=Moderate rain presence: spatial difference
Expand Down Expand Up @@ -1147,6 +1176,20 @@ type=python_boolean
compulsory=true
sort-key=dw3c

[template variables=VIOLENT_RAIN_PRESENCE_SPATIAL_DIFFERENCE]
ns=Diagnostics/Derived/Daily
title=Violent rain presence: spatial difference
description=IMPACT-BASED DIAGNOSTIC.
Determines the difference between two violent rain presence fields.
Violent rain is defined as 50 mm/h.
Requires surface_microphysical_rainfall_rate.
help=This diagnostic identifies only whether there is violent rain or not, regardless
of the amount of rain that is falling. It can be particularly useful for
considering the model from the viewpoint of a customer.
type=python_boolean
compulsory=true
sort-key=dw3d

[template variables=SFC_WIND_BEAUFORT_SCALE_SPATIAL]
ns=Diagnostics/Derived/Daily
title=Sfc wind (sustained) Beaufort Scale: spatial plot
Expand Down
3 changes: 3 additions & 0 deletions src/CSET/cset_workflow/rose-suite.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ TIMESERIES_SURFACE_FIELD_SEA_MASK=False
!!USE_WMO_STATION_NUMBERS=False
!!VERTICAL_COORDINATE_A=[]
!!VERTICAL_COORDINATE_B=[]
VIOLENT_RAIN_PRESENCE_DOMAIN_MEAN_TIMESERIES=False
VIOLENT_RAIN_PRESENCE_SPATIAL_DIFFERENCE=False
VIOLENT_RAIN_PRESENCE_SPATIAL_PLOT=False
WEB_ADDR=""
WEB_DIR=""
!!WMO_BLOCK_STTN_NMBRS=[]
Expand Down
18 changes: 18 additions & 0 deletions src/CSET/loaders/spatial_difference_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,24 @@ def load(conf: Config):
aggregation=False,
)

# Violent rain presence.
if conf.VIOLENT_RAIN_PRESENCE_SPATIAL_DIFFERENCE:
base_model = models[0]
for model in models[1:]:
yield RawRecipe(
recipe="violent_rain_presence_spatial_difference.yaml",
variables={
"BASE_MODEL": base_model["name"],
"OTHER_MODEL": model["name"],
"SUBAREA_TYPE": conf.SUBAREA_TYPE if conf.SELECT_SUBAREA else None,
"SUBAREA_EXTENT": conf.SUBAREA_EXTENT
if conf.SELECT_SUBAREA
else None,
},
model_ids=[base_model["id"], model["id"]],
aggregation=False,
)

# Heavy rain presence.
if conf.HEAVY_RAIN_PRESENCE_SPATIAL_DIFFERENCE:
base_model = models[0]
Expand Down
15 changes: 15 additions & 0 deletions src/CSET/loaders/spatial_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,21 @@ def load(conf: Config):
aggregation=False,
)

# Violent rain presence.
if conf.VIOLENT_RAIN_PRESENCE_SPATIAL_PLOT:
yield RawRecipe(
recipe="violent_rain_presence_spatial_plot.yaml",
model_ids=model["id"],
variables={
"MODEL_NAME": model["name"],
"SUBAREA_TYPE": conf.SUBAREA_TYPE if conf.SELECT_SUBAREA else None,
"SUBAREA_EXTENT": conf.SUBAREA_EXTENT
if conf.SELECT_SUBAREA
else None,
},
aggregation=False,
)

# Heavy rain presence.
if conf.HEAVY_RAIN_PRESENCE_SPATIAL_PLOT:
yield RawRecipe(
Expand Down
13 changes: 13 additions & 0 deletions src/CSET/loaders/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,19 @@ def load(conf: Config):
aggregation=False,
)

# Violent rain presence
if conf.VIOLENT_RAIN_PRESENCE_DOMAIN_MEAN_TIMESERIES:
yield RawRecipe(
recipe="violent_rain_presence_domain_mean_time_series.yaml",
variables={
"MODEL_NAME": [model["name"] for model in models],
"SUBAREA_TYPE": conf.SUBAREA_TYPE if conf.SELECT_SUBAREA else None,
"SUBAREA_EXTENT": conf.SUBAREA_EXTENT if conf.SELECT_SUBAREA else None,
},
model_ids=[model["id"] for model in models],
aggregation=False,
)

# Heavy rain presence
if conf.HEAVY_RAIN_PRESENCE_DOMAIN_MEAN_TIMESERIES:
yield RawRecipe(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
category: Daily Weather
title: Violent rain presence domain mean timeseries
description: |
Generates a mask of whether violent rain is present in a grid box and provides a
timeseries representing the chance of violent rain anywhere within the domain.
Violent rain is defined in the Forecasting Handbook as rainfall exceeding 50 mm/h.

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: 'surface_microphysical_rainfall_rate'
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
subarea_type: $SUBAREA_TYPE
subarea_extent: $SUBAREA_EXTENT

- operator: filters.generate_mask
condition: 'ge'
value: 50.0

- operator: misc.rename_cube
name: "mask_for_violent_rainfall_rate"

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

# Plot the data.
- operator: plot.plot_line_series

- operator: write.write_cube_to_nc
overwrite: True
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
category: Daily Weather
title: "Violent rain presence\nDifference ($BASE_MODEL - $OTHER_MODEL)"
description: |
Generates a mask of whether violent rain is present in a grid box and provides
the difference between two datasets. Values will be positive or negative one
depending on which model has violent rain present at that location if the other
does not.
Violent rain is defined in the Forecasting Handbook as rainfall exceeding 50 mm/h.

steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names: [$BASE_MODEL, $OTHER_MODEL]
constraint:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: surface_microphysical_rainfall_rate
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
subarea_type: $SUBAREA_TYPE
subarea_extent: $SUBAREA_EXTENT

- operator: filters.generate_mask
condition: 'ge'
value: 50.0

- operator: misc.rename_cube
name: "mask_for_violent_rainfall_rate"

- operator: misc.difference

- operator: plot.spatial_pcolormesh_plot

- operator: write.write_cube_to_nc
overwrite: True
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
category: Daily Weather
title: $MODEL_NAME Violent rain presence spatial plot
description: |
Generates a mask of whether violent rain is present in a grid box and provides a
spatial plot. A value of one implies violent rain is present; a value of zero
implies violent rain is not present.
Violent rain is defined in the Forecasting Handbook as rainfall exceeding 50 mm/h.
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: surface_microphysical_rainfall_rate
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
subarea_type: $SUBAREA_TYPE
subarea_extent: $SUBAREA_EXTENT

- operator: filters.generate_mask
condition: 'ge'
value: 50.0

- operator: misc.rename_cube
name: "mask_for_violent_rainfall_rate"

- operator: plot.spatial_pcolormesh_plot

- operator: write.write_cube_to_nc
overwrite: True
Loading