Skip to content

Commit

Permalink
#2278 Rollback and 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 3, 2022
1 parent 06977f9 commit 627a96c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tools/other/pb2nc/pb2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ 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 @@ -1351,6 +1352,9 @@ void process_pbfile(int i_pb) {
}

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

// Search through the vertical levels
for(lv=0, n_hdr_obs = 0; lv<buf_nlev; lv++) {
Expand Down Expand Up @@ -1889,6 +1893,7 @@ 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 Down

0 comments on commit 627a96c

Please sign in to comment.