From 0e94ea8dd399a946bef8280dc4ed804660552f69 Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Mon, 26 Sep 2022 13:58:25 -0600 Subject: [PATCH 01/30] Per issue #2036, add print (cout) statement for vmax (wind-speed) to derive_baseline_model(). This is mostly to get the feature branch established. SL --- src/tools/tc_utils/tc_pairs/tc_pairs.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/tc_utils/tc_pairs/tc_pairs.cc b/src/tools/tc_utils/tc_pairs/tc_pairs.cc index fd5f6d20ba..6cb0f13b63 100644 --- a/src/tools/tc_utils/tc_pairs/tc_pairs.cc +++ b/src/tools/tc_utils/tc_pairs/tc_pairs.cc @@ -1502,6 +1502,8 @@ void derive_baseline_model(const ConcatString &model, tp_lon[ntp] = (float) ti[i].lon(); tp_vmax[ntp] = (float) ti[i].v_max(); + cout << "ti[" << i << "].v_max() = " << ti[i].v_max() << endl; + // Increment the track point counter ntp++; From 21998250710bdc9f7dedbdd325c82a155a5fd3ae Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Tue, 27 Sep 2022 15:06:12 -0600 Subject: [PATCH 02/30] Per #2036, add new tc_pairs_CONSENSUS test to unit_tc_pairs.xml to demonstrate the computation of consensus tracks. Note however that the TC-Pairs computed consensus do not match the output from NHC as closely as I'd expect. --- .../test_unit/config/TCPairsConfig_CONSENSUS | 198 ++++++++++++++++++ internal/test_unit/xml/unit_tc_pairs.xml | 19 ++ src/tools/tc_utils/tc_pairs/tc_pairs.cc | 4 +- 3 files changed, 218 insertions(+), 3 deletions(-) create mode 100644 internal/test_unit/config/TCPairsConfig_CONSENSUS diff --git a/internal/test_unit/config/TCPairsConfig_CONSENSUS b/internal/test_unit/config/TCPairsConfig_CONSENSUS new file mode 100644 index 0000000000..16b2106a2a --- /dev/null +++ b/internal/test_unit/config/TCPairsConfig_CONSENSUS @@ -0,0 +1,198 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// TC-Pairs configuration file. +// +// For additional information, please see the MET User's Guide. +// +//////////////////////////////////////////////////////////////////////////////// + +// +// ATCF file format reference: +// http://www.nrlmry.navy.mil/atcf_web/docs/database/new/abrdeck.html +// + +// +// Models +// +model = []; + +// +// Description +// +desc = "NA"; + +// +// Storm identifiers +// +storm_id = [ "AL132020" ]; + +// +// Basins +// +basin = []; + +// +// Cyclone numbers +// +cyclone = []; + +// +// Storm names +// +storm_name = []; + +// +// Model initialization time windows to include or exclude +// +init_beg = ${INIT_BEG}; +init_end = ${INIT_END}; +init_inc = []; +init_exc = []; + +// +// Valid model time windows to include or exclude +// +valid_beg = ""; +valid_end = ""; +valid_inc = []; +valid_exc = []; + +// +// Valid times for which output should be written +// +write_valid = []; + +// +// Model initialization hours +// +init_hour = []; + +// +// Required lead time in hours +// +lead_req = []; + +// +// lat/lon polylines defining masking regions +// +init_mask = ""; +valid_mask = ""; + +// +// Specify if the code should check for duplicate ATCF lines +// +check_dup = TRUE; + +// +// Specify special processing to be performed for interpolated models. +// Set to NONE, FILL, or REPLACE. +// +interp12 = NONE; + +// +// Specify how consensus forecasts should be defined +// See NHC Consensus Definitions in Table 2: +// https://www.nhc.noaa.gov/modelsummary.shtml +// +consensus = [ + { + name = "UEMN_CONS"; + members = [ "UE00", "UE01", "UE02", "UE03", "UE04", + "UE05", "UE06", "UE07", "UE08", "UE09", + "UE10", "UE11", "UE12", "UE13", "UE14", + "UE15", "UE16", "UE17", "UE18", "UE19", + "UE20", "UE21", "UE22", "UE23", "UE24", + "UE25", "UE26", "UE27", "UE28", "UE29", + "UE30", "UE31", "UE32", "UE33", "UE34", + "UE35" ]; + required = []; + min_req = 36; + }, + { + name = "HCCA_CONS"; + members = [ "AEMI", "GFSI", "CTCI", "DSHP", "EGRI", "EMN2", "EMXI", "HWFI", "LGEM" ]; + required = []; + min_req = 8; + }, + { + name = "GFEX_CONS"; + members = [ "GFSI", "EMXI" ]; + required = []; + min_req = 2; + }, + { + name = "TVCA_CONS"; + members = [ "GFSI", "EGRI", "HWFI", "EMHI", "CTCI", "EMNI" ]; + required = []; + min_req = 2; + }, + { + name = "TVCX_CONS"; + members = [ "GFSI", "EMXI", "EMXI", "HWFI", "CTCI", "EGRI" ]; + required = [ TRUE, TRUE, FALSE, FALSE, FALSE, FALSE ]; + min_req = 2; + }, + { + name = "ICON_CONS"; + members = [ "DSHP", "LGEM", "HWFI", "HMNI" ]; + required = [ TRUE, TRUE, TRUE, TRUE ]; + min_req = 4; + }, + { + name = "IVCN_CONS"; + members = [ "DSHP", "LGEM", "HWFI", "HMNI", "CTCI" ]; + required = []; + min_req = 2; + } +]; + +// +// Forecast lag times +// +lag_time = []; + +// +// CLIPER/SHIFOR baseline forecasts to be derived from the BEST +// and operational (CARQ) tracks. +// +best_baseline = [ "BCLP" ]; +oper_baseline = [ "OCLP" ]; + +// +// Specify if only those track points common to both the ADECK and BDECK +// tracks be written out. +// +match_points = TRUE; + +// +// Specify the NetCDF output of the gen_dland tool containing a gridded +// representation of the minimum distance to land. +// +dland_file = "${MET_TEST_OUTPUT}/tc_dland/tc_dland_half_deg.nc"; + +// +// Specify watch/warning information: +// - Input watch/warning filename +// - Watch/warning time offset in seconds +// +watch_warn = { + file_name = "MET_BASE/tc_data/wwpts_us.txt"; + time_offset = -14400; +} + +// +// Modify basin names to make them consistent across ATCF input files. +// +basin_map = [ + { key = "SI"; val = "SH"; }, + { key = "SP"; val = "SH"; }, + { key = "AU"; val = "SH"; }, + { key = "AB"; val = "IO"; }, + { key = "BB"; val = "IO"; } +]; + +// +// Indicate a version number for the contents of this configuration file. +// The value should generally not be modified. +// +version = "V11.0.0"; diff --git a/internal/test_unit/xml/unit_tc_pairs.xml b/internal/test_unit/xml/unit_tc_pairs.xml index d35465237a..44f986fd10 100644 --- a/internal/test_unit/xml/unit_tc_pairs.xml +++ b/internal/test_unit/xml/unit_tc_pairs.xml @@ -36,6 +36,25 @@ + + &MET_BIN;/tc_pairs + + INIT_BEG "20200823_00" + INIT_END "20200823_18" + + \ + -adeck &DATA_DIR;/adeck/aal132020.dat \ + -bdeck &DATA_DIR;/bdeck/bal132020.dat \ + -config &CONFIG_DIR;/TCPairsConfig_CONSENSUS \ + -out &OUTPUT_DIR;/tc_pairs/al132020_CONSENSUS \ + -log &OUTPUT_DIR;/tc_pairs/tc_pairs_CONSENSUS.log \ + -v 2 + + + &OUTPUT_DIR;/tc_pairs/al132020_CONSENSUS.tcst + + + &MET_BIN;/tc_pairs diff --git a/src/tools/tc_utils/tc_pairs/tc_pairs.cc b/src/tools/tc_utils/tc_pairs/tc_pairs.cc index 6cb0f13b63..8d690a97bc 100644 --- a/src/tools/tc_utils/tc_pairs/tc_pairs.cc +++ b/src/tools/tc_utils/tc_pairs/tc_pairs.cc @@ -171,7 +171,7 @@ int met_main(int argc, char *argv[]) { //////////////////////////////////////////////////////////////////////// const string get_tool_name() { - return "tc_gen"; + return "tc_pairs"; } //////////////////////////////////////////////////////////////////////// @@ -1502,8 +1502,6 @@ void derive_baseline_model(const ConcatString &model, tp_lon[ntp] = (float) ti[i].lon(); tp_vmax[ntp] = (float) ti[i].v_max(); - cout << "ti[" << i << "].v_max() = " << ti[i].v_max() << endl; - // Increment the track point counter ntp++; From 8be18706ac4b44f5e42d29c122512e3348205660 Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Wed, 28 Sep 2022 14:05:23 -0600 Subject: [PATCH 03/30] Per issue #2036, added new function compute_gc_dist_stdev() and associated changes in consensus() to call this function to get track spread. Still in progress SL. ci-skip-all --- src/libcode/vx_tc_util/track_info.cc | 37 +++++++++++++++++++++++++--- src/libcode/vx_tc_util/track_info.h | 1 + 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/libcode/vx_tc_util/track_info.cc b/src/libcode/vx_tc_util/track_info.cc index 4a4c34900c..01036797fb 100644 --- a/src/libcode/vx_tc_util/track_info.cc +++ b/src/libcode/vx_tc_util/track_info.cc @@ -862,9 +862,10 @@ TrackInfo consensus(const TrackInfoArray &tracks, int pcnt; TrackPoint pavg, psum; QuadInfo wavg; - NumArray plon; + NumArray plon, plat; double lon_range, lon_shift, lon_avg; - + double track_spread; + // Check for at least one track if(tracks.n() == 0) { mlog << Error @@ -926,6 +927,7 @@ TrackInfo consensus(const TrackInfoArray &tracks, pavg.clear(); psum.clear(); plon.clear(); + plat.clear(); pcnt = 0; // Loop through the tracks and get an average TrackPoint @@ -948,10 +950,11 @@ TrackInfo consensus(const TrackInfoArray &tracks, if(pcnt == 1) psum = tracks.Track[j][i_pnt]; else psum += tracks.Track[j][i_pnt]; - // Store the longitude values + // Store the latitude and longitude values plon.add(tracks.Track[j][i_pnt].lon()); + plat.add(tracks.Track[j][i_pnt].lat()); } - + // Check for missing required member and the minimum number of points if(skip == true || pcnt < req) continue; @@ -981,6 +984,13 @@ TrackInfo consensus(const TrackInfoArray &tracks, if(!is_bad_data(pavg.lat())) pavg.set_lat(psum.lat()/pcnt); if(!is_bad_data(pavg.lon())) pavg.set_lon(rescale_deg(lon_avg, -180.0, 180.0)); + // Call new function + //double compute_gc_dist_stdev(const double lat, const double lon, const NumArray &lats, const NumArray &lons); + // + // Call it like + track_spread = compute_gc_dist_stdev(pavg.lat(), pavg.lon(), plat, plon); + cout << "track_spred = " << track_spread << endl; + // Compute the average winds for(j=0; j Date: Tue, 4 Oct 2022 10:43:45 -0600 Subject: [PATCH 05/30] Per issue #2036, in compute_gc_dist_stdev() added some prints for debugging SL. ci-skip-all --- src/libcode/vx_tc_util/track_info.cc | 32 +++++++++++----------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/src/libcode/vx_tc_util/track_info.cc b/src/libcode/vx_tc_util/track_info.cc index a5c939fa2f..07bd81519b 100644 --- a/src/libcode/vx_tc_util/track_info.cc +++ b/src/libcode/vx_tc_util/track_info.cc @@ -989,7 +989,7 @@ TrackInfo consensus(const TrackInfoArray &tracks, // // Call it like track_spread = compute_gc_dist_stdev(pavg.lat(), pavg.lon(), plat, plon); - cout << "track_spread = " << track_spread << endl; + cout << "track_spread = " << track_spread << endl << endl; // Compute the average winds for(j=0; j Date: Tue, 4 Oct 2022 15:10:52 -0600 Subject: [PATCH 06/30] Per issue #2036, in consensus(), added code to compute vmax_stdev and mslp_stdev, still in progress SL. ci-skip-all --- src/libcode/vx_tc_util/track_info.cc | 39 ++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/src/libcode/vx_tc_util/track_info.cc b/src/libcode/vx_tc_util/track_info.cc index 07bd81519b..f9421ade73 100644 --- a/src/libcode/vx_tc_util/track_info.cc +++ b/src/libcode/vx_tc_util/track_info.cc @@ -862,9 +862,9 @@ TrackInfo consensus(const TrackInfoArray &tracks, int pcnt; TrackPoint pavg, psum; QuadInfo wavg; - NumArray plon, plat; + NumArray plon, plat, pvmax, pmslp; double lon_range, lon_shift, lon_avg; - double track_spread; + double track_spread, vmax_stdev, mslp_stdev; // Check for at least one track if(tracks.n() == 0) { @@ -923,11 +923,15 @@ TrackInfo consensus(const TrackInfoArray &tracks, // Loop through the lead times and construct a TrackPoint for each for(i=0, skip=false; i Date: Wed, 5 Oct 2022 15:42:39 -0600 Subject: [PATCH 07/30] Per issue #2036, added relevant code for new consensus variables Spread, VmaxStdev, MSLPStdev SL. ci-skip-all --- src/libcode/vx_tc_util/track_point.cc | 37 ++++++++++++++++++++++++--- src/libcode/vx_tc_util/track_point.h | 26 ++++++++++++++++--- 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/libcode/vx_tc_util/track_point.cc b/src/libcode/vx_tc_util/track_point.cc index 1d0004a5b4..ab38f4d549 100644 --- a/src/libcode/vx_tc_util/track_point.cc +++ b/src/libcode/vx_tc_util/track_point.cc @@ -384,6 +384,13 @@ TrackPoint & TrackPoint::operator+=(const TrackPoint &p) { if(is_bad_data(Speed) || is_bad_data(p.speed())) Speed = bad_data_double; else Speed += p.speed(); + if(is_bad_data(Spread) || is_bad_data(p.spread())) Spread = bad_data_double; + else Spread += p.spread(); + if(is_bad_data(VmaxStdev) || is_bad_data(p.v_max_stdev())) VmaxStdev = bad_data_double; + else VmaxStdev += p.v_max_stdev(); + if(is_bad_data(MSLPStdev) || is_bad_data(p.mslp_stdev())) MSLPStdev = bad_data_double; + else MSLPStdev += p.mslp_stdev(); + for(i=0; i Date: Fri, 7 Oct 2022 10:17:32 -0600 Subject: [PATCH 10/30] Per issue #2036, changed LOCATION_SPREAD to TRACK_SPREAD SL. ci-skip-all --- src/libcode/vx_tc_util/tc_columns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcode/vx_tc_util/tc_columns.h b/src/libcode/vx_tc_util/tc_columns.h index 01b48cc2c1..e4fbdda010 100644 --- a/src/libcode/vx_tc_util/tc_columns.h +++ b/src/libcode/vx_tc_util/tc_columns.h @@ -69,7 +69,7 @@ static const char * tc_mpr_cols [] = { "ADIR", "BDIR", "ASPEED", "BSPEED", "ADEPTH", "BDEPTH", - "LOCATION_SPREAD", + "TRACK_SPREAD", "MSLP_SPREAD", "MAX_WIND_SPREAD" }; From 449885de546dc0d855bc58143243dba61646e3de Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Fri, 7 Oct 2022 10:19:40 -0600 Subject: [PATCH 11/30] Per issue #2036, in operator function, don't need to increment spread variables, instead set to bad_data_double. Fixed clear function to set spread variables to bad_data_double SL. ci-skip-all --- src/libcode/vx_tc_util/track_point.cc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/libcode/vx_tc_util/track_point.cc b/src/libcode/vx_tc_util/track_point.cc index ab38f4d549..e0bce93a8d 100644 --- a/src/libcode/vx_tc_util/track_point.cc +++ b/src/libcode/vx_tc_util/track_point.cc @@ -383,14 +383,13 @@ TrackPoint & TrackPoint::operator+=(const TrackPoint &p) { else Eye += p.eye(); if(is_bad_data(Speed) || is_bad_data(p.speed())) Speed = bad_data_double; else Speed += p.speed(); - - if(is_bad_data(Spread) || is_bad_data(p.spread())) Spread = bad_data_double; - else Spread += p.spread(); - if(is_bad_data(VmaxStdev) || is_bad_data(p.v_max_stdev())) VmaxStdev = bad_data_double; - else VmaxStdev += p.v_max_stdev(); - if(is_bad_data(MSLPStdev) || is_bad_data(p.mslp_stdev())) MSLPStdev = bad_data_double; - else MSLPStdev += p.mslp_stdev(); + // Set spread variables to missing + Spread = bad_data_double; + VmaxStdev = bad_data_double; + MSLPStdev = bad_data_double; + + // Increment wind quadrants for(i=0; i Date: Fri, 7 Oct 2022 11:12:08 -0600 Subject: [PATCH 12/30] Per issue #2036: updated add() function to add the new spread variables: TRACK_SPREAD, MSLP_SPREAD, MAX_WIND_SPREAD SL. ci-skip-all --- src/libcode/vx_tc_util/track_pair_info.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcode/vx_tc_util/track_pair_info.cc b/src/libcode/vx_tc_util/track_pair_info.cc index bc013b6821..bb4ddd315d 100644 --- a/src/libcode/vx_tc_util/track_pair_info.cc +++ b/src/libcode/vx_tc_util/track_pair_info.cc @@ -407,6 +407,13 @@ void TrackPairInfo::add(const TCStatLine &l) { tp->set_eye(string_to_systemsdepth(l.get_item(cs.c_str()))); tp->set_watch_warn(string_to_watchwarntype(l.get_item("WATCH_WARN"))); + cs << cs_erase << deck[i] << "TRACK_SPREAD"; + tp->set_spread(atof(l.get_item(cs.c_str()))); + cs << cs_erase << deck[i] << "MAX_WIND_SPREAD"; + tp->set_v_max_stdev(atof(l.get_item(cs.c_str()))); + cs << cs_erase << deck[i] << "MSLP_SPREAD"; + tp->set_mslp_stdev(atof(l.get_item(cs.c_str()))); + // Loop over the winds for(j=0; j Date: Fri, 7 Oct 2022 12:51:31 -0600 Subject: [PATCH 13/30] Per issue #2036, added a print (cout) to get_item() SL. ci-skip-all --- src/libcode/vx_tc_util/tc_stat_line.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcode/vx_tc_util/tc_stat_line.cc b/src/libcode/vx_tc_util/tc_stat_line.cc index c3ef71f08b..14ea73f726 100644 --- a/src/libcode/vx_tc_util/tc_stat_line.cc +++ b/src/libcode/vx_tc_util/tc_stat_line.cc @@ -200,6 +200,8 @@ const char * TCStatLine::get_item(const char *col_str, bool check_na) const { // offset = HdrLine->col_offset(col_str, dim); + cout << "dim: " << dim << " col_str: " << col_str << " offset: " << offset << endl; + // // If not found, check extra header columns // From fc8bc6bf7d3bbee1282e9fd25fe74ae36390fd19 Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Mon, 10 Oct 2022 10:57:32 -0600 Subject: [PATCH 14/30] Per issue #2036, in consensus() added code to convert track_spread from km to miles. Cleaned up code. SL. ci-skip-all --- src/libcode/vx_tc_util/track_info.cc | 35 ++++++++-------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/src/libcode/vx_tc_util/track_info.cc b/src/libcode/vx_tc_util/track_info.cc index d93d405726..fad3cdb50b 100644 --- a/src/libcode/vx_tc_util/track_info.cc +++ b/src/libcode/vx_tc_util/track_info.cc @@ -923,8 +923,6 @@ TrackInfo consensus(const TrackInfoArray &tracks, // Loop through the lead times and construct a TrackPoint for each for(i=0, skip=false; i Date: Mon, 10 Oct 2022 11:03:40 -0600 Subject: [PATCH 15/30] Per issue #2036, removed some print (cout) statements from write_tcmpr_cols(). SL --- src/libcode/vx_tc_util/tc_columns.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcode/vx_tc_util/tc_columns.cc b/src/libcode/vx_tc_util/tc_columns.cc index d14120877a..2b7467fcc9 100644 --- a/src/libcode/vx_tc_util/tc_columns.cc +++ b/src/libcode/vx_tc_util/tc_columns.cc @@ -297,7 +297,7 @@ void write_tc_mpr_cols(const TrackPairInfo &p, int i, at.set_entry(r, c++, p.bdeck()[i].speed()); at.set_entry(r, c++, systemsdepth_to_string(p.adeck()[i].depth())); at.set_entry(r, c++, systemsdepth_to_string(p.bdeck()[i].depth())); - + at.set_entry(r, c++, p.adeck()[i].spread()); at.set_entry(r, c++, p.adeck()[i].mslp_stdev()); at.set_entry(r, c++, p.adeck()[i].v_max_stdev()); From 1792f2c3e7e37957f978b0528d1209621bb7116f Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Tue, 11 Oct 2022 11:29:30 -0600 Subject: [PATCH 16/30] Per issue #2036, added new variables: dist_mean and num_members. Re-worked compute_gc_dist_stdev() to compute track-spread and dist-mean. Re-organized. Cleaned up. SL ci-skip-all --- src/libcode/vx_tc_util/tc_columns.cc | 2 + src/libcode/vx_tc_util/tc_columns.h | 2 + src/libcode/vx_tc_util/tc_stat_line.cc | 2 - src/libcode/vx_tc_util/track_info.cc | 57 +++++++++++++++++++++-- src/libcode/vx_tc_util/track_info.h | 3 +- src/libcode/vx_tc_util/track_pair_info.cc | 4 ++ src/libcode/vx_tc_util/track_point.cc | 48 +++++++++++-------- src/libcode/vx_tc_util/track_point.h | 35 +++++++++----- 8 files changed, 115 insertions(+), 38 deletions(-) diff --git a/src/libcode/vx_tc_util/tc_columns.cc b/src/libcode/vx_tc_util/tc_columns.cc index 2b7467fcc9..ec73a544d9 100644 --- a/src/libcode/vx_tc_util/tc_columns.cc +++ b/src/libcode/vx_tc_util/tc_columns.cc @@ -298,7 +298,9 @@ void write_tc_mpr_cols(const TrackPairInfo &p, int i, at.set_entry(r, c++, systemsdepth_to_string(p.adeck()[i].depth())); at.set_entry(r, c++, systemsdepth_to_string(p.bdeck()[i].depth())); + at.set_entry(r, c++, p.adeck()[i].num_members()); at.set_entry(r, c++, p.adeck()[i].spread()); + at.set_entry(r, c++, p.adeck()[i].dist_mean()); at.set_entry(r, c++, p.adeck()[i].mslp_stdev()); at.set_entry(r, c++, p.adeck()[i].v_max_stdev()); diff --git a/src/libcode/vx_tc_util/tc_columns.h b/src/libcode/vx_tc_util/tc_columns.h index e4fbdda010..af6cab2e5a 100644 --- a/src/libcode/vx_tc_util/tc_columns.h +++ b/src/libcode/vx_tc_util/tc_columns.h @@ -69,7 +69,9 @@ static const char * tc_mpr_cols [] = { "ADIR", "BDIR", "ASPEED", "BSPEED", "ADEPTH", "BDEPTH", + "NUM_MEMBERS", "TRACK_SPREAD", + "DIST_MEAN", "MSLP_SPREAD", "MAX_WIND_SPREAD" }; diff --git a/src/libcode/vx_tc_util/tc_stat_line.cc b/src/libcode/vx_tc_util/tc_stat_line.cc index 14ea73f726..c3ef71f08b 100644 --- a/src/libcode/vx_tc_util/tc_stat_line.cc +++ b/src/libcode/vx_tc_util/tc_stat_line.cc @@ -200,8 +200,6 @@ const char * TCStatLine::get_item(const char *col_str, bool check_na) const { // offset = HdrLine->col_offset(col_str, dim); - cout << "dim: " << dim << " col_str: " << col_str << " offset: " << offset << endl; - // // If not found, check extra header columns // diff --git a/src/libcode/vx_tc_util/track_info.cc b/src/libcode/vx_tc_util/track_info.cc index fad3cdb50b..f01715fa98 100644 --- a/src/libcode/vx_tc_util/track_info.cc +++ b/src/libcode/vx_tc_util/track_info.cc @@ -923,6 +923,8 @@ TrackInfo consensus(const TrackInfoArray &tracks, // Loop through the lead times and construct a TrackPoint for each for(i=0, skip=false; i 0) pavg.set_num_members(pcnt); + + // Compute track spread and distance mean, convert to nautical-miles + double track_spread, dist_mean; + compute_gc_dist_stdev(pavg.lat(), pavg.lon(), plat, plon, track_spread, dist_mean); + if(!is_bad_data(track_spread)) { track_spread *= tc_nautical_miles_per_km; pavg.set_spread(track_spread); } + + if(!is_bad_data(dist_mean)) { + dist_mean *= tc_nautical_miles_per_km; + pavg.set_dist_mean(dist_mean); + } // Compute wind-speed (v_max) and pressure (mslp) standard deviation vmax_stdev = pvmax.stdev(); mslp_stdev = pmslp.stdev(); if(!is_bad_data(vmax_stdev)) pavg.set_v_max_stdev(vmax_stdev); if(!is_bad_data(mslp_stdev)) pavg.set_mslp_stdev(mslp_stdev); + + cout << "num_members (pcnt): " << pcnt << " track_spread: " << track_spread << " dist_mean: " << dist_mean << " vmax_stdev: " << vmax_stdev << " mslp_stdev: " << mslp_stdev << endl << endl; // Compute the average winds for(j=0; jset_eye(string_to_systemsdepth(l.get_item(cs.c_str()))); tp->set_watch_warn(string_to_watchwarntype(l.get_item("WATCH_WARN"))); + cs << cs_erase << deck[i] << "NUM_MEMBERS"; + tp->set_num_members(atoi(l.get_item(cs.c_str()))); cs << cs_erase << deck[i] << "TRACK_SPREAD"; tp->set_spread(atof(l.get_item(cs.c_str()))); + cs << cs_erase << deck[i] << "DIST_MEAN"; + tp->set_dist_mean(atof(l.get_item(cs.c_str()))); cs << cs_erase << deck[i] << "MAX_WIND_SPREAD"; tp->set_v_max_stdev(atof(l.get_item(cs.c_str()))); cs << cs_erase << deck[i] << "MSLP_SPREAD"; diff --git a/src/libcode/vx_tc_util/track_point.cc b/src/libcode/vx_tc_util/track_point.cc index e0bce93a8d..9937034156 100644 --- a/src/libcode/vx_tc_util/track_point.cc +++ b/src/libcode/vx_tc_util/track_point.cc @@ -384,10 +384,12 @@ TrackPoint & TrackPoint::operator+=(const TrackPoint &p) { if(is_bad_data(Speed) || is_bad_data(p.speed())) Speed = bad_data_double; else Speed += p.speed(); - // Set spread variables to missing - Spread = bad_data_double; - VmaxStdev = bad_data_double; - MSLPStdev = bad_data_double; + // Set consensus (spread) variables to missing + NumMembers = bad_data_int; + Spread = bad_data_double; + DistMean = bad_data_double; + VmaxStdev = bad_data_double; + MSLPStdev = bad_data_double; // Increment wind quadrants for(i=0; i Date: Wed, 12 Oct 2022 11:13:47 -0600 Subject: [PATCH 24/30] Per issue #2036, added new consensus track variables to the TCMPR line type: NUM_MEMBERS, TRACK_SPREAD, DIST_MEAN, MSLP_SPREAD, MAX_WIND_SPREAD. Also updated some wording for the consensus section related to this. SL --- docs/Users_Guide/tc-pairs.rst | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/Users_Guide/tc-pairs.rst b/docs/Users_Guide/tc-pairs.rst index 3de6d0b470..f67b036fb7 100644 --- a/docs/Users_Guide/tc-pairs.rst +++ b/docs/Users_Guide/tc-pairs.rst @@ -156,7 +156,7 @@ ____________________ } ]; -The **consensus** field allows the user to generate a user-defined consensus forecasts from any number of models. All models used in the consensus forecast need to be included in the **model** field (first entry in **TCPairsConfig_default**). The name field is the desired consensus model name. The **members** field is a comma-separated list of model IDs that make up the members of the consensus. The **required** field is a comma-separated list of true/false values associated with each consensus member. If a member is designated as true, the member is required to be present in order for the consensus to be generated. If a member is false, the consensus will be generated regardless of whether the member is present. The length of the required array must be the same length as the members array. The **min_req** field is the number of members required in order for the consensus to be computed. The required and min_req field options are applied at each forecast lead time. If any member of the consensus has a non-valid position or intensity value, the consensus for that valid time will not be generated. +The **consensus** field allows the user to generate a user-defined consensus forecasts from any number of models. All models used in the consensus forecast need to be included in the **model** field (first entry in **TCPairsConfig_default**). The name field is the desired consensus model name. The **members** field is a comma-separated list of model IDs that make up the members of the consensus. The **required** field is a comma-separated list of true/false values associated with each consensus member. If a member is designated as true, the member is required to be present in order for the consensus to be generated. If a member is false, the consensus will be generated regardless of whether the member is present. The length of the required array must be the same length as the members array. The **min_req** field is the number of members required in order for the consensus to be computed. The required and min_req field options are applied at each forecast lead time. If any member of the consensus has a non-valid position or intensity value, the consensus for that valid time will not be generated. If a consensus model is indicated in the configuration file there will be non-missing output for the consensus track variables in the output file (NUM_MEMBERS, TRACK_SPREAD, DIST_MEAN, MSLP_SPREAD, MAX_WIND_SPREAD). See the TCMPR line type definitions below. ____________________ @@ -472,7 +472,22 @@ TC-Pairs produces output in TCST format. The default output file name can be ove * - 78, 79 - A/BDEPTH - system depth, D-deep, M-medium, S-shallow, X-unknown - + * - 80 + - NUM_MEMBERS + - consensus variable: number of models (or ensemble members) that were used to build the consesus track data + * - 81 + - TRACK_SPREAD + - consensus variable: the standard deviation of the distance from each member track location to the location of the consensus track + * - 82 + - DIST_MEAN + - consensus variable: the mean of the distances from each member track location to the consensus track location + * - 83 + - MSLP_SPREAD + - consensus variable: the standard deviation of the member's mean sea level pressure values + * - 84 + - MAX_WIND_SPREAD + - consensus variable: the standard deviation of the member's maximum wind speed values + .. _PROBRIRW Line Type: .. list-table:: Format information for PROBRIRW (Probability of Rapid Intensification/Weakening) output line type. From 62967e47d895f3986da0960a66e6be95e5d4f2b6 Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Wed, 12 Oct 2022 11:31:16 -0600 Subject: [PATCH 25/30] Per issue #2036, for the TCMPR line type, added some units for some of the consensus track variables. SL --- docs/Users_Guide/tc-pairs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Users_Guide/tc-pairs.rst b/docs/Users_Guide/tc-pairs.rst index f67b036fb7..1d090d6361 100644 --- a/docs/Users_Guide/tc-pairs.rst +++ b/docs/Users_Guide/tc-pairs.rst @@ -477,10 +477,10 @@ TC-Pairs produces output in TCST format. The default output file name can be ove - consensus variable: number of models (or ensemble members) that were used to build the consesus track data * - 81 - TRACK_SPREAD - - consensus variable: the standard deviation of the distance from each member track location to the location of the consensus track + - consensus variable: the standard deviation of the distance from each member track location to the location of the consensus track (nm) * - 82 - DIST_MEAN - - consensus variable: the mean of the distances from each member track location to the consensus track location + - consensus variable: the mean of the distances from each member track location to the consensus track location (nm) * - 83 - MSLP_SPREAD - consensus variable: the standard deviation of the member's mean sea level pressure values From 453699cb4bf56e964b27e4022d17a8ecac42dc52 Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Wed, 12 Oct 2022 14:50:31 -0600 Subject: [PATCH 26/30] Per issue #2036, in the add() function re-worked lines that load the new consensus variables into the track-point object. SL ci-skip-all --- src/libcode/vx_tc_util/track_pair_info.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/libcode/vx_tc_util/track_pair_info.cc b/src/libcode/vx_tc_util/track_pair_info.cc index 008370938f..bcacda8b15 100644 --- a/src/libcode/vx_tc_util/track_pair_info.cc +++ b/src/libcode/vx_tc_util/track_pair_info.cc @@ -407,17 +407,6 @@ void TrackPairInfo::add(const TCStatLine &l) { tp->set_eye(string_to_systemsdepth(l.get_item(cs.c_str()))); tp->set_watch_warn(string_to_watchwarntype(l.get_item("WATCH_WARN"))); - cs << cs_erase << deck[i] << "NUM_MEMBERS"; - tp->set_num_members(atoi(l.get_item(cs.c_str()))); - cs << cs_erase << deck[i] << "TRACK_SPREAD"; - tp->set_spread(atof(l.get_item(cs.c_str()))); - cs << cs_erase << deck[i] << "DIST_MEAN"; - tp->set_dist_mean(atof(l.get_item(cs.c_str()))); - cs << cs_erase << deck[i] << "MAX_WIND_SPREAD"; - tp->set_v_max_stdev(atof(l.get_item(cs.c_str()))); - cs << cs_erase << deck[i] << "MSLP_SPREAD"; - tp->set_mslp_stdev(atof(l.get_item(cs.c_str()))); - // Loop over the winds for(j=0; jset_num_members(atoi(l.get_item("NUM_MEMBERS"))); + tp->set_spread(atof(l.get_item("TRACK_SPREAD"))); + tp->set_dist_mean(atof(l.get_item("DIST_MEAN"))); + tp->set_v_max_stdev(atof(l.get_item("MAX_WIND_SPREAD"))); + tp->set_mslp_stdev(atof(l.get_item("MSLP_SPREAD"))); + // Add the TrackPoints to the ADECK/BDECK tracks ADeck.add(apoint); BDeck.add(bpoint); From f5beb7fe825271f45dc38eddc41c89f403fc2d75 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 12 Oct 2022 15:34:03 -0600 Subject: [PATCH 27/30] Per #2036, explicitly set apoint object rather than using the tp pointer which points the bdeck after the loop. Also update with newly generated Makefile.in files from seneca. --- internal/test_util/libcode/vx_nc_util/Makefile.in | 1 + src/libcode/vx_tc_util/track_pair_info.cc | 10 +++++----- src/tools/tc_utils/rmw_analysis/Makefile.in | 1 + src/tools/tc_utils/tc_rmw/Makefile.in | 1 + src/tools/tc_utils/tc_stat/Makefile.in | 1 + 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/internal/test_util/libcode/vx_nc_util/Makefile.in b/internal/test_util/libcode/vx_nc_util/Makefile.in index 57f091eed3..7a3b2d75de 100644 --- a/internal/test_util/libcode/vx_nc_util/Makefile.in +++ b/internal/test_util/libcode/vx_nc_util/Makefile.in @@ -343,6 +343,7 @@ test_pressure_levels_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/libcode/vx_tc_util/track_pair_info.cc b/src/libcode/vx_tc_util/track_pair_info.cc index bcacda8b15..01a792818a 100644 --- a/src/libcode/vx_tc_util/track_pair_info.cc +++ b/src/libcode/vx_tc_util/track_pair_info.cc @@ -434,11 +434,11 @@ void TrackPairInfo::add(const TCStatLine &l) { } // end for i // Set the consensus track variables - tp->set_num_members(atoi(l.get_item("NUM_MEMBERS"))); - tp->set_spread(atof(l.get_item("TRACK_SPREAD"))); - tp->set_dist_mean(atof(l.get_item("DIST_MEAN"))); - tp->set_v_max_stdev(atof(l.get_item("MAX_WIND_SPREAD"))); - tp->set_mslp_stdev(atof(l.get_item("MSLP_SPREAD"))); + apoint.set_num_members(atoi(l.get_item("NUM_MEMBERS"))); + apoint.set_spread(atof(l.get_item("TRACK_SPREAD"))); + apoint.set_dist_mean(atof(l.get_item("DIST_MEAN"))); + apoint.set_v_max_stdev(atof(l.get_item("MAX_WIND_SPREAD"))); + apoint.set_mslp_stdev(atof(l.get_item("MSLP_SPREAD"))); // Add the TrackPoints to the ADECK/BDECK tracks ADeck.add(apoint); diff --git a/src/tools/tc_utils/rmw_analysis/Makefile.in b/src/tools/tc_utils/rmw_analysis/Makefile.in index e87a7303e3..dd0e15370e 100644 --- a/src/tools/tc_utils/rmw_analysis/Makefile.in +++ b/src/tools/tc_utils/rmw_analysis/Makefile.in @@ -341,6 +341,7 @@ rmw_analysis_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/tools/tc_utils/tc_rmw/Makefile.in b/src/tools/tc_utils/tc_rmw/Makefile.in index 1ab4002cec..d77888c5fa 100644 --- a/src/tools/tc_utils/tc_rmw/Makefile.in +++ b/src/tools/tc_utils/tc_rmw/Makefile.in @@ -344,6 +344,7 @@ tc_rmw_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/tools/tc_utils/tc_stat/Makefile.in b/src/tools/tc_utils/tc_stat/Makefile.in index e2f297ef2d..ef32facee1 100644 --- a/src/tools/tc_utils/tc_stat/Makefile.in +++ b/src/tools/tc_utils/tc_stat/Makefile.in @@ -348,6 +348,7 @@ tc_stat_LDADD = -lvx_stat_out \ -lvx_gsl_prob \ -lvx_pb_util \ -lvx_cal \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ From b210aacffa782f3ff3cd2a07652fcd43b420114f Mon Sep 17 00:00:00 2001 From: johnhg Date: Sun, 16 Oct 2022 09:58:12 -0600 Subject: [PATCH 28/30] Update tc-pairs.rst --- docs/Users_Guide/tc-pairs.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Users_Guide/tc-pairs.rst b/docs/Users_Guide/tc-pairs.rst index 1d090d6361..77ee2af4c7 100644 --- a/docs/Users_Guide/tc-pairs.rst +++ b/docs/Users_Guide/tc-pairs.rst @@ -474,13 +474,13 @@ TC-Pairs produces output in TCST format. The default output file name can be ove - system depth, D-deep, M-medium, S-shallow, X-unknown * - 80 - NUM_MEMBERS - - consensus variable: number of models (or ensemble members) that were used to build the consesus track data + - consensus variable: number of models (or ensemble members) that were used to build the consensus track * - 81 - TRACK_SPREAD - - consensus variable: the standard deviation of the distance from each member track location to the location of the consensus track (nm) + - consensus variable: the standard deviation of the distances from the member locations to the consensus track location (nm) * - 82 - DIST_MEAN - - consensus variable: the mean of the distances from each member track location to the consensus track location (nm) + - consensus variable: the mean of the distances from the member location to the consensus track location (nm) * - 83 - MSLP_SPREAD - consensus variable: the standard deviation of the member's mean sea level pressure values From f4ab66a45b09e99502b70bb7b9185c5f048a92c4 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Sun, 16 Oct 2022 10:09:58 -0600 Subject: [PATCH 29/30] Per #2036, just some whitespace cleanup and removing a commented out function from a header file. --- internal/test_unit/tc_pairs_cmds.txt | 90 +++++++++++++++++++ .../test_util/libcode/vx_nc_util/Makefile.am | 2 +- .../test_util/libcode/vx_nc_util/Makefile.in | 2 +- src/libcode/vx_tc_util/track_info.cc | 4 +- src/libcode/vx_tc_util/track_info.h | 5 +- src/libcode/vx_tc_util/track_point.h | 4 +- src/tools/tc_utils/rmw_analysis/Makefile.am | 2 +- src/tools/tc_utils/rmw_analysis/Makefile.in | 2 +- src/tools/tc_utils/tc_rmw/Makefile.am | 2 +- src/tools/tc_utils/tc_rmw/Makefile.in | 2 +- src/tools/tc_utils/tc_stat/Makefile.am | 2 +- src/tools/tc_utils/tc_stat/Makefile.in | 2 +- 12 files changed, 105 insertions(+), 14 deletions(-) create mode 100644 internal/test_unit/tc_pairs_cmds.txt diff --git a/internal/test_unit/tc_pairs_cmds.txt b/internal/test_unit/tc_pairs_cmds.txt new file mode 100644 index 0000000000..4a3dd79d71 --- /dev/null +++ b/internal/test_unit/tc_pairs_cmds.txt @@ -0,0 +1,90 @@ +export LEAD_REQ='' +export VALID_INC='' +export WRITE_VALID='' +/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ + -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2010.dat \ + -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2010.dat \ + -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_ALAL2010 \ + -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2010 \ + -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_ALAL2010.log \ + -v 2 +unset LEAD_REQ +unset VALID_INC +unset WRITE_VALID + +export INTERP12='FILL' +/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ + -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2013.dat \ + -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2013.dat \ + -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_INTERP12 \ + -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/al022013_interp12_fill \ + -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_INTERP12_FILL.log \ + -v 3 +unset INTERP12 + +export INTERP12='REPLACE' +/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ + -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2013.dat \ + -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2013.dat \ + -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_INTERP12 \ + -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/al022013_interp12_replace \ + -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_INTERP12_REPLACE.log \ + -v 3 +unset INTERP12 + +export WRITE_VALID='' +/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ + -edeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/edeck/*2015*.dat \ + -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2015*.dat \ + -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_PROBRIRW \ + -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2015 \ + -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_PROBRIRW.log \ + -v 3 +unset WRITE_VALID + +/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ + -edeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/edeck/*2015*.dat \ + -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2015*.dat \ + -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_BASIN_MAP \ + -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2015_BASIN_MAP \ + -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_BASIN_MAP.log \ + -v 3 + +export LEAD_REQ='"96","108"' +export VALID_INC='' +export WRITE_VALID='' +/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ + -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2010.dat \ + -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2010.dat \ + -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_ALAL2010 \ + -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2010_LEAD_REQ \ + -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_LEAD_REQ.log \ + -v 2 +unset LEAD_REQ +unset VALID_INC +unset WRITE_VALID + +export LEAD_REQ='' +export VALID_INC='"20100814_12", "20100815_00"' +export WRITE_VALID='"20100815_00"' +/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ + -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2010.dat \ + -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2010.dat \ + -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_ALAL2010 \ + -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2010_WRITE_VALID \ + -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_WRITE_VALID.log \ + -v 2 +unset LEAD_REQ +unset VALID_INC +unset WRITE_VALID + +export WRITE_VALID='"20150512"' +/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ + -edeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/edeck/*2015*.dat \ + -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2015*.dat \ + -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_PROBRIRW \ + -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2015_WRITE_VALID \ + -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_WRITE_VALID_PROBRIRW.log \ + -v 3 +unset WRITE_VALID + diff --git a/internal/test_util/libcode/vx_nc_util/Makefile.am b/internal/test_util/libcode/vx_nc_util/Makefile.am index 2ae67d233c..39d0cd9867 100644 --- a/internal/test_util/libcode/vx_nc_util/Makefile.am +++ b/internal/test_util/libcode/vx_nc_util/Makefile.am @@ -42,7 +42,7 @@ test_pressure_levels_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ - -lvx_nav \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/internal/test_util/libcode/vx_nc_util/Makefile.in b/internal/test_util/libcode/vx_nc_util/Makefile.in index 7a3b2d75de..bc6cf1d1db 100644 --- a/internal/test_util/libcode/vx_nc_util/Makefile.in +++ b/internal/test_util/libcode/vx_nc_util/Makefile.in @@ -343,7 +343,7 @@ test_pressure_levels_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ - -lvx_nav \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/libcode/vx_tc_util/track_info.cc b/src/libcode/vx_tc_util/track_info.cc index 6738332383..479d0ae6f1 100644 --- a/src/libcode/vx_tc_util/track_info.cc +++ b/src/libcode/vx_tc_util/track_info.cc @@ -957,10 +957,10 @@ TrackInfo consensus(const TrackInfoArray &tracks, pvmax.add(tracks.Track[j][i_pnt].v_max()); pmslp.add(tracks.Track[j][i_pnt].mslp()); } - + // Check for missing required member and the minimum number of points if(skip == true || pcnt < req) continue; - + // Compute the average point pavg = psum; if(!is_bad_data(pavg.v_max())) pavg.set_v_max(psum.v_max()/pcnt); diff --git a/src/libcode/vx_tc_util/track_info.h b/src/libcode/vx_tc_util/track_info.h index fbee24828b..12957699b7 100644 --- a/src/libcode/vx_tc_util/track_info.h +++ b/src/libcode/vx_tc_util/track_info.h @@ -248,8 +248,9 @@ inline int TrackInfoArray::n() const { return(Track.size()); } //////////////////////////////////////////////////////////////////////// extern TrackInfo consensus(const TrackInfoArray &, const ConcatString &, int, const StringArray &); -extern void compute_gc_dist_stdev(const double lat, const double lon, const NumArray &lats, const NumArray &lons, double &spread, double &mean); -//extern double compute_gc_dist_stdev(const double lat, const double lon, const NumArray &lats, const NumArray &lons); +extern void compute_gc_dist_stdev(const double lat, const double lon, + const NumArray &lats, const NumArray &lons, + double &spread, double &mean); extern bool has_storm_id(const StringArray &, const ConcatString &basin, const ConcatString &cyclone, unixtime init); extern void latlon_to_xytk_err(double alat, double alon, diff --git a/src/libcode/vx_tc_util/track_point.h b/src/libcode/vx_tc_util/track_point.h index bdaf00d72d..bb0158814f 100644 --- a/src/libcode/vx_tc_util/track_point.h +++ b/src/libcode/vx_tc_util/track_point.h @@ -130,12 +130,12 @@ class TrackPoint { // Location double Lat; // degrees, + north, - south double Lon; // degrees, + west, - east - + // Intensity double Vmax; // knots double MSLP; // millibars CycloneLevel Level; - + // Pressure of the last closed isobar (900 - 1050 mb) double RadP; diff --git a/src/tools/tc_utils/rmw_analysis/Makefile.am b/src/tools/tc_utils/rmw_analysis/Makefile.am index 6407b8eff0..e0b72bb127 100644 --- a/src/tools/tc_utils/rmw_analysis/Makefile.am +++ b/src/tools/tc_utils/rmw_analysis/Makefile.am @@ -34,7 +34,7 @@ rmw_analysis_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ - -lvx_nav \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/tools/tc_utils/rmw_analysis/Makefile.in b/src/tools/tc_utils/rmw_analysis/Makefile.in index dd0e15370e..a6dfaa3dd9 100644 --- a/src/tools/tc_utils/rmw_analysis/Makefile.in +++ b/src/tools/tc_utils/rmw_analysis/Makefile.in @@ -341,7 +341,7 @@ rmw_analysis_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ - -lvx_nav \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/tools/tc_utils/tc_rmw/Makefile.am b/src/tools/tc_utils/tc_rmw/Makefile.am index 8713ddebe7..d125fb2bed 100644 --- a/src/tools/tc_utils/tc_rmw/Makefile.am +++ b/src/tools/tc_utils/tc_rmw/Makefile.am @@ -35,7 +35,7 @@ tc_rmw_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ - -lvx_nav \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/tools/tc_utils/tc_rmw/Makefile.in b/src/tools/tc_utils/tc_rmw/Makefile.in index d77888c5fa..3a00b9ee32 100644 --- a/src/tools/tc_utils/tc_rmw/Makefile.in +++ b/src/tools/tc_utils/tc_rmw/Makefile.in @@ -344,7 +344,7 @@ tc_rmw_LDADD = -lvx_stat_out \ -lvx_config \ -lvx_gsl_prob \ -lvx_cal \ - -lvx_nav \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/tools/tc_utils/tc_stat/Makefile.am b/src/tools/tc_utils/tc_stat/Makefile.am index 706781829c..10ae99fb47 100644 --- a/src/tools/tc_utils/tc_stat/Makefile.am +++ b/src/tools/tc_utils/tc_stat/Makefile.am @@ -39,7 +39,7 @@ tc_stat_LDADD = -lvx_stat_out \ -lvx_gsl_prob \ -lvx_pb_util \ -lvx_cal \ - -lvx_nav \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ diff --git a/src/tools/tc_utils/tc_stat/Makefile.in b/src/tools/tc_utils/tc_stat/Makefile.in index ef32facee1..df8bbe5b6a 100644 --- a/src/tools/tc_utils/tc_stat/Makefile.in +++ b/src/tools/tc_utils/tc_stat/Makefile.in @@ -348,7 +348,7 @@ tc_stat_LDADD = -lvx_stat_out \ -lvx_gsl_prob \ -lvx_pb_util \ -lvx_cal \ - -lvx_nav \ + -lvx_nav \ -lvx_util_math \ -lvx_util \ -lvx_math \ From afca850c6ce31909797f3009df524134aad8959b Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Sun, 16 Oct 2022 10:11:03 -0600 Subject: [PATCH 30/30] Per #2036, remove text file I accidentally added. --- internal/test_unit/tc_pairs_cmds.txt | 90 ---------------------------- 1 file changed, 90 deletions(-) delete mode 100644 internal/test_unit/tc_pairs_cmds.txt diff --git a/internal/test_unit/tc_pairs_cmds.txt b/internal/test_unit/tc_pairs_cmds.txt deleted file mode 100644 index 4a3dd79d71..0000000000 --- a/internal/test_unit/tc_pairs_cmds.txt +++ /dev/null @@ -1,90 +0,0 @@ -export LEAD_REQ='' -export VALID_INC='' -export WRITE_VALID='' -/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ - -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2010.dat \ - -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2010.dat \ - -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_ALAL2010 \ - -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2010 \ - -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_ALAL2010.log \ - -v 2 -unset LEAD_REQ -unset VALID_INC -unset WRITE_VALID - -export INTERP12='FILL' -/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ - -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2013.dat \ - -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2013.dat \ - -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_INTERP12 \ - -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/al022013_interp12_fill \ - -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_INTERP12_FILL.log \ - -v 3 -unset INTERP12 - -export INTERP12='REPLACE' -/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ - -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2013.dat \ - -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2013.dat \ - -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_INTERP12 \ - -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/al022013_interp12_replace \ - -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_INTERP12_REPLACE.log \ - -v 3 -unset INTERP12 - -export WRITE_VALID='' -/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ - -edeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/edeck/*2015*.dat \ - -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2015*.dat \ - -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_PROBRIRW \ - -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2015 \ - -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_PROBRIRW.log \ - -v 3 -unset WRITE_VALID - -/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ - -edeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/edeck/*2015*.dat \ - -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2015*.dat \ - -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_BASIN_MAP \ - -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2015_BASIN_MAP \ - -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_BASIN_MAP.log \ - -v 3 - -export LEAD_REQ='"96","108"' -export VALID_INC='' -export WRITE_VALID='' -/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ - -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2010.dat \ - -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2010.dat \ - -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_ALAL2010 \ - -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2010_LEAD_REQ \ - -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_LEAD_REQ.log \ - -v 2 -unset LEAD_REQ -unset VALID_INC -unset WRITE_VALID - -export LEAD_REQ='' -export VALID_INC='"20100814_12", "20100815_00"' -export WRITE_VALID='"20100815_00"' -/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ - -adeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/adeck/*2010.dat \ - -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2010.dat \ - -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_ALAL2010 \ - -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2010_WRITE_VALID \ - -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_WRITE_VALID.log \ - -v 2 -unset LEAD_REQ -unset VALID_INC -unset WRITE_VALID - -export WRITE_VALID='"20150512"' -/Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/../../share/met/../../bin/tc_pairs \ - -edeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/edeck/*2015*.dat \ - -bdeck /Volumes/d1/projects/MET/MET_unit_test/MET_test_input/tc_data/bdeck/*2015*.dat \ - -config /Volumes/d1/projects/MET/MET_development/MET-develop/internal/test_unit/config/TCPairsConfig_PROBRIRW \ - -out /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/alal2015_WRITE_VALID \ - -log /Volumes/d1/projects/MET/MET_unit_test/MET_test_output/tc_pairs/tc_pairs_WRITE_VALID_PROBRIRW.log \ - -v 3 -unset WRITE_VALID -