data_source¶
Data source helper class.
Functions
Enable COSMO GRIB definitions. |
|
|
Classes
|
|
|
|
|
|
|
|
|
- class meteodatalab.data_source.DataSource(request_template: dict[str, typing.Any] = <factory>)[source]¶
- retrieve(request: dict[str, Any] | str | tuple[str, str] | Request) Iterator [source]¶
- retrieve(request: dict) Iterator
- retrieve(request: Request) Iterator
- retrieve(request: str) Iterator
- retrieve(request: tuple) Iterator
Stream GRIB fields from files or FDB.
Request for data from the source in the mars language.
Simple strings are interpreted as param filters and pairs of strings are interpreted as param and levtype filters.
Key value pairs from the request_template attribute are used as default values. Note that the default values in the mars request passed as an input will take precedence on the template values.
- Parameters:
request (dict | str | tuple[str, str] | meteodatalab.mars.Request) – Request for data from the source in the mars language.
- Yields:
GribField – GribField instances containing the requested data.
- class meteodatalab.data_source.FDBDataSource(request_template: dict[str, typing.Any] = <factory>)[source]¶
- class meteodatalab.data_source.FileDataSource(request_template: dict[str, typing.Any] = <factory>, datafiles: list[str] | None = None)[source]¶
- class meteodatalab.data_source.PolytopeDataSource(request_template: dict[str, typing.Any] = <factory>, polytope_collection: str | None = None)[source]¶