Plotting Use Case: Fractions Skill Score (FSS)
This use case demonstrates how to use VCasT’s plotting module to visualize the Fractions Skill Score (FSS) across models and lead times using pre-aggregated MET statistics.
It uses a sample configuration file (plot.yaml) to create a line plot from an aggregated dataset produced by the NBRCNT use case.
Prerequisites
Before running the example, you need an input file agg.data created in the previous use case MET Stat Use Case: Fractions Skill Score (FSS).
Run the Example
Clone the test repository:
git clone https://github.com/NOAA-GSL/VCasT-tests cd VCasT-tests/examples/MET/fss
Run VCasT with the plotting YAML file:
vcast plot.yamlThis will generate the FSS comparison plot.
YAML Configuration Explained
Below is the content of plot.yaml, which configures VCasT to:
Load a pre-aggregated CSV file with FSS values
Plot fcst_lead on the x-axis and mean FSS on the y-axis
Differentiate models or smoothing scales
Filter the plot to include only the fss metric
1start_date: "2024-05-01_00:00:00"
2end_date: "2024-06-02_12:00:00"
3interval_hours: "1"
4
5average: false
6scale: 1
7
8plot_type: line
9
10fcst_var:
11
12vars:
13 - fss: "./agg_20_9.data"
14 - fss: "./agg_20_25.data"
15 - fss: "./agg_20_81.data"
16 - fss: "./agg_20_361.data"
17 - fss: "./agg_20_729.data"
18
19unique:
20
21plot_title: "REFC >= 20 dBZ"
22legend_title: "Stat"
23labels:
24 - "Interp_points - 9"
25 - "Interp_points - 25"
26 - "Interp_points - 81"
27 - "Interp_points - 361"
28 - "Interp_points - 729"
29
30line_color:
31 - "red"
32 - "purple"
33 - "green"
34 - "orange"
35 - "black"
36
37line_marker:
38 - "o"
39 - "x"
40 - "^"
41 - "^"
42 - "o"
43
44line_type:
45 - "-"
46 - "-."
47 - "--"
48 - "-"
49 - "-."
50
51line_width:
52 - 0.5
53 - 0.5
54 - 0.5
55 - 0.5
56 - 0.5
57
58output_filename: fss_REFC20.png
59
60x_label: "Lead Time"
61y_label: "FSS"
62ylim: [0, 1]
63xlim: [0,60]
64grid: true
65yticks:
66xticks: [0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60]
Output
The generated plot will be saved to the location specified by output_filename, such as fss_REFC20.png.