Skip to content

Commit a5d30f9

Browse files
ilopezgpWeatherbench2 authors
authored and
Weatherbench2 authors
committed
[weatherbench2] Add Gaussian flag to evaluation script.
PiperOrigin-RevId: 597842449
1 parent 3e4f392 commit a5d30f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/evaluate.py

+15
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@
174174
_DEFAULT_VARIABLES,
175175
help='Comma delimited list of variables to select from weather.',
176176
)
177+
AUX_VARIABLES = flags.DEFINE_list(
178+
'aux_variables',
179+
None,
180+
help='Comma delimited list of auxiliary variables for metric evaluation.',
181+
)
177182
DERIVED_VARIABLES = flags.DEFINE_list(
178183
'derived_variables',
179184
[],
@@ -268,6 +273,7 @@ def main(argv: list[str]) -> None:
268273
"""Run all WB2 metrics."""
269274
selection = config.Selection(
270275
variables=VARIABLES.value,
276+
aux_variables=AUX_VARIABLES.value,
271277
levels=[int(level) for level in LEVELS.value],
272278
time_slice=slice(TIME_START.value, TIME_STOP.value),
273279
)
@@ -521,6 +527,15 @@ def main(argv: list[str]) -> None:
521527
probabilistic_climatology_hour_interval=PROBABILISTIC_CLIMATOLOGY_HOUR_INTERVAL.value,
522528
output_format='zarr',
523529
),
530+
'gaussian': config.Eval(
531+
metrics={
532+
'crps': metrics.GaussianCRPS(),
533+
'ensemble_variance': metrics.GaussianVariance(),
534+
},
535+
against_analysis=False,
536+
regions=regions,
537+
derived_variables=derived_variables,
538+
),
524539
}
525540
if not set(EVAL_CONFIGS.value.split(',')).issubset(eval_configs):
526541
raise flags.UnrecognizedFlagError(

0 commit comments

Comments
 (0)