Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 2028 madis2nc profiler qc #2035

Merged
merged 6 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 3 additions & 29 deletions met/src/libcode/vx_nc_obs/met_point_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ void MetPointData::init_from_scratch() {
}


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

//void MetPointData::allocate() {
// obs_data.allocate();
//}

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

void MetPointData::clear() {
Expand Down Expand Up @@ -178,18 +172,10 @@ MetPointDataPython::MetPointDataPython() {

MetPointDataPython::MetPointDataPython(MetPointDataPython &d) {
init_from_scratch();
//obs_data = d.get_point_obs_data();
//header_data = d.get_header_data();
obs_data->assign(*d.get_point_obs_data());
obs_data = new MetPointObsData();
MetPointObsData *from_obs_data = d.get_point_obs_data();
if (from_obs_data) obs_data->assign(*from_obs_data);
header_data.assign(*d.get_header_data());
cout << " DEBUG HS MetPointData(MetPointData &d) is called \n";
cout << " DEBUG HS MetPointData(MetPointData &d) &header_data.lat_array=" << &(header_data.lat_array) << "\n";
cout << " DEBUG HS MetPointData(MetPointData &d) header_data.lat_array.n()=" << header_data.lat_array.n() << "\n";
cout << " DEBUG HS MetPointData(MetPointData &d) header_data.lon_array.n()=" << header_data.lon_array.n() << "\n";
cout << " DEBUG HS MetPointData(MetPointData &d) header_data.elv_array.n()=" << header_data.elv_array.n() << "\n";
cout << " DEBUG HS MetPointData(MetPointData &d) header_data.typ_idx_array.n()=" << header_data.typ_idx_array.n() << "\n";
cout << " DEBUG HS MetPointData(MetPointData &d) header_data.sid_idx_array.n()=" << header_data.sid_idx_array.n() << "\n";
cout << " DEBUG HS MetPointData(MetPointData &d) header_data.vld_idx_array.n()=" << header_data.vld_idx_array.n() << "\n";
}


Expand All @@ -199,17 +185,6 @@ MetPointDataPython::~MetPointDataPython() {
clear();
}

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

//void MetPointDataPython::init_from_scratch() {
// nobs = 0;
// nhdr = 0;
// qty_length = 0;
//
// use_var_id = false;
// use_arr_vars = false;
//}


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

Expand Down Expand Up @@ -434,4 +409,3 @@ void MetPointHeader::reset_counters() {
}

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

2 changes: 0 additions & 2 deletions met/src/libcode/vx_pointdata_python/pointdata_python.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ mlog << Error << "\nMetPythonPointDataFile::operator=(const MetPythonPointDataFi

exit ( 1 );

return ( * this );

}


Expand Down
4 changes: 2 additions & 2 deletions met/src/tools/other/madis2nc/madis2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2114,10 +2114,10 @@ void process_madis_profiler(NcFile *&f_in) {
dim[1] = nlvl;
get_nc_data(&var_levels, (float *)levels_arr, dim, cur);

if (IS_VALID_NC(in_uComponentQty_var)) get_nc_data(&in_uComponentQty_var, (char *)uComponentQty_arr, buf_size, i_hdr_s);
if (IS_VALID_NC(in_uComponentQty_var)) get_nc_data(&in_uComponentQty_var, (char *)uComponentQty_arr, dim, cur);
else memset(uComponentQty_arr, 0, buf_size*dim[1]*sizeof(char));

if (IS_VALID_NC(in_vComponentQty_var)) get_nc_data(&in_vComponentQty_var, (char *)vComponentQty_arr, buf_size, i_hdr_s);
if (IS_VALID_NC(in_vComponentQty_var)) get_nc_data(&in_vComponentQty_var, (char *)vComponentQty_arr, dim, cur);
else memset(vComponentQty_arr, 0, buf_size*dim[1]*sizeof(char));

get_filtered_nc_data_2d(in_uComponent_var, (float *)uComponent_arr, dim, cur, "uComponent");
Expand Down
14 changes: 7 additions & 7 deletions met/src/tools/other/mode_time_domain/mtd_file_int.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1206,19 +1206,19 @@ if ( Nobjects == 0 ) return;

old.ObjVolume = new int [Nobjects];

d = old.Data;

for (j=0; j<Nobjects; ++j) old.ObjVolume[j] = 0;

d = old.Data;
if (d) {
for (j=0; j<Nxyt; ++j, ++d) {

for (j=0; j<Nxyt; ++j, ++d) {

k = (int) (*d);
k = (int) (*d);

if ( k == 0 ) continue;
if ( k == 0 ) continue;

old.ObjVolume[k - 1] += 1;
old.ObjVolume[k - 1] += 1;

}
}


Expand Down
15 changes: 10 additions & 5 deletions met/src/tools/other/pb2nc/pb2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1995,11 +1995,16 @@ void process_pbfile(int i_pb) {
}

if(i_msg <= 0) {
mlog << Warning << "\n" << method_name
<< ((n_derived_obs > 0) ? "Saved the derived variables only. " : " ")
<< "No " << (is_prepbufr ? "PrepBufr" : "Bufr")
<< " messages retained from file: "
<< pbfile[i_pb] << "\n\n";
if (n_derived_obs > 0)
mlog << Debug(3) << method_name
<< "Saved the derived variables only. No " << (is_prepbufr ? "PrepBufr" : "Bufr")
<< " messages retained from file: "
<< pbfile[i_pb] << "\n";
else
mlog << Warning << "\n" << method_name
<< "No " << (is_prepbufr ? "PrepBufr" : "Bufr")
<< " messages retained from file: "
<< pbfile[i_pb] << "\n\n";
}

return;
Expand Down