////////////////////////////////////////////////////////////////////////////////
//
// STAT-Analysis configuration file.
//
// For additional information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

//
// Filtering input STAT lines by the contents of each column
//
model = [];
desc  = [];

fcst_lead = [];
obs_lead  = [];

fcst_valid_beg  = "";
fcst_valid_end  = "";
fcst_valid_inc  = [];
fcst_valid_exc  = [];
fcst_valid_hour = [];

obs_valid_beg   = "";
obs_valid_end   = "";
obs_valid_inc   = [];
obs_valid_exc   = [];
obs_valid_hour  = [];

fcst_init_beg   = "";
fcst_init_end   = "";
fcst_init_inc   = [];
fcst_init_exc   = [];
fcst_init_hour  = [];

obs_init_beg    = "";
obs_init_end    = "";
obs_init_inc    = [];
obs_init_exc    = [];
obs_init_hour   = [];

fcst_var = [];
obs_var  = [];

fcst_lev = [];
obs_lev  = [];

obtype = [];

vx_mask = [ "DTC165", "DTC166" ];

interp_mthd = [ "NEAREST" ];

interp_pnts = [ 1 ];

fcst_thresh = [];
obs_thresh  = [];
cov_thresh  = [];

alpha = [];

line_type = [];

column = [];

weight = [];

////////////////////////////////////////////////////////////////////////////////

//
// Array of STAT-Analysis jobs to be performed on the filtered data
//
jobs = [
   "-job aggregate_stat -fcst_var TMP -fcst_lev Z2 \
    -line_type MPR -out_line_type CNT,SL1L2 -out_thresh NA,gt273 \
    -dump_row ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_stat_mpr_to_cnt_dump.stat \
    -out_stat ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_stat_mpr_to_cnt_out.stat \
    -set_hdr VX_MASK CONUS",
   "-job aggregate_stat -fcst_var TMP -fcst_lev Z2 \
    -line_type MPR -out_line_type CNT -by VX_MASK -set_hdr DESC CASE -n_boot_rep 0 \
    -out_stat ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_stat_mpr_to_cnt_by_vx_mask_out.stat",
   "-job aggregate -fcst_var TMP -fcst_lev Z2 \
    -line_type CTC -by FCST_THRESH \
    -out_stat ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_ctc_by_fcst_thresh_out.stat \
    -set_hdr VX_MASK CONUS",
   "-job aggregate_stat -fcst_lev Z10 \
    -line_type MPR -out_line_type WDIR \
    -out_wind_thresh >0 -out_wind_logic INTERSECTION \
    -dump_row ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_stat_mpr_to_wdir_dump.stat",
   "-job aggregate_stat -fcst_var TMP -fcst_lev Z2 \
    -line_type MPR -out_line_type ECLV,CTC,CTS \
    -out_thresh >273,>278 -out_eclv_points 0.1",
   "-job aggregate_stat -fcst_var TMP -fcst_lev Z2 \
    -line_type MPR -out_line_type MCTC \
    -out_thresh >273,>275,>277 \
    -out_stat ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_stat_mpr_to_mctc.stat",
   "-job aggregate_stat -fcst_var TMP -fcst_lev Z2 \
    -line_type MPR -out_line_type MCTS \
    -out_thresh >273,>275,>277 -hss_ec_value 0.50 \
    -out_stat ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_stat_mpr_to_mcts.stat",
   "-job filter -fcst_var TMP -fcst_lev Z2 \
    -line_type MPR -mask_sid ${CONFIG_DIR}/SID_CO.txt \
    -dump_row ${OUTPUT_DIR}/CONFIG_POINT_STAT_filter_mpr_sid.stat",
   "-job filter -fcst_var TMP -fcst_lev Z2 \
    -line_type MPR -column_thresh abs(fcst-obs) >5 \
    -dump_row ${OUTPUT_DIR}/CONFIG_POINT_STAT_filter_mpr_fcst_minus_obs.stat"
];

////////////////////////////////////////////////////////////////////////////////

//
// Confidence interval settings
//
out_alpha = 0.05;

boot = {
   interval = PCTILE;
   rep_prop = 1.0;
   n_rep    = 1000;
   rng      = "mt19937";
   seed     = "1";
}

////////////////////////////////////////////////////////////////////////////////

//
// Skill score index options
//
ss_index_name       = "SS_INDEX";
ss_index_vld_thresh = 1.0;

////////////////////////////////////////////////////////////////////////////////

hss_ec_value   = NA;
rank_corr_flag = TRUE;
vif_flag       = FALSE;
tmp_dir        = "/tmp";
version        = "V11.1.0";

////////////////////////////////////////////////////////////////////////////////
