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

Bugfix #2525 nhdr 1 off #2529

Merged
merged 3 commits into from
Apr 28, 2023
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
8 changes: 4 additions & 4 deletions scripts/python/met/dataplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ def write_dataplane(met_in, netcdf_filename):
met_info['attrs'] = attrs

# determine fill value
try:
fill = met_in.met_data.get_fill_value()
except:
fill = -9999.
#try:
# fill = met_in.met_data.get_fill_value()
#except:
fill = -9999.

# write NetCDF file
ds = nc.Dataset(netcdf_filename, 'w')
Expand Down
9 changes: 4 additions & 5 deletions scripts/python/pyembed/python_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def add_python_path(called_file): # called_file = __file__
met_base_dir = os.environ.get('MET_BASE', None)
if met_base_dir is not None:
met_python_path = os.path.join(met_base_dir, 'python')
if pyembed_tools.debug:
print(f"{method_name} added python path {os.path.abspath(met_python_path)} from MET_BASE")
sys.path.append(os.path.abspath(met_python_path))
if os.path.exists(met_python_path):
if pyembed_tools.debug:
print(f"{method_name} added python path {os.path.abspath(met_python_path)} from MET_BASE")
sys.path.append(os.path.abspath(met_python_path))

# add share/met/python directory to system path
met_python_path = os.path.join(script_dir, os.pardir, 'python')
Expand All @@ -50,8 +51,6 @@ def add_python_path(called_file): # called_file = __file__
if pyembed_tools.debug:
print(f"{method_name} added python path {os.path.abspath(met_python_path)}")
sys.path.append(os.path.abspath(met_python_path))
else:
print(" - {d} does not exist".format(d=met_python_path))

@staticmethod
def call_python(argv):
Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_pointdata_python/python_pointdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ bool process_point_data_list(PyObject *python_point_data, MetPointDataPython &me
<< "The header is empty. Please check the python script and input\n\n";
exit (1);
}
met_pd_out.set_hdr_cnt(hid);
met_pd_out.set_hdr_cnt(hid + 1);

check_obs_data(obs_data, use_var_id, method_name);
check_header_data(header_data, method_name);
Expand Down