Configuration (rojak.orchestrator.configuration)#

Pydantic schema for the YAML configuration consumed by rojak run (rojak.cli.main.run())

Context, loaded via BaseConfigModel.from_yaml(), is the root of the configuration tree and describes an entire run: where to write output (Context), what turbulence analysis to perform (TurbulenceConfig, TurbulencePhases), and what input data to use (DataConfig, MeteorologyConfig, AmdarConfig). Where meteorological data lives is described by a DataLocation, and which MetData adapter reads it by MetDataSource (see rojak.datalib.registry).

Turbulence analysis is split into a calibration stage (TurbulenceCalibrationPhases, deriving thresholds and EDR distribution parameters from a calibration dataset) and an evaluation stage (TurbulenceEvaluationPhases, applying those to an evaluation dataset), each made up of a configurable list of phases (TurbulenceCalibrationPhaseOption, TurbulenceEvaluationPhaseOption). Most classes in this module validate that the configuration is internally consistent (e.g. that a phase’s dependencies are also configured) and raise InvalidConfigurationError if not.

Functions

fold_legacy_data_dir(data, legacy_key, ...)

Rewrite a legacy <legacy_key>: <directory> entry into <new_key>'s MeteorologyConfig form

Classes

AggregationMetricOption(*values)

Metric used to aggregate a diagnostic's skill at classifying observed turbulence, within each spatial group

AmdarConfig(*, data_dir, data_source, ...[, ...])

Configuration for a directory of AMDAR turbulence observations, see DataConfig.amdar_config

AmdarDataSource(*values)

AMDAR turbulence observation provider, see rojak.datalib

AmdarDiagnosticCmpSource(*values)

Which stage's diagnostic values AMDAR observations are compared/harmonised against

BaseConfigModel()

Base class for every pydantic configuration model in this module, providing from_yaml()

BaseInputDataConfig(*, data_dir, data_source)

Base configuration for a directory of input data from a given provider T

BaseInputDataConfig[AmdarDataSource](*, ...)

Base configuration for a directory of input data from a given provider T

Context(*, name, image_format, output_dir, ...)

Root configuration for a rojak run invocation (rojak.cli.main.run()), loaded via BaseConfigModel.from_yaml()

ContrailModel(*values)

Contrail formation/persistence model (from pycontrails) to use

ContrailsConfig(*, contrail_model)

Top-level configuration for contrail analysis, see Context.contrails_config

DataConfig(*, spatial_domain[, ...])

Configuration for the input data (both meteorological and AMDAR observational) used by a run

DiagnosticValidationCondition(*, ...)

A single condition defining when an observed AMDAR column counts as turbulence, for diagnostic validation

DiagnosticValidationConfig(*, ...[, ...])

Configuration for validating turbulence diagnostics against observed AMDAR turbulence

JetStreamAlgorithms(*values)

Algorithm used to identify the jet stream from meteorological data

MetDataSource(*values)

Meteorological reanalysis data provider, see rojak.datalib.registry

MeteorologyConfig(*[, data_source, engine, ...])

A meteorological dataset: what it is (data_source, selecting the MetData adapter) and where it lives (location)

RelationshipBetweenTypes(*values)

Association measure to compute between two binary features, see rojak.turbulence.analysis.RelationshipBetweenFactory

SpatialDomain(*[, minimum_latitude, ...])

A rectangular (and optionally vertically-bounded) geographic domain to restrict data to

SpatialGroupByStrategy(*values)

How to group observations/diagnostic values spatially before aggregating validation statistics

TurbulenceCalibrationConfig(*[, ...])

Configuration for the turbulence calibration stage, see TurbulenceCalibrationPhases

TurbulenceCalibrationPhaseOption(*values)

A step of the turbulence calibration stage

TurbulenceCalibrationPhases(*, phases, ...)

The turbulence calibration stage: which phases to run, and the configuration they need

TurbulenceConfig(*, chunks, diagnostics, phases)

Top-level configuration for turbulence analysis, see Context.turbulence_config

TurbulenceDiagnostics(*values)

A clear-air turbulence (CAT) diagnostic to compute, see rojak.turbulence.diagnostic for each diagnostic's definition

TurbulenceEvaluationConfig(*, evaluation_data)

Configuration for the turbulence evaluation stage, see TurbulenceEvaluationPhases

TurbulenceEvaluationPhaseOption(*values)

A step of the turbulence evaluation stage, see TurbulenceEvaluationPhases

TurbulenceEvaluationPhases(*, phases, ...)

The turbulence evaluation stage: which phases to run, and the configuration they need

TurbulencePhases(*, calibration_phases[, ...])

The full turbulence workflow: a required calibration stage and an optional evaluation stage

TurbulenceSeverity(*values)

Turbulence intensity severity, in increasing order of intensity from LIGHT to SEVERE

TurbulenceThresholdMode(*values)

How a TurbulenceThresholds value determines whether a severity is present, see TurbulenceThresholds.get_bounds()

TurbulenceThresholds(*[, light, ...])

Threshold value for each turbulence severity, used to determine whether a diagnostic value counts as that severity

Exceptions

InvalidConfigurationError(message)

Raised when a configuration file is malformed or internally inconsistent