Skip to content

Commit

Permalink
Per #1714, switch ops_hit_tdiff to ops_hit_window.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Apr 2, 2021
1 parent b46c078 commit 3d90539
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 24 deletions.
9 changes: 6 additions & 3 deletions met/data/config/TCGenConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,13 @@ dev_hit_window = {
}

//
// Maximum Best track genesis minus model initialization time difference for an
// operational scoring method hit
// Time window in hours for the Best track genesis minus model initialization
// time difference for an operational scoring method hit
//
ops_hit_tdiff = 48;
ops_hit_window = {
beg = 0;
end = 48;
}

//
// Discard genesis forecasts for initializations at or after the matching
Expand Down
9 changes: 6 additions & 3 deletions met/docs/Users_Guide/tc-gen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,18 @@ ______________________
end = 24;
}
The **dev_hit_window** entry defines a time window, in hours, relative to the forecast genesis time. The Best track genesis event must occur within this time window for the pair to be counted as contingency table HIT for the development scoring method. Tightening this window may cause development method HITS to become FALSE ALARMS.
The **dev_hit_window** entry defines a time window, in hours, relative to the forecast genesis time. The Best track genesis event must occur within this time window for the pair to be counted as a contingency table HIT for the development scoring method. Tightening this window may cause development method HITS to become FALSE ALARMS.

______________________

.. code-block:: none
ops_hit_tdiff = 48;
ops_hit_window = {
beg = 0;
end = 48;
}
The **ops_hit_tdiff** entry is an integer which defines a maximum allowable time difference in hours. For each matching forecast and Best track genesis event, if the difference between the Best track genesis time and the forecast initialization time is less than or equal to this value, then the pair is counted as a contingency table HIT for the operational scoring method. Otherwise, it is counted as a FALSE ALARM.
The **ops_hit_window** entry defines a time window, in hours, relative to the Best track genesis time. The model initialization time for the forecast genesis event must occur within this time window for the pairs to be counted as a contingency table HIT for the operationl scoring method. Otherwise, the pair is counted as a FALSE ALARM.

______________________

Expand Down
2 changes: 1 addition & 1 deletion met/src/basic/vx_config/config_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ static const char conf_key_genesis_match_radius[] = "genesis_match_ra
static const char conf_key_genesis_match_window[] = "genesis_match_window";
static const char conf_key_dev_hit_radius[] = "dev_hit_radius";
static const char conf_key_dev_hit_window[] = "dev_hit_window";
static const char conf_key_ops_hit_tdiff[] = "ops_hit_tdiff";
static const char conf_key_ops_hit_window[] = "ops_hit_window";
static const char conf_key_discard_init_post_genesis_flag[] = "discard_init_post_genesis_flag";
static const char conf_key_dev_method_flag[] = "dev_method_flag";
static const char conf_key_ops_method_flag[] = "ops_method_flag";
Expand Down
13 changes: 7 additions & 6 deletions met/src/tools/tc_utils/tc_gen/tc_gen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// 002 12/15/20 Halley Gotway Matching logic for MET #1448
// 003 12/31/20 Halley Gotway Add NetCDF output for MET #1430
// 004 01/14/21 Halley Gotway Add GENMPR output for MET #1597
// 005 04/02/21 Halley Gotway Refinements for MET #1714
//
////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -525,19 +526,19 @@ void do_genesis_ctc(const TCGenVxOpt &vx_opt,
// FALSE ALARM for the development method
diff.DevCategory = FYONGenesis;
}

// Ops Method:
// HIT if forecast init time is close enough to
// the BEST genesis time.

// Compute time offset
// Compute init/genesis time offset
diff.OpsDSec = bgi->genesis_time() - fgi->init();

offset_cs << cs_erase
<< "with an init vs genesis time offset of "
<< diff.OpsDSec/sec_per_hour << " hours.\n";

if(diff.OpsDSec <= vx_opt.OpsHitDSec) {
// Ops Method:
// HIT if forecast init time is close enough to
// the BEST genesis time.
if(diff.OpsDSec >= vx_opt.OpsHitBeg &&
diff.OpsDSec <= vx_opt.OpsHitEnd) {

mlog << Debug(4) << case_cs
<< " is an ops method HIT " << offset_cs;
Expand Down
13 changes: 7 additions & 6 deletions met/src/tools/tc_utils/tc_gen/tc_gen_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void TCGenVxOpt::clear() {
GenesisMatchBeg = GenesisMatchEnd = bad_data_int;
DevHitRadius = bad_data_double;
DevHitBeg = DevHitEnd = bad_data_int;
OpsHitDSec = bad_data_int;
OpsHitBeg = OpsHitEnd = bad_data_int;
DiscardFlag = false;
DevFlag = OpsFlag = false;
CIAlpha = bad_data_double;
Expand Down Expand Up @@ -256,16 +256,17 @@ void TCGenVxOpt::process_config(Dictionary &dict) {
// Conf: dev_hit_radius
DevHitRadius = dict.lookup_double(conf_key_dev_hit_radius);

// Conf: genesis_hit_window
// Conf: dev_hit_window
dict2 = dict.lookup_dictionary(conf_key_dev_hit_window);
parse_conf_range_int(dict2, beg, end);
DevHitBeg = beg*sec_per_hour;
DevHitEnd = end*sec_per_hour;

// Conf: ops_hit_tdiff
OpsHitDSec = nint(
dict.lookup_double(conf_key_ops_hit_tdiff) *
sec_per_hour);
// Conf: ops_hit_window
dict2 = dict.lookup_dictionary(conf_key_ops_hit_window);
parse_conf_range_int(dict2, beg, end);
OpsHitBeg = beg*sec_per_hour;
OpsHitEnd = end*sec_per_hour;

// Conf: discard_init_post_genesis_flag
DiscardFlag =
Expand Down
2 changes: 1 addition & 1 deletion met/src/tools/tc_utils/tc_gen/tc_gen_conf_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class TCGenVxOpt {
// Temporal and spatial scoring options
double DevHitRadius;
int DevHitBeg, DevHitEnd;
int OpsHitDSec;
int OpsHitBeg, OpsHitEnd;
bool DiscardFlag, DevFlag, OpsFlag;

// Output file options
Expand Down
11 changes: 7 additions & 4 deletions test/config/TCGenConfig_2016
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ filter = [
{
desc = "ALL_MATCH_600KM_OPS60HR";
genesis_match_radius = 600;
ops_hit_tdiff = 60;
ops_hit_window = { beg = -60; end = 60; };
dev_method_flag = FALSE;
ops_method_flag = TRUE;
}
Expand Down Expand Up @@ -227,10 +227,13 @@ dev_hit_window = {
}

//
// Maximum Best track genesis minus model initialization time difference for an
// operational scoring method hit
// Time window in hours for the Best track genesis minus model initialization
// time difference for an operational scoring method hit
//
ops_hit_tdiff = 48;
ops_hit_window = {
beg = 0;
end = 48;
}

//
// Discard genesis forecasts for initializations at or after the matching
Expand Down

0 comments on commit 3d90539

Please sign in to comment.