From b39783f9c886c1ddd1103d39a73a6e51764d2faa Mon Sep 17 00:00:00 2001 From: Felix Kleinert <f.kleinert@fz-juelich.de> Date: Fri, 12 Aug 2022 14:33:54 +0200 Subject: [PATCH] add try exept statement to full crps --- mlair/run_modules/post_processing.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mlair/run_modules/post_processing.py b/mlair/run_modules/post_processing.py index 59abe4d6..feee0782 100644 --- a/mlair/run_modules/post_processing.py +++ b/mlair/run_modules/post_processing.py @@ -246,12 +246,16 @@ class PostProcessing(RunEnvironment): path_config.check_path_and_create(report_path) self.store_crps_reports(df_stations, report_path, subset, station=True) - full_ens = xr.concat(collector_ens, dim=self.index_dim) - full_obs = xr.concat(collector_obs, dim=self.index_dim) - df_tot = pd.DataFrame(self._calc_crps_for_lead_times(full_ens, full_obs), index=to_list(subset)) - self.store_crps_reports(df_tot, report_path, subset, station=False) + try: + full_ens = xr.concat(collector_ens, dim=self.index_dim) + full_obs = xr.concat(collector_obs, dim=self.index_dim) + df_tot = pd.DataFrame(self._calc_crps_for_lead_times(full_ens, full_obs), index=to_list(subset)) + self.store_crps_reports(df_tot, report_path, subset, station=False) + except Exception as e: + logging.info(f"Can't calc crps for all stations together due to: {e}") + @TimeTrackingWrapper def _calc_crps_for_lead_times(self, ens, obs): crps_collector = {} for i in range(1, self.window_lead_time + 1): -- GitLab