Skip to content

Commit

Permalink
Per #2321, when the track and diag locations differ, print a warning …
Browse files Browse the repository at this point in the history
…message only when TrackSource = Technique. Otherwise, print it as Debug(4). Update the SHIPS_DIAG_RT track_source from OFCL to SHIPS_TRK and modify the documentation to clarify.
  • Loading branch information
JohnHalleyGotway committed Nov 16, 2022
1 parent d7c04bf commit 2740104
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data/config/TCPairsConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ diag_info_map = [
},
{
diag_source = "SHIPS_DIAG_RT";
track_source = "OFCL";
track_source = "SHIPS_TRK";
field_source = "GFS_0p50";
match_to_track = [ "OFCL" ];
diag_name = [];
Expand Down
4 changes: 2 additions & 2 deletions docs/Users_Guide/tc-pairs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ As of MET v11.0.0, two types of TC diagnostics are supported in TC-Pairs:

.. SHIPS_DIAG_DEV: Includes a plethora of inner core, environmental, oceanic, and satellite-based diagnostics. These diagnostics are computed using the *perfect prog* approach.
* SHIPS_DIAG_RT: Real-time SHIPS diagnostics computed from a NWP model such as the Global Forecast System (GFS) model along the NHC Official forecast track.
* SHIPS_DIAG_RT: Real-time SHIPS diagnostics computed from a NWP model such as the Global Forecast System (GFS) model along a GFS forecast track defined by the SHIPS model itself. Note that the SHIPS-derived forecast track does not appear in NHC adeck data.

* CIRA_DIAG_RT: Real-time model-based diagnostics computed along the model's predicted track.

Expand Down Expand Up @@ -295,7 +295,7 @@ ____________________
},
{
diag_source = "SHIPS_DIAG_RT";
track_source = "OFCL";
track_source = "SHIPS_TRK";
field_source = "GFS_0p50";
match_to_track = [ "OFCL" ];
diag_name = [];
Expand Down
17 changes: 13 additions & 4 deletions src/libcode/vx_tc_util/track_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,21 @@ bool TrackInfo::add_diag_data(DiagFile &diag_file, const StringArray &req_diag_n
if(i_name == 0) {
if(!is_eq(diag_file.lat(i_time), Point[i_pnt].lat()) ||
!is_eq(diag_file.lon(i_time), Point[i_pnt].lon())) {
mlog << Warning << "\nTrackInfo::add_diag_data() -> "
<< "the " << StormId << " " << Technique << " " << unix_to_yyyymmddhh(InitTime)
ConcatString cs;
cs << "The " << StormId << " " << Technique << " " << unix_to_yyyymmddhh(InitTime)
<< " lead time " << sec_to_timestring(diag_file.lead(i_time))
<< " track location (" << Point[i_pnt].lat() << ", "
<< Point[i_pnt].lon() << ") does not match the diagnostic location ("
<< diag_file.lat(i_time) << ", " << diag_file.lon(i_time) << ")\n";
<< Point[i_pnt].lon() << ") does not match the "
<< diagtype_to_string(DiagSource) << " diagnostic location ("
<< diag_file.lat(i_time) << ", " << diag_file.lon(i_time) << ")";

// Print a warning if the TrackSource and Technique match
if(TrackSource == Technique) {
mlog << Warning << "\nTrackInfo::add_diag_data() -> " << cs << "\n\n";
}
else {
mlog << Debug(4) << cs << "\n";
}
}
}

Expand Down

0 comments on commit 2740104

Please sign in to comment.