Skip to main content

ARCat: Atmospheric River Categorization Toolkit

ARCat is a Python package for categorizing Atmospheric River (AR) events based on Integrated Vapor Transport (IVT) data. It provides:

  • Event-based AR categorization: Collapses each AR event to its peak intensity.
  • Evolution-based AR categorization: Preserves the intensity evolution within AR events.

Additionally, ARCat computes:

  • Cumulative IVT per AR event.
  • IVT-only values for each AR event.
  • Duration-only values (number of timesteps per event).

It is fully compatible with NumPy arrays, xarray, and Dask, allowing analysis of large datasets efficiently.


Features

  • Event-based and evolution-based AR categorization.
  • Automatic handling of duration rules:
    • Events < 1 day → downgrade category
    • Events 1–2 days → unchanged
    • Events ≥ 2 days → upgrade category
  • Maximum category enforcement.
  • Option to extract IVT-only and duration-only arrays.
  • Easy integration with xarray/Dask for large datasets.
  • Fully documented and tested, with CI support.

Installation

Clone the repository and install locally:

git clone https://github.com/yourusername/arcat.git
cd arcat
pip install -e .

Quick Start

Import the package

import numpy as np
from arcat.core import AR_categorization_scheme, AR_categorization_evolution_scheme

Prepare your IVT array

# Example: random IVT values for demonstration
ivt = np.random.rand(20) * 1500  # IVT in kg/m/s

Event-based AR categorization

# Run the event-based AR scheme
final_cat, cum_ivt, ivt_event, duration_event = AR_categorization_scheme(
    ivt,
    time_resolution_hours=6,  # Data resolution in hours
    bin_width=250.0,           # IVT bin size
    max_category=6             # Maximum AR category
)

print("Categorized AR events:", final_cat)
print("Cumulative IVT:", cum_ivt)
print("IVT-only values:", ivt_event)
print("Duration per timestep:", duration_event)

Evolution-based AR categorization

# Run the evolution-based AR scheme
final_cat, cum_ivt, ivt_event, duration_event = AR_categorization_evolution_scheme(
    ivt,
    time_resolution_hours=6,  # Data resolution in hours
    bin_width=250.0,           # IVT bin size
    max_category=6             # Maximum AR category
)

print("Evolution categories:", final_cat)
print("Cumulative IVT:", cum_ivt)
print("IVT-only values:", ivt_event)
print("Duration per timestep:", duration_event)

Parameters

Parameter Description
ivt_array 1D NumPy array of IVT values (kg/m/s)
time_resolution_hours Temporal resolution of your data in hours (default: 6)
bin_width Width of each IVT bin for categorization (default: 250)
max_category Maximum AR category (default: 6)

Returns

  1. final_categories: Array of AR categories (1–6) after duration adjustments.
  2. cumulative_ivt: Cumulative IVT during AR events.
  3. ivt_event: Original IVT values during AR events (0 elsewhere).
  4. duration_event: Number of timesteps per AR event (0 elsewhere).

Usage Notes

  • Event-based scheme collapses each AR event to its maximum intensity (max_bounded_replace).
  • Evolution-based scheme preserves temporal evolution of IVT within AR events.
  • Duration rules are applied per continuous AR segment.
  • Works with any NumPy array, and can be integrated with xarray or Dask arrays for large datasets.

Adopting for xarray data

final_cat, cum_ivt, ivt_event, duration_event = xr.apply_ufunc(AR_categorization_scheme, 
                             Ivt_ds['IVT'].as_numpy(),
                             input_core_dims = [['time']],
                             output_core_dims = [['time'],['time'],['time'],['time']],
                             vectorize=True,  # Auto-vectorize over lat/lon
                             dask='parallelized',  # Enable parallelization using Dask
                             output_dtypes=[np.int8,np.float32,np.float32, np.int8])

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a new branch: git checkout -b feature-name
  3. Make your changes
  4. Run tests
  5. Submit a pull request

License

This project is licensed under the Creative Commons License.


References

  • Ralph, F. M., Rutz, J. J., Cordeira, J. M., Dettinger, M., Anderson, M., Reynolds, D., ... & Smallcomb, C. (2019). A scale to characterize the strength and impacts of atmospheric rivers. Bulletin of the American Meteorological Society, 100(2), 269-289.
  • Visit the Atmospheric River Tracking Model Intercomparison Project (ARTMIP) to follow Atmospheric River community research and publications.

Metadata

Release files for arcat 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arcat 0.1.0
File Size Uploaded Provenance
arcat-0.1.0.tar.gz 8.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for arcat 0.1.0
File Interpreter ABI Platform
arcat-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / arcat-0.1.0.tar.gz

Download URL arcat-0.1.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
aa574c8cdf5c0e6a413bbdbc9e4bd7af696d269c1e1bdefb647eab1326430ad0
BLAKE2b-256 checksum
How to use checksums
2d9dfb6e03d0b19a75d51cac39687d9b001ce74004a425f87750f0e3f048d631
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / arcat-0.1.0-py3-none-any.whl

Download URL arcat-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da032bf4161628c6aa4f3dc5e5cfeeb6c306490250b081737aeaa5d245142402
BLAKE2b-256 checksum
How to use checksums
4a2d2ba41fe2570bab12676f4d3bc4726a978b2c59f26d2cd7fe3adb3f963ea7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for arcat 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page