From 1f1e658d7b0457a2268eaac2a820d89002ea78f8 Mon Sep 17 00:00:00 2001 From: leufen1 <l.leufen@fz-juelich.de> Date: Wed, 19 May 2021 10:20:16 +0200 Subject: [PATCH] add another gc collect --- mlair/helpers/filter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mlair/helpers/filter.py b/mlair/helpers/filter.py index 2fe95ebb..3cb07140 100644 --- a/mlair/helpers/filter.py +++ b/mlair/helpers/filter.py @@ -423,8 +423,10 @@ class ClimateFIRFilter: # combine historical data / observation [t0-length,t0] and climatological statistics [t0+1,t0+length] logging.info(f"{data.coords['Stations'].values[0]} ({var}): history") history = self._shift_data(d, range(int(-(length - 1) / 2), 1), time_dim, var_dim, new_dim) + gc.collect() logging.info(f"{data.coords['Stations'].values[0]} ({var}): future") future = self._shift_data(a, range(1, int((length - 1) / 2) + 1), time_dim, var_dim, new_dim) + gc.collect() logging.info(f"{data.coords['Stations'].values[0]} ({var}): concat to filter input") filter_input_data = xr.concat([history.dropna(time_dim), future], dim=new_dim, join="left") # filter_input_data = history.combine_first(future) -- GitLab