diff --git a/scripts/python/met/dataplane.py b/scripts/python/met/dataplane.py index a9aed943b6..3da0e8b9e4 100644 --- a/scripts/python/met/dataplane.py +++ b/scripts/python/met/dataplane.py @@ -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') diff --git a/scripts/python/pyembed/python_embedding.py b/scripts/python/pyembed/python_embedding.py index 434679b185..5240eb1120 100644 --- a/scripts/python/pyembed/python_embedding.py +++ b/scripts/python/pyembed/python_embedding.py @@ -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') @@ -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): diff --git a/src/libcode/vx_pointdata_python/python_pointdata.cc b/src/libcode/vx_pointdata_python/python_pointdata.cc index 4b3834a1d2..cef71163a5 100644 --- a/src/libcode/vx_pointdata_python/python_pointdata.cc +++ b/src/libcode/vx_pointdata_python/python_pointdata.cc @@ -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);