From b71160f73bd3fd5df01c9fc26763a6c098d2e90b Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 2 May 2024 20:08:41 +0000 Subject: [PATCH] fix logic to build pandas DataFrame to properly get header information from observation header IDs --- scripts/python/met/point_nc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/python/met/point_nc.py b/scripts/python/met/point_nc.py index 062b5cbbdd..d3dfc4220c 100644 --- a/scripts/python/met/point_nc.py +++ b/scripts/python/met/point_nc.py @@ -285,12 +285,12 @@ def write_nc_data(nc_dataset, point_obs): def to_pandas(self): return pd.DataFrame({ - 'typ': [self.hdr_typ_table[i] for i in self.hdr_typ], - 'sid': [self.hdr_sid_table[i] for i in self.hdr_sid], - 'vld': [self.hdr_vld_table[i] for i in self.hdr_vld], - 'lat': self.hdr_lat, - 'lon': self.hdr_lon, - 'elv': self.hdr_elv, + 'typ': [self.hdr_typ_table[self.hdr_typ[i]] for i in self.obs_hid], + 'sid': [self.hdr_sid_table[self.hdr_sid[i]] for i in self.obs_hid], + 'vld': [self.hdr_vld_table[self.hdr_vld[i]] for i in self.obs_hid], + 'lat': [self.hdr_lat[i] for i in self.obs_hid], + 'lon': [self.hdr_lon[i] for i in self.obs_hid], + 'elv': [self.hdr_elv[i] for i in self.obs_hid], 'var': [self.obs_var_table[i] if self.use_var_id else f'{i}' for i in self.obs_vid], 'lvl': self.obs_lvl,