Skip to content

Commit

Permalink
#2601 Added a argument for the SEEPS clomo file
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Jun 26, 2024
1 parent 8b50ca2 commit 7c73501
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/libcode/vx_statistics/compute_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,8 @@ void compute_aggregated_seeps(const PairDataPoint *pd, SeepsAggScore *seeps) {
void compute_aggregated_seeps_grid(const DataPlane &fcst_dp, const DataPlane &obs_dp,
DataPlane &seeps_dp, DataPlane &seeps_dp_fcat,
DataPlane &seeps_dp_ocat,SeepsAggScore *seeps,
int month, int hour, const SingleThresh &seeps_p1_thresh) {
int month, int hour, const SingleThresh &seeps_p1_thresh,
const ConcatString &seeps_climo_name) {
int fcst_cat, obs_cat;
int seeps_count, count_diagonal, nan_count, bad_count;
int nx = fcst_dp.nx();
Expand All @@ -1569,7 +1570,7 @@ void compute_aggregated_seeps_grid(const DataPlane &fcst_dp, const DataPlane &ob
c12 = c13 = c21 = c23 = c31 = c32 = 0;

seeps->clear();
SeepsClimoGrid *seeps_climo = get_seeps_climo_grid(month);
SeepsClimoGrid *seeps_climo = get_seeps_climo_grid(month, seeps_climo_name);
seeps_climo->set_p1_thresh(seeps_p1_thresh);
for (int i=0; i<SEEPS_MATRIX_SIZE; i++) {
pvf[i] = 0.;
Expand Down
3 changes: 2 additions & 1 deletion src/libcode/vx_statistics/compute_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ extern void compute_aggregated_seeps(const PairDataPoint *pd, SeepsAggScore *see
extern void compute_aggregated_seeps_grid(const DataPlane &fcst_dp, const DataPlane &obs_dp,
DataPlane &seeps_dp, DataPlane &seeps_dp_fcat,
DataPlane &seeps_dp_ocat,SeepsAggScore *seeps,
int month, int hour, const SingleThresh &seeps_p1_thresh);
int month, int hour, const SingleThresh &seeps_p1_thresh,
const ConcatString &seeps_climo_name);
extern void compute_seeps_density_vector(const PairDataPoint *pd, SeepsAggScore *seeps,
std::vector<double> &density_vector);

Expand Down
8 changes: 4 additions & 4 deletions src/libcode/vx_statistics/pair_data_point.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ bool PairDataPoint::add_point_pair(const char *sid, double lat, double lon,

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

void PairDataPoint::load_seeps_climo() {
if (nullptr == seeps_climo) seeps_climo = get_seeps_climo();
void PairDataPoint::load_seeps_climo(const ConcatString &seeps_climo_name) {
if (nullptr == seeps_climo) seeps_climo = get_seeps_climo(seeps_climo_name);
}

////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1674,11 +1674,11 @@ void VxPairDataPoint::set_obs_perc_value(int percentile) {

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

void VxPairDataPoint::load_seeps_climo() {
void VxPairDataPoint::load_seeps_climo(const ConcatString &seeps_climo_name) {
for(int i=0; i < n_msg_typ; i++){
for(int j=0; j < n_mask; j++){
for(int k=0; k < n_interp; k++){
pd[i][j][k].load_seeps_climo();
pd[i][j][k].load_seeps_climo(seeps_climo_name);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/libcode/vx_statistics/pair_data_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class PairDataPoint : public PairBase {
bool add_point_pair(const char *, double, double, double, double,
unixtime, double, double, double, double,
const char *, double, double, double);
void load_seeps_climo();
void load_seeps_climo(const ConcatString &seeps_climo_name);
void set_seeps_thresh(const SingleThresh &p1_thresh);
void set_seeps_score(SeepsScore *, int index=-1);

Expand Down Expand Up @@ -229,7 +229,7 @@ class VxPairDataPoint {

void set_mpr_thresh(const StringArray &, const ThreshArray &);

void load_seeps_climo();
void load_seeps_climo(const ConcatString &seeps_climo_name);
void set_seeps_thresh(const SingleThresh &p1_thresh);

void set_climo_cdf_info_ptr(const ClimoCDFInfo *);
Expand Down

0 comments on commit 7c73501

Please sign in to comment.