Skip to content

Commit

Permalink
Per #1746, cleaning up for consistent indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Jul 9, 2021
1 parent 64dcdf9 commit da0b030
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
23 changes: 10 additions & 13 deletions met/src/tools/core/wavelet_stat/wavelet_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ void process_scores() {
shc.set_fcst_thresh(conf_info.fcat_ta[i][k]);
shc.set_obs_thresh(conf_info.ocat_ta[i][k]);

write_isc_row(shc, isc_info[j][k],
write_isc_row(shc, isc_info[j][k],
conf_info.output_flag[i_isc],
stat_at, i_stat_row, isc_at, i_isc_row);
} // end for k
Expand Down Expand Up @@ -995,20 +995,20 @@ void do_intensity_scale(const NumArray &f_na, const NumArray &o_na,

// Apply each threshold
for(i=0; i<conf_info.fcat_ta[i_vx].n_elements(); i++) {

fcst_thresh_str = isc_info[i].fthresh.get_abbr_str();
obs_thresh_str = isc_info[i].othresh.get_abbr_str();

// If the forecast threshold is set to NA skip masking below
if(isc_info[i].fthresh.get_type() == thresh_na) {
mlog << Debug(2) << "The forecast threshold is NA (missing), skipping applying threshold" << "\n";
apply_fcst_thresh = 0;
mlog << Debug(2) << "The forecast threshold is NA (missing), skipping applying threshold.\n";
apply_fcst_thresh = 0;
}

// If the observation threshold is set to NA skip masking below
if(isc_info[i].othresh.get_type() == thresh_na) {
mlog << Debug(2) << "The observation threshold is NA (missing), skipping applying threshold" << "\n";
apply_obs_thresh = 0;
mlog << Debug(2) << "The observation threshold is NA (missing), skipping applying threshold.\n";
apply_obs_thresh = 0;
}

mlog << Debug(2) << "Computing Intensity-Scale decomposition for "
Expand All @@ -1019,14 +1019,11 @@ void do_intensity_scale(const NumArray &f_na, const NumArray &o_na,

// Apply the threshold to each point to create 0/1 mask fields
for(j=0; j<n; j++) {
if(apply_fcst_thresh)
f_dat[j] = isc_info[i].fthresh.check(f_na[j]);
if(apply_obs_thresh)
o_dat[j] = isc_info[i].othresh.check(o_na[j]);

diff[j] = f_dat[j] - o_dat[j];
if(apply_fcst_thresh) f_dat[j] = isc_info[i].fthresh.check(f_na[j]);
if(apply_obs_thresh) o_dat[j] = isc_info[i].othresh.check(o_na[j]);
diff[j] = f_dat[j] - o_dat[j];
} // end for j

// Compute the contingency table for the binary fields
compute_cts(f_dat, o_dat, n, isc_info[i]);

Expand Down
8 changes: 4 additions & 4 deletions met/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ void WaveletStatConfInfo::process_config(GrdFileType ftype,
// If the forecast threshold array is an empty list (or NA)
// Add the NA threshold type to the list for downstream iteration
if(fcat_ta[i].n_elements() == 0) {
mlog << Debug(2) << "Found empty list for forecast threshold, setting threshold type to NA" << "\n";
fcat_ta[i].add(st_NA);
mlog << Debug(2) << "Found empty list for forecast threshold, setting threshold type to NA.\n";
fcat_ta[i].add(st_NA);
}

// If the observation threshold array is an empty list (or NA)
// Add the NA threshold type to the list for downstream iteration
if(ocat_ta[i].n_elements() == 0) {
mlog << Debug(2) << "Found empty list for observation threshold, setting threshold type to NA" << "\n";
ocat_ta[i].add(st_NA);
mlog << Debug(2) << "Found empty list for observation threshold, setting threshold type to NA.\n";
ocat_ta[i].add(st_NA);
}

// Check for the same number of fcst and obs thresholds
Expand Down

0 comments on commit da0b030

Please sign in to comment.