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

add dropna calls

parent a435c7a3
No related branches found
No related tags found
3 merge requests!522filter can now combine obs, forecast, and apriori for first iteration. Further...,!521Resolve "release v2.4.0",!513Resolve "robust apriori estimate for short timeseries"
Pipeline #140031 failed
......@@ -382,7 +382,7 @@ class ClimateFIRFilter(FIRFilter):
monthly_mean.sel(month=month, drop=True),
monthly)
# transform monthly information into original sampling rate
return monthly.resample({time_dim: sampling}).interpolate()
return monthly.dropna(dim=time_dim).resample({time_dim: sampling}).interpolate()
@staticmethod
def _compute_hourly_mean_per_month(data: xr.DataArray, time_dim: str, as_anomaly: bool) -> Dict[int, xr.DataArray]:
......@@ -422,7 +422,7 @@ class ClimateFIRFilter(FIRFilter):
for month in means.keys():
hourly_mean_single_month = means[month].sel(hour=hour, drop=True)
h_coll = xr.where((h_coll[f"{time_dim}.month"] == month), hourly_mean_single_month, h_coll)
h_coll = h_coll.resample({time_dim: sampling}).interpolate()
h_coll = h_coll.dropna(time_dim).resample({time_dim: sampling}).interpolate()
h_coll = h_coll.sel({time_dim: (h_coll[f"{time_dim}.hour"] == hour)})
return h_coll
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment