stilt.config.MetConfig#

class stilt.config.MetConfig(*, directory: pathlib.Path, source: str | None = None, backend: Literal['s3', 'ftp', 'http'] = 's3', file_format: str | None = None, file_tres: str | None = None, n_min: int = 1, subgrid_enable: bool = False, subgrid_bounds: stilt.config.spatial.Bounds | None = None, subgrid_buffer: float = 0.2, subgrid_levels: int | None = None, subgrid_dir: pathlib.Path | None = None, **extra_data: Any) → None[source]#

Settings for one meteorology stream.

Give either source to download ARL files with arlmet, or file_format and file_tres to find them in directory. With source, other keys are options for that arlmet source (such as domain for nams). Any other unknown key is an error.

Parameters#

Parameter

Description

Default

directory

Directory holding the ARL meteorology files. Downloads are saved here.

Required

source

Name of an arlmet source to download files from NOAA archives, such as hrrr, nam12, gdas1, or gfs0p25. When set, file_format and file_tres are not needed. Options for the source (such as domain: ak) go in the same entry.

None

backend

Where source downloads from: s3, ftp, or http.

's3'

file_format

strftime pattern for the start of each file name, such as %Y%m%d_%H. Files whose names start with it are found anywhere under directory. Required when source is not set.

None

file_tres

Time covered by each file, as a pandas time string such as 6h. Required when source is not set.

None

n_min

Minimum number of files a simulation needs. Fewer fails the simulation.

1

subgrid_enable

Crop the meteorology to subgrid_bounds before running.

False

subgrid_bounds

Longitude/latitude box to crop the meteorology to.

None

subgrid_buffer

Margin added to every side of subgrid_bounds, in degrees.

0.2

subgrid_levels

Number of vertical levels to keep, counted from the surface. Unset keeps all.

None

subgrid_dir

Directory for the cropped files, shared by every simulation that uses this meteorology. Unset uses <directory>/subgrid. Used only without source, which crops files as it downloads them.

None