weatherbench2.evaluation.evaluate_with_beam

weatherbench2.evaluation.evaluate_with_beam(data_config, eval_configs, *, input_chunks, runner, fanout=None, num_threads=None, argv=None)

Run evaluation with a Beam pipeline.

Will save a separate results NetCDF file for each config.Eval. An example for a results dataset with the respective dimensions is given below. Note that region and level are optional.

``` <xarray.Dataset> Dimensions: (lead_time: 21, region: 3, level: 3, metric: 2) Coordinates:

  • lead_time (lead_time) timedelta64[ns] 0 days 00:00:00 …

  • region (region) object ‘global’ ‘tropics’ ‘extra-tropics’

  • level (level) int32 500 700 850

  • metric (metric) object ‘rmse’ ‘acc’

Data variables:

geopotential (metric, region, lead_time, level) float64 … 2m_temperature (metric, region, lead_time) float64 0.6337 …

```

Parameters:
  • data_config (Data) – config.Data instance.

  • eval_configs (dict[str, weatherbench2.config.Eval]) – Dictionary of config.Eval instances.

  • input_chunks (Mapping[str, int]) – Chunking of input datasets.

  • runner (str) – Beam runner.

  • fanout (Optional[int]) – Beam CombineFn fanout.

  • num_threads (Optional[int]) – Number of threads to use for reading/writing data.

  • argv (Optional[list[str]]) – Other arguments to pass into the Beam pipeline.

Return type:

None