diff --git a/data/table_files/met_header_columns_V12.0.txt b/data/table_files/met_header_columns_V12.0.txt index 299e6cb4d6..3d98f02206 100644 --- a/data/table_files/met_header_columns_V12.0.txt +++ b/data/table_files/met_header_columns_V12.0.txt @@ -27,9 +27,9 @@ V12.0 : STAT : RELP : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID V12.0 : STAT : SAL1L2 : 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 FABAR OABAR FOABAR FFABAR OOABAR MAE V12.0 : STAT : SL1L2 : 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 FBAR OBAR FOBAR FFBAR OOBAR MAE V12.0 : STAT : SSVAR : 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_BIN BIN_i BIN_N VAR_MIN VAR_MAX VAR_MEAN FBAR OBAR FOBAR FFBAR OOBAR FBAR_NCL FBAR_NCU FSTDEV FSTDEV_NCL FSTDEV_NCU OBAR_NCL OBAR_NCU OSTDEV OSTDEV_NCL OSTDEV_NCU PR_CORR PR_CORR_NCL PR_CORR_NCU ME ME_NCL ME_NCU ESTDEV ESTDEV_NCL ESTDEV_NCU MBIAS MSE BCMSE RMSE -V12.0 : STAT : VAL1L2 : 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 UFABAR VFABAR UOABAR VOABAR UVFOABAR UVFFABAR UVOOABAR FA_SPEED_BAR OA_SPEED_BAR DIRA_ME DIRA_MAE DIRA_MSE -V12.0 : STAT : VL1L2 : 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 UFBAR VFBAR UOBAR VOBAR UVFOBAR UVFFBAR UVOOBAR F_SPEED_BAR O_SPEED_BAR DIR_ME DIR_MAE DIR_MSE -V12.0 : STAT : VCNT : 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 FBAR FBAR_BCL FBAR_BCU OBAR OBAR_BCL OBAR_BCU FS_RMS FS_RMS_BCL FS_RMS_BCU OS_RMS OS_RMS_BCL OS_RMS_BCU MSVE MSVE_BCL MSVE_BCU RMSVE RMSVE_BCL RMSVE_BCU FSTDEV FSTDEV_BCL FSTDEV_BCU OSTDEV OSTDEV_BCL OSTDEV_BCU FDIR FDIR_BCL FDIR_BCU ODIR ODIR_BCL ODIR_BCU FBAR_SPEED FBAR_SPEED_BCL FBAR_SPEED_BCU OBAR_SPEED OBAR_SPEED_BCL OBAR_SPEED_BCU VDIFF_SPEED VDIFF_SPEED_BCL VDIFF_SPEED_BCU VDIFF_DIR VDIFF_DIR_BCL VDIFF_DIR_BCU SPEED_ERR SPEED_ERR_BCL SPEED_ERR_BCU SPEED_ABSERR SPEED_ABSERR_BCL SPEED_ABSERR_BCU DIR_ERR DIR_ERR_BCL DIR_ERR_BCU DIR_ABSERR DIR_ABSERR_BCL DIR_ABSERR_BCU ANOM_CORR ANOM_CORR_NCL ANOM_CORR_NCU ANOM_CORR_BCL ANOM_CORR_BCU ANOM_CORR_UNCNTR ANOM_CORR_UNCNTR_BCL ANOM_CORR_UNCNTR_BCU DIR_ME DIR_ME_BCL DIR_ME_BCU DIR_MAE DIR_MAE_BCL DIR_MAE_BCU DIR_MSE DIR_MSE_BCL DIR_MSE_BCU DIR_RMSE DIR_RMSE_BCL DIR_RMSE_BCU +V12.0 : STAT : VAL1L2 : 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 UFABAR VFABAR UOABAR VOABAR UVFOABAR UVFFABAR UVOOABAR FA_SPEED_BAR OA_SPEED_BAR TOTAL_DIR DIRA_ME DIRA_MAE DIRA_MSE +V12.0 : STAT : VL1L2 : 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 UFBAR VFBAR UOBAR VOBAR UVFOBAR UVFFBAR UVOOBAR F_SPEED_BAR O_SPEED_BAR TOTAL_DIR DIR_ME DIR_MAE DIR_MSE +V12.0 : STAT : VCNT : 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 FBAR FBAR_BCL FBAR_BCU OBAR OBAR_BCL OBAR_BCU FS_RMS FS_RMS_BCL FS_RMS_BCU OS_RMS OS_RMS_BCL OS_RMS_BCU MSVE MSVE_BCL MSVE_BCU RMSVE RMSVE_BCL RMSVE_BCU FSTDEV FSTDEV_BCL FSTDEV_BCU OSTDEV OSTDEV_BCL OSTDEV_BCU FDIR FDIR_BCL FDIR_BCU ODIR ODIR_BCL ODIR_BCU FBAR_SPEED FBAR_SPEED_BCL FBAR_SPEED_BCU OBAR_SPEED OBAR_SPEED_BCL OBAR_SPEED_BCU VDIFF_SPEED VDIFF_SPEED_BCL VDIFF_SPEED_BCU VDIFF_DIR VDIFF_DIR_BCL VDIFF_DIR_BCU SPEED_ERR SPEED_ERR_BCL SPEED_ERR_BCU SPEED_ABSERR SPEED_ABSERR_BCL SPEED_ABSERR_BCU DIR_ERR DIR_ERR_BCL DIR_ERR_BCU DIR_ABSERR DIR_ABSERR_BCL DIR_ABSERR_BCU ANOM_CORR ANOM_CORR_NCL ANOM_CORR_NCU ANOM_CORR_BCL ANOM_CORR_BCU ANOM_CORR_UNCNTR ANOM_CORR_UNCNTR_BCL ANOM_CORR_UNCNTR_BCU TOTAL_DIR DIR_ME DIR_ME_BCL DIR_ME_BCU DIR_MAE DIR_MAE_BCL DIR_MAE_BCU DIR_MSE DIR_MSE_BCL DIR_MSE_BCU DIR_RMSE DIR_RMSE_BCL DIR_RMSE_BCU V12.0 : STAT : GENMPR : 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 STORM_ID PROB_LEAD PROB_VAL AGEN_INIT AGEN_FHR AGEN_LAT AGEN_LON AGEN_DLAND BGEN_LAT BGEN_LON BGEN_DLAND GEN_DIST GEN_TDIFF INIT_TDIFF DEV_CAT OPS_CAT V12.0 : STAT : SSIDX : 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 FCST_MODEL REF_MODEL N_INIT N_TERM N_VLD SS_INDEX diff --git a/docs/Users_Guide/point-stat.rst b/docs/Users_Guide/point-stat.rst index 6c32537146..ec4e69178b 100644 --- a/docs/Users_Guide/point-stat.rst +++ b/docs/Users_Guide/point-stat.rst @@ -1289,12 +1289,15 @@ The first set of header columns are common to all of the output files generated - O_SPEED_BAR - Mean observed wind speed * - 35 + - TOTAL_DIR + - Total number of matched pairs for which both the forecast and observation wind directions are well-defined (i.e. non-zero vectors) + * - 36 - DIR_ME - Mean wind direction difference, from -180 to 180 degrees - * - 36 + * - 37 - DIR_MAE - Mean absolute wind direction difference - * - 37 + * - 38 - DIR_MSE - Mean squared wind direction difference @@ -1344,12 +1347,15 @@ The first set of header columns are common to all of the output files generated - OA_SPEED_BAR - Mean observed wind speed anomaly * - 35 + - TOTAL_DIR + - Total number of matched triplets for which the forecast, observation, and climatological wind directions are well-defined (i.e. non-zero vectors) + * - 36 - DIRA_ME - Mean wind direction anomaly difference, from -180 to 180 degrees - * - 36 + * - 37 - DIRA_MAE - Mean absolute wind direction anomaly difference - * - 37 + * - 38 - DIRA_MSE - Mean squared wind direction anomaly difference @@ -1431,16 +1437,19 @@ The first set of header columns are common to all of the output files generated * - 85-87 - ANOM_CORR_UNCNTR, :raw-html:`
` ANOM_CORR_UNCNTR_BCL, :raw-html:`
` ANOM_CORR_UNCNTR_BCU - Uncentered vector Anomaly Correlation excluding mean error including bootstrap upper and lower confidence limits - * - 88-90 + * - 88 + - TOTAL_DIR + - Total number of matched pairs for which both the forecast and observation wind directions are well-defined (i.e. non-zero vectors) + * - 89-91 - DIR_ME, :raw-html:`
` DIR_ME_BCL, :raw-html:`
` DIR_ME_BCU - Mean direction difference, from -180 to 180 degrees, including bootstrap upper and lower confidence limits - * - 91-93 + * - 92-94 - DIR_MAE, :raw-html:`
` DIR_MAE_BCL, :raw-html:`
` DIR_MAE_BCU - Mean absolute direction difference including bootstrap upper and lower confidence limits - * - 94-96 + * - 95-97 - DIR_MSE, :raw-html:`
` DIR_MSE_BCL, :raw-html:`
` DIR_MSE_BCU - Mean squared direction difference including bootstrap upper and lower confidence limits - * - 97-99 + * - 98-100 - DIR_RMSE, :raw-html:`
` DIR_RMSE_BCL, :raw-html:`
` DIR_RMSE_BCU - Root mean squared direction difference including bootstrap upper and lower confidence limits diff --git a/internal/test_unit/config/STATAnalysisConfig_point_stat b/internal/test_unit/config/STATAnalysisConfig_point_stat index 4f751b32dc..db7ab415a6 100644 --- a/internal/test_unit/config/STATAnalysisConfig_point_stat +++ b/internal/test_unit/config/STATAnalysisConfig_point_stat @@ -103,7 +103,11 @@ jobs = [ -dump_row ${OUTPUT_DIR}/CONFIG_POINT_STAT_filter_mpr_sid.stat", "-job filter -fcst_var TMP -fcst_lev Z2 \ -line_type MPR -column_thresh abs(fcst-obs) >5 \ - -dump_row ${OUTPUT_DIR}/CONFIG_POINT_STAT_filter_mpr_fcst_minus_obs.stat" + -dump_row ${OUTPUT_DIR}/CONFIG_POINT_STAT_filter_mpr_fcst_minus_obs.stat", + "-job aggregate -line_type VL1L2 -by FCST_LEV \ + -out_stat ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_vl1l2.stat", + "-job aggregate_stat -line_type VL1L2 -out_line_type VCNT -by FCST_LEV \ + -out_stat ${OUTPUT_DIR}/CONFIG_POINT_STAT_agg_stat_vl1l2_to_vcnt.stat" ]; //////////////////////////////////////////////////////////////////////////////// diff --git a/internal/test_unit/hdr/met_12_0.hdr b/internal/test_unit/hdr/met_12_0.hdr index a1113d5102..bf8575039a 100644 --- a/internal/test_unit/hdr/met_12_0.hdr +++ b/internal/test_unit/hdr/met_12_0.hdr @@ -27,9 +27,9 @@ RELP : VERSION MODEL DESC FCST_LEAD FCST_VALID_BEG FCST_VALID_END OBS_L SAL1L2 : 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 FABAR OABAR FOABAR FFABAR OOABAR MAE SL1L2 : 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 FBAR OBAR FOBAR FFBAR OOBAR MAE SSVAR : 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_BIN BIN_i BIN_N VAR_MIN VAR_MAX VAR_MEAN FBAR OBAR FOBAR FFBAR OOBAR FBAR_NCL FBAR_NCU FSTDEV FSTDEV_NCL FSTDEV_NCU OBAR_NCL OBAR_NCU OSTDEV OSTDEV_NCL OSTDEV_NCU PR_CORR PR_CORR_NCL PR_CORR_NCU ME ME_NCL ME_NCU ESTDEV ESTDEV_NCL ESTDEV_NCU MBIAS MSE BCMSE RMSE -VL1L2 : 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 UFBAR VFBAR UOBAR VOBAR UVFOBAR UVFFBAR UVOOBAR F_SPEED_BAR O_SPEED_BAR DIR_ME DIR_MAE DIR_MSE -VAL1L2 : 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 UFABAR VFABAR UOABAR VOABAR UVFOABAR UVFFABAR UVOOABAR FA_SPEED_BAR OA_SPEED_BAR DIRA_ME DIRA_MAE DIRA_MSE -VCNT : 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 FBAR FBAR_BCL FBAR_BCU OBAR OBAR_BCL OBAR_BCU FS_RMS FS_RMS_BCL FS_RMS_BCU OS_RMS OS_RMS_BCL OS_RMS_BCU MSVE MSVE_BCL MSVE_BCU RMSVE RMSVE_BCL RMSVE_BCU FSTDEV FSTDEV_BCL FSTDEV_BCU OSTDEV OSTDEV_BCL OSTDEV_BCU FDIR FDIR_BCL FDIR_BCU ODIR ODIR_BCL ODIR_BCU FBAR_SPEED FBAR_SPEED_BCL FBAR_SPEED_BCU OBAR_SPEED OBAR_SPEED_BCL OBAR_SPEED_BCU VDIFF_SPEED VDIFF_SPEED_BCL VDIFF_SPEED_BCU VDIFF_DIR VDIFF_DIR_BCL VDIFF_DIR_BCU SPEED_ERR SPEED_ERR_BCL SPEED_ERR_BCU SPEED_ABSERR SPEED_ABSERR_BCL SPEED_ABSERR_BCU DIR_ERR DIR_ERR_BCL DIR_ERR_BCU DIR_ABSERR DIR_ABSERR_BCL DIR_ABSERR_BCU ANOM_CORR ANOM_CORR_NCL ANOM_CORR_NCU ANOM_CORR_BCL ANOM_CORR_BCU ANOM_CORR_UNCNTR ANOM_CORR_UNCNTR_BCL ANOM_CORR_UNCNTR_BCU DIR_ME DIR_ME_BCL DIR_ME_BCU DIR_MAE DIR_MAE_BCL DIR_MAE_BCU DIR_MSE DIR_MSE_BCL DIR_MSE_BCU DIR_RMSE DIR_RMSE_BCL DIR_RMSE_BCU +VL1L2 : 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 UFBAR VFBAR UOBAR VOBAR UVFOBAR UVFFBAR UVOOBAR F_SPEED_BAR O_SPEED_BAR TOTAL_DIR DIR_ME DIR_MAE DIR_MSE +VAL1L2 : 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 UFABAR VFABAR UOABAR VOABAR UVFOABAR UVFFABAR UVOOABAR FA_SPEED_BAR OA_SPEED_BAR TOTAL_DIR DIRA_ME DIRA_MAE DIRA_MSE +VCNT : 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 FBAR FBAR_BCL FBAR_BCU OBAR OBAR_BCL OBAR_BCU FS_RMS FS_RMS_BCL FS_RMS_BCU OS_RMS OS_RMS_BCL OS_RMS_BCU MSVE MSVE_BCL MSVE_BCU RMSVE RMSVE_BCL RMSVE_BCU FSTDEV FSTDEV_BCL FSTDEV_BCU OSTDEV OSTDEV_BCL OSTDEV_BCU FDIR FDIR_BCL FDIR_BCU ODIR ODIR_BCL ODIR_BCU FBAR_SPEED FBAR_SPEED_BCL FBAR_SPEED_BCU OBAR_SPEED OBAR_SPEED_BCL OBAR_SPEED_BCU VDIFF_SPEED VDIFF_SPEED_BCL VDIFF_SPEED_BCU VDIFF_DIR VDIFF_DIR_BCL VDIFF_DIR_BCU SPEED_ERR SPEED_ERR_BCL SPEED_ERR_BCU SPEED_ABSERR SPEED_ABSERR_BCL SPEED_ABSERR_BCU DIR_ERR DIR_ERR_BCL DIR_ERR_BCU DIR_ABSERR DIR_ABSERR_BCL DIR_ABSERR_BCU ANOM_CORR ANOM_CORR_NCL ANOM_CORR_NCU ANOM_CORR_BCL ANOM_CORR_BCU ANOM_CORR_UNCNTR ANOM_CORR_UNCNTR_BCL ANOM_CORR_UNCNTR_BCU TOTAL_DIR DIR_ME DIR_ME_BCL DIR_ME_BCU DIR_MAE DIR_MAE_BCL DIR_MAE_BCU DIR_MSE DIR_MSE_BCL DIR_MSE_BCU DIR_RMSE DIR_RMSE_BCL DIR_RMSE_BCU GENMPR : 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 STORM_ID PROB_LEAD PROB_VAL AGEN_INIT AGEN_FHR AGEN_LAT AGEN_LON AGEN_DLAND BGEN_LAT BGEN_LON BGEN_DLAND GEN_DIST GEN_TDIFF INIT_TDIFF DEV_CAT OPS_CAT SSIDX : 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 FCST_MODEL REF_MODEL N_INIT N_TERM N_VLD SS_INDEX MODE_SOA : 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 N_VALID GRID_RES OBJECT_ID OBJECT_CAT CENTROID_X CENTROID_Y CENTROID_LAT CENTROID_LON AXIS_ANG LENGTH WIDTH AREA AREA_THRESH CURVATURE CURVATURE_X CURVATURE_Y COMPLEXITY INTENSITY_10 INTENSITY_25 INTENSITY_50 INTENSITY_75 INTENSITY_90 INTENSITY_50 INTENSITY_SUM diff --git a/internal/test_unit/xml/unit_stat_analysis_ps.xml b/internal/test_unit/xml/unit_stat_analysis_ps.xml index 9fd50dcb2a..1ea5e2e19a 100644 --- a/internal/test_unit/xml/unit_stat_analysis_ps.xml +++ b/internal/test_unit/xml/unit_stat_analysis_ps.xml @@ -38,6 +38,8 @@ &OUTPUT_DIR;/stat_analysis_ps/CONFIG_POINT_STAT_agg_stat_mpr_to_wdir_dump.stat &OUTPUT_DIR;/stat_analysis_ps/CONFIG_POINT_STAT_filter_mpr_sid.stat &OUTPUT_DIR;/stat_analysis_ps/CONFIG_POINT_STAT_filter_mpr_fcst_minus_obs.stat + &OUTPUT_DIR;/stat_analysis_ps/CONFIG_POINT_STAT_agg_vl1l2.stat + &OUTPUT_DIR;/stat_analysis_ps/CONFIG_POINT_STAT_agg_stat_vl1l2_to_vcnt.stat diff --git a/src/basic/vx_util/stat_column_defs.h b/src/basic/vx_util/stat_column_defs.h index 826d5101c9..9a92cf0970 100644 --- a/src/basic/vx_util/stat_column_defs.h +++ b/src/basic/vx_util/stat_column_defs.h @@ -13,7 +13,7 @@ //////////////////////////////////////////////////////////////////////// -static const char * hdr_columns [] = { +static const char * const hdr_columns [] = { "VERSION", "MODEL", "DESC", "FCST_LEAD", "FCST_VALID_BEG", "FCST_VALID_END", @@ -29,17 +29,17 @@ static const char * hdr_columns [] = { "LINE_TYPE" }; -static const char * fho_columns [] = { +static const char * const fho_columns [] = { "TOTAL", "F_RATE", "H_RATE", "O_RATE" }; -static const char * ctc_columns [] = { +static const char * const ctc_columns [] = { "TOTAL", "FY_OY", "FY_ON", "FN_OY", "FN_ON", "EC_VALUE" }; -static const char * cts_columns [] = { +static const char * const cts_columns [] = { "TOTAL", "BASER", "BASER_NCL", "BASER_NCU", "BASER_BCL", "BASER_BCU", "FMEAN", "FMEAN_NCL", "FMEAN_NCU", "FMEAN_BCL", "FMEAN_BCU", @@ -64,11 +64,11 @@ static const char * cts_columns [] = { "HSS_EC", "HSS_EC_BCL", "HSS_EC_BCU", "EC_VALUE" }; -static const char * mctc_columns [] = { +static const char * const mctc_columns [] = { "TOTAL", "N_CAT", "Fi_Oj", "EC_VALUE" }; -static const char * mcts_columns [] = { +static const char * const mcts_columns [] = { "TOTAL", "N_CAT", "ACC", "ACC_NCL", "ACC_NCU", "ACC_BCL", "ACC_BCU", "HK", "HK_BCL", "HK_BCU", @@ -77,7 +77,7 @@ static const char * mcts_columns [] = { "HSS_EC", "HSS_EC_BCL", "HSS_EC_BCU", "EC_VALUE" }; -static const char * cnt_columns [] = { +static const char * const cnt_columns [] = { "TOTAL", "FBAR", "FBAR_NCL", "FBAR_NCU", "FBAR_BCL", "FBAR_BCU", "FSTDEV", "FSTDEV_NCL", "FSTDEV_NCU", "FSTDEV_BCL", "FSTDEV_BCU", @@ -108,36 +108,36 @@ static const char * cnt_columns [] = { "SI", "SI_BCL", "SI_BCU" }; -static const char * sl1l2_columns [] = { +static const char * const sl1l2_columns [] = { "TOTAL", "FBAR", "OBAR", "FOBAR", "FFBAR", "OOBAR", "MAE" }; -static const char * sal1l2_columns [] = { +static const char * const sal1l2_columns [] = { "TOTAL", "FABAR", "OABAR", "FOABAR", "FFABAR", "OOABAR", "MAE" }; -static const char * vl1l2_columns [] = { +static const char * const vl1l2_columns [] = { "TOTAL", "UFBAR", "VFBAR", "UOBAR", "VOBAR", "UVFOBAR", "UVFFBAR", "UVOOBAR", "F_SPEED_BAR", - "O_SPEED_BAR", "DIR_ME", "DIR_MAE", - "DIR_MSE" + "O_SPEED_BAR", "TOTAL_DIR", "DIR_ME", + "DIR_MAE", "DIR_MSE" }; -static const char * val1l2_columns [] = { +static const char * const val1l2_columns [] = { "TOTAL", "UFABAR", "VFABAR", "UOABAR", "VOABAR", "UVFOABAR", "UVFFABAR", "UVOOABAR", "FA_SPEED_BAR", - "OA_SPEED_BAR", "DIRA_ME", "DIRA_MAE", - "DIRA_MSE" + "OA_SPEED_BAR", "TOTAL_DIR", "DIRA_ME", + "DIRA_MAE", "DIRA_MSE" }; -static const char * vcnt_columns [] = { +static const char * const vcnt_columns [] = { "TOTAL", "FBAR", "FBAR_BCL", "FBAR_BCU", "OBAR", "OBAR_BCL", "OBAR_BCU", @@ -160,18 +160,19 @@ static const char * vcnt_columns [] = { "ANOM_CORR", "ANOM_CORR_NCL", "ANOM_CORR_NCU", "ANOM_CORR_BCL", "ANOM_CORR_BCU", "ANOM_CORR_UNCNTR", "ANOM_CORR_UNCNTR_BCL", "ANOM_CORR_UNCNTR_BCU", + "TOTAL_DIR", "DIR_ME", "DIR_ME_BCL", "DIR_ME_BCU", "DIR_MAE", "DIR_MAE_BCL", "DIR_MAE_BCU", "DIR_MSE", "DIR_MSE_BCL", "DIR_MSE_BCU", "DIR_RMSE", "DIR_RMSE_BCL", "DIR_RMSE_BCU" }; -static const char * pct_columns [] = { +static const char * const pct_columns [] = { "TOTAL", "N_THRESH", "THRESH_", "OY_", "ON_" }; -static const char * pstd_columns [] = { +static const char * const pstd_columns [] = { "TOTAL", "N_THRESH", "BASER", "BASER_NCL", "BASER_NCU", "RELIABILITY", "RESOLUTION", "UNCERTAINTY", "ROC_AUC", @@ -180,23 +181,23 @@ static const char * pstd_columns [] = { "BSS", "BSS_SMPL", "THRESH_", }; -static const char * pjc_columns [] = { +static const char * const pjc_columns [] = { "TOTAL", "N_THRESH", "THRESH_", "OY_TP_", "ON_TP_", "CALIBRATION_", "REFINEMENT_", "LIKELIHOOD_", "BASER_" }; -static const char * prc_columns [] = { +static const char * const prc_columns [] = { "TOTAL", "N_THRESH", "THRESH_", "PODY_", "POFD_" }; -static const char * eclv_columns [] = { +static const char * const eclv_columns [] = { "TOTAL", "BASER", "VALUE_BASER", "N_PNT", "CL_", "VALUE_" }; -static const char * mpr_columns [] = { +static const char * const mpr_columns [] = { "TOTAL", "INDEX", "OBS_SID", "OBS_LAT", "OBS_LON", "OBS_LVL", "OBS_ELV", "FCST", "OBS", @@ -204,12 +205,12 @@ static const char * mpr_columns [] = { "CLIMO_CDF" }; -static const char * nbrctc_columns [] = { +static const char * const nbrctc_columns [] = { "TOTAL", "FY_OY", "FY_ON", "FN_OY", "FN_ON" }; -static const char * nbrcts_columns [] = { +static const char * const nbrcts_columns [] = { "TOTAL", "BASER", "BASER_NCL", "BASER_NCU", "BASER_BCL", "BASER_BCU", "FMEAN", "FMEAN_NCL", "FMEAN_NCU", "FMEAN_BCL", "FMEAN_BCU", @@ -233,7 +234,7 @@ static const char * nbrcts_columns [] = { "BAGSS", "BAGSS_BCL", "BAGSS_BCU" }; -static const char * nbrcnt_columns [] = { +static const char * const nbrcnt_columns [] = { "TOTAL", "FBS", "FBS_BCL", "FBS_BCU", "FSS", "FSS_BCL", "FSS_BCU", @@ -243,14 +244,14 @@ static const char * nbrcnt_columns [] = { "O_RATE", "O_RATE_BCL", "O_RATE_BCU" }; -static const char * grad_columns [] = { +static const char * const grad_columns [] = { "TOTAL", "FGBAR", "OGBAR", "MGBAR", "EGBAR", "S1", "S1_OG", "FGOG_RATIO", "DX", "DY" }; -static const char * dmap_columns [] = { +static const char * const dmap_columns [] = { "TOTAL", "FY", "OY", "FBIAS", "BADDELEY", "HAUSDORFF", "MED_FO", "MED_OF", "MED_MIN", "MED_MAX", "MED_MEAN", @@ -259,7 +260,7 @@ static const char * dmap_columns [] = { "G", "GBETA", "BETA_VALUE" }; -static const char * isc_columns [] = { +static const char * const isc_columns [] = { "TOTAL", "TILE_DIM", "TILE_XLL", "TILE_YLL", "NSCALE", "ISCALE", "MSE", @@ -267,7 +268,7 @@ static const char * isc_columns [] = { "BASER", "FBIAS" }; -static const char * ecnt_columns [] = { +static const char * const ecnt_columns [] = { "TOTAL", "N_ENS", "CRPS", "CRPSS", "IGN", "ME", "RMSE", "SPREAD", "ME_OERR", @@ -279,22 +280,22 @@ static const char * ecnt_columns [] = { "ME_LT_OBS", "IGN_CONV_OERR", "IGN_CORR_OERR" }; -static const char * rps_columns [] = { +static const char * const rps_columns [] = { "TOTAL", "N_PROB", "RPS_REL", "RPS_RES", "RPS_UNC", "RPS", "RPSS", "RPSS_SMPL", "RPS_COMP" }; -static const char * rhist_columns [] = { +static const char * const rhist_columns [] = { "TOTAL", "N_RANK", "RANK_" }; -static const char * phist_columns [] = { +static const char * const phist_columns [] = { "TOTAL", "BIN_SIZE", "N_BIN", "BIN_" }; -static const char * orank_columns [] = { +static const char * const orank_columns [] = { "TOTAL", "INDEX", "OBS_SID", "OBS_LAT", "OBS_LON", "OBS_LVL", "OBS_ELV", "OBS", "PIT", @@ -304,7 +305,7 @@ static const char * orank_columns [] = { "SPREAD_OERR", "SPREAD_PLUS_OERR", "CLIMO_STDEV" }; -static const char * ssvar_columns [] = { +static const char * const ssvar_columns [] = { "TOTAL", "N_BIN", "BIN_i", "BIN_N", "VAR_MIN", "VAR_MAX", "VAR_MEAN", "FBAR", "OBAR", @@ -320,16 +321,16 @@ static const char * ssvar_columns [] = { "RMSE" }; -static const char * relp_columns [] = { +static const char * const relp_columns [] = { "TOTAL", "N_ENS", "RELP_" }; -static const char * ssidx_columns [] = { +static const char * const ssidx_columns [] = { "FCST_MODEL", "REF_MODEL", "N_INIT", "N_TERM", "N_VLD", "SS_INDEX" }; -static const char * genmpr_columns [] = { +static const char * const genmpr_columns [] = { "TOTAL", "INDEX", "STORM_ID", "PROB_LEAD", "PROB_VAL", "AGEN_INIT", "AGEN_FHR", @@ -339,7 +340,7 @@ static const char * genmpr_columns [] = { "DEV_CAT", "OPS_CAT" }; -static const char * job_summary_columns [] = { +static const char * const job_summary_columns [] = { "TOTAL", "MEAN", "MEAN_NCL", "MEAN_NCU", "MEAN_BCL", "MEAN_BCU", "STDEV", "STDEV_BCL", "STDEV_BCU", @@ -349,12 +350,12 @@ static const char * job_summary_columns [] = { "WMO_TYPE", "WMO_MEAN", "WMO_WEIGHTED_MEAN" }; -static const char * job_wdir_columns [] = { +static const char * const job_wdir_columns [] = { "TOTAL", "FBAR", "OBAR", "ME", "MAE" }; -static const char * job_ramp_columns [] = { +static const char * const job_ramp_columns [] = { "TYPE", "FCOLUMN", "OCOLUMN", "FTIME", "OTIME", @@ -363,7 +364,7 @@ static const char * job_ramp_columns [] = { "WINDOW_BEG", "WINDOW_END" }; -static const char * job_ramp_mpr_columns [] = { +static const char * const job_ramp_mpr_columns [] = { "TOTAL", "INDEX", "INIT", "LEAD", "VALID", "FPRV", "FCUR", "FDLT", "FRAMP", @@ -371,7 +372,7 @@ static const char * job_ramp_mpr_columns [] = { "CATEGORY" }; -static const char * seeps_mpr_columns [] = { +static const char * const seeps_mpr_columns [] = { "OBS_SID", "OBS_LAT", "OBS_LON", "FCST", "OBS", "OBS_QC", "FCST_CAT", "OBS_CAT", "P1", @@ -379,7 +380,7 @@ static const char * seeps_mpr_columns [] = { "SEEPS" }; -static const char * seeps_columns [] = { +static const char * const seeps_columns [] = { "TOTAL", "S12", "S13", "S21", "S23", "S31", "S32", "PF1", "PF2", diff --git a/src/libcode/vx_stat_out/stat_columns.cc b/src/libcode/vx_stat_out/stat_columns.cc index 07c4df90d6..b2ef7bce7a 100644 --- a/src/libcode/vx_stat_out/stat_columns.cc +++ b/src/libcode/vx_stat_out/stat_columns.cc @@ -99,7 +99,7 @@ ConcatString append_climo_bin(const ConcatString &mask_name, //////////////////////////////////////////////////////////////////////// -void write_header_row(const char **cols, int n_cols, int hdr_flag, +void write_header_row(const char * const * cols, int n_cols, int hdr_flag, AsciiTable &at, int r, int c) { int i; @@ -2975,8 +2975,8 @@ void write_vl1l2_cols(const VL1L2Info &vl1l2_info, // TOTAL, UFBAR, VFBAR, // UOBAR, VOBAR, UVFOBAR, // UVFFBAR, UVOOBAR F_SPEED_BAR, - // O_SPEED_BAR, DIR_ME, DIR_MAE, - // DIR_MSE + // O_SPEED_BAR, TOTAL_DIR, DIR_ME, + // DIR_MAE, DIR_MSE // at.set_entry(r, c+0, // Total Count @@ -3009,13 +3009,16 @@ void write_vl1l2_cols(const VL1L2Info &vl1l2_info, at.set_entry(r, c+9, // O_SPEED_BAR vl1l2_info.o_speed_bar); - at.set_entry(r, c+10, // DIR_ME + at.set_entry(r, c+10, // TOTAL_DIR + vl1l2_info.dcount); + + at.set_entry(r, c+11, // DIR_ME vl1l2_info.dir_bar); - at.set_entry(r, c+11, // DIR_MAE + at.set_entry(r, c+12, // DIR_MAE vl1l2_info.absdir_bar); - at.set_entry(r, c+12, // DIR_MSE + at.set_entry(r, c+13, // DIR_MSE vl1l2_info.dir2_bar); return; @@ -3032,8 +3035,8 @@ void write_val1l2_cols(const VL1L2Info &vl1l2_info, // TOTAL, UFABAR, VFABAR, // UOABAR, VOABAR, UVFOABAR, // UVFFABAR, UVOOABAR, FA_SPEED_BAR, - // OA_SPEED_BAR, DIRA_ME, DIRA_MAE, - // DIRA_MSE + // OA_SPEED_BAR, TOTAL_DIR, DIRA_ME, + // DIRA_MAE, DIRA_MSE // at.set_entry(r, c+0, // Total Anomaly Count @@ -3066,13 +3069,16 @@ void write_val1l2_cols(const VL1L2Info &vl1l2_info, at.set_entry(r, c+9, // OA_SPEED_BAR vl1l2_info.oa_speed_bar); - at.set_entry(r, c+10, // DIRA_ME + at.set_entry(r, c+10, // TOTAL_DIR + vl1l2_info.dacount); + + at.set_entry(r, c+11, // DIRA_ME vl1l2_info.dira_bar); - at.set_entry(r, c+11, // DIRA_MAE + at.set_entry(r, c+12, // DIRA_MAE vl1l2_info.absdira_bar); - at.set_entry(r, c+12, // DIRA_MSE + at.set_entry(r, c+13, // DIRA_MSE vl1l2_info.dira2_bar); return; @@ -3108,6 +3114,7 @@ void write_vcnt_cols(const VL1L2Info &vcnt_info, int i, // ANOM_CORR, ANOM_CORR_NCL, ANOM_CORR_NCU, // ANOM_CORR_BCL, ANOM_CORR_BCU // ANOM_CORR_UNCNTR, ANOM_CORR_UNCNTR_BCL, ANOM_CORR_UNCNTR_BCU, + // TOTAL_DIR, // DIR_ME, DIR_ME_BCL, DIR_ME_BCU, // DIR_MAE, DIR_MAE_BCL, DIR_MAE_BCU, // DIR_MSE, DIR_MSE_BCL, DIR_MSE_BCU, @@ -3201,6 +3208,8 @@ void write_vcnt_cols(const VL1L2Info &vcnt_info, int i, at.set_entry(r, c++, (string)na_str); // ANOM_CORR_UNCNTR_BCL at.set_entry(r, c++, (string)na_str); // ANOM_CORR_UNCNTR_BCU + at.set_entry(r, c++, vcnt_info.dcount); // TOTAL_DIR + at.set_entry(r, c++, vcnt_info.DIR_ME.v); // DIR_ME at.set_entry(r, c++, (string)na_str); // DIR_ME_BCL at.set_entry(r, c++, (string)na_str); // DIR_ME_BCU diff --git a/src/libcode/vx_stat_out/stat_columns.h b/src/libcode/vx_stat_out/stat_columns.h index 923425dabc..8af99ad730 100644 --- a/src/libcode/vx_stat_out/stat_columns.h +++ b/src/libcode/vx_stat_out/stat_columns.h @@ -35,7 +35,7 @@ extern void close_txt_file(std::ofstream *&, const char *); extern ConcatString append_climo_bin(const ConcatString &, int, int); // Write out the header row for fixed length line types -extern void write_header_row(const char **, int, int, AsciiTable &, int, int); +extern void write_header_row(const char * const *, int, int, AsciiTable &, int, int); // Write out the header row for variable length line types extern void write_mctc_header_row (int, int, AsciiTable &, int, int); diff --git a/src/libcode/vx_statistics/met_stats.cc b/src/libcode/vx_statistics/met_stats.cc index 587c5552a7..7f2af8b534 100644 --- a/src/libcode/vx_statistics/met_stats.cc +++ b/src/libcode/vx_statistics/met_stats.cc @@ -1363,6 +1363,7 @@ VL1L2Info & VL1L2Info::operator+=(const VL1L2Info &c) { for(int i=0; i 0) { v_info.uf_bar = (uf_bar*vcount + c.uf_bar*c.vcount) /v_info.vcount; @@ -1374,12 +1375,15 @@ VL1L2Info & VL1L2Info::operator+=(const VL1L2Info &c) { v_info.uvoo_bar = (uvoo_bar*vcount + c.uvoo_bar*c.vcount) /v_info.vcount; v_info.f_speed_bar = (f_speed_bar*vcount + c.f_speed_bar*c.vcount)/v_info.vcount; v_info.o_speed_bar = (o_speed_bar*vcount + c.o_speed_bar*c.vcount)/v_info.vcount; - v_info.dir_bar = (dir_bar*vcount + c.dir_bar*c.vcount) /v_info.vcount; - v_info.absdir_bar = (absdir_bar*vcount + c.absdir_bar*c.vcount) /v_info.vcount; - v_info.dir2_bar = (dir2_bar*vcount + c.dir2_bar*c.vcount) /v_info.vcount; + } + if(v_info.dcount > 0) { + v_info.dir_bar = (dir_bar*dcount + c.dir_bar*c.dcount) /v_info.dcount; + v_info.absdir_bar = (absdir_bar*dcount + c.absdir_bar*c.dcount) /v_info.dcount; + v_info.dir2_bar = (dir2_bar*dcount + c.dir2_bar*c.dcount) /v_info.dcount; } v_info.vacount = vacount + c.vacount; + v_info.dacount = dacount + c.dacount; if(v_info.vacount > 0) { v_info.ufa_bar = (ufa_bar*vacount + c.ufa_bar*c.vacount) /v_info.vacount; @@ -1391,9 +1395,11 @@ VL1L2Info & VL1L2Info::operator+=(const VL1L2Info &c) { v_info.uvooa_bar = (uvooa_bar*vacount + c.uvooa_bar*c.vacount) /v_info.vacount; v_info.fa_speed_bar = (fa_speed_bar*vacount + c.fa_speed_bar*c.vacount)/v_info.vacount; v_info.oa_speed_bar = (oa_speed_bar*vacount + c.oa_speed_bar*c.vacount)/v_info.vacount; - v_info.dira_bar = (dira_bar*vacount + c.dira_bar*c.vacount) /v_info.vacount; - v_info.absdira_bar = (absdira_bar*vacount + c.absdira_bar*c.vacount) /v_info.vacount; - v_info.dira2_bar = (dira2_bar*vacount + c.dira2_bar*c.vacount) /v_info.vacount; + } + if(v_info.dacount > 0) { + v_info.dira_bar = (dira_bar*dacount + c.dira_bar*c.dacount) /v_info.dacount; + v_info.absdira_bar = (absdira_bar*dacount + c.absdira_bar*c.dacount) /v_info.dacount; + v_info.dira2_bar = (dira2_bar*dacount + c.dira2_bar*c.dacount) /v_info.dacount; } v_info.compute_stats(); @@ -1436,6 +1442,7 @@ void VL1L2Info::zero_out() { dir2_bar = 0.0; vcount = 0; + dcount = 0; // // VAL1L2 Quantities @@ -1455,6 +1462,7 @@ void VL1L2Info::zero_out() { dira2_bar = 0.0; vacount = 0; + dacount = 0; return; } @@ -1464,8 +1472,6 @@ void VL1L2Info::zero_out() { void VL1L2Info::clear() { n = 0; - n_dir_undef = 0; - n_dira_undef = 0; n_alpha = 0; if(alpha) { delete [] alpha; alpha = (double *) nullptr; } @@ -1515,8 +1521,6 @@ void VL1L2Info::assign(const VL1L2Info &c) { logic = c.logic; n = c.n; - n_dir_undef = c.n_dir_undef; - n_dira_undef = c.n_dira_undef; allocate_n_alpha(c.n_alpha); for(i=0; i 0) { - mlog << Warning << "\nVL1L2Info::compute_stats() -> " - << "Skipping " << n_dir_undef << " of " << vcount - << " vector pairs for which the direction difference is undefined.\n" - << "Set the \"wind_thresh\" and \"wind_logic\" configuration options " - << "to exclude zero vectors.\n\n"; - } - DIR_ME.v = dir_bar; DIR_MAE.v = absdir_bar; DIR_MSE.v = dir2_bar; @@ -1912,15 +1907,6 @@ void VL1L2Info::compute_stats() { } ANOM_CORR_UNCNTR.v = compute_anom_corr_uncntr(uvffa_bar, uvooa_bar, uvfoa_bar); - - // Print undefined wind direction warning message - if(n_dira_undef > 0) { - mlog << Warning << "\nVL1L2Info::compute_stats() -> " - << "Skipping " << n_dira_undef << " of " << vacount - << " anomaly vector pairs for which the direction difference is undefined.\n" - << "Set the \"wind_thresh\" and \"wind_logic\" configuration options " - << "to exclude zero vectors.\n\n"; - } } // Compute parametric confidence intervals diff --git a/src/libcode/vx_statistics/met_stats.h b/src/libcode/vx_statistics/met_stats.h index 1d5def71a7..36a9e2f01d 100644 --- a/src/libcode/vx_statistics/met_stats.h +++ b/src/libcode/vx_statistics/met_stats.h @@ -277,10 +277,6 @@ class VL1L2Info { // Number of points int n; - // Number of points for which the wind direction difference is undefined - int n_dir_undef; - int n_dira_undef; - // VL1L2 Quantities double uf_bar; @@ -336,7 +332,8 @@ class VL1L2Info { CIInfo DIR_MSE; CIInfo DIR_RMSE; - int vcount; + int vcount; // Vector count + int dcount; // Direction count // VAL1L2 Quantities double ufa_bar; @@ -355,7 +352,8 @@ class VL1L2Info { double absdira_bar; // Average anomalous absolute direction difference double dira2_bar; // Average anomalous squared direction difference - int vacount; + int vacount; // Vector anomaly count + int dacount; // Direction anomaly count // Compute sums void set(const PairDataPoint &, const PairDataPoint &); diff --git a/src/tools/core/ensemble_stat/ensemble_stat.h b/src/tools/core/ensemble_stat/ensemble_stat.h index 28d26a5585..3e14ebbaa1 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat.h +++ b/src/tools/core/ensemble_stat/ensemble_stat.h @@ -49,14 +49,14 @@ static const char * default_config_filename = "MET_BASE/config/EnsembleStatConfig_default"; // Text file abbreviations -static const char *txt_file_abbr[n_txt] = { +static const char * const txt_file_abbr[n_txt] = { "ecnt", "rps", "rhist", "phist", "orank", "ssvar", "relp", "pct", "pstd", "pjc", "prc", "eclv" }; // Header columns -static const char **txt_columns[n_txt] = { +static const char * const * txt_columns[n_txt] = { ecnt_columns, rps_columns, rhist_columns, phist_columns, orank_columns, ssvar_columns, relp_columns, pct_columns, pstd_columns, diff --git a/src/tools/core/grid_stat/grid_stat.h b/src/tools/core/grid_stat/grid_stat.h index ccd85c82ac..9f170b5a9f 100644 --- a/src/tools/core/grid_stat/grid_stat.h +++ b/src/tools/core/grid_stat/grid_stat.h @@ -66,7 +66,7 @@ static const char * default_config_filename = static const char * default_out_dir = "."; // Header columns -static const char **txt_columns[n_txt] = { +static const char * const * txt_columns[n_txt] = { fho_columns, ctc_columns, cts_columns, mctc_columns, mcts_columns, cnt_columns, sl1l2_columns, sal1l2_columns, vl1l2_columns, @@ -90,7 +90,7 @@ static const int n_txt_columns[n_txt] = { }; // Text file abbreviations -static const char *txt_file_abbr[n_txt] = { +static const char * const txt_file_abbr[n_txt] = { "fho", "ctc", "cts", "mctc", "mcts", "cnt", "sl1l2", "sal1l2", "vl1l2", diff --git a/src/tools/core/point_stat/point_stat.h b/src/tools/core/point_stat/point_stat.h index 0804650b0a..abe34d25ac 100644 --- a/src/tools/core/point_stat/point_stat.h +++ b/src/tools/core/point_stat/point_stat.h @@ -61,7 +61,7 @@ static const char * default_config_filename = "MET_BASE/config/PointStatConfig_default"; // Header columns -static const char **txt_columns[n_txt] = { +static const char * const * txt_columns[n_txt] = { fho_columns, ctc_columns, cts_columns, mctc_columns, mcts_columns, cnt_columns, sl1l2_columns, sal1l2_columns, vl1l2_columns, @@ -85,7 +85,7 @@ static const int n_txt_columns[n_txt] = { }; // Text file abbreviations -static const char *txt_file_abbr[n_txt] = { +static const char * const txt_file_abbr[n_txt] = { "fho", "ctc", "cts", "mctc", "mcts", "cnt", "sl1l2", "sal1l2", "vl1l2", diff --git a/src/tools/core/stat_analysis/aggr_stat_line.cc b/src/tools/core/stat_analysis/aggr_stat_line.cc index 7f3c16af10..c46c35c134 100644 --- a/src/tools/core/stat_analysis/aggr_stat_line.cc +++ b/src/tools/core/stat_analysis/aggr_stat_line.cc @@ -65,8 +65,9 @@ using namespace std; //////////////////////////////////////////////////////////////////////// -static bool is_precip_var_name(const ConcatString &s); -static const std::string case_str = "CASE"; +static bool is_precip_var_name(const ConcatString &s); +static const string case_str = "CASE"; +static bool is_vector_dir_stat(const STATLineType &t, const ConcatString &s); //////////////////////////////////////////////////////////////////////// // @@ -834,14 +835,18 @@ void aggr_summary_lines(LineDataFile &f, STATAnalysisJob &job, } else if(line.type() == STATLineType::vl1l2 && lty == STATLineType::vcnt) { v = vl1l2_info.get_stat(req_col[i].c_str()); - w = vl1l2_info.vcount; + w = (is_vector_dir_stat(line.type(), req_col[i].c_str()) ? + vl1l2_info.dcount : + vl1l2_info.vcount); } else if(line.type() != lty) { continue; } else { v = job.get_column_double(line, req_col[i]); - w = atoi(line.get_item("TOTAL")); + w = (is_vector_dir_stat(line.type(), req_col[i].c_str()) ? + atoi(line.get_item("TOTAL_DIR")) : + atoi(line.get_item("TOTAL"))); } // @@ -2150,35 +2155,15 @@ void aggr_mpr_wind_lines(LineDataFile &f, STATAnalysisJob &job, it->second.pd_u.f_na[i], it->second.pd_v.f_na[i], it->second.pd_u.o_na[i], it->second.pd_v.o_na[i]); - if(is_bad_data(d_diff)) { - v_info.n_dir_undef = 1; - } - else { - v_info.n_dir_undef = 0; - v_info.dir_bar = d_diff; - v_info.absdir_bar = abs(d_diff); - v_info.dir2_bar = d_diff*d_diff; + if(!is_bad_data(d_diff)) { + v_info.dcount = 1; + v_info.dir_bar = d_diff; + v_info.absdir_bar = abs(d_diff); + v_info.dir2_bar = d_diff*d_diff; } aggr.vl1l2_info += v_info; - // - // Check for vectors of length zero - // - if((is_eq(it->second.pd_u.f_na[i], 0.0) && - is_eq(it->second.pd_v.f_na[i], 0.0)) || - (is_eq(it->second.pd_u.o_na[i], 0.0) && - is_eq(it->second.pd_v.o_na[i], 0.0))) { - mlog << Debug(4) << "aggr_mpr_wind_lines() -> " - << "angle not defined for zero forecast (" - << it->second.pd_u.f_na[i] << ", " << it->second.pd_v.f_na[i] - << ") or observation (" - << it->second.pd_u.o_na[i] << ", " << it->second.pd_v.o_na[i] - << ") vector for header:\n" - << it->second.hdr_sa[i] << "\n"; - continue; - } - // // Convert to and append unit vectors // @@ -4229,7 +4214,7 @@ double compute_vif(NumArray &na) { //////////////////////////////////////////////////////////////////////// -bool is_precip_var_name(const ConcatString &s) { +static bool is_precip_var_name(const ConcatString &s) { bool match = has_prefix(pinterp_precipitation_names, n_pinterp_precipitation_names, s.c_str()) || @@ -4239,4 +4224,19 @@ bool is_precip_var_name(const ConcatString &s) { return match; } + +//////////////////////////////////////////////////////////////////////// + +static bool is_vector_dir_stat(const STATLineType &t, const ConcatString &s) { + + bool match = (t == STATLineType::vl1l2 || + t == STATLineType::val1l2 || + t == STATLineType::vcnt) && + (s.startswith("DIR_ME") || + s.startswith("DIR_MAE") || + s.startswith("DIR_MSE")); + + return match; +} + //////////////////////////////////////////////////////////////////////// diff --git a/src/tools/core/stat_analysis/parse_stat_line.cc b/src/tools/core/stat_analysis/parse_stat_line.cc index ebdc9d9a0a..b3662a8eeb 100644 --- a/src/tools/core/stat_analysis/parse_stat_line.cc +++ b/src/tools/core/stat_analysis/parse_stat_line.cc @@ -238,6 +238,7 @@ void parse_vl1l2_line(STATLine &l, VL1L2Info &v_info) { v_info.uvoo_bar = atof(l.get_item("UVOOBAR")); v_info.f_speed_bar = atof(l.get_item("F_SPEED_BAR")); v_info.o_speed_bar = atof(l.get_item("O_SPEED_BAR")); + v_info.dcount = atoi(l.get_item("TOTAL_DIR")); v_info.dir_bar = atof(l.get_item("DIR_ME")); v_info.absdir_bar = atof(l.get_item("DIR_MAE")); v_info.dir2_bar = atof(l.get_item("DIR_MSE")); @@ -263,6 +264,7 @@ void parse_val1l2_line(STATLine &l, VL1L2Info &v_info) { v_info.uvooa_bar = atof(l.get_item("UVOOABAR")); v_info.fa_speed_bar = atof(l.get_item("FA_SPEED_BAR")); v_info.oa_speed_bar = atof(l.get_item("OA_SPEED_BAR")); + v_info.dacount = atoi(l.get_item("TOTAL_DIR")); v_info.dira_bar = atof(l.get_item("DIRA_ME")); v_info.absdira_bar = atof(l.get_item("DIRA_MAE")); v_info.dira2_bar = atof(l.get_item("DIRA_MSE")); diff --git a/src/tools/tc_utils/tc_gen/tc_gen.h b/src/tools/tc_utils/tc_gen/tc_gen.h index fa19075829..13c31a2ae9 100644 --- a/src/tools/tc_utils/tc_gen/tc_gen.h +++ b/src/tools/tc_utils/tc_gen/tc_gen.h @@ -59,7 +59,7 @@ static const char * default_config_filename = "MET_BASE/config/TCGenConfig_default"; // Header columns -static const char **txt_columns[n_txt] = { +static const char * const * txt_columns[n_txt] = { fho_columns, ctc_columns, cts_columns, pct_columns, pstd_columns, pjc_columns, prc_columns, genmpr_columns @@ -73,7 +73,7 @@ static const int n_txt_columns[n_txt] = { }; // Text file abbreviations -static const char *txt_file_abbr[n_txt] = { +static const char * const txt_file_abbr[n_txt] = { "fho", "ctc", "cts", "pct", "pstd", "pjc", "prc", "genmpr" };