Skip to content

Commit

Permalink
#1965 Use the output variable name for time summary
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Jan 12, 2022
1 parent 717dd17 commit decebfd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions met/src/tools/other/ioda2nc/ioda2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ void process_ioda_file(int i_pb) {
IntArray diff_file_times;
int diff_file_time_count;
StringArray variables_big_nlevels;
static const char *method_name = "process_ioda_file() ->";
static const char *method_name = "process_ioda_file() -> ";
static const char *method_name_s = "process_ioda_file() ";

bool apply_grid_mask = (conf_info.grid_mask.nx() > 0 &&
Expand Down Expand Up @@ -961,15 +961,18 @@ void addObservation(const float *obs_arr, const ConcatString &hdr_typ,
else obs_qty.format("%d", nint(quality_mark));

int var_index = obs_arr[1];
map<ConcatString,ConcatString> name_map = conf_info.getObsVarMap();
string var_name = obs_var_names[var_index];
string out_name = name_map[var_name];
cout << " DEBUG HS var_name: " << var_name << ", out_name: " << out_name << ", passing: " << (0<out_name.length() ? out_name : var_name) << "\n";
Observation obs = Observation(hdr_typ.text(),
hdr_sid.text(),
hdr_vld,
hdr_lat, hdr_lon, hdr_elv,
obs_qty.text(),
var_index,
obs_arr[2], obs_arr[3], obs_arr[4],
var_name);
(0<out_name.length() ? out_name : var_name));
obs.setHeaderIndex(obs_arr[0]);
observations.push_back(obs);
if(do_summary) summary_obs->addObservationObj(obs);
Expand Down

0 comments on commit decebfd

Please sign in to comment.