Skip to content

Commit

Permalink
Merge pull request #2065 from dtcenter/feature_1824_pb2nc_MLCAPE2
Browse files Browse the repository at this point in the history
Feature 1996 sonarqube findings
  • Loading branch information
hsoh-u authored Feb 23, 2022
2 parents 2c4e4af + 946e4ec commit ba71e4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions met/src/tools/core/series_analysis/series_analysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ void process_scores() {
VarInfo *obs_info = (VarInfo *) 0;
PairDataPoint *pd_ptr = (PairDataPoint *) 0;
DataPlane fcst_dp, obs_dp;
const char *method_name = "process_scores() ";

// Climatology mean and standard deviation
DataPlane cmn_dp, csd_dp;
Expand Down Expand Up @@ -763,6 +764,12 @@ void process_scores() {

} // end for i_series

if(0 == pd_ptr) {
mlog << Debug(3) << method_name
<< "PairDataPoint is not set. Skip computing statistics for each grid point in the block.\n";
continue;
}

// Compute statistics for each grid point in the block
for(i=0; i<conf_info.block_size && (i_point+i)<nxy; i++) {

Expand Down
2 changes: 1 addition & 1 deletion met/src/tools/other/pb2nc/pb2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ void process_pbfile(int i_pb) {

// Initialize
prev_hdr_lat = prev_hdr_lon = prev_hdr_elv = bad_data_double;
cape_level = cape_count = cape_cnt_too_big = 0;
cape_level = cape_count = cape_cnt_too_big = cape_cnt_surface_msgs = 0;
cape_cnt_no_levels = cape_cnt_missing_values = cape_cnt_zero_values = 0;
mlcape_count = mlcape_cnt_too_big = 0;
mlcape_cnt_missing_values = mlcape_cnt_zero_values = 0;
Expand Down

0 comments on commit ba71e4c

Please sign in to comment.