Skip to content

Commit 044717d

Browse files
committed
Minor fixes
1 parent 6c3d2e0 commit 044717d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

unseen/eva.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ def gev_return_curve(
11761176
np.isfinite(boot_event_return_periods)
11771177
]
11781178
event_return_period_lower_ci = np.quantile(boot_event_return_periods, q)
1179-
event_return_period_upper_ci = np.quantile(boot_event_return_periods, q - 1)
1179+
event_return_period_upper_ci = np.quantile(boot_event_return_periods, 1 - q)
11801180
event_data = (
11811181
event_return_period,
11821182
event_return_period_lower_ci,

unseen/fileio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ def open_dataset(
253253
if no_leap_days:
254254
ds = ds.sel(time=~((ds[time_dim].dt.month == 2) & (ds[time_dim].dt.day == 29)))
255255
if rolling_sum_window:
256+
ds = ds.compute()
256257
ds = ds.rolling({time_dim: rolling_sum_window}).sum(dim=time_dim)
257258
if time_freq:
258259
assert time_agg, "Provide a time_agg"

unseen/process_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def count_months(event_months):
6060
return counts
6161

6262

63-
def plot_event_seasonality(ds, ax=None, core_dim=None, outfile=None):
63+
def plot_event_seasonality(ds, ax=None, core_dim="time", outfile=None):
6464
"""Plot event seasonality
6565
6666
Parameters

0 commit comments

Comments
 (0)