Skip to content

Commit

Permalink
Merge pull request #2773 from dtcenter/bugfix_2755_python_emb_for_sin…
Browse files Browse the repository at this point in the history
…gle_point_obs_main_v11.1

Bugfix #2755 header counter main_v11.1
  • Loading branch information
hsoh-u authored Jan 22, 2024
2 parents 3756107 + b9702a8 commit aab399e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/libcode/vx_pointdata_python/python_pointdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -405,16 +405,17 @@ bool process_point_data_list(PyObject *python_point_data, MetPointDataPython &me

} // for j

met_pd_out.set_use_var_id(use_var_id);
mlog << Debug(9) << method_name << "use_var_id: \"" << use_var_id
<< "\" from python. is_using_var_id(): " << met_pd_out.is_using_var_id() << "\n";

if (hid <= 0) {
int h_cnt = hid + 1; // hid starts with -1
if (h_cnt < 0) {
mlog << Error << "\n" << method_name
<< "The header is empty. Please check the python script and input\n\n";
exit (1);
}
met_pd_out.set_hdr_cnt(hid + 1);
met_pd_out.set_hdr_cnt(h_cnt);

met_pd_out.set_use_var_id(use_var_id);
mlog << Debug(9) << method_name << "use_var_id: \"" << use_var_id
<< "\" from python. is_using_var_id(): " << met_pd_out.is_using_var_id() << "\n";

check_obs_data(obs_data, use_var_id, method_name);
check_header_data(header_data, method_name);
Expand Down Expand Up @@ -613,8 +614,8 @@ command << cs_erase
<< replace_path(python_dir)
<< "\")";
run_python_string(command.text());
mlog << Debug(1) << method_name << "added python path ("
<< python_dir << ") to python interpreter\n";
mlog << Debug(3) << method_name << "added python path ("
<< replace_path(python_dir) << ") to python interpreter\n";

//setenv(env_PYTHONPATH, python_dir.c_str(),1);

Expand Down

0 comments on commit aab399e

Please sign in to comment.