API Reference#

Use this reference when you want the exact signature, parameters, return values, and class interfaces for arl-met. Most workflows start with open_dataset(), write_dataset(), extract_subset(), or sample_points().

High-Level I/O#

open_dataset

Open an ARL meteorology file as an xarray Dataset.

write_dataset

Write a simple flat Dataset representation to an ARL file.

File Operations#

Transform ARL files: crop a subset, sample at points, or join files together. See the Cropping ARL Data, Sampling Points, and Concatenating ARL Files guides.

extract_subset

Extract a spatial/vertical subset from an ARL file into a new ARL file.

sample_points

Sample meteorological variables at arbitrary (lon, lat, z, time) points.

concat

Concatenate multiple ARL files into a single ARL file.

concat_by_time

Group every ARL file in a directory by valid time and concatenate each group.

Vertical Coordinates#

Derive pressure and height coordinates from an open Dataset. See the Vertical Coordinates guide for coordinate-system details and limitations.

pressure

Pressure (hPa) at each level.

z_agl

Height above ground level (m) at each level.

z_msl

Height above mean sea level (m) at each level.

Low-Level File Model#

File

Read or write an ARL meteorology file.

RecordSet

Records for one valid time within an ARL file.

DataRecord

One ARL data record representing a single 2D variable slice.

Grid And Vertical Metadata#

These are immutable, hashable value objects. Derive modified copies with dataclasses.replace() (Projection, Grid, GridWindow) or by constructing a new axis.

Projection

Horizontal projection metadata from an ARL index record.

Grid

Two-dimensional horizontal grid definition for ARL data.

GridWindow

Rectangular subset of a grid using zero-based half-open indices.

VerticalAxis

Abstract base class for ARL vertical coordinate axes.

SigmaAxis

Flag=1.

PressureAxis

Flag=2.

TerrainAxis

Flag=3.

HybridAxis

Flag=4.

Binary Metadata And Packing#

Header

Fixed-width 50-byte header present at the start of every ARL record.

IndexRecord

Index record describing one ARL time step and its contained variables.

calculate_checksum

Compute the ARL checksum for a packed payload.

pack

Pack a 2D field using the ARL differential byte encoding.

unpack

Unpack an ARL differential byte stream into a 2D field.

Errors And Warnings#

Raised or emitted when file content is not valid ARL. ARLFormatError subclasses ValueError, so except ValueError also catches it.

ARLFormatError

Raised when file content is not valid ARL.

ARLFormatWarning

Warning for recoverable irregularities in ARL file content.

Remote Archive Sources#

get_archive

Build a meteorology archive from its short name.

Archive

Abstract base class for NOAA ARL meteorology archives.

HRRRArchive

HRRR 3 km analysis (CONUS, June 2019–present).

HRRRv1Archive

HRRR 3 km analysis, version 1 (CONUS, June 15, 2015–2019).

NAMArchive

NAM 12 km analysis (North America, May 26, 2007–present).

NAMSArchive

NAMS hybrid sigma-pressure analysis (CONUS/Alaska/Hawaii, March 2009–present).

GDASArchive

GDAS 1-degree global analysis (December 2004–present).

GDAS0p5Archive

GDAS 0.5-degree global analysis (September 2007–mid 2019).

GFSArchive

GFS 0.25-degree global analysis (June 13, 2019–present).

NARRArchive

NCEP North American Regional Reanalysis (January 1979–2019).

ReanalysisArchive

NCEP/NCAR Reanalysis 2.5-degree global (1948–present).

arlmet.archives.ARCHIVES

Every registered source class by name (read-only mapping). See get_archive().