Plotting Use Case: Performance Diagram

This use case demonstrates how to use VCasT’s plotting module to generate a performance diagram from pre-aggregated categorical statistics, such as POD and Success Ratio, computed using MET .stat files.

It uses a sample configuration file (plot.yaml) to create a performance diagram based on categorical forecast metrics.

Prerequisites

Before running the example, you need an input file APCP01_agg.data created in the previous use case MET Stat Use Case: Performance Diagram.

Run the Example

  1. Clone the test repository:

    git clone https://github.com/NOAA-GSL/VCasT-tests
    cd VCasT-tests/examples/MET/performance_diagram
    
  2. Run VCasT with the plotting YAML file:

    vcast plot.yaml
    

    This will generate a performance diagram comparing models or configurations.

YAML Configuration Explained

Below is the content of plot.yaml, which configures VCasT to:

  • Load a pre-aggregated CSV file with categorical statistics

  • Plot Success Ratio vs. POD (Probability of Detection)

  • Differentiate series by model, variable, or threshold

  • Filter the plot to include only the relevant metrics

Sample plot.yaml configuration
 1plot_type: performance_diagram
 2
 3fcst_var: APCP_01
 4
 5vars:
 6  - "./APCP01_agg.data"
 7
 8unique:
 9
10plot_title: "Performance Diagram APCP_01 - May 2022"
11legend_title: "Model"
12labels:
13  - "RRFS_mem000"
14
15line_color:
16  - "blue"
17
18line_marker:
19  - "o"
20
21line_type:
22  - "-"      
23
24line_width:
25  - 0.8
26
27output_filename: stat_agg_performance.png

Output

The generated performance diagram will be saved to the location specified by output_filename, such as stat_agg_performance.png.

Example performance diagram