ERA5LandDownloader#
- class download_era5.ERA5LandDownloader(area: str | Path | tuple | GeoDataFrame, variables: str | List[str], start_date: str | datetime, end_date: str | datetime, output_dir: str | Path | None = None, n_parallel: int = 1, keep_chunks: bool = False, force_overwrite: bool = False, output_prefix: str = 'ERA5LAND')[source]#
Download ERA5-Land reanalysis data from the Copernicus Climate Data Store (CDS API).
This class provides a unified interface for downloading ERA5-Land data with support for multiple data sources, flexible area specification, and optimized request queuing for the CDS API.
Note: CDS API doesn’t support true parallel downloads. n_parallel controls request queuing to minimize latency between consecutive downloads.
Parameters#
- areaUnion[str, pathlib.Path, tuple, gpd.GeoDataFrame]
Area specification (bounding box, file path, or GeoDataFrame). For bounding box, use a tuple (North, West, South, East) in WGS84.
- variablesUnion[str, List[str]]
Variables to download (names, categories, or profiles).
- start_dateUnion[str, datetime]
Start date for download period. Supports partial dates: - ‘2025-04-23’ -> exact date - ‘2025-04’ -> first day of month (2025-04-01) - ‘2025’ -> first day of year (2025-01-01)
- end_dateUnion[str, datetime]
End date for download period. Supports partial dates: - ‘2025-04-23’ -> exact date - ‘2025-04’ -> last day of month (2025-04-30) - ‘2025’ -> last day of year (2025-12-31)
- output_dirOptional[Union[str, pathlib.Path]], default None
Output directory for downloaded files. Defaults to current working directory with ‘ERA5Land_data’ subdirectory.
- n_parallelint, default 1
Number of concurrent request handlers for optimized queuing. Not true parallelization due to CDS API limitations. Recommended: 3-4. CDS recommends maximum 20 concurrent requests.
- keep_chunksbool, default False
Whether to keep intermediate monthly chunk files (raw data). If True, files are not deleted after processing and can be reused.
- force_overwritebool, default False
Whether to overwrite existing files.
- output_prefixstr, default ‘ERA5LAND’
Prefix for output filenames. Final names: {prefix}_{variable}_RAW_{dates}.nc