From c764560c5db28fa1d48f67fb0c44e144be7dff16 Mon Sep 17 00:00:00 2001 From: Baptiste Vandecrux <35140661+BaptisteVandecrux@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:58:33 +0100 Subject: [PATCH] fixed unintended removal of rh_*_ice_or_water from the daily and monthly dataset --- src/pypromice/process/write.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pypromice/process/write.py b/src/pypromice/process/write.py index 77e24863..181ed045 100644 --- a/src/pypromice/process/write.py +++ b/src/pypromice/process/write.py @@ -100,14 +100,14 @@ def prepare_and_write( elif t == 86400: # removing instantaneous values from daily and monthly files for v in col_names: - if ("_i" in v) and ("_i_" not in v): + if v in ['p_i', 't_i', 'rh_i', 'wspd_i', 'wdir_i', 'wspd_x_i', 'wspd_y_i']: col_names.remove(v) out_csv = output_dir / f"{name}_day.csv" out_nc = output_dir / f"{name}_day.nc" else: # removing instantaneous values from daily and monthly files for v in col_names: - if ("_i" in v) and ("_i_" not in v): + if v in ['p_i', 't_i', 'rh_i', 'wspd_i', 'wdir_i', 'wspd_x_i', 'wspd_y_i']: col_names.remove(v) out_csv = output_dir / f"{name}_month.csv" out_nc = output_dir / f"{name}_month.nc"