Skip to content
Snippets Groups Projects
Commit 1f1e658d authored by leufen1's avatar leufen1
Browse files

add another gc collect

parent 57999dac
Branches
Tags
5 merge requests!319add all changes of dev into release v1.4.0 branch,!318Resolve "release v1.4.0",!317enabled window_lead_time=1,!295Resolve "data handler FIR filter",!259Draft: Resolve "WRF-Datahandler should inherit from SingleStationDatahandler"
Pipeline #68069 passed
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment