NEXRADLevel2Archive#
- class metpy.remote.NEXRADLevel2Archive(include_mdm=False)[source]#
Access data from the NEXRAD Level 2 archive in AWS.
These data consist of complete volumes (i.e. multiple elevation cuts) from NWS NEXRAD.
Initialize the archive client.
- Parameters:
include_mdm (bool, optional) – Whether Model Data Messages (MDM) should be included in results. Defaults to False.
Methods Summary
__init__
([include_mdm])Initialize the archive client.
common_prefixes
(prefix[, delim])Return the common prefixes under a given prefix.
dt_from_key
(key)Parse date from key.
get_product
(site[, dt])Get a product from the archive.
get_range
(site, start, end)Yield products within a particular date/time range.
objects
(prefix)Return objects matching the given prefix.
sites
([dt])Return sites available for a particular date.
Methods Documentation
- __init__(include_mdm=False)[source]#
Initialize the archive client.
- Parameters:
include_mdm (bool, optional) – Whether Model Data Messages (MDM) should be included in results. Defaults to False.
- dt_from_key(key)[source]#
Parse date from key.
- Parameters:
key (str) – The key to parse
- Returns:
datetime – The parsed date
- get_product(site, dt=None)[source]#
Get a product from the archive.
- Parameters:
site (str) – The site to search for data
dt (
datetime.datetime
, optional) – The desired date/time for the model run; the one closest matching in time will be returned. This should have the proper timezone included; if not specified, UTC will be assumed. IfNone
, defaults to the current UTC date/time.
- get_range(site, start, end)[source]#
Yield products within a particular date/time range.
- Parameters:
site (str) – The site to search for data
start (
datetime.datetime
) – The start of the date/time range. This should have the proper timezone included; if not specified, UTC will be assumed.end (
datetime.datetime
) – The end of the date/time range. This should have the proper timezone included; if not specified, UTC will be assumed.
See also
- objects(prefix)[source]#
Return objects matching the given prefix.
- Parameters:
prefix (str) – The prefix to match against.
- Returns:
Iterator of botocore.client.Object – Objects matching the given prefix.
- sites(dt=None)[source]#
Return sites available for a particular date.
- Parameters:
dt (datetime.datetime, optional) – The date to use for listing available sites. Defaults to the current date.
- Returns:
List[str] – Sites