arlmet.archives.Archive#

class arlmet.archives.Archive[source]#

Abstract base class for NOAA ARL meteorology archives.

An archive is one ARL-formatted product in NOAA’s archive (e.g. HRRR 3 km): its filename convention, path layout, and start date. Download files with fetch(), choosing the mirror (server) to download from.

Subclasses set class-level metadata and implement _archive_path() to encode the filename convention for their product. A subclass that sets name is registered in ARCHIVES under that name.

name#

Short archive identifier used by callers and config files (stable).

Type:

str

description#

Human-readable product description.

Type:

str

start_date#

Earliest date in the archive.

Type:

pandas.Timestamp

source#

The source id its files’ headers carry (arlmet.File.source), such as "HRRR", so a caller can tell which product an archive holds without downloading a file. Every file of an archive carries the same id, except where a subclass says otherwise.

Type:

str

paths_for_range(start, end)[source]#

Return archive paths covering the requested inclusive time range.

fetch(start, end, ...)[source]#

Download or crop local ARL files for the requested time range.

Methods

Archive.__init__()

Archive.fetch(start, end, *, dest_dir[, ...])

Download ARL files covering [start, end] to dest_dir.

Archive.paths_for_range(start, end)

Return deduplicated, sorted archive paths covering [start, end].

Attributes

Archive.FTP_HOST

Archive.HTTP_BASE

Archive.S3_BUCKET

Archive.name

Archive.description

Archive.start_date

Earliest date available in the NOAA archive.

Archive.source

The source id in the headers of the archive's files.