Skip to content

Repository files navigation

CloudMicrophysics.jl Logo

CloudMicrophysics.jl

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 stable dev
Version version
License license
Tests gha ci
Code Coverage codecov
Downloads Downloads

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: Morrison & Milbrandt (2015) 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

Installation

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

Quick Example

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)

Documentation

Integration with Climate Models

CloudMicrophysics.jl is used throughout the CliMA ecosystem:

Contributing

Contributions are welcome. See the Developer's Guide and AGENTS.md, which points to the shared CliMA developer guides in docs/dev-guides/.

To run the test suite locally:

julia --project=test
julia>]
pkg> dev .
pkg> instantiate
julia> include("test/runtests.jl")

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

Releases

Packages

Used by

Contributors

Languages