Skip to content

Msturroc/ARLReader.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARLReader.jl

A Julia package for reading NOAA ARL (Air Resources Laboratory) packed meteorological data files used by HYSPLIT and other atmospheric transport models.

Features

  • Read ARL binary packed data files (ERA5, GFS, GDAS formats)
  • Access 2D and 3D meteorological fields by time, level, and variable
  • Automatic grid construction from file headers
  • Meteorological utility functions (dewpoint, potential temperature, relative humidity, wind components)
  • Support for multiple grid resolutions (0.25°, 0.5°, 1.0°)

Installation

using Pkg
Pkg.add(url="https://github.com/Msturroc/ARLReader.jl")

Usage

using ARLReader

# Open an ARL file
arl = read_arl("ERA5_20220421.ARL")

# Inspect the file
println("Source: $(arl.headerinfo["source"])")
println("Resolution: $(arl.resolution)°")
println("Grid: $(arl.headerinfo["Nx"]) x $(arl.headerinfo["Ny"])")
println("Levels: $(available_levels(arl))")
println("Surface variables: $(available_variables(arl, 0))")

# Read a field
recinfo, grid, temperature = load_field(arl, 21, 0, 0, "T02M")

# Read with true longitude [-180, 180]
recinfo, grid, data = load_field(arl, 21, 12, 1000, "UWND", truelon=true)

# Meteorological utilities
rh = rh_from_q(1013.25, 0.01, 293.15)  # relative humidity
θ = pottemp(293.15, 850.0)              # potential temperature
wdir, wspd = wind_from_components(u_field, v_field)

ARL Format

The ARL packed binary format is used by NOAA's Air Resources Laboratory for meteorological data input to HYSPLIT and other Lagrangian transport models. Each file contains gridded fields at multiple vertical levels and time steps, packed using a difference encoding scheme.

License

MIT

About

Pure Julia package for reading NOAA ARL packed binary meteorological data files (ERA5, GFS, GDAS) used by HYSPLIT and other atmospheric transport models.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages