Note
Go to the end to download the full example code.
Regional spatial plot¶
Generate spatial map of a 2D field (regional data example).
References
General functionality is provided using CSET recipe generic_surface_spatial_plot_sequence.yaml
The following CSET operators are used:
Using cset bake on the command line¶
Access recipe file using
cset cookbook.Set required recipe inputs on command line.
Example to generate full-domain spatial maps of temperature_at_screen_level for all output times:
cset cookbook generic_surface_spatial_plot_sequence.yaml
cset -v bake -i "/path/to/input/data" -o "./output_path" \
-r generic_surface_spatial_plot_sequence.yaml \
--VARNAME="temperature_at_screen_level" \
--MODEL_NAME="my_model_label" \
--METHOD="SEQ" \
--SUBAREA_TYPE='None' --SUBAREA_EXTENT='None' --SUBAREA_NAME='None'
Configuring the cset_workflow¶
Update workflow configuration settings via
rose editGUI or inrose-suite.conffile.Complete
General setup optionsandCycling and Model optionsdetails - see Configure the workflow.Set required configuration options on
Diagnostics / Surface (2D) fieldspanel:SURFACE_FIELDS = ["temperature_at_screen_level", ...] SPATIAL_SURFACE_FIELD = True
Example python code¶
![air_temperature [2022-09-21 05:00:00]](../../../../_images/sphx_glr_plot_surface_spatial_001.png)
from CSET import sample_data_path
from CSET.operators import plot, read
# Set path to input data
filename = sample_data_path("air_temperature.nc")
# Read selected variable(s) of interest
cube = read.read_cube(filename, ["temperature_at_screen_level"])
# Plot single time using spatial_contour_plot
plot.spatial_contour_plot(cube[-1])
Total running time of the script: (0 minutes 2.433 seconds)