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.0a5.tar.gz (97.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.0a5-cp312-cp312-win_amd64.whl (80.8 kB view details)

Uploaded CPython 3.12Windows x86-64

arlmet-0.1.0a5-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (87.7 kB view details)

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

arlmet-0.1.0a5-cp312-cp312-macosx_11_0_arm64.whl (78.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

arlmet-0.1.0a5-cp312-cp312-macosx_10_13_x86_64.whl (77.9 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

arlmet-0.1.0a5-cp311-cp311-win_amd64.whl (80.8 kB view details)

Uploaded CPython 3.11Windows x86-64

arlmet-0.1.0a5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (87.3 kB view details)

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

arlmet-0.1.0a5-cp311-cp311-macosx_11_0_arm64.whl (78.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

arlmet-0.1.0a5-cp311-cp311-macosx_10_9_x86_64.whl (77.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

arlmet-0.1.0a5-cp310-cp310-win_amd64.whl (80.8 kB view details)

Uploaded CPython 3.10Windows x86-64

arlmet-0.1.0a5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (87.1 kB view details)

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

arlmet-0.1.0a5-cp310-cp310-macosx_11_0_arm64.whl (78.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

arlmet-0.1.0a5-cp310-cp310-macosx_10_9_x86_64.whl (77.9 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: arlmet-0.1.0a5.tar.gz
  • Upload date:
  • Size: 97.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.0a5.tar.gz
Algorithm Hash digest
SHA256 0fc300e32990188af35123a6fdf9f9a142c830e13b806bbac2d12ba3fc18f1aa
MD5 24bcef26c6ab0c9aec28066a848604db
BLAKE2b-256 30c13a2586526193443aa9d5bed1448079cc8326d63ceb696b95b5023986a042

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5.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.0a5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: arlmet-0.1.0a5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 80.8 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.0a5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4295119d90afef5616559adb8db1702c7a1e48f515c9320cc720cc5047985350
MD5 01cb49fa6aab5d008043bb5bfd8b0856
BLAKE2b-256 1cba5f9541adb2afdc6882be0b8294860bf227437029141cdad3d014d1af23e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-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.0a5-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e13c160ccc0821b0117b0c4300d594c3e6c3c7677d4ee8fe0a45b96e0c5666e
MD5 b99569af0f348d5aa950c5942b671f3f
BLAKE2b-256 7fbcf675567980549735e9effa58060679f3cf2e629cd5fe56638ff14e166246

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1ba7da2bdd27b904fe0fe83731eb8c3b38ccb3392d73217363a928ea91659a24
MD5 f3c6b0268e07e3b4b418bdbbaa61c156
BLAKE2b-256 2a31cf85f73455500f05d872747969c5584dbd1fe1ded220e07beb03a7e1ae03

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a5-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 291a7455edda24735926f4a850d4b0e3ff25f81998bc06f6d292761415b8612b
MD5 4c1429d4a41fa1353523455e2134c698
BLAKE2b-256 68b922ebff45850d8ff0de2d1e2e362ac70d2e1d0e60eeaa46d740133fbc33a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: arlmet-0.1.0a5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 80.8 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.0a5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 19858781ec113d954cd9f5f17fa52aea43ac453299b45cd0135490fbd79d94ee
MD5 a9c6c91643fc7f5d0574bc479820b5d1
BLAKE2b-256 540330134a9249a2ea2337372a01d1f9fa7857a7459633c874ada64666f0f0ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-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.0a5-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ceb36fddf7761c98158a1ee47881b57c1443c23691cf9fa9cf0a3adb9b7141c7
MD5 e1a6acb62ccae642ca4d462c11bd5c2a
BLAKE2b-256 1b39445198d0e39000d9339e6336705b462a61ac229f8161b3feecfa475acc27

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e63ad1033ebece732fba69568479c68a6675c077af928a54aa85535feed9318a
MD5 d6efa9d69d5f406623ee6dbdf072f315
BLAKE2b-256 ec4ac9124db896966b5079b1603c8f56f2eb528a3fee20d5a7f8552cb77f8f8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7dcc436ec4abe4234730cc801d8c02669cfd04e18132bfb867fdc50bfbb34261
MD5 74d62d1c97a089bc1b0a6795bdde00e0
BLAKE2b-256 d222951efeb24ff040aef1ccddc06cf04992f6410e33deb7888c9b3df569f73e

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: arlmet-0.1.0a5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 80.8 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.0a5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2e43ceea37c0ab3e351f8b1fdd1dd764aeb901c4e9281b5879bda70aa4a3facf
MD5 1929d0b721eb9bec1874c76d023a394e
BLAKE2b-256 9a73bd725056ba72d911b35155e3c100cb5dd885eee559a50c09d7a76b0f9445

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-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.0a5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4fa2d2e08c40f8f2da76bf5081649bfef97f024e6bb24ebbbff6d1c4024a9fb9
MD5 e6a6e9d40de60488a05acf5b93bc20bc
BLAKE2b-256 da6a3e626875a40872bb766b3835be2bbec5f73fcd0de7bf9db5484135511f77

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a84136d4e7242c2d2801d4fda7f43a8dd19839189dcf76fd75165e081e4f6d2
MD5 750faee940e0339021a554636955f923
BLAKE2b-256 80c100db86621a4e5da25f0b282a506e70c8ee23e4e9236af7e9e56477c39777

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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.0a5-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for arlmet-0.1.0a5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c0c22965cd7b281ac2160223da9af80303e9a4ab2f8c6379dc85a17740e1f55a
MD5 c90d8c91c02459d452690d47679dba9d
BLAKE2b-256 a19a9c01334faae699025210e2659763287b3db08f26db890885fd3d7cb73ab9

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a5-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