API reference
earthcarekit.download
A download tool for EarthCARE data based on ESA MAAP.
Notes
This module depends on other internal modules:
ecdownload
ecdownload(
file_type: str | list[str],
baseline: str | None = None,
orbit_number: int | list[int] | None = None,
start_orbit_number: int | None = None,
end_orbit_number: int | None = None,
frame_id: str | list[str] | None = None,
orbit_and_frame: str | list[str] | None = None,
start_orbit_and_frame: str | None = None,
end_orbit_and_frame: str | None = None,
timestamps: str | list[str] | None = None,
start_time: str | None = None,
end_time: str | None = None,
radius_search: tuple[RadiusMetersFloat, LatFloat, LonFloat] | list | None = None,
bounding_box: tuple[LatSFloat, LonWFloat, LatNFloat, LonEFloat] | list | None = None,
path_to_config: str | None = None,
path_to_data: str | None = None,
is_log: bool = False,
is_debug: bool = False,
is_download: bool = True,
is_overwrite: bool = False,
is_unzip: bool = True,
is_delete: bool = True,
is_create_subdirs: bool = True,
is_export_results: bool = False,
idx_selected_input: int | None = None,
is_organize_data: bool = False,
is_include_header: bool | None = None,
is_only_header: bool | None = None,
is_reversed_order: bool = False,
return_results: bool = False,
verbose: bool = True,
check_product_availability: bool = False,
) -> ProductDataFrame | None
EarthCARE Download Tool: Search for and download EarthCARE products from a ESA data distribution platform (OADS or MAAP).
The execution of this tool is divided into two parts:
- First, based on provided arguments search request will be send via the OpenSearch API of the ESA MAAP catalogue.
- Second, the resulting list of products is then downloaded from the configures download backend (OADS or MAAP). See:
- MAAP: portal.maap.eo.esa.int/earthcare
- OADS L1: ec-pdgs-dissemination1.eo.esa.int
- OADS L2: ec-pdgs-dissemination2.eo.esa.int
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_type
|
str | list[str]
|
Name(s) of EarthCARE product(s) to search for (e.g., "ATL_NOM_1B", "ANOM", or "A-NOM"). Note: Input string evaluation is not case sensitive. Also, product version may also be selected by adding a colon and the two-letter processor baseline after the name (e.g., "ANOM:BA"). |
required |
baseline
|
str | None
|
Two-letter processor baseline used as default for all given |
None
|
orbit_number
|
int | list[int] | None
|
Specific orbit number(s) to search for (e.g., 981 or [1000, 5000, ...]). Defaults to None. |
None
|
start_orbit_number
|
int | None
|
The lower limit of orbit numbers to search for (e.g., 5000). Defaults to None. |
None
|
end_orbit_number
|
int | None
|
The upper limit of orbit numbers to search for (e.g., 5003). Defaults to None. |
None
|
frame_id
|
str | list[str] | None
|
Frame ID letter(s) to search for (i.e., letters A to H). Defaults to None. |
None
|
orbit_and_frame
|
str | list[str] | None
|
Orbit and frame string(s) to search for (e.g., "01234F" or ["1000A", "5000C", ...]). Defaults to None. |
None
|
start_orbit_and_frame
|
str | None
|
The lower limit of orbit and frames to search for (e.g., "05000D"). Defaults to None. |
None
|
end_orbit_and_frame
|
str | None
|
The upper limit of orbit and frames to search for (e.g., "05003C"). Defaults to None. |
None
|
timestamps
|
str | list[str] | None
|
Search for data containing specific timestamp(s) (e.g. "2024-07-31 13:45" or "20240731T134500Z"). Defaults to None. |
None
|
start_time
|
str | None
|
The lower time limit for the search. Defaults to None. |
None
|
end_time
|
str | None
|
The upper time limit for the search. Defaults to None. |
None
|
radius_search
|
tuple[RadiusMetersFloat, LatFloat, LonFloat] | list | None
|
A tuple containing a radius (meters) and a lat/lon point to perform a geo radius search (e.g., 25000 51.35 12.43, i.e.,
|
None
|
bounding_box
|
tuple[LatSFloat, LonWFloat, LatNFloat, LonEFloat] | list | None
|
A tuple containing the extent for a bounding box geo search (e.g., [14.9, 37.7, 14.99, 37.78],
i.e., |
None
|
path_to_config
|
str | None
|
If provided, uses given config file instead of the default config. Defaults to None. |
None
|
path_to_data
|
str | None
|
If provided, downloads data to the given folder instead of the one defined in the config file. Defaults to None. |
None
|
is_log
|
bool
|
If True, creates a log file in a |
False
|
is_debug
|
bool
|
If True, shows debug logs in the console. Defaults to False. |
False
|
is_download
|
bool
|
If False, skips download part, but still performs search requests via the data dissemination platform API. Defaults to True. |
True
|
is_overwrite
|
bool
|
If True, downloads and overwrites files that already exist in the data directory instead of skipping them. Defaults to False. |
False
|
is_unzip
|
bool
|
If False, skips file extraction for downloaded archives. Defaults to True. |
True
|
is_delete
|
bool
|
If True, deletes downloaded archives after extraction (i.e., does not delete non-extracted archives). Defaults to True. |
True
|
is_create_subdirs
|
bool
|
If True, places downloaded files in a sub-directory structure according to the template defined in the config file. Defaults to True. |
True
|
is_export_results
|
bool
|
If True, creates a text file in the current working directory listing all search results. Defaults to False. |
False
|
idx_selected_input
|
int | None
|
A number matching an index in the list of found files. If provided, only this single file will be downloaded. Defaults to None. |
None
|
is_organize_data
|
bool
|
If True, does not search or download any data. Defaults to False. |
False
|
is_include_header
|
bool | None
|
If True, the full archive is downloaded containing both HDF5 data file ( |
None
|
is_only_header
|
bool
|
If True, downloads only header files ( |
None
|
is_reversed_order
|
bool
|
If True, downloads data products in reversed order (from the latest to the earliest). Defaults to False. |
False
|
return_results
|
bool
|
If True, returns the search results as a |
False
|
verbose
|
bool
|
If False, does not print logs to the console and does not create log file. Defaults to True. |
True
|
check_product_availability
|
bool
|
If True, sends extra request to the download backend checking the list of available products per data collection. If False, uses internally stored lists of available products, significantly reducing execution time (but might fail in case of backend changes). Defaults to False. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
results |
ProductDataFrame | None
|
If |
Source code in earthcarekit/download/main.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |