MetData#
- class rojak.core.data.MetData(longitude_name='longitude', latitude_name='latitude', *, persist=True)[source]#
Abstract base for a generic source of meteorological data
Subclasses are responsible for loading their own underlying data; this base class provides shared spatial domain selection (
select_domain()) and longitude wraparound handling (shift_ds_longitude()). Every subclass must implementto_clear_air_turbulence_data(), adapting its own underlying data into the commonCATData/CATPrognosticDatainterface. This is the extension point of the architecture: adding support for a new meteorological data source only requires a newMetDatasubclass that can produce aCATData, and every consumer downstream inrojak.turbulencekeeps working unchanged. Subclasses should build theCATDatawith_create_cat_data()so that it respectspersist.- __init__(longitude_name='longitude', latitude_name='latitude', *, persist=True)[source]#
- Parameters:
longitude_name (str) – Name of the longitude coordinate in the underlying data. Defaults to
"longitude".latitude_name (str) – Name of the latitude coordinate in the underlying data. Defaults to
"latitude".persist (bool) – Whether the
CATDataproduced byto_clear_air_turbulence_data()persists its fields, seeCATPrognosticData.__init__(). Defaults toTrue.
- Return type:
None
Methods
__init__([longitude_name, latitude_name, ...])select_domain(domain, data[, ...])Subset a Dataset to the given spatial (and, if specified, vertical) domain
shift_ds_longitude(data[, domain_bound, ...])See
shift_longitude(), using this instance's configured longitude coordinate nameto_clear_air_turbulence_data(domain)Build the
CATDatarequired byrojak.turbulencefrom this data source, overdomainAttributes
persistWhether the
CATDataproduced byto_clear_air_turbulence_data()persists its fields