API reference#
earthcarekit.workflow
Provides high-level workflows that combine multiple operations into convenient, single-call interfaces.
Notes#
This module depends on other internal modules:
eclazy
#
eclazy(
type_or_path: str | PathLike,
frame_or_time: str | TimestampLike | None = None,
baseline: str | None = None,
*,
path_to_data: str | None = None,
search_mode: Literal["exhaustive", "fast"] = "exhaustive",
download: bool = False,
verbose: bool = False,
return_path: Literal[False] = ...,
**kwargs
) -> LazyDataset
eclazy(
type_or_path: str | PathLike,
frame_or_time: str | TimestampLike | None = None,
baseline: str | None = None,
*,
path_to_data: str | None = None,
search_mode: Literal["exhaustive", "fast"] = "exhaustive",
download: bool = False,
verbose: bool = False,
return_path: Literal[True] = ...,
**kwargs
) -> str
eclazy(
type_or_path: str | PathLike,
frame_or_time: str | TimestampLike | None = None,
baseline: str | None = None,
*,
path_to_data: str | None = None,
search_mode: Literal["exhaustive", "fast"] = "exhaustive",
download: bool = False,
verbose: bool = False,
return_path: bool = False,
**kwargs
) -> LazyDataset | str
Locate, download (if needed), and open an EarthCARE product as a LazyDataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_or_path
|
str | PathLike
|
Product name (e.g., "ATL_EBD_2A", "ATL_EBD_2A:BA") or file path. If path, loads directly. |
required |
frame_or_time
|
str | TimestampLike | None
|
Orbit frame (e.g., "01234B") or timestamp (e.g., "2024-09-02 21:04:37").
Required when |
None
|
baseline
|
str | None
|
Two-letter processor baseline. Ignored if already in |
None
|
path_to_data
|
str | None
|
Root search directory; defaults to config value if None. |
None
|
search_mode
|
Literal['exhaustive', 'fast']
|
Search strategy: "exhaustive" (recursive scan) or "fast" (expected paths only). Defaults to "exhaustive". |
'exhaustive'
|
download
|
bool
|
Download missing files if True; raise |
False
|
verbose
|
bool
|
Print logs to console if True. |
False
|
return_path
|
bool
|
If True, return the file path instead of loading the dataset. |
False
|
Returns:
| Type | Description |
|---|---|
LazyDataset | str
|
The opened EarthCARE product (default) or file path (str) if |
See Also
ecload(): Opens file as xarray.Dataset.
Examples:
Source code in earthcarekit/workflow/load/_eclazy.py
ecload
#
ecload(
type_or_path: str | PathLike,
frame_or_time: str | TimestampLike | None = None,
baseline: str | None = None,
*,
path_to_data: str | None = None,
search_mode: Literal["exhaustive", "fast"] = "exhaustive",
download: bool = False,
verbose: bool = False,
return_path: Literal[False] = ...,
**kwargs
) -> Dataset
ecload(
type_or_path: str | PathLike,
frame_or_time: str | TimestampLike | None = None,
baseline: str | None = None,
*,
path_to_data: str | None = None,
search_mode: Literal["exhaustive", "fast"] = "exhaustive",
download: bool = False,
verbose: bool = False,
return_path: Literal[True] = ...,
**kwargs
) -> str
ecload(
type_or_path: str | PathLike,
frame_or_time: str | TimestampLike | None = None,
baseline: str | None = None,
*,
path_to_data: str | None = None,
search_mode: Literal["exhaustive", "fast"] = "exhaustive",
download: bool = False,
verbose: bool = False,
return_path: bool = False,
**kwargs
) -> Dataset | str
Locate, download (if needed), and open an EarthCARE product as a xarray.Dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_or_path
|
str | PathLike
|
Product name (e.g., "ATL_EBD_2A", "ATL_EBD_2A:BA") or file path. If path, loads directly. |
required |
frame_or_time
|
str | TimestampLike | None
|
Orbit frame (e.g., "01234B") or timestamp (e.g., "2024-09-02 21:04:37").
Required when |
None
|
baseline
|
str | None
|
Two-letter processor baseline. Ignored if already in |
None
|
path_to_data
|
str | None
|
Root search directory; defaults to config value if None. |
None
|
search_mode
|
Literal['exhaustive', 'fast']
|
Search strategy: "exhaustive" (recursive scan) or "fast" (expected paths only). Defaults to "exhaustive". |
'exhaustive'
|
download
|
bool
|
Download missing files if True; raise |
False
|
verbose
|
bool
|
Print logs to console if True. |
False
|
return_path
|
bool
|
If True, return the file path instead of loading the dataset. |
False
|
Returns:
| Type | Description |
|---|---|
Dataset | str
|
The opened EarthCARE product (default) or file path (str) if |
See Also
eclazy(): Opens file as LazyDataset.
Examples:
These examples all yield the same dataset:
>>> ds = eck.ecload("ATL_EBD_2A", "2024-09-02 21:04:37")
>>> ds = eck.ecload("ATL_EBD_2A", "01508B")
>>> ds = eck.ecload("A-EBD", "01508B")
>>> ds = eck.ecload("aebd", "01508B")
You may specifify the desired baseline of a product like this:
Or using the colon syntax, e.g.: