Skip to content

Commit

Permalink
Per #2882, change SEEPS debug log levels and correct the storage of m…
Browse files Browse the repository at this point in the history
…ean_fcst and mean_obs values.
  • Loading branch information
JohnHalleyGotway committed Sep 20, 2024
1 parent a377729 commit 4ae932f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 39 deletions.
70 changes: 38 additions & 32 deletions src/libcode/vx_stat_out/stat_columns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4162,34 +4162,40 @@ void write_seeps_cols(const SeepsAggScore *seeps,
//
// Stable Equitable Error in Probability Space (SEEPS)
// Dump out the SEEPS line:
// TOTAL ODFL, ODFH,
// OLFD, OLFH, OHFD,
// OHFL, PF1, PF2,
// PF3, PV1, PV2,
// PV3, MEAN_FCST, MEAN_OBS,
// SEEPS
// TOTAL,
// ODFL, ODFH, OLFD,
// OLFH, OHFD, OHFL,
// PF1, PF2, PF3,
// PV1, PV2, PV3,
// MEAN_FCST, MEAN_OBS, SEEPS
//

at.set_entry(r, c+0, seeps->n_obs); // Total Number of Pairs

at.set_entry(r, c+1, seeps->s_odfl); // s_odfl
at.set_entry(r, c+2, seeps->s_odfh); // s_odfh
at.set_entry(r, c+3, seeps->s_olfd); // s_olfd
at.set_entry(r, c+4, seeps->s_olfh); // s_olfh
at.set_entry(r, c+5, seeps->s_ohfd); // s_ohfd
at.set_entry(r, c+6, seeps->s_ohfl); // s_ohfl

at.set_entry(r, c+7, seeps->pf1); // pf1
at.set_entry(r, c+8, seeps->pf2); // pf2
at.set_entry(r, c+9, seeps->pf3); // pf3

at.set_entry(r, c+10, seeps->pv1); // pv1
at.set_entry(r, c+11, seeps->pv2); // pv2
at.set_entry(r, c+12, seeps->pv3); // pv3

at.set_entry(r, c+13, (use_weighted_seeps ? seeps->mean_fcst_wgt : seeps->mean_fcst)); // MEAN_FCST
at.set_entry(r, c+14, (use_weighted_seeps ? seeps->mean_obs_wgt : seeps->mean_obs)); // MEAN_OBS
at.set_entry(r, c+15, (use_weighted_seeps ? seeps->score_wgt : seeps->score)); // SEEPS
at.set_entry(r, c+1, seeps->s_odfl); // ODFL
at.set_entry(r, c+2, seeps->s_odfh); // ODFH
at.set_entry(r, c+3, seeps->s_olfd); // OLFD
at.set_entry(r, c+4, seeps->s_olfh); // OLFH
at.set_entry(r, c+5, seeps->s_ohfd); // OHFD
at.set_entry(r, c+6, seeps->s_ohfl); // OHFL

at.set_entry(r, c+7, seeps->pf1); // PF1
at.set_entry(r, c+8, seeps->pf2); // PF2
at.set_entry(r, c+9, seeps->pf3); // PF3

at.set_entry(r, c+10, seeps->pv1); // PV1
at.set_entry(r, c+11, seeps->pv2); // PV2
at.set_entry(r, c+12, seeps->pv3); // PV3

at.set_entry(r, c+13, (use_weighted_seeps ?
seeps->mean_fcst_wgt :
seeps->mean_fcst)); // MEAN_FCST
at.set_entry(r, c+14, (use_weighted_seeps ?
seeps->mean_obs_wgt :
seeps->mean_obs)); // MEAN_OBS
at.set_entry(r, c+15, (use_weighted_seeps ?
seeps->score_wgt:
seeps->score)); // SEEPS

return;
}
Expand Down Expand Up @@ -4218,18 +4224,18 @@ void write_seeps_mpr_cols(const PairDataPoint *pd_ptr, int i,

at.set_entry(r, c+4, pd_ptr->o_na[i]); // Observation Value

at.set_entry(r, c+5, (string)pd_ptr->o_qc_sa[i]); // Observation Quality Control
at.set_entry(r, c+5, (string)pd_ptr->o_qc_sa[i]); // Observation Quality Control

at.set_entry(r, c+6, pd_ptr->seeps_mpr[i]->fcst_cat); // model category
at.set_entry(r, c+7, pd_ptr->seeps_mpr[i]->obs_cat); // observation category
at.set_entry(r, c+6, pd_ptr->seeps_mpr[i]->fcst_cat); // FCST_CAT
at.set_entry(r, c+7, pd_ptr->seeps_mpr[i]->obs_cat); // OBS_CAT

at.set_entry(r, c+8, pd_ptr->seeps_mpr[i]->p1); // p1
at.set_entry(r, c+9, pd_ptr->seeps_mpr[i]->p2); // p2
at.set_entry(r, c+8, pd_ptr->seeps_mpr[i]->p1); // P1
at.set_entry(r, c+9, pd_ptr->seeps_mpr[i]->p2); // P2

at.set_entry(r, c+10, pd_ptr->seeps_mpr[i]->t1); // t1
at.set_entry(r, c+11, pd_ptr->seeps_mpr[i]->t2); // t2
at.set_entry(r, c+10, pd_ptr->seeps_mpr[i]->t1); // T1
at.set_entry(r, c+11, pd_ptr->seeps_mpr[i]->t2); // T2

at.set_entry(r, c+12, pd_ptr->seeps_mpr[i]->score); // SEEPS score
at.set_entry(r, c+12, pd_ptr->seeps_mpr[i]->score); // SEEPS

}

Expand Down
14 changes: 7 additions & 7 deletions src/libcode/vx_statistics/compute_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ void compute_aggregated_seeps(const PairDataPoint *pd, SeepsAggScore *seeps_agg)
double score_sum_wgt, weight_sum, weight[count];

mlog << Debug(9) << method_name
<< "Categories c_odfl, c_odfh, c_olfd, c_ohfd, c_ohfl => "
<< "Categories c_odfl, c_odfh, c_olfd, c_olfh, c_ohfd, c_ohfl => "
<< c_odfl << " " << c_odfh << " " << c_olfd << " "
<< c_olfh << " " << c_ohfd << " " << c_ohfl << "\n";

Expand Down Expand Up @@ -1552,9 +1552,9 @@ void compute_aggregated_seeps(const PairDataPoint *pd, SeepsAggScore *seeps_agg)
seeps_agg->s_olfh = (is_eq(svf[7], 0.0) ? 0.0 : svf[7]);
seeps_agg->s_ohfd = (is_eq(svf[2], 0.0) ? 0.0 : svf[2]);
seeps_agg->s_ohfl = (is_eq(svf[5], 0.0) ? 0.0 : svf[5]);
seeps_agg->mean_fcst = fcst_sum_wgt;
seeps_agg->mean_obs = obs_sum_wgt;
seeps_agg->score_wgt = score_sum_wgt;
seeps_agg->mean_fcst_wgt = fcst_sum_wgt;
seeps_agg->mean_obs_wgt = obs_sum_wgt;
seeps_agg->score_wgt = score_sum_wgt;

mlog << Debug(7) << method_name
<< "SEEPS score=" << seeps_agg->score << " score_wgt=" << seeps_agg->score_wgt
Expand Down Expand Up @@ -1813,7 +1813,7 @@ void compute_seeps_density_vector(const PairDataPoint *pd, SeepsAggScore *seeps,
<< seeps_idx << " " << seeps_mpr << "\n";

if (!seeps_mpr || is_eq(seeps_mpr->score, bad_data_double)) continue;
mlog << Debug(2) << method_name
mlog << Debug(4) << method_name
<< "lat, long => " << pd->lat_na[i] << " "
<< fmod((pd->lon_na[i] + 360.), 360.) << "\n";

Expand Down Expand Up @@ -1894,13 +1894,13 @@ void compute_seeps_density_vector(const PairDataPoint *pd, SeepsAggScore *seeps,
density2 = 0.;
}
//double dens = exp(-(pow(2,2)));
mlog << Debug(2) << method_name
mlog << Debug(4) << method_name
<< "final density, density2 => "
<< density << " " << density2 << "\n";
} else {
density = 1.;
}
mlog << Debug(2) << method_name
mlog << Debug(4) << method_name
<< "For Info - Feeding density2 (not density) back as vector "
<< "as density all zeros in final output" << "\n";
density_vector[j] += density2;
Expand Down

0 comments on commit 4ae932f

Please sign in to comment.