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.0a3.tar.gz (88.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.0a3-cp312-cp312-win_amd64.whl (74.8 kB view details)

Uploaded CPython 3.12Windows x86-64

arlmet-0.1.0a3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80.9 kB view details)

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

arlmet-0.1.0a3-cp312-cp312-macosx_11_0_arm64.whl (71.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

arlmet-0.1.0a3-cp312-cp312-macosx_10_13_x86_64.whl (71.1 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

arlmet-0.1.0a3-cp311-cp311-win_amd64.whl (74.7 kB view details)

Uploaded CPython 3.11Windows x86-64

arlmet-0.1.0a3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80.5 kB view details)

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

arlmet-0.1.0a3-cp311-cp311-macosx_11_0_arm64.whl (71.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

arlmet-0.1.0a3-cp311-cp311-macosx_10_9_x86_64.whl (71.1 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

arlmet-0.1.0a3-cp310-cp310-win_amd64.whl (74.7 kB view details)

Uploaded CPython 3.10Windows x86-64

arlmet-0.1.0a3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (80.3 kB view details)

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

arlmet-0.1.0a3-cp310-cp310-macosx_11_0_arm64.whl (71.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

arlmet-0.1.0a3-cp310-cp310-macosx_10_9_x86_64.whl (71.1 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: arlmet-0.1.0a3.tar.gz
  • Upload date:
  • Size: 88.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.0a3.tar.gz
Algorithm Hash digest
SHA256 a32ed24273aac1140e529ecbcea876698972c568809a7db4b1eb02bb1cf49a62
MD5 bf6800ccdf96ae244c05fc0f5fedd68a
BLAKE2b-256 3353fdc8141727fa40e6a4655cc69b839fad465e972e2f352fceb9b701ef12de

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: arlmet-0.1.0a3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 74.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.0a3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f1033342cde3d910e64d9dbcbcc53401457c9b33895977e19463fd2834c85c8a
MD5 1f8239a50ba283939ff892d3b66d8655
BLAKE2b-256 942e90e64adf76e92086274b893ed0e64bd30adfa29a10d7fb0f6e9be50107fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a3-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.0a3-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.0a3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 79296b2cbccee5ba50dfdec48d0790c42e5226c1cc2a6fde430483f06ff027b9
MD5 fd4424b9c29585e5b626894f8325e20f
BLAKE2b-256 48776e5cdc5689797694437f7cd873065d74e6ae5ee7a9bd6fd54016c4510ce9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a510985085da574a3e2519d68b9cb104e14df743563cfea2fac25d73fe8cefd2
MD5 6db80bd5a6e139d34663ebd5c2149478
BLAKE2b-256 0391e2b15e98541c63dd878ba7a65e67666ac4f590fdf5ba79209600acdbc617

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a3-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7fc84918a74cc0bca3aaea53dc0492486e6e9ee4606730de386dad4ec73c19c4
MD5 6e00c6a68e1f4c7ffab36e44a165d0e5
BLAKE2b-256 fc87d11873ca09cf547403ac3ffe31df55805d08110eefb4268323102a52866d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: arlmet-0.1.0a3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 74.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.0a3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 98d54df0d99cd3d947c47806e60c6990a6911d6c5bc6ba8489669f7cbcecfcc5
MD5 8aca055c8af8ef412e02f2fccb11d434
BLAKE2b-256 5235f3363b86cd24f648765f533f56b07e4091c88a271b6cf3c6b0bba82aaa41

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a3-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.0a3-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.0a3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3af56e965dd5143bdd234555ed4af608193e5c441312468587681076ec339f2c
MD5 11f6fdf44b1fd1d6440c30d6fa16fc53
BLAKE2b-256 8171a3d6d35bf06d63d3b30434f738f255c9f485f9c708a9a3ec32c75c8352ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce5a20466eb97715ca978f54d9a8d5485b8c3acfb00e906f82db8f20866fe60e
MD5 2419f6bb84b8ef118d3c1ef0dd2e06b6
BLAKE2b-256 194d6cd5263e80c373ddb48c4b961631733bfdba363f712234958c2f62088d98

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9886560992349b572c135fc6d20417027b352f810f1b66d9ee1a31d53d3c05ce
MD5 ba3bd965dd1808a299f77db945f52fee
BLAKE2b-256 6bd541af550f8a54802fef6fa3e347d079e00c5f03f109d2164237aac1249460

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: arlmet-0.1.0a3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 74.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.0a3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5ede020bf8da2f4c8282d1aaa4833d540268579d144019a275975fc417f8f07c
MD5 516332f063a7956f84d043addea606da
BLAKE2b-256 65ffc68ff77ea12121986f445941283b2900f11b5fedce9cc814d8060a26e37f

See more details on using hashes here.

Provenance

The following attestation bundles were made for arlmet-0.1.0a3-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.0a3-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.0a3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a214a91f019b4c579024633258344f275e7ec1489b7c0f496a7bede0c5fd9dba
MD5 3345d796425f8b62e0c396d3f9da48d5
BLAKE2b-256 92ad9fccad999089bf30d11bd52f53d5d9b9a45234b9ea4edfd7e5d51bb93b9e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 999ea79e2c2fe0aacd1f28d81bb1d40183462b0f8b4a0f9c0d66b710801e7178
MD5 c0a5bf644ca11d0f6c34d60be65d8884
BLAKE2b-256 d7fc6c954c9489dbd9dad87740a357a34312a385d6c50b4fc09b18e6d54ae59f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for arlmet-0.1.0a3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e6ca59a425f3c66ddc67e9e38cc18db1c9526794b3c7eb45892fcc30e037d55e
MD5 f998045c1d2c3c91a2031992a34a46c8
BLAKE2b-256 2345bc083f650be10c82c7529f5b3f2dcf3ea63f7e83d68db5a7cbbc5fa09319

See more details on using hashes here.

Provenance

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