downloader
- collect_sources(folder, sources, latlim, lonlim, timelim, landsat_order_only=False)
Download different sources and products within defined limits.
- Parameters
folder (str) – Path to folder in which to store files.
sources (dict) – Configuration for each variable and source.
latlim (list) – Latitude limits of area of interest.
lonlim (list) – Longitude limits of area of interest.
timelim (list) – Period for which to prepare data.
return_fps (bool, optional) – Whether to return the datasets opened or closed as filepaths, by default True
- Returns
dictionary with keys as (source, product) and values either filepaths or xr.Dataset`s and an updated `sources dictionary in which products that couldn’t be downloaded have been removed.
- Return type
tuple
- reverse_sources(sources)
Invert the sources so that the keys are like (source, product) and the values lists of variables.
- Parameters
sources (dict) – Configuration for each variable and source.
- Returns
the reversed sources dictionary and a dictionary listing the enhancers per (source, product).
- Return type
tuple
- trim_sources(reversed_sources, sources)
Remove (source, product)s from sources that couldn’t be downloaded succesfully.
- Parameters
reversed_sources (dict) – Reversed sources dictionary
sources (dict) – Configuration for each variable and source.
- Returns
Configuration for each variable and source, where some have been removed.
- Return type
dict
- Raises
ValueError – Each var must contain unique source.product.