DiagnosticSuite#

class rojak.turbulence.diagnostic.DiagnosticSuite(_factory, _diagnostics)[source]#

A collection of computed turbulence diagnostics

The diagnostics can either be freshly computed via a DiagnosticFactory, or reloaded from an xarray.Dataset (e.g. as read back from zarr by load_from_zarr()) containing already-computed values.

Parameters:
__init__(_factory, _diagnostics)[source]#
__init__(factory, diagnostics)
__init__(factory, diagnostics)
Parameters:
Raises:

TypeError – If _factory is not a DiagnosticFactory or xarray.Dataset

Return type:

None

Methods

__init__()

as_dataset()

Combine every diagnostic's computed value into a single Dataset

computed_values(progress_description)

Iterate over the name and computed value of each diagnostic in the suite

computed_values_as_dict()

Same as computed_values(), collected eagerly into a dict (without a progress bar)

diagnostic_names()

Names of the diagnostics in the suite

export_as_zarr(output_path, /, *[, zarr_format])

Export every diagnostic's computed value (see as_dataset()) to a zarr store

get_prototype_computed_diagnostic()

An arbitrary diagnostic's computed value, used where any one diagnostic's shape/coords will do

load_from_zarr(path, target_diagnostics, *)

Construct a DiagnosticSuite from a zarr store of previously-exported diagnostic values