MET Stat Use Case: Categorical Scores

This use case demonstrates how to run VCasT to compute categorical statistics using MET .stat files and a YAML configuration.

It uses a sample configuration file (cts.yaml) that filters and aggregates categorical scores like POD, FAR, CSI, FBIAS, and GSS for reflectivity forecasts.

Prerequisites

Before running the example, make sure VCasT is installed. Follow the installation steps in Quick Start Guide.

Run the Example

  1. Clone the test repository:

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

    vcast cts.yaml
    

    This will load and process the .stat files under the ./stats directory using the configuration options defined below.

YAML Configuration Explained

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

  • Load categorical statistics (line_type: cts)

  • Filter by model, variable, threshold, lead time, and region

  • Aggregate the results by model, variable, and lead time

Sample cts.yaml configuration
 1input_stat_folder: ./stats
 2line_type: cts
 3
 4date_column: "fcst_valid_beg"
 5start_date: "2024-04-29_12:00:00"
 6end_date: "2024-05-31_12:00:00"
 7
 8string_filters:
 9  model: ["RRFS_mem000"]
10  fcst_var: ["REFC"]
11  fcst_thresh: [">=20"]
12  fcst_lead: ["0", "010000", "020000", "030000", "040000", "050000", "060000", "070000", "080000", "090000", "100000", "110000", "120000", "130000", "140000", "150000", "160000", "170000", "180000", "190000", "200000", "210000", "220000", "230000"]
13  vx_mask: ["CONUS"]
14
15stat_vars: ["pody", "far", "csi", "fbias", "gss"]
16
17reformat_file: false
18output_reformat_file: "./filtered_output.data"
19
20output_file: false
21output_plot_file: "./vars.data"
22
23aggregate: true
24group_by: ["model", "fcst_var", "fcst_lead"]
25output_agg_file: "./REFC_agg.data"

Output

Since both reformat_file and output_file are set to false, the only output in this example will be an aggregated result saved to REFC_agg.data.

You can modify the YAML to enable full data dumps as needed.