ERA5¶
pansat.products.reanalysis.era5¶
This module defines the ERA5 product class, which represents all supported ERA5 products.
- class pansat.products.reanalysis.era5.ERA5Hourly(levels, variables, domain=None)¶
Child Class of ERA5Product for hourly ERA5 data.
- __init__(levels, variables, domain=None)¶
- class pansat.products.reanalysis.era5.ERA5Monthly(levels, variables, domain=None)¶
Child Class of ERA5Product for monthly ERA5 data.
- __init__(levels, variables, domain=None)¶
- class pansat.products.reanalysis.era5.ERA5Product(levels, variables, domain=None)¶
The ERA5 class defines a generic interface for ERA5 products.
- levels¶
“surface”, “pressure” or “land”. <surface> contains surface data and column-integrated values, pressure levels contains data throughout the atmosphere column and <land> contains data from surface to soil depth
- Type:
str
- name¶
The full name of the product according to Copernicus webpage
- Type:
str
- variables¶
List of variable names provided by this product.
- Type:
list
- domain¶
list of strings to select region [lat1, lat2, lon1, lon2] if None: global data will be downloaded
- Type:
list
- __init__(levels, variables, domain=None)¶
- __str__()¶
The full product name.
- _get_provider()¶
Find a provider that provides the product.
- property default_destination¶
The default destination for ERA5 product is
ERA5/<product_name>>
- download(start, end, destination=None)¶
Download data product for given time range.
- Parameters:
start_time (
datetime) –datetimeobject defining the start date of the time range.end_time (
datetime) –datetimeobject defining the end date of the of the time range.destination (
strorpathlib.Path) – The destination where to store the output data.
- Returns:
name list of all downloaded files for data product
- Return type:
downloaded(
list)
- filename_to_date(filename)¶
Extract timestamp from filename.
- Parameters:
filename (
str) – Filename of a ERA5 product.- Returns:
datetimeobject representing the timestamp of the filename.
- matches(filename)¶
Determines whether a given filename matches the pattern used for the product.
- Parameters:
filename (
str) – The filename- Returns:
True if the filename matches the product, False otherwise.
- classmethod open(filename)¶
Opens a given file of NCEP product class as xarray.
- Parameters:
filename (
str) – name of the file to be opened- Returns:
xarray dataset object for opened file
- Return type:
datasets(
xarray.Dataset)