Skip to content

Commit

Permalink
#2278 Initialize pbl_qm after computing and saving PBL
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Dec 2, 2022
1 parent 0caabcd commit 06977f9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/tools/other/pb2nc/pb2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,6 @@ void process_pbfile(int i_pb) {
float cape_qm = bad_data_float;

// To compute PBL
int pbl_level = 0;
int pbl_code = -1;
float pbl_p, pbl_h;
float pbl_qm = bad_data_float;
Expand Down Expand Up @@ -1352,10 +1351,6 @@ void process_pbfile(int i_pb) {
}

do_pbl = cal_pbl && 0 == strcmp("ADPUPA", hdr_typ);
if (do_pbl) {
pbl_level = 0;
pbl_qm = bad_data_float;
}

// Search through the vertical levels
for(lv=0, n_hdr_obs = 0; lv<buf_nlev; lv++) {
Expand Down Expand Up @@ -1894,7 +1889,6 @@ void process_pbfile(int i_pb) {
}

if (do_pbl) {
pbl_level = 0;
is_same_header = (prev_hdr_vld_ut == hdr_vld_ut)
&& is_eq(prev_hdr_lat, hdr_lat)
&& is_eq(prev_hdr_lon, hdr_lon)
Expand All @@ -1915,6 +1909,7 @@ void process_pbfile(int i_pb) {
pqtzuv_list.clear();
pqtzuv_map_tq.clear();
pqtzuv_map_uv.clear();
pbl_qm = bad_data_float;
}
//is_same_header = false;
prev_hdr_vld_ut = hdr_vld_ut;
Expand Down

0 comments on commit 06977f9

Please sign in to comment.