Skip to content

Commit d29e269

Browse files
shoyerWeatherbench2 authors
authored andcommitted
Update compute_probabilistic_climatological_forecasts
PiperOrigin-RevId: 751507897
1 parent ebdf547 commit d29e269

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/compute_probabilistic_climatological_forecasts.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@
227227
# Determines how to form ensembles.
228228
DAY_WINDOW_SIZE = flags.DEFINE_integer(
229229
'day_window_size',
230-
10,
230+
15,
231231
help=(
232-
'Width of window (in days) to take samples from. Must be in [0, 2*364].'
232+
'Width of window (in days) to take samples from. Must be in [1, 2*364].'
233233
),
234234
)
235235
ENSEMBLE_SIZE = flags.DEFINE_integer(
@@ -412,10 +412,10 @@ def _get_sampled_init_times(
412412
"""
413413
rng = np.random.default_rng(seed)
414414

415-
if day_window_size > 2 * 364:
415+
if day_window_size <= 0 or day_window_size > 2 * 364:
416416
# This complicates the REFLECT_RANGE behavior, and no sensible human would
417417
# want this.
418-
raise ValueError(f'{day_window_size=} > 2 * 364, which is not allowed.')
418+
raise ValueError(f'{day_window_size=} not in [1, 2 * 364] but should be.')
419419

420420
# The scheme below samples uniformly over initial day (ignoring leap years).
421421
# Conceptually, think of each climatology year as a circle. The days

0 commit comments

Comments
 (0)