Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #2224 nbrhd_prob #2331

Merged
merged 4 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Users_Guide/point-stat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ The first set of header columns are common to all of the output files generated
* - 78-80
- RMSE, :raw-html:`<br />` RMSE_BCL, :raw-html:`<br />` RMSE_BCU
- Root mean squared error including bootstrap upper and lower confidence limits
* - 81-94
* - 81-95
- E10, :raw-html:`<br />` E10_BCL, :raw-html:`<br />` E10_BCU, :raw-html:`<br />` E25, :raw-html:`<br />` E25_BCL, :raw-html:`<br />` E25_BCU, :raw-html:`<br />` E50, :raw-html:`<br />` E50_BCL, :raw-html:`<br />` E50_BCU, :raw-html:`<br />` E75, :raw-html:`<br />` E75_BCL, :raw-html:`<br />` E75_BCU, :raw-html:`<br />` E90, :raw-html:`<br />` E90_BCL, :raw-html:`<br />` E90_BCU
- 10th, 25th, 50th, 75th, and 90th percentiles of the error including bootstrap upper and lower confidence limits
* - 96-98
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ens = {
// Only set if processing a single file with all ensembles
//
ens_member_ids = ["+1", "+2", "+3", "+4", "+5", "+6", "+7", "+8", "+9", "+10", "+11", "+12", "+13", "+14", "+15", "+16", "+17", "+18", "+19", "+20"];
control_id = "hi_res_ctl";
control_id = ${CONTROL_ID};

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

Expand Down
2 changes: 1 addition & 1 deletion internal/test_unit/config/GenEnsProdConfig_single_file_nc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ens = {
// Only set if processing a single file with all ensembles
//
ens_member_ids = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"];
control_id = "0";
control_id = ${CONTROL_ID};

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

Expand Down
12 changes: 12 additions & 0 deletions internal/test_unit/xml/unit_gen_ens_prod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@

<test name="gen_ens_prod_SINGLE_FILE_NC_NO_CTRL">
<exec>&MET_BIN;/gen_ens_prod</exec>
<env>
<pair><name>CONTROL_ID</name> <value>""</value></pair>
</env>
<param> \
-ens &DATA_DIR_MODEL;/CPC_NMME/CFSv2.tmp2m.198201.fcst.nc \
-config &CONFIG_DIR;/GenEnsProdConfig_single_file_nc \
Expand All @@ -91,6 +94,9 @@

<test name="gen_ens_prod_SINGLE_FILE_NC_WITH_CTRL">
<exec>&MET_BIN;/gen_ens_prod</exec>
<env>
<pair><name>CONTROL_ID</name> <value>"0"</value></pair>
</env>
<param> \
-ens &DATA_DIR_MODEL;/CPC_NMME/CFSv2.tmp2m.198201.fcst.nc \
-config &CONFIG_DIR;/GenEnsProdConfig_single_file_nc \
Expand All @@ -105,6 +111,9 @@

<test name="gen_ens_prod_SINGLE_FILE_GRIB_NO_CTRL">
<exec>&MET_BIN;/gen_ens_prod</exec>
<env>
<pair><name>CONTROL_ID</name> <value>""</value></pair>
</env>
<param> \
-ens &DATA_DIR_MODEL;/grib2/gefs/enspost_grb2.t00z.prmsl \
-config &CONFIG_DIR;/GenEnsProdConfig_single_file_grib \
Expand All @@ -118,6 +127,9 @@

<test name="gen_ens_prod_SINGLE_FILE_GRIB_WITH_CTRL">
<exec>&MET_BIN;/gen_ens_prod</exec>
<env>
<pair><name>CONTROL_ID</name> <value>"hi_res_ctl"</value></pair>
</env>
<param> \
-ens &DATA_DIR_MODEL;/grib2/gefs/enspost_grb2.t00z.prmsl \
-config &CONFIG_DIR;/GenEnsProdConfig_single_file_grib \
Expand Down
15 changes: 11 additions & 4 deletions src/basic/vx_config/config_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1731,11 +1731,18 @@ NbrhdInfo parse_conf_nbrhd(Dictionary *dict, const char *conf_key) {
nbrhd_dict = dict->lookup_dictionary(conf_key);

// Conf: field - may be missing
v = nbrhd_dict->lookup_int(conf_key_field, false);

// If found, interpret value. Otherwise, default to BOTH
if(nbrhd_dict->last_lookup_status()) info.field = int_to_fieldtype(v);
else info.field = FieldType_Both;
// Default info.field to BOTH
info.field = FieldType_Both;

// Skip lookup for conf_key_nbrhd_prob
if(strncmp(conf_key, conf_key_nbrhd_prob, strlen(conf_key_nbrhd_prob)) != 0) {

v = nbrhd_dict->lookup_int(conf_key_field, false);

// If found, interpret value
if(nbrhd_dict->last_lookup_status()) info.field = int_to_fieldtype(v);
}

// Conf: vld_thresh
info.vld_thresh = nbrhd_dict->lookup_double(conf_key_vld_thresh);
Expand Down