NOAA¶
pansat.download.providers.noaa¶
This module provides the NoaaProvider class to download data stored at the NOAA data server.
- class pansat.download.providers.noaa.NOAAProvider(product)¶
Abstract base class for gridded products available from NOAA Physical Science Laboratory.
- __init__(product)¶
Create a new product instance.
- Parameters:
product – Product class object with specific product for NOAA
- _ftp_listing_to_list(path, item_type=<class 'int'>, base_url=None)¶
Retrieve directory content from ftp listing as list.
- Parameters:
path (str) – The path from which to retrieve the ftp listing.
t (type) – Type constructor to apply to the elements of the listing. To retrieve a list of strings use t = str.
base_url (
str) – FTP URL without subdirectories
- Returns:
A list containing the content of the ftp directory.
- download(start, end, destination, base_url=None, product_path=None, files=None)¶
This method downloads data for a given time range from the respective data provider.
- Parameters:
start (
int) – start yearend (
int) – end yeardestination (
strorpathlib.Path) – path to directory where the downloaded files should be stored.base_url (
str) – base urlfiles (list`) – list of files if files are not sorted by year
- classmethod get_available_products()¶
Return the names of products available from this data provider.
- Returns:
A list of strings containing the names of the products that can be downloaded from this data provider.
- classmethod get_file_names(var, start, end)¶
Return all files from given year.
- Parameters:
var (
str) – Variable to extractstart (
int) – start year for desired time rangeend (
int) – end year for desired timerange
- Returns:
List of the filenames of this product for given variable and time range by year.