CloudMicrophysics.jl

March 18, 2026 · View on GitHub

CloudMicrophysics.jl provides a library of cloud microphysics and aerosol parameterizations for the CliMA Earth System Model. It implements bulk microphysics schemes for cloud formation, precipitation, and aerosol processes, designed for high-performance climate simulations.

Documentation click here :arrow_right:dev
Docs Builddocs build
GHA CIgha ci
Code Coveragecodecov
DownloadsDownloads

Quick Start

Installation

using Pkg
Pkg.add("CloudMicrophysics")
Pkg.add("ClimaParams")

Basic Usage

import CloudMicrophysics as CM
import CloudMicrophysics.Microphysics1M as CM1
import CloudMicrophysics.Parameters as CMP

# Create microphysics parameters
rain = CMP.Rain(Float64)
vel = CMP.Blk1MVelType(Float64).rain

# Compute rain terminal velocity
ρ = 1.2      # air density [kg/m³]
q_rai = 1e-3 # rain specific content [kg/kg]
v_term = CM1.terminal_velocity(rain, vel, ρ, q_rai)

Running tests locally

# Load additional packages needed for tests
julia --project=test

# Enter Package Manager and develop locally
julia>]
pkg> dev .
pkg> instantiate

# Run the tests
julia> include("test/runtests.jl")

Key Features

🌧️ Bulk Microphysics Schemes

  • 0-moment scheme: Simple precipitation removal
  • 1-moment scheme: Marshall-Palmer distributions for rain and snow
  • 2-moment scheme: Seifert & Beheng (2006) with mass and number concentration
  • P3 scheme: Predicted particle properties for ice

🧊 Ice Nucleation

💨 Aerosol Processes

  • Aerosol activation: Abdul-Razzak & Ghan (2000) parameterization
  • Aerosol nucleation: H₂SO₄ and organic nucleation pathways
  • Aerosol model: Modal distributions with κ-Köhler theory

High Performance

  • Type-stable and GPU-compatible (CUDA.jl, AMDGPU.jl)
  • AD-compatible (ForwardDiff.jl) for differentiable physics
  • Optimized for minimal allocations

Documentation

Integration with Climate Models

CloudMicrophysics.jl is used throughout the CliMA ecosystem:

Getting Help

For questions, check the documentation or open an issue on GitHub.