NCEP¶
pansat.products.reanalysis.ncep¶
This module defines the NCEP reanalysis product class, which represents all supported NCEP reanalysis products.
- class pansat.products.reanalysis.ncep.NCEPReanalysis(variable, grid)¶
The NCEP reanalysis class defines a generic interface for NCEP products.
- variable¶
Variable to extract
- Type:
str
- grid¶
pressure, surface, spectral, surface_gauss or tropopause
- Type:
str
- name¶
Full name of the product.
- Type:
str
- __init__(variable, grid)¶
- Parameters:
variable (
str) – Variable to extractgrid (
str) – pressure, surface, spectral, surface_gauss or tropopause
- __str__()¶
The full product name.
- _get_provider()¶
Find a provider that provides the product.
- property default_destination¶
The default destination for NCEP product is
NCEP/<product_name>>
- download(start, end, destination=None)¶
Download data product for given time range.
- Parameters:
start (
int) – start yearend (
int) – end yeardestination (
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 NCEP product.- Returns:
datetimeobject representing the timestamp of thefilename.
- 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)