Skip to content

Commit

Permalink
--fanout FLAG added to [weatherbench2]/scripts/compute_zonal_energy_s…
Browse files Browse the repository at this point in the history
…pectrum

PiperOrigin-RevId: 575340755
  • Loading branch information
langmore authored and Weatherbench2 authors committed Oct 20, 2023
1 parent 58d6f14 commit 131e05e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/compute_zonal_energy_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
' average.'
),
)
FANOUT = flags.DEFINE_integer(
'fanout',
None,
help='Beam CombineFn fanout. Might be required for large dataset.',
)

RUNNER = flags.DEFINE_string('runner', None, 'beam.runners.Runner')

Expand Down Expand Up @@ -199,7 +204,7 @@ def main(argv: list[str]) -> None:
)
| xbeam.SplitVariables()
| beam.MapTuple(_strip_offsets)
| xbeam.Mean(AVERAGING_DIMS.value)
| xbeam.Mean(AVERAGING_DIMS.value, fanout=FANOUT.value)
| xbeam.ChunksToZarr(
OUTPUT_PATH.value, template, output_chunks, num_threads=16
)
Expand Down

0 comments on commit 131e05e

Please sign in to comment.