From 4141adb44f236b5e643b663e4cc582db85044223 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Fri, 12 Nov 2021 13:17:47 -0700 Subject: [PATCH] Per #1809, keep track of the min/max BEST track genesis times, and we only need 1 PCT table, not two. --- .../tools/tc_utils/tc_gen/tc_gen_conf_info.cc | 21 ++++++++++--------- .../tools/tc_utils/tc_gen/tc_gen_conf_info.h | 5 ++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/met/src/tools/tc_utils/tc_gen/tc_gen_conf_info.cc b/met/src/tools/tc_utils/tc_gen/tc_gen_conf_info.cc index 389bf5d603..2294b99fdb 100644 --- a/met/src/tools/tc_utils/tc_gen/tc_gen_conf_info.cc +++ b/met/src/tools/tc_utils/tc_gen/tc_gen_conf_info.cc @@ -1243,15 +1243,13 @@ void ProbGenPCTInfo::clear() { Model.clear(); InitBeg = InitEnd = (unixtime) 0; + BestBeg = BestEnd = (unixtime) 0; - PCTDev.clear(); - PCTOps.clear(); + PCT.clear(); VxOpt = (const TCGenVxOpt *) 0; LeadTimes.clear(); - ValidGenesisDHrThresh.clear(); - return; } @@ -1264,9 +1262,6 @@ void ProbGenPCTInfo::set_vx_opt(const TCGenVxOpt *vx_opt) { // Store pointer VxOpt = vx_opt; - // Store config options - ValidGenesisDHrThresh = VxOpt->ValidGenesisDHrThresh; - // Setup the default PCTInfo object DefaultPCT.set_fthresh(VxOpt->ProbGenThresh); DefaultPCT.allocate_n_alpha(1); @@ -1283,10 +1278,17 @@ void ProbGenPCTInfo::add(const ProbGenInfo &pgi) { // Store the model name if(Model.empty()) Model = pgi.technique(); - // Track the range of valid times + // Track the range of forecast initalization times if(InitBeg == 0 || InitBeg > pgi.init()) InitBeg = pgi.init(); if(InitEnd == 0 || InitEnd < pgi.init()) InitEnd = pgi.init(); + // Track the range of verifying BEST genesis events + if(pgi.best_gen()) { + unixtime ut = pgi.best_gen()->genesis_time(); + if(BestBeg == 0 || BestBeg > ut) BestBeg = ut; + if(BestEnd == 0 || BestEnd < ut) BestEnd = ut; + } + // Add new map entry for each lead time, if needed for(i=0; i PCTDev, PCTOps; - - SingleThresh ValidGenesisDHrThresh; + map PCT; //////////////////////////////////////////////////////////////////