Skip to content

Commit

Permalink
Per #2279, fix a couple bugs parsing the SID weights and add a new un…
Browse files Browse the repository at this point in the history
…it_point_weight.xml unit test to run Point-Stat on scalar and probability inputs weighting the stations by their elevation. Still need to add Ensemble-Stat calls.
  • Loading branch information
JohnHalleyGotway committed Oct 11, 2024
1 parent 9806e0a commit eabaaaf
Show file tree
Hide file tree
Showing 7 changed files with 503 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
- jobid: 'job1'
tests: 'ascii2nc_indy pb2nc_indy tc_dland tc_pairs tc_stat plot_tc tc_rmw rmw_analysis tc_diag tc_gen'
- jobid: 'job2'
tests: 'met_test_scripts mode_multivar mode_graphics mtd regrid airnow gsi_tools netcdf modis series_analysis wwmca_regrid gen_vx_mask grid_weight interp_shape grid_diag grib_tables lidar2nc shift_data_plane trmm2nc aeronet wwmca_plot ioda2nc gaussian'
tests: 'met_test_scripts mode_multivar mode_graphics mtd regrid airnow gsi_tools netcdf modis series_analysis wwmca_regrid gen_vx_mask interp_shape grid_diag grib_tables lidar2nc shift_data_plane trmm2nc aeronet wwmca_plot ioda2nc gaussian'
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -310,6 +310,8 @@ jobs:
tests: 'ensemble_stat stat_analysis_es'
- jobid: 'job5'
tests: 'ugrid'
- jobid: 'job6'
tests: 'grid_weight point_weight'
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
145 changes: 145 additions & 0 deletions internal/test_unit/config/PointStatConfig_point_weight
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
////////////////////////////////////////////////////////////////////////////////
//
// Point-Stat configuration file.
//
// For additional information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

model = "SREF";

//
// Output description to be written
// May be set separately in each "obs.field" entry
//
desc = "${DESC}";

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

regrid = {
to_grid = NONE;
method = NEAREST;
width = 1;
}

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

obs_window = {
beg = -1800;
end = 1800;
}

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

mpr_column = [];
mpr_thresh = [];
cnt_thresh = [ NA ];
cnt_logic = UNION;
wind_thresh = [ NA ];
wind_logic = UNION;
eclv_points = 0.05;

fcst = {
sid_inc = [];
sid_exc = [];
obs_quality_inc = [];
obs_quality_exc = [];

field = [
{ name = "TMP"; level = "P850"; message_type = "ADPUPA"; cat_thresh = [ >273, >283 ]; },
{ name = "UGRD"; level = "P850"; message_type = "ADPUPA"; cat_thresh = [ >5 ]; },
{ name = "VGRD"; level = "P850"; message_type = "ADPUPA"; cat_thresh = [ >5 ]; }
];

}
obs = fcst;

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

mask = {
grid = [];
poly = [];
sid = [ "${CONFIG_DIR}/SID_CONUS_ADPUPA_ELEV.txt" ];
llpnt = [];
}

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

ci_alpha = [ 0.05 ];

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

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

interp = {
vld_thresh = 1.0;

type = [
{
method = NEAREST;
width = 1;
}
];
}

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

hira = {
flag = FALSE;
width = [ 2, 3, 4, 5 ];
vld_thresh = 1.0;
cov_thresh = [ ==0.25 ];
shape = SQUARE;
prob_cat_thresh = [];
}

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

output_flag = {
fho = NONE;
ctc = STAT;
cts = STAT;
mctc = STAT;
mcts = STAT;
cnt = STAT;
sl1l2 = STAT;
sal1l2 = NONE;
vl1l2 = STAT;
val1l2 = NONE;
vcnt = STAT;
pct = NONE;
pstd = NONE;
pjc = NONE;
prc = NONE;
ecnt = NONE;
orank = NONE;
rps = NONE;
eclv = STAT;
mpr = STAT;
seeps = NONE;
seeps_mpr = NONE;
}

////////////////////////////////////////////////////////////////////////////////
// Threshold for SEEPS p1 (Probability of being dry)

seeps_p1_thresh = NA;

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

duplicate_flag = NONE;
rank_corr_flag = TRUE;

point_weight_flag = ${POINT_WEIGHT};

tmp_dir = "/tmp";
output_prefix = "${OUTPUT_PREFIX}";
version = "V12.0.0";

////////////////////////////////////////////////////////////////////////////////
151 changes: 151 additions & 0 deletions internal/test_unit/config/PointStatConfig_prob_point_weight
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
////////////////////////////////////////////////////////////////////////////////
//
// Point-Stat configuration file.
//
// For additional information, please see the MET User's Guide.
//
////////////////////////////////////////////////////////////////////////////////

model = "SREF";

//
// Output description to be written
// May be set separately in each "obs.field" entry
//
desc = "${DESC}";

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

regrid = {
to_grid = NONE;
method = NEAREST;
width = 1;
}

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

obs_window = {
beg = -1800;
end = 1800;
}

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

mpr_column = [];
mpr_thresh = [];
cnt_thresh = [ NA ];
cnt_logic = UNION;
wind_thresh = [ NA ];
wind_logic = UNION;
eclv_points = 0.05;

fcst = {
sid_inc = [];
sid_exc = [];
obs_quality_inc = [];
obs_quality_exc = [];

field = [
{ name = "PROB"; level = "P850";
prob = { name = "TMP"; thresh_hi = 273; };
cat_thresh = ==0.25; }
];

}
obs = {
message_type = "ADPUPA";

field = [
{ name = "TMP"; level = "P850"; cat_thresh = <273; }
];
}

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

mask = {
grid = [ "FULL" ];
poly = [];
sid = [ "${CONFIG_DIR}/SID_CONUS_ADPUPA_ELEV.txt" ];
llpnt = [];
}

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

ci_alpha = [ 0.05 ];

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

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

interp = {
vld_thresh = 1.0;

type = [
{
method = NEAREST;
width = 1;
}
];
}

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

hira = {
flag = FALSE;
width = [ 2, 3, 4, 5 ];
vld_thresh = 1.0;
cov_thresh = [ ==0.25 ];
shape = SQUARE;
prob_cat_thresh = [];
}

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

output_flag = {
fho = NONE;
ctc = NONE;
cts = NONE;
mctc = NONE;
mcts = NONE;
cnt = NONE;
sl1l2 = NONE;
sal1l2 = NONE;
vl1l2 = NONE;
val1l2 = NONE;
vcnt = NONE;
pct = STAT;
pstd = STAT;
pjc = STAT;
prc = STAT;
ecnt = NONE;
orank = NONE;
rps = NONE;
eclv = STAT;
mpr = STAT;
seeps = NONE;
seeps_mpr = NONE;
}

////////////////////////////////////////////////////////////////////////////////
// Threshold for SEEPS p1 (Probability of being dry)

seeps_p1_thresh = NA;

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

duplicate_flag = NONE;
rank_corr_flag = TRUE;

point_weight_flag = ${POINT_WEIGHT};

tmp_dir = "/tmp";
output_prefix = "${OUTPUT_PREFIX}";
version = "V12.0.0";

////////////////////////////////////////////////////////////////////////////////
Loading

0 comments on commit eabaaaf

Please sign in to comment.