-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #577 from MetOffice/528_extract_single_point_data
Extract single point data
- Loading branch information
Showing
6 changed files
with
281 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
cset-workflow/includes/deterministic_single_point_surface_time_series.cylc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% if SURFACE_SINGLE_POINT_TIME_SERIES %} | ||
{% for model_field in SURFACE_MODEL_FIELDS %} | ||
[runtime] | ||
[[pre_process_surface_single_point_time_series_{{model_field}}]] | ||
inherit = PARALLEL | ||
[[[environment]]] | ||
CSET_RECIPE_NAME = "generic_surface_single_point_time_series.yaml" | ||
CSET_ADDOPTS = "--VARNAME={{model_field}} --LONGITUDE_POINT={{LONGITUDE_POINT}} --LATITUDE_POINT={{LATITUDE_POINT}} --SINGLE_POINT_METHOD={{SINGLE_POINT_METHOD}}" | ||
|
||
[[collate_surface_single_point_time_series_{{model_field}}]] | ||
inherit = COLLATE | ||
[[[environment]]] | ||
CSET_RECIPE_NAME = "generic_surface_single_point_time_series.yaml" | ||
CSET_ADDOPTS = "--VARNAME={{model_field}} --LONGITUDE_POINT={{LONGITUDE_POINT}} --LATITUDE_POINT={{LATITUDE_POINT}} --SINGLE_POINT_METHOD={{SINGLE_POINT_METHOD}}" | ||
{% endfor %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/CSET/recipes/generic_surface_single_point_time_series.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
category: Quick Look | ||
title: Time series of $VARNAME at $LATITUDE_POINT N, $LONGITUDE_POINT E | ||
description: Plots a time series of the surface $VARNAME at a selected gridpoint. | ||
|
||
# Parallel steps. | ||
parallel: | ||
- operator: read.read_cube | ||
constraint: | ||
operator: constraints.combine_constraints | ||
varname_constraint: | ||
operator: constraints.generate_var_constraint | ||
varname: $VARNAME | ||
pressure_level_constraint: | ||
operator: constraints.generate_level_constraint | ||
levels: [] | ||
coordinate: "pressure" | ||
validity_time_constraint: | ||
operator: constraints.generate_time_constraint | ||
time_start: $VALIDITY_TIME | ||
|
||
- operator: regrid.regrid_to_single_point | ||
lat_pt: $LATITUDE_POINT | ||
lon_pt: $LONGITUDE_POINT | ||
method: $SINGLE_POINT_METHOD | ||
|
||
# Save single-point variable to a file per validity time. | ||
- operator: write.write_cube_to_nc | ||
filename: intermediate/single_point_values | ||
|
||
# Collation steps. | ||
# Reads in intermediate cube and plots it. | ||
collate: | ||
- operator: read.read_cube | ||
filename_pattern: intermediate/*.nc | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters