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
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
category: Time series of latent heat flux at Cardington single point
title: "Time series of $PLOTNAME at lat_pt:52.10438, lon_pt:-0.42286 specific to Cardington gridpoint."
description: "Plots a time series of $PLOTNAME at a selected Cardington gridpoint."

steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names:
- $CARDINGTON_30_LABEL
- $MODEL_NAME

- operator: filters.filter_multiple_cubes

Cardington:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: $VARNAME
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
varname: $VARNAME
height_constraint:
operator: constraints.generate_attribute_constraint
attribute: 'height'
value: $HEIGHT

$MODEL_NAME:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: $UM_VARNAME
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
varname: $UM_VARNAME
pressure_level_constraint:
operator: constraints.generate_level_constraint
levels: [ ]
coordinate: "pressure"
stash_constraint:
operator: constraints.generate_attribute_constraint
attribute: STASH

- operator: misc.latent_heat_units

- operator: misc.remove_attribute
attribute: [ 'time_coverage_end', 'time_coverage_start', 'valid_min', 'valid_max', 'date', 'date_created' ]

- operator: regrid.regrid_to_single_point
lat_pt: 52.10438
lon_pt: -0.42286
latlon_in_type: "realworld"
method: "Nearest"
boundary_margin: 0

# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
category: Time series of sensible heat flux at Cardington single point
title: "Time series of $PLOTNAME at lat_pt:52.10438, lon_pt:-0.42286 specific to Cardington gridpoint."
description: "Plots a time series of $PLOTNAME at a selected Cardington gridpoint."
steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names:
- $CARDINGTON_30_LABEL
- $MODEL_NAME

- operator: misc.mask_fill_values

- operator: misc.sensible_heat_units
HEIGHT: $HEIGHT
CARDINGTON_VARNAMES: $WT_VARNAMES

- operator: filters.filter_multiple_cubes
Cardington:
operator: constraints.generate_var_constraint
varname: surface_upward_sensible_heat_flux

$MODEL_NAME:
operator: constraints.generate_var_constraint
varname: surface_upward_sensible_heat_flux

- operator: misc.remove_attribute
attribute:
- time_coverage_end
- time_coverage_start
- valid_min
- valid_max
- date
- date_created

- operator: regrid.regrid_to_single_point
lat_pt: 52.10438
lon_pt: -0.42286
latlon_in_type: "realworld"
method: "Nearest"
boundary_margin: 0

- operator: write.write_cube_to_nc
overwrite: True

- operator: plot.plot_line_series
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
category: Time series of pressure at Cardington single point
title: "Time series of $PLOTNAME at lat_pt:52.10438, lon_pt:-0.42286 specific to Cardington gridpoint."
description: "Plots a time series of $PLOTNAME at a selected Cardington gridpoint."

steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names:
- $CARDINGTON_05_LABEL
- $CARDINGTON_30_LABEL
- $MODEL_NAME

- operator: filters.filter_multiple_cubes

Cardington:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: $VARNAME
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
varname: $VARNAME


$MODEL_NAME:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: $UM_VARNAME
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
varname: $UM_VARNAME
pressure_level_constraint:
operator: constraints.generate_level_constraint
levels: []
coordinate: "pressure"
stash_constraint:
operator: constraints.generate_attribute_constraint
attribute: STASH

- operator: misc.remove_attribute
attribute: [ 'time_coverage_end', 'time_coverage_start', 'valid_min', 'valid_max', 'date', 'date_created' ]

- operator: misc.convert_units
units: 'hPa'

- operator: regrid.regrid_to_single_point
lat_pt: 52.10438
lon_pt: -0.42286
latlon_in_type: "realworld"
method: "Nearest"
boundary_margin: 0

- operator: misc.mask_fill_values

# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
category: Time series of surface temperature at Cardington single point
title: "Time series of $VARNAME at lat_pt:52.10438, lon_pt:-0.42286 specific to Cardington gridpoint."
description: "Plots a time series of $VARNAME at a selected Cardington gridpoint."
steps:
# ------------------------------------------------------------
# 1. Read data
# IMPORTANT:
# - Constrain the UM *at read time* so Iris only ever loads
# a single surface_temperature cube.
# ------------------------------------------------------------

- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names:
- $CARDINGTON_05_LABEL
- $CARDINGTON_30_LABEL
- $MODEL_NAME
constraints:
$MODEL_NAME:
operator: constraints.combine_constraints
stash_constraint:
operator: constraints.generate_attribute_constraint
attribute: STASH
values:
- $UM_VARNAME
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: [ 'maximum' ]
coord: 'time'
interval: '1 hour'
preprocessors:
- operator: misc.remove_scalar_coords
coords:
- forecast_reference_time
- realization

# IMPORTANT: Global temperature-only prune.
# filter_multiple_cubes must have exactly ONE key here,
# otherwise non-temperature cubes will survive and break convert_units.
- operator: filters.filter_multiple_cubes
temperature:
operator: constraints.generate_var_constraint
varname: $VARNAME

- operator: misc.remove_attribute
attribute:
- time_coverage_end
- time_coverage_start
- valid_min
- valid_max
- date
- date_created

- operator: misc.convert_units
units: 'Celsius'

- operator: regrid.regrid_to_single_point
lat_pt: 52.10438
lon_pt: -0.42286
latlon_in_type: "realworld"
method: "Nearest"
boundary_margin: 0

- operator: misc.mask_fill_values

- operator: write.write_cube_to_nc
overwrite: True

- operator: plot.plot_line_series
Original file line number Diff line number Diff line change
@@ -1,40 +1,53 @@
category: Time series of air temperature at Cardington single point
title: Time series of 'air_temperature' at lat_pt:52.10438, lon_pt:-0.42286 specific to Cardington gridpoint.
description: Plots a time series of the air temperature at a selected Cardington gridpoint.
title: "Time series of $PLOTNAME at lat_pt:52.10438, lon_pt:-0.42286 specific to Cardington gridpoint."
description: "Plots a time series of $PLOTNAME at a selected Cardington gridpoint."

steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names: ['Cardington','$MODEL_NAME']
constraint:
model_names:
- $CARDINGTON_05_LABEL
- $CARDINGTON_30_LABEL
- $MODEL_NAME

- operator: filters.filter_multiple_cubes

Cardington:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: 'air_temperature'
varname: $VARNAME
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
varname: 'air_temperature'
varname: $VARNAME
height_constraint:
operator: constraints.generate_attribute_constraint
attribute: 'height'
value: $HEIGHT

$MODEL_NAME:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: $UM_VARNAME
cell_methods_constraint:
operator: constraints.generate_cell_methods_constraint
cell_methods: []
varname: $UM_VARNAME
pressure_level_constraint:
operator: constraints.generate_level_constraint
levels: []
coordinate: "pressure"

- operator: misc.remove_attribute
attribute: ['time_coverage_end', 'time_coverage_start', 'valid_min', 'valid_max', 'date', 'date_created']

- operator: filters.filter_multiple_cubes
cardington:
stash_constraint:
operator: constraints.generate_attribute_constraint
attribute: 'height'
value: 2.0
model:
operator: constraints.generate_attribute_constraint
# This currently only works for UM. Maybe we need another operator to make this nicer?
attribute: STASH

- operator: misc.remove_attribute
attribute: [ 'time_coverage_end', 'time_coverage_start', 'valid_min', 'valid_max', 'date', 'date_created' ]

- operator: misc.convert_units
units: 'Celsius'
units: 'celsius'

- operator: regrid.regrid_to_single_point
lat_pt: 52.10438
Expand All @@ -43,6 +56,8 @@ steps:
method: "Nearest"
boundary_margin: 0

- operator: misc.mask_fill_values

# Make a single NetCDF with all the data inside it.
- operator: write.write_cube_to_nc
overwrite: True
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
category: Time series of visibility at Cardington single point
title: "Time series of $PLOTNAME at lat_pt:52.10438, lon_pt:-0.42286 specific to Cardington gridpoint."
description: "Plots a time series of $PLOTNAME at a selected Cardington gridpoint."

steps:
- operator: read.read_cubes
file_paths: $INPUT_PATHS
model_names:
- $CARDINGTON_05_LABEL
- $CARDINGTON_30_LABEL
- $MODEL_NAME

- operator: filters.filter_multiple_cubes
Cardington:
operator: constraints.generate_var_constraint
varname: $VARNAME

$MODEL_NAME:
operator: constraints.combine_constraints
varname_constraint:
operator: constraints.generate_var_constraint
varname: $UM_VARNAME
pressure_level_constraint:
operator: constraints.generate_level_constraint
levels: []
coordinate: "pressure"
stash_constraint:
operator: constraints.generate_attribute_constraint
attribute: STASH

- operator: misc.remove_attribute
attribute:
- time_coverage_end
- time_coverage_start
- valid_min
- valid_max
- date
- date_created

- operator: misc.convert_visibility_to_km

- operator: regrid.regrid_to_single_point
lat_pt: 52.10438
lon_pt: -0.42286
latlon_in_type: "realworld"
method: "Nearest"
boundary_margin: 0

- operator: write.write_cube_to_nc
overwrite: True

- operator: plot.plot_line_series
Loading