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

Bugfix #2148 main_v10.1 misses #2149

Merged
merged 3 commits into from
May 10, 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
8 changes: 7 additions & 1 deletion met/src/libcode/vx_tc_util/pair_data_genesis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ void PairDataGenesis::add_fcst_gen(const GenesisInfo *fgi) {
void PairDataGenesis::add_best_gen(const GenesisInfo *bgi,
const int fcst_beg, const int fcst_end, const int init_add,
const unixtime init_beg, const unixtime init_end,
const TimeArray &init_inc, const TimeArray &init_exc) {
const TimeArray &init_inc, const TimeArray &init_exc,
const NumArray &init_hour, const NumArray &lead) {

if(!bgi) return;

Expand All @@ -282,6 +283,11 @@ void PairDataGenesis::add_best_gen(const GenesisInfo *bgi,
(init_exc.n() > 0 && init_exc.has(init_ut)))
continue;

// Check if this initialization hour and lead time should be used
if((init_hour.n() > 0 && !init_hour.has(unix_to_sec_of_day(init_ut))) ||
(lead.n() > 0 && !lead.has(nint(bgi->genesis_time() - init_ut))))
continue;

// Check if this case already exists
if(!has_case(bgi->storm_id(), init_ut, i_case)) {

Expand Down
3 changes: 2 additions & 1 deletion met/src/libcode/vx_tc_util/pair_data_genesis.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class PairDataGenesis {
void add_best_gen(const GenesisInfo *,
const int, const int, const int,
const unixtime, const unixtime,
const TimeArray &, const TimeArray &);
const TimeArray &, const TimeArray &,
const NumArray &, const NumArray &);

void add_gen_pair(const GenesisInfo *, const GenesisInfo *);
void set_gen_diff(int, const GenesisPairDiff &);
Expand Down
4 changes: 3 additions & 1 deletion met/src/tools/tc_utils/tc_gen/tc_gen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// 005 04/02/21 Halley Gotway MET #1714 Refinem matching logic
// 006 11/04/21 Halley Gotway MET #1809 Add -edeck option
// 007 11/22/21 Halley Gotway MET #1810 Add -shape option
// 008 05/02/22 Halley Gotway MET #2148 Fix init_hour and lead misses
//
////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -605,7 +606,8 @@ void get_genesis_pairs(const TCGenVxOpt &vx_opt,
conf_info.FcstSecBeg, conf_info.FcstSecEnd,
conf_info.InitFreqHr*sec_per_hour,
vx_opt.InitBeg, vx_opt.InitEnd,
vx_opt.InitInc, vx_opt.InitExc);
vx_opt.InitInc, vx_opt.InitExc,
vx_opt.InitHour, vx_opt.Lead);
} // end for i bga

// Loop over the model genesis events looking for pairs.
Expand Down