Skip to content

Commit

Permalink
Per #1673, add 4 new DMAP columns write them. Just writing bad data v…
Browse files Browse the repository at this point in the history
…alues right now, still need to actually compute them! Also need to update Stat-Analysis to update the parsing/aggregation of these new values.
  • Loading branch information
JohnHalleyGotway committed Jul 8, 2021
1 parent f1d85c9 commit b3bbc0f
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 10 deletions.
2 changes: 1 addition & 1 deletion met/data/table_files/met_header_columns_V10.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ V10.1 : STAT : NBRCNT : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID
V10.1 : STAT : NBRCTC : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL FY_OY FY_ON FN_OY FN_ON
V10.1 : STAT : NBRCTS : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL BASER BASER_NCL BASER_NCU BASER_BCL BASER_BCU FMEAN FMEAN_NCL FMEAN_NCU FMEAN_BCL FMEAN_BCU ACC ACC_NCL ACC_NCU ACC_BCL ACC_BCU FBIAS FBIAS_BCL FBIAS_BCU PODY PODY_NCL PODY_NCU PODY_BCL PODY_BCU PODN PODN_NCL PODN_NCU PODN_BCL PODN_BCU POFD POFD_NCL POFD_NCU POFD_BCL POFD_BCU FAR FAR_NCL FAR_NCU FAR_BCL FAR_BCU CSI CSI_NCL CSI_NCU CSI_BCL CSI_BCU GSS GSS_BCL GSS_BCU HK HK_NCL HK_NCU HK_BCL HK_BCU HSS HSS_BCL HSS_BCU ODDS ODDS_NCL ODDS_NCU ODDS_BCL ODDS_BCU LODDS LODDS_NCL LODDS_NCU LODDS_BCL LODDS_BCU ORSS ORSS_NCL ORSS_NCU ORSS_BCL ORSS_BCU EDS EDS_NCL EDS_NCU EDS_BCL EDS_BCU SEDS SEDS_NCL SEDS_NCU SEDS_BCL SEDS_BCU EDI EDI_NCL EDI_NCU EDI_BCL EDI_BCU SEDI SEDI_NCL SEDI_NCU SEDI_BCL SEDI_BCU BAGSS BAGSS_BCL BAGSS_BCU
V10.1 : STAT : GRAD : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL FGBAR OGBAR MGBAR EGBAR S1 S1_OG FGOG_RATIO DX DY
V10.1 : STAT : DMAP : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL FY OY FBIAS BADDELEY HAUSDORFF MED_FO MED_OF MED_MIN MED_MAX MED_MEAN FOM_FO FOM_OF FOM_MIN FOM_MAX FOM_MEAN ZHU_FO ZHU_OF ZHU_MIN ZHU_MAX ZHU_MEAN
V10.1 : STAT : DMAP : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL FY OY FBIAS BADDELEY HAUSDORFF MED_FO MED_OF MED_MIN MED_MAX MED_MEAN FOM_FO FOM_OF FOM_MIN FOM_MAX FOM_MEAN ZHU_FO ZHU_OF ZHU_MIN ZHU_MAX ZHU_MEAN G GBETA AGBETA BETA_VALUE
V10.1 : STAT : ORANK : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL INDEX OBS_SID OBS_LAT OBS_LON OBS_LVL OBS_ELV OBS PIT RANK N_ENS_VLD (N_ENS) ENS_[0-9]* OBS_QC ENS_MEAN CLIMO_MEAN SPREAD ENS_MEAN_OERR SPREAD_OERR SPREAD_PLUS_OERR CLIMO_STDEV
V10.1 : STAT : PCT : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL (N_THRESH) THRESH_[0-9]* OY_[0-9]* ON_[0-9]*
V10.1 : STAT : PJC : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL (N_THRESH) THRESH_[0-9]* OY_TP_[0-9]* ON_TP_[0-9]* CALIBRATION_[0-9]* REFINEMENT_[0-9]* LIKELIHOOD_[0-9]* BASER_[0-9]*
Expand Down
3 changes: 2 additions & 1 deletion met/src/basic/vx_util/stat_column_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ static const char * dmap_columns [] = {
"FBIAS", "BADDELEY", "HAUSDORFF",
"MED_FO", "MED_OF", "MED_MIN", "MED_MAX", "MED_MEAN",
"FOM_FO", "FOM_OF", "FOM_MIN", "FOM_MAX", "FOM_MEAN",
"ZHU_FO", "ZHU_OF", "ZHU_MIN", "ZHU_MAX", "ZHU_MEAN"
"ZHU_FO", "ZHU_OF", "ZHU_MIN", "ZHU_MAX", "ZHU_MEAN",
"G", "GBETA", "AGBETA", "BETA_VALUE"
};

static const char * isc_columns [] = {
Expand Down
15 changes: 14 additions & 1 deletion met/src/libcode/vx_stat_out/stat_columns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3471,7 +3471,8 @@ void write_dmap_cols(const DMAPInfo &dmap_info,
// FBIAS, BADDELEY, HAUSDORFF,
// MED_FO, MED_OF, MED_MIN, MED_MAX, MED_MEAN,
// FOM_FO, FOM_OF, FOM_MIN, FOM_MAX, FOM_MEAN,
// ZHU_FO, ZHU_OF, ZHU_MIN, ZHU_MAX, ZHU_MEAN
// ZHU_FO, ZHU_OF, ZHU_MIN, ZHU_MAX, ZHU_MEAN,
// G, GBETA, AGBETA, BETA_VALUE
//
at.set_entry(r, c+0, // TOTAL
dmap_info.total);
Expand Down Expand Up @@ -3536,6 +3537,18 @@ void write_dmap_cols(const DMAPInfo &dmap_info,
at.set_entry(r, c+20, // ZHU_MEAN
dmap_info.zhu_mean);

at.set_entry(r, c+21, // G
dmap_info.g);

at.set_entry(r, c+22, // GBETA
dmap_info.gbeta);

at.set_entry(r, c+23, // AGBETA
dmap_info.agbeta);

at.set_entry(r, c+24, // BETA_VALUE
dmap_info.get_beta_value());

return;
}

Expand Down
26 changes: 20 additions & 6 deletions met/src/libcode/vx_statistics/met_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2743,6 +2743,7 @@ void DMAPInfo::clear() {
med_fo = med_of = med_min = med_max = med_mean = bad_data_double;
fom_fo = fom_of = fom_min = fom_max = fom_mean = bad_data_double;
zhu_fo = zhu_of = zhu_min = zhu_max = zhu_mean = bad_data_double;
g = gbeta = agbeta = beta_value = bad_data_double;

return;
}
Expand Down Expand Up @@ -2793,6 +2794,10 @@ void DMAPInfo::assign(const DMAPInfo &c) {
zhu_max = c.zhu_max;
zhu_mean = c.zhu_mean;

g = c.g;
gbeta = c.gbeta;
agbeta = c.agbeta;

baddeley_p = c.baddeley_p;
baddeley_max_dist = c.baddeley_max_dist;
fom_alpha = c.fom_alpha;
Expand Down Expand Up @@ -2935,15 +2940,24 @@ void DMAPInfo::set(const SingleThresh &fthr, const SingleThresh &othr,
zhu_mean = (zhu_fo + zhu_of) / 2;
}

// G, G-Beta, and asymmetric G-Beta
// JHG work here!
g = bad_data_double;
gbeta = bad_data_double;
agbeta = bad_data_double;

mlog << Debug(4) << " DMAP: nf=" << fy << ", no=" << oy << ", total=" << total
<< "\tbaddeley=" << baddeley << ", hausdorff=" << hausdorff
<< "\n\tmed_fo=" << med_fo << ", med_of=" << med_of
<< ", med_min=" << med_min << ", med_max=" << med_max << ", med_mean=" << med_mean
<< "\n\tfom_fo=" << fom_fo << ", fom_of=" << fom_of
<< ", fom_min=" << fom_min << ", fom_max=" << fom_max << ", fom_mean=" << fom_mean
<< "\n\tzhu_fo=" << zhu_fo << ", zhu_of=" << zhu_of
<< ", zhu_min=" << zhu_min << ", zhu_max=" << zhu_max << ", zhu_mean=" << zhu_mean
<< "\n\tmed_fo=" << med_fo << ", med_of=" << med_of
<< ", med_min=" << med_min << ", med_max=" << med_max << ", med_mean=" << med_mean
<< "\n\tfom_fo=" << fom_fo << ", fom_of=" << fom_of
<< ", fom_min=" << fom_min << ", fom_max=" << fom_max << ", fom_mean=" << fom_mean
<< "\n\tzhu_fo=" << zhu_fo << ", zhu_of=" << zhu_of
<< ", zhu_min=" << zhu_min << ", zhu_max=" << zhu_max << ", zhu_mean=" << zhu_mean
<< "\n\tg=" << g << ", gbeta=" << gbeta << ", agbeta=" << agbeta
<< ", beta_value=" << beta_value
<< "\n";

return;
}

Expand Down
10 changes: 10 additions & 0 deletions met/src/libcode/vx_statistics/met_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,9 @@ class DMAPInfo {
// Zhu Metric
double zhu_fo, zhu_of, zhu_min, zhu_max, zhu_mean;

// G, G-Beta, and assymetric G-Beta
double g, gbeta, agbeta;

// Compute statistics
double fbias() const; // fbias = fy / oy

Expand All @@ -646,10 +649,17 @@ class DMAPInfo {
const double _fom_alpha, const double _zhu_weight,
const double _beta_value);

// Get functions
double get_beta_value() const;

void clear();
void reset_options();
};

////////////////////////////////////////////////////////////////////////

inline double DMAPInfo::get_beta_value() const { return(beta_value); }

////////////////////////////////////////////////////////////////////////
//
// Utility functions for parsing data from configuration files
Expand Down
2 changes: 1 addition & 1 deletion test/hdr/met_10_1.hdr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NBRCNT : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_L
NBRCTC : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL FY_OY FY_ON FN_OY FN_ON
NBRCTS : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL BASER BASER_NCL BASER_NCU BASER_BCL BASER_BCU FMEAN FMEAN_NCL FMEAN_NCU FMEAN_BCL FMEAN_BCU ACC ACC_NCL ACC_NCU ACC_BCL ACC_BCU FBIAS FBIAS_BCL FBIAS_BCU PODY PODY_NCL PODY_NCU PODY_BCL PODY_BCU PODN PODN_NCL PODN_NCU PODN_BCL PODN_BCU POFD POFD_NCL POFD_NCU POFD_BCL POFD_BCU FAR FAR_NCL FAR_NCU FAR_BCL FAR_BCU CSI CSI_NCL CSI_NCU CSI_BCL CSI_BCU GSS GSS_BCL GSS_BCU HK HK_NCL HK_NCU HK_BCL HK_BCU HSS HSS_BCL HSS_BCU ODDS ODDS_NCL ODDS_NCU ODDS_BCL ODDS_BCU LODDS LODDS_NCL LODDS_NCU LODDS_BCL LODDS_BCU ORSS ORSS_NCL ORSS_NCU ORSS_BCL ORSS_BCU EDS EDS_NCL EDS_NCU EDS_BCL EDS_BCU SEDS SEDS_NCL SEDS_NCU SEDS_BCL SEDS_BCU EDI EDI_NCL EDI_NCU EDI_BCL EDI_BCU SEDI SEDI_NCL SEDI_NCU SEDI_BCL SEDI_BCU BAGSS BAGSS_BCL BAGSS_BCU
GRAD : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL FGBAR OGBAR MGBAR EGBAR S1 S1_OG FGOG_RATIO DX DY
DMAP : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL FY OY FBIAS BADDELEY HAUSDORFF MED_FO MED_OF MED_MIN MED_MAX MED_MEAN FOM_FO FOM_OF FOM_MIN FOM_MAX FOM_MEAN ZHU_FO ZHU_OF ZHU_MIN ZHU_MAX ZHU_MEAN
DMAP : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL FY OY FBIAS BADDELEY HAUSDORFF MED_FO MED_OF MED_MIN MED_MAX MED_MEAN FOM_FO FOM_OF FOM_MIN FOM_MAX FOM_MEAN ZHU_FO ZHU_OF ZHU_MIN ZHU_MAX ZHU_MEAN G GBETA AGBETA BETA_VALUE
ORANK : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL INDEX OBS_SID OBS_LAT OBS_LON OBS_LVL OBS_ELV OBS PIT RANK N_ENS_VLD N_ENS _VAR_
PCT : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_THRESH _VAR_
PJC : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_LEAD OBS_VALID_BEG OBS_VALID_END FCST_VAR FCST_UNITS FCST_LEV OBS_VAR OBS_UNITS OBS_LEV OBTYPE VX_MASK INTERP_MTHD INTERP_PNTS FCST_THRESH OBS_THRESH COV_THRESH ALPHA LINE_TYPE TOTAL N_THRESH _VAR_
Expand Down

0 comments on commit b3bbc0f

Please sign in to comment.