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:
- Raises:
ValueError – If the file path is invalid or if a data record is found before an index record.
- property records: list[DataRecord]#
Get list of all data records.
- Returns:
List of all data records in the dataset.
- Return type:
- 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
- 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