Skip to content

Commit

Permalink
Per #2339, add unit tests to demonstrate processing SEEPS with Stat-A…
Browse files Browse the repository at this point in the history
…nalysis.
  • Loading branch information
JohnHalleyGotway committed Nov 12, 2022
1 parent bff919d commit 2a523df
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 0 deletions.
118 changes: 118 additions & 0 deletions internal/test_unit/config/STATAnalysisConfig_seeps
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
////////////////////////////////////////////////////////////////////////////////
//
// 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 = [];

interp_mthd = [];

interp_pnts = [];

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

alpha = [];

line_type = [];

column = [];

weight = [];

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

//
// Array of STAT-Analysis jobs to be performed on the filtered data
//
// Job 1 = filter SEEPS lines
// Job 2 = aggregate SEEPS_MPR lines by interpolation (output equals Job 1)
// Job 3 = aggregate SEEPS lines
// Job 4 = aggregate all SEEPS_MPR lines (output equals Job 3)
// Job 5 = summarize SEEPS_MPR scores
//
jobs = [
"-job filter -line_type SEEPS -dump_row ${OUTPUT_DIR}/CONFIG_POINT_STAT_filter_seeps.stat",
"-job aggregate_stat -line_type SEEPS_MPR -out_line_type SEEPS -by INTERP_MTHD,INTERP_PNTS",
"-job aggregate -line_type SEEPS",
"-job aggregate_stat -line_type SEEPS_MPR -out_line_type SEEPS",
"-job summary -line_type SEEPS_MPR -column SEEPS -by INTERP_MTHD,INTERP_PNTS"
];

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

//
// 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.0.0";

////////////////////////////////////////////////////////////////////////////////
17 changes: 17 additions & 0 deletions internal/test_unit/xml/unit_stat_analysis_ps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,23 @@
</output>
</test>

<test name="stat_analysis_POINT_STAT_SEEPS">
<env>
<pair><name>OUTPUT_DIR</name> <value>&OUTPUT_DIR;/stat_analysis_ps</value></pair>
</env>
<exec>&MET_BIN;/stat_analysis</exec>
<param> \
-lookin &OUTPUT_DIR;/point_stat/point_stat_NCMET_NAM_NDAS_SEEPS_360000L_20120410_120000V.stat \
-config &CONFIG_DIR;/STATAnalysisConfig_seeps \
-out &OUTPUT_DIR;/stat_analysis_ps/POINT_STAT_SEEPS.out \
-v 1
</param>
<output>
<stat>&OUTPUT_DIR;/stat_analysis_ps/CONFIG_POINT_STAT_filter_seeps.stat</stat>
<exist>&OUTPUT_DIR;/stat_analysis_ps/POINT_STAT_SEEPS.out</exist>
</output>
</test>

<test name="stat_analysis_RAMPS">
<env>
<pair><name>OUTPUT_DIR</name> <value>&OUTPUT_DIR;/stat_analysis_ps</value></pair>
Expand Down

0 comments on commit 2a523df

Please sign in to comment.