diff --git a/scripts/python/met_point_obs.py b/scripts/python/met_point_obs.py index 458a91572c..062e815b14 100755 --- a/scripts/python/met_point_obs.py +++ b/scripts/python/met_point_obs.py @@ -242,6 +242,7 @@ def log_info(self, info_msg): base_met_point_obs.info_msg(info_msg) def put_data(self, point_obs_dict): + self.use_var_id = point_obs_dict['use_var_id'] self.hdr_typ = point_obs_dict['hdr_typ'] self.hdr_sid = point_obs_dict['hdr_sid'] self.hdr_vld = point_obs_dict['hdr_vld'] @@ -446,6 +447,7 @@ def convert_point_data(self): hdr_vld_map = {} obs_var_map = {} obs_qty_map = {} + self.use_var_id = not self.is_grib_code() self.use_var_id = not self.is_grib_code() diff --git a/scripts/python/met_point_obs_nc.py b/scripts/python/met_point_obs_nc.py index cb86be5011..e6680c0689 100644 --- a/scripts/python/met_point_obs_nc.py +++ b/scripts/python/met_point_obs_nc.py @@ -64,6 +64,11 @@ def read_data(self, nc_filename): self.log_error_msg(f"input NetCDF file ({nc_filename}) does not exist") else: dataset = nc.Dataset(nc_filename, 'r') + + attr_name = 'use_var_id' + use_var_id_str = dataset.getncattr(attr_name) if attr_name in dataset.ncattrs() else "false" + self.use_var_id = use_var_id_str.lower() == 'true' + # Header self.hdr_typ = dataset['hdr_typ'][:] self.hdr_sid = dataset['hdr_sid'][:]