xarray_beam.Dataset.rechunk

Dataset.rechunk(chunks, split_vars=None, min_mem=None, max_mem=1073741824, *, label=None)[source]

Rechunk this Dataset.

Parameters:
  • chunks (Mapping[str | EllipsisType, int | str] | int | str) – new chunk sizes, either a dict mapping from dimension name to chunk size, or any value that can be passed to xarray_beam.normalize_chunks().

  • split_vars (bool | None) – whether variables should be split across chunks in the ptransform, or all stored in the same chunks. By default, the current value of split_vars is preserved.

  • min_mem (int | None) – optional minimum memory usage for an intermediate chunk in rechunking. Defaults to max_mem/100.

  • max_mem (int) – optional maximum memory usage for an intermediate chunk in rechunking. Defaults to 1GB.

  • label (str | None) – A unique name for this stage of the pipeline. Defaults to None, in which case a name will be generated.

Returns:

New Dataset with updated chunks.

Return type:

Dataset