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 Pyright

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.0a2.tar.gz (86.6 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.0a2-cp312-cp312-win_amd64.whl (73.6 kB view details)

Uploaded CPython 3.12Windows x86-64

arlmet-0.1.0a2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (79.7 kB view details)

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

arlmet-0.1.0a2-cp312-cp312-macosx_11_0_arm64.whl (70.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

arlmet-0.1.0a2-cp312-cp312-macosx_10_13_x86_64.whl (69.9 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

arlmet-0.1.0a2-cp311-cp311-win_amd64.whl (73.6 kB view details)

Uploaded CPython 3.11Windows x86-64

arlmet-0.1.0a2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (79.3 kB view details)

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

arlmet-0.1.0a2-cp311-cp311-macosx_11_0_arm64.whl (70.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

arlmet-0.1.0a2-cp311-cp311-macosx_10_9_x86_64.whl (69.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

arlmet-0.1.0a2-cp310-cp310-win_amd64.whl (73.6 kB view details)

Uploaded CPython 3.10Windows x86-64

arlmet-0.1.0a2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (79.1 kB view details)

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

arlmet-0.1.0a2-cp310-cp310-macosx_11_0_arm64.whl (70.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

arlmet-0.1.0a2-cp310-cp310-macosx_10_9_x86_64.whl (69.9 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: arlmet-0.1.0a2.tar.gz
  • Upload date:
  • Size: 86.6 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.0a2.tar.gz
Algorithm Hash digest
SHA256 c39f985b511068132eb4ca43e46e524abc9decd83b4ce5df56bf0bd3219810dc
MD5 3a5eb3ac7c4dfb2cc6512e77cd4772ac
BLAKE2b-256 14252af26f865da9504575860d1f5652adca9645ba0a628180e397afa407385f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: arlmet-0.1.0a2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 73.6 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.0a2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f22cb0de85c130974407a62aa28c73cdb15b0867deddb479167730cae06fb801
MD5 835c17a071f5c05e3cfe70279de8b902
BLAKE2b-256 e1b385f276fe2e8ab36c07efdb87f76e1ad00a94f70a9f2b1417bfa30064d369

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a2-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.0a2-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.0a2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0b99a58ff4debfef0183a0ea4c20b5ec5c94d2f7941070e5fe01c9323285e01c
MD5 3af1c6a631049c7dd2ab48ea1ffc6f77
BLAKE2b-256 084a8c5fafc911259c2ed439eba020b7932125b575240a56cbe98f6e97400af9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4dade0f1be038406c05a3101b186e42af93aac111b3ca5ae49e19cd5d9a10543
MD5 a6e7c555d5c15141261ec8b58ec0642e
BLAKE2b-256 4da95eecdf8ff33542c79a48ac0b19ea92c11c4df4804877ef9c0fc85712e770

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a2-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 67dd406c84df6727c7340159d57de1c0505589c7982fe11c2f74488119fa616a
MD5 c0a97bbbf689224855d482ae047a2711
BLAKE2b-256 e8859e2f95a214798962ef2158e34fdd7ecb171a269dfa69f1765a40714ddf48

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: arlmet-0.1.0a2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 73.6 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.0a2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c029774b75cd95f78118497b832a2645d734325408dd7ee9fb64cc0e04fd3fe2
MD5 deb1a099dd8eaa9c4c3264b4c5015c7f
BLAKE2b-256 58f1152b90d265ad952230447c037e833db0c81cb513f24da381a48d4d0a0152

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a2-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.0a2-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.0a2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b6a717b643c59ace90e1e9c2681a2e9d41601902b3f478a1248457dc64009ad
MD5 72bd68c0757db7837cce3c42a0be5953
BLAKE2b-256 51c97dbadd3eb980f98c6614f5a3a6a476995e33e33b67937de531c5fa0396ab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 95024169e94c2ff438ee612b3f41b1e8f5baac5b521f8a22793825fd870f311d
MD5 aea268b7bd346fbb798624f5783e36b0
BLAKE2b-256 b32f0ed3be07f93d3e90a9aa8e47ad45e87dce78c0e156ab3ae632dc801ab393

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 32770bfc719908f2028b12e072e8f56cc247fecfefff0cacbf8516f985d2ab6f
MD5 a483f3f048097c2652b6eade686cb636
BLAKE2b-256 b0384e2489a72bb14fa31037ea4fe978db42917118b9b9b075dd3550a84be874

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: arlmet-0.1.0a2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 73.6 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.0a2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b831d5c5701ea5912d1046d312c20d028e7983b2b19685641e23522b3c80806d
MD5 c107e8565146f0b9336898ded40a9f39
BLAKE2b-256 a02c3e0e07507a41fab5d060bb90e4bb73acdd1f6ae366f875679b2ebd5b515d

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a2-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.0a2-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.0a2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18de2cb96e31fb4d277bb601838b33ff82ca7d93510034bc34b6b3e15212766b
MD5 2722ba1b385da43323395e27af5e1c93
BLAKE2b-256 4bbcde60a1b77431c090158006cd7bbcda3efdb890c20586c36d32663cdc8e27

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 21140461655aee86afef1674cfacd508e744c33ef7afd49822bfd97ed3a6ab07
MD5 6664ded8c2b30334b2f45e965203670d
BLAKE2b-256 50ae3449b24e97e3ba5f347a0aa7ef3015de8769809b02774a146f76a509c58c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a21220025bff9f9dde91b041a06a495321f77911c6886d4f0082c552301a0a13
MD5 2f52f34c9e1cc86dadc745c4214dbac8
BLAKE2b-256 7b864afc71aaf5a93c74495eaae1f9c59970144d2453c7e0370df9514cfc1332

See more details on using hashes here.

Provenance

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