arlmet#

arlmet: Python package for reading and analyzing NOAA ARL meteorological files.

This package provides tools to read, parse, and work with ARL (Air Resources Laboratory) packed meteorological data files used by HYSPLIT and other atmospheric transport models.

class arlmet.ARLMet(index_record, records)[source]#

ARL (Air Resources Laboratory) packed meteorological data.

Extracts metadata from meteorological data file headers and provides methods to work with ARL format files.

__init__(index_record, records)[source]#

Initialize ARLMet instance with data records.

Parameters:

records (Sequence[DataRecord]) – List of data records parsed from the ARL file.

classmethod from_file(filename)[source]#

Create an ARLMet instance by reading an ARL file.

Parameters:

filename (Path or str) – Path to the ARL meteorological data file.

Returns:

ARLMet instance containing the parsed data records.

Return type:

ARLMet

Raises:

ValueError – If the file path is invalid or if a data record is found before an index record.

property grids: list[Grid]#

Get list of all grids.

Returns:

List of all grids in the dataset.

Return type:

list[Grid]

property records: list[DataRecord]#

Get list of all data records.

Returns:

List of all data records in the dataset.

Return type:

list[DataRecord]

load(**kwargs)[source]#

Load data into an xarray Dataset or DataArray.

Accepts xarray sel-style indexing to select specific times, variables, levels, forecasts, or grids.

Parameters:

**kwargs (dict) – Selection criteria using xarray sel-style indexing (e.g., time, variable, level, forecast).

Returns:

If a single record matches the criteria, returns a DataArray. Otherwise, returns a Dataset containing multiple variables/times.

Return type:

xr.Dataset or xr.DataArray

static merge(mets)[source]#

Merge multiple ARLMet instances into a single instance.

Parameters:

mets (Sequence[ARLMet]) – Sequence of ARLMet instances to merge.

Returns:

Merged ARLMet instance.

Return type:

ARLMet

__add__(other)[source]#

Merge two ARLMet instances.

Parameters:

other (ARLMet) – Another ARLMet instance to merge with this one.

Returns:

Merged ARLMet instance.

Return type:

ARLMet

arlmet.open_dataset(filename, **kwargs)[source]#

Open an ARL meteorological data file as an xarray Dataset.

Parameters:
  • filename (Path or str) – Path to the ARL data file.

  • **kwargs – sel-like keyword arguments passed to ARLMet.load().

Returns:

The ARL data as an xarray Dataset.

Return type:

xr.Dataset

Modules

arlmet

ARL meteorological data reader and parser.

grid

Grid and projection definitions for ARL meteorological data.

records

ARL record parsing and data unpacking.