diff --git a/data/config/TCPairsConfig_default b/data/config/TCPairsConfig_default
index e85a7c5094..ae5601bc79 100644
--- a/data/config/TCPairsConfig_default
+++ b/data/config/TCPairsConfig_default
@@ -145,7 +145,7 @@ diag_info_map = [
diag_source = "CIRA_DIAG_RT";
track_source = "GFS";
field_source = "GFS_0p50";
- match_to_track = [ "GFS" ];
+ match_to_track = [];
diag_name = [];
},
{
diff --git a/docs/Users_Guide/tc-pairs.rst b/docs/Users_Guide/tc-pairs.rst
index 0533d5f649..d8f7a79b5f 100644
--- a/docs/Users_Guide/tc-pairs.rst
+++ b/docs/Users_Guide/tc-pairs.rst
@@ -291,7 +291,7 @@ ____________________
diag_source = "CIRA_DIAG_RT";
track_source = "GFS";
field_source = "GFS_0p50";
- match_to_track = [ "GFS" ];
+ match_to_track = [];
diag_name = [];
},
{
@@ -307,7 +307,11 @@ A TCMPR line is written to the output for each track point. If diagnostics data
The **diag_info_map** entries define how the diagnostics read with the **-diag** command line option should be used. Each array element is a dictionary consisting of entries for **diag_source**, **track_source**, **field_source**, **match_to_track**, and **diag_name**.
-The **diag_source** entry is one of the supported diagnostics data sources. The **track_source** entry is a string defining the ATCF ID of the track data used to define the locations at which diagnostics are computed. This string is written to the **TRACK_SOURCE** column of the TCDIAG output line. The **field_source** entry is a string describing the gridded model data from which the diagnostics are computed. This string is written to the **FIELD_SOURCE** column of the TCDIAG output line type. The **match_to_track** entry specifies a comma-separated list of strings defining the ATCF ID(s) of the tracks to which these diagnostic values should be matched. The **diag_name** entry specifies a comma-separated list of strings for the tropical cyclone diagnostics of interest. If a non-zero list of diagnostic names is specified, only those diagnostics appearing in the list are written to the TCDIAG output line type. If defined as an empty list (default), all diagnostics found in the input are written to the TCDIAG output lines.
+ - The **diag_source** entry is one of the supported diagnostics data sources.
+ - The **track_source** entry is a string defining the ATCF ID of the track data used to define the locations at which diagnostics are computed. This string is written to the **TRACK_SOURCE** column of the TCDIAG output line.
+ - The **field_source** entry is a string describing the gridded model data from which the diagnostics are computed. This string is written to the **FIELD_SOURCE** column of the TCDIAG output line type.
+ - The **match_to_track** entry specifies a comma-separated list of strings defining the ATCF ID(s) of the tracks to which these diagnostic values should be matched. For the SHIPS_DIAG_RT source, this is required since it is the only way to associate diagnostics with track ATCF IDs. For the CIRA_DIAG_RT source, this is optional. If a non-zero list is provided, the diagnostics will be matched to tracks for the specified ATCF ID(s). If defined as an empty list (default), the ATCF ID will be extracted from each CIRA diagnostic file and used to match the diagnostics to track data.
+ - The **diag_name** entry specifies a comma-separated list of strings for the tropical cyclone diagnostics of interest. If a non-zero list of diagnostic names is specified, only those diagnostics appearing in the list are written to the TCDIAG output line type. If defined as an empty list (default), all diagnostics found in the input are written to the TCDIAG output lines.
____________________
diff --git a/internal/test_unit/config/TCPairsConfig_DIAGNOSTICS b/internal/test_unit/config/TCPairsConfig_DIAGNOSTICS
index 75f4d9ef70..7052d262d4 100644
--- a/internal/test_unit/config/TCPairsConfig_DIAGNOSTICS
+++ b/internal/test_unit/config/TCPairsConfig_DIAGNOSTICS
@@ -136,7 +136,7 @@ diag_info_map = [
diag_source = "CIRA_DIAG_RT";
track_source = "GFS";
field_source = "GFS_0p50";
- match_to_track = [ "GFS" ];
+ match_to_track = [];
diag_name = [ ${CIRA_RT_DIAG_NAME} ];
},
{
diff --git a/internal/test_unit/config/TCPairsConfig_DIAGNOSTICS_CONSENSUS b/internal/test_unit/config/TCPairsConfig_DIAGNOSTICS_CONSENSUS
new file mode 100644
index 0000000000..49d3963dd1
--- /dev/null
+++ b/internal/test_unit/config/TCPairsConfig_DIAGNOSTICS_CONSENSUS
@@ -0,0 +1,175 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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 = [ "GFSI", "EMXI" ];
+
+//
+// Description
+//
+desc = "NA";
+
+//
+// Storm identifiers
+//
+storm_id = [ ${STORM_ID} ];
+
+//
+// Basins
+//
+basin = [];
+
+//
+// Cyclone numbers
+//
+cyclone = [];
+
+//
+// Storm names
+//
+storm_name = [];
+
+//
+// Model initialization time windows to include or exclude
+//
+init_beg = "";
+init_end = "";
+init_inc = [ ${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 = "GFEX_CONS";
+ members = [ "GFSI", "EMXI" ];
+ required = [];
+ min_req = 2;
+ write_members = TRUE;
+ }
+];
+
+//
+// Forecast lag times
+//
+lag_time = [];
+
+//
+// CLIPER/SHIFOR baseline forecasts to be derived from the BEST
+// and operational (CARQ) tracks.
+//
+best_baseline = [];
+oper_baseline = [];
+
+//
+// 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;
+}
+
+//
+// Diagnostics to be extracted
+//
+diag_info_map = [
+ {
+ diag_source = "CIRA_DIAG_RT";
+ track_source = "TRACK_MODEL";
+ field_source = "0p50RES";
+ match_to_track = [ ];
+ diag_name = [ ${CIRA_RT_DIAG_NAME} ];
+ }
+];
+
+//
+// Unit conversions to be applied based on diagnostic names and units
+// Commented out to use settings from the default config file
+//
+// diag_convert_map = [];
+
+//
+// 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 = "V12.0.0";
diff --git a/internal/test_unit/xml/unit_tc_pairs.xml b/internal/test_unit/xml/unit_tc_pairs.xml
index 24bec42c00..fde2193181 100644
--- a/internal/test_unit/xml/unit_tc_pairs.xml
+++ b/internal/test_unit/xml/unit_tc_pairs.xml
@@ -206,4 +206,27 @@
+
+ &MET_BIN;/tc_pairs
+
+ STORM_ID "AL092022"
+ INIT_INC "20220926_06", "20220926_18"
+ CIRA_RT_DIAG_NAME "TPW", "LAND", "SHR_MAG", "STM_SPD"
+
+ \
+ -adeck &DATA_DIR;/adeck/aal092022.dat \
+ -bdeck &DATA_DIR;/bdeck/bal092022.dat \
+ -diag CIRA_DIAG_RT &DATA_DIR;/diag/cira_diag_rt/2022/GFSI/sal092022_avni_doper_20220926*_diag.dat \
+ -diag CIRA_DIAG_RT &DATA_DIR;/diag/cira_diag_rt/2022/EMXI/sal092022_emxi_doper_20220926*_diag.dat \
+ -config &CONFIG_DIR;/TCPairsConfig_DIAGNOSTICS_CONSENSUS \
+ -out &OUTPUT_DIR;/tc_pairs/al092022_20220926_DIAGNOSTICS_CONSENSUS \
+ -log &OUTPUT_DIR;/tc_pairs/tc_pairs_DIAGNOSTICS_CONSENSUS.log \
+ -v 4
+
+
+
+
+
diff --git a/src/libcode/vx_tc_util/track_info.cc b/src/libcode/vx_tc_util/track_info.cc
index d91b9b1a94..86a39b15ed 100644
--- a/src/libcode/vx_tc_util/track_info.cc
+++ b/src/libcode/vx_tc_util/track_info.cc
@@ -562,7 +562,6 @@ bool TrackInfo::add_diag_data(DiagFile &diag_file, const StringArray &req_diag_n
// Store the diagnostic name
DiagName.add(diag_file.diag_name()[i_name]);
NumArray diag_val = diag_file.diag_val(diag_file.diag_name()[i_name]);
-
// Add diagnostic values to the TrackPoints
for(i_time=0; i_time 0)
+ diag_val = DiagVal[i];
+ else
+ diag_val = bad_data_double;
+
+ return(diag_val);
+}
+
+////////////////////////////////////////////////////////////////////////
diff --git a/src/libcode/vx_tc_util/track_point.h b/src/libcode/vx_tc_util/track_point.h
index b6e4fb89be..0c5b536084 100644
--- a/src/libcode/vx_tc_util/track_point.h
+++ b/src/libcode/vx_tc_util/track_point.h
@@ -14,6 +14,7 @@
////////////////////////////////////////////////////////////////////////
#include
+#include
#include "vx_cal.h"
#include "vx_util.h"
@@ -263,8 +264,10 @@ class TrackPoint {
void set_wind(int, const QuadInfo &);
bool set(const ATCFTrackLine &);
bool is_match(const ATCFTrackLine &) const;
+ void clear_diag_value();
void add_diag_value(double);
-
+ double get_diag_val(const StringArray &, const std::string) const;
+
};
////////////////////////////////////////////////////////////////////////
diff --git a/src/tools/tc_utils/tc_pairs/tc_pairs.cc b/src/tools/tc_utils/tc_pairs/tc_pairs.cc
index 03ff8616c0..6fadc08c18 100644
--- a/src/tools/tc_utils/tc_pairs/tc_pairs.cc
+++ b/src/tools/tc_utils/tc_pairs/tc_pairs.cc
@@ -345,14 +345,6 @@ void process_adecks(const TrackInfoArray &bdeck_tracks) {
derive_interp12(adeck_tracks);
}
- // Derive consensus forecasts from the ADECK tracks
- mlog << Debug(2)
- << "Deriving " << conf_info.NConsensus
- << " ADECK consensus model(s).\n";
- i = derive_consensus(adeck_tracks);
- mlog << Debug(2)
- << "Added " << i << " ADECK consensus tracks(s).\n";
-
// Derive lag forecasts from the ADECK tracks
mlog << Debug(2)
<< "Deriving " << conf_info.LagTime.n()
@@ -379,6 +371,14 @@ void process_adecks(const TrackInfoArray &bdeck_tracks) {
// Append diagnostic data to the tracks
process_diags(adeck_tracks);
+ // Derive consensus forecasts from the ADECK tracks
+ mlog << Debug(2)
+ << "Deriving " << conf_info.NConsensus
+ << " ADECK consensus model(s).\n";
+ i = derive_consensus(adeck_tracks);
+ mlog << Debug(2)
+ << "Added " << i << " ADECK consensus tracks(s).\n";
+
//
// Loop through the ADECK tracks and find a matching BDECK track
//