Skip to main content

Read and write ARL meteorological files.

Project description

arl-met

Tests Documentation Code Quality codecov PyPI version Python Version License: MIT Ruff Pyrefly

Read, write, subset, and sample NOAA ARL meteorological files.

arl-met provides a Python-first interface to the ARL packed meteorology format used by HYSPLIT and related workflows. It supports:

  • low-level record-preserving reads and writes through File, RecordSet, and DataRecord
  • xarray Dataset reads and common-case writes through open_dataset() and write_dataset()
  • NOAA source fetching helpers for common ARL archives
  • crop-before-unpack subset extraction with extract_subset()
  • vertical helper functions such as pressure(), z_agl(), and z_msl()
  • point sampling with sample_points()

Alpha status

This is an alpha release. The core read/write/subset APIs are usable, but the package is still tightening its high-level contracts and release surface.

Current strengths:

  • low-level ARL fidelity, including preservation of trailing DIF* records
  • xarray-native analysis workflow for common ARL files
  • direct subset extraction and point sampling
  • tested support for Python 3.10 through 3.12

Current limitations:

  • write_dataset() is intentionally conservative and targets the flat common-case Dataset contract
  • complex multi-record DIFF chains are not tested
  • WRF vertical flag 5 is not implemented

Installation

Install the core package:

pip install arlmet

Install the optional source-fetching dependencies:

pip install "arlmet[sources]"

For development:

git clone https://github.com/jmineau/arl-met.git
cd arl-met
uv sync --dev

Quick examples

Open an ARL file as a Dataset:

import arlmet

ds = arlmet.open_dataset("met.arl")
print(ds)

Modify a Dataset and write it back:

import arlmet

ds = arlmet.open_dataset("met.arl")
ds["TEMP"] = ds["TEMP"] - 273.15
ds["WWND"].attrs["diff"] = "DIFW"
arlmet.write_dataset(ds, "edited.arl")

Extract a subset without unpacking the full file first:

import arlmet

arlmet.extract_subset(
    "met.arl",
    "subset.arl",
    bbox=(-114.0, 39.0, -110.0, 42.0),
    levels=[0, 1, 2],
)

Use the low-level writer for irregular layouts:

import numpy as np
import pandas as pd
import arlmet

grid = arlmet.Grid(
    projection=arlmet.Projection(
        pole_lat=90.0,
        pole_lon=0.0,
        tangent_lat=1.0,
        tangent_lon=1.0,
        grid_size=0.0,
        orientation=0.0,
        cone_angle=0.0,
        sync_x=1.0,
        sync_y=1.0,
        sync_lat=-10.0,
        sync_lon=20.0,
    ),
    nx=20,
    ny=20,
)
vertical_axis = arlmet.VerticalAxis(flag=2, levels=[0.0, 1000.0])
time = pd.Timestamp("2024-07-18 00:00")

prss = np.ones((grid.ny, grid.nx), dtype=np.float32)
wwnd = np.ones((grid.ny, grid.nx), dtype=np.float32)

with arlmet.File("custom.arl", mode="w", source="TEST", grid=grid, vertical_axis=vertical_axis) as arl:
    rs = arl.create_recordset(time, forecast=0)
    rs.create_datarecord("PRSS", level=0, forecast=0, data=prss)
    rs.create_datarecord("WWND", level=1, forecast=0, data=wwnd, diff="DIFW")

Resources

Documentation is available at https://jmineau.github.io/arl-met/

Useful ARL/HYSPLIT references:

Related project:

  • ARLreader, which focuses on GDAS1 files, while arl-met targets a broader ARL/xarray workflow.

Release notes

See CHANGELOG.md for release history.

Contributing

Contributions are welcome. See CONTRIBUTING.md for development setup and contribution guidelines.

License

This project is licensed under the MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arlmet-0.1.0a4.tar.gz (91.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

arlmet-0.1.0a4-cp312-cp312-win_amd64.whl (76.7 kB view details)

Uploaded CPython 3.12Windows x86-64

arlmet-0.1.0a4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (82.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

arlmet-0.1.0a4-cp312-cp312-macosx_11_0_arm64.whl (73.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

arlmet-0.1.0a4-cp312-cp312-macosx_10_13_x86_64.whl (73.0 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

arlmet-0.1.0a4-cp311-cp311-win_amd64.whl (76.7 kB view details)

Uploaded CPython 3.11Windows x86-64

arlmet-0.1.0a4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (82.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

arlmet-0.1.0a4-cp311-cp311-macosx_11_0_arm64.whl (73.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

arlmet-0.1.0a4-cp311-cp311-macosx_10_9_x86_64.whl (73.0 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

arlmet-0.1.0a4-cp310-cp310-win_amd64.whl (76.7 kB view details)

Uploaded CPython 3.10Windows x86-64

arlmet-0.1.0a4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (82.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

arlmet-0.1.0a4-cp310-cp310-macosx_11_0_arm64.whl (73.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

arlmet-0.1.0a4-cp310-cp310-macosx_10_9_x86_64.whl (73.0 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file arlmet-0.1.0a4.tar.gz.

File metadata

  • Download URL: arlmet-0.1.0a4.tar.gz
  • Upload date:
  • Size: 91.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arlmet-0.1.0a4.tar.gz
Algorithm Hash digest
SHA256 a91294bd0ec51d6666fed9395ab942b2fa9db1559df94af77597c0da118e5c87
MD5 5296bb0c8e4e68984eaad64596ef690a
BLAKE2b-256 98a70b46587e8a3f4740c849c08bf8af2508f86f8bd4fdd684cd9e0ead7118a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4.tar.gz:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: arlmet-0.1.0a4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 76.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arlmet-0.1.0a4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fd6e3b12f9dd07c4b7d01d155f6f1ef5e55689c98cdea17db7160dd3ba9d4e27
MD5 2a0ced8a47560820ee7c318dd63945b1
BLAKE2b-256 4edb6675ed87ebead45e41f98dc4651029ef9ac12f3e1500ccf7b6b7271d3319

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e3f767c4be82a15d04ad4e08a4f0181164f598f2d343945d5f10273c3f02f76
MD5 b521fcf71c66b8a97e604cdd2c495139
BLAKE2b-256 22e17b84e89ed72e158156cd0ccbc458f384c790bf2604a547147d3af2744ecd

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 11c6aa8d9a69c079274a88a55c6dc015d5e864d6f4af75f8e3c0b26bc7d22c10
MD5 4ec12eead6b4277e9d2933ebc24255ee
BLAKE2b-256 91a226a93b82ac643fc2cde778facc5ac3b7a8041cc1819f7041e4393094bec9

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ab93942a12be5fb18eb820c0130b34ed9c7022567b60bb3a5a5f4e8d6ad1cd3e
MD5 e766773f399fc99042b319afe69387de
BLAKE2b-256 2b93cb4526eec1568a678cd09caca9447fb76a9a9e4c6360de1673cc4f3df3e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: arlmet-0.1.0a4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 76.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arlmet-0.1.0a4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2b3d90fad3398e15b0e989ca5299e8be569fcad6ae6adde7ce7b03a8f026c9ae
MD5 c6b4dc7b13d40f047833421a9a186392
BLAKE2b-256 7ef4abda80f64979a27aef075993fd677ec0fdc023ba4f3ae29593ac167c0e69

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b820f81e979684ed57a450c9ce16abc722a4d1edfdd04c1bd70da3a8ef0d505
MD5 97434da16fa55e746b8ca85239b22cf0
BLAKE2b-256 a536b2892c6ec3eb9acb78d0c5b90e22f855c2c7f80dc42403062f2288908359

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8459259f488c3111d4fdbea7d40cdc81fcb124c59d5315066f5cf86214a42527
MD5 06a99d60b3668cd0ec4c9c849d34d2fd
BLAKE2b-256 4d23c448701e5781db5b7f7a4045b47b892412852acbed252c2c3f9b142270f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8999241db4d8a7e6c51a32d4bbbc788befab88a23391a01d4e42ff5af712f35e
MD5 a1c2e0c1ba94b33ab65c0447bdc31858
BLAKE2b-256 6815bfbfeb8a268276d356928c852e40575cf173f850a5aa2bda5359ad85a866

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: arlmet-0.1.0a4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 76.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arlmet-0.1.0a4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 675edc19948e024d9ebab8280e7104645ed8f1ffb38a433440e3f848f21a3982
MD5 499ebac47bfe0be8757b4281e98ac8a0
BLAKE2b-256 30a4d102ec93c1bd8d2aff7761828aa14a7065b17d62225bc65b54ced5337d99

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c0451865fad2561359f6caad72bd6ee47a942bbd01b715e182cf990a36bf56ac
MD5 8dabcc25d03c5c80b0e376bd818126e5
BLAKE2b-256 70aaf5ba258ff65459e5c2e09b87f17ace77b342160a63a8d789c8e995d58be1

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a68772707f289085796091406595099d81c2c8513fd411032d4e47a3a9e9bf43
MD5 b646630bc61c7ca67ce03d4af88f7c55
BLAKE2b-256 59793f3c8429004dbea8108437bf91b32fcb687cbe0bbbd26b33e22d1107a7eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arlmet-0.1.0a4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 34f9d053beb1e7f0d1d95ffdd2ac43ba411d0e0dd9c1147d76d7e39ef0cdf4be
MD5 65b760e0eb3c20828322934a8c7b4e3d
BLAKE2b-256 531dc3a0ca0d4665401787edfd81fd7b1533e5acd917d573b29e5d06d94ce233

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a4-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: publish.yml on jmineau/arl-met

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page