Registry (rojak.datalib.registry)#

Registry mapping each MetDataSource to the MetData adapter that reads it

This is the single place the orchestrators dispatch on the data source. Supporting a new meteorological data source requires a new MetData subclass, a new MetDataSource member, and a call to register_met_data_adapter(); no orchestration code needs to change.

load_cat_data() combines the two halves of loading: opening the data from wherever it lives (rojak.core.sources.open_dataset()) and adapting it into CATData.

Module Attributes

MetDataAdapter

Builds a MetData from the raw dataset (e.g. a MetData subclass itself).

Functions

get_met_data_adapter(source)

Look up the adapter registered for source

load_cat_data(config, domain, chunks)

Open the data described by config and adapt it into CATData over domain

register_met_data_adapter(source, adapter, *)

Register adapter as the way to read data from source