Skip to main content

A python wrapper of the CARMA cloud aerosol model

Project description

Tests Documentation Status PyPI version Python versions License

CARMApy

CARMApy logo

CARMApy is a Python wrapper of the Community Aerosol and Radiation Model for Atmospheres (CARMA), originally developed by Turco et al. (1979), Toon et al. (1988), and Bardeen et al. (2008). CARMApy specifically wraps ExoCARMA, a version of CARMA developed by Gao et al. (2018) and Powell et al. (2018) to model clouds on exoplanets.

This code is still under development: while we believe there are no significant errors in the code, the CARMApy wrapper is still young. If you encounter any issues or bugs, please open an issue or email Wolf Cukier (wcukier@uchicago.edu).

The documentation, including detailed tutorials and installation instructions, are available here: https://carmapy.readthedocs.io

Features

  • Detailed microphysical modeling including
    • Homogeneous and heterogeneous nucleation
    • Particle growth and evaporation
    • Vertical transport including eddy diffusion, falling, and bulk winds
    • Coagulation
  • The ability to use user-defined condensates by specifying their physical properties
  • A beginner-friendly, opinionated API that makes the code easy to learn
  • Easy reading of output data and plotting of results
  • Helper functions with reasonable physical assumptions to supplement input data

Installation

CARMApy is available on PyPI:

pip install carmapy

CARMApy requires Python 3.10 or newer. Pre-built wheels bundle a standalone Fortran binary, so no compiler is needed for a standard install. See the documentation for source builds and details.

Quick Start

import carmapy

# Create a simulation (the name becomes the output directory)
carma = carmapy.Carma("my_first_run")

# Set the timestep [s], output cadence, and number of steps
carma.set_stepping(dt=100, output_gap=100, n_tstep=24000)

# Load the example atmosphere (a 2000 K Sonora Diamondback profile).
# All inputs are cgs: P in barye, T in K, kzz in cm^2/s.
P_levs, T_levs, kzz_levs, mu_levs = carmapy.example.example_levels()
carma.add_P(P_levs)
carma.add_T(T_levs)
carma.add_kzz(kzz_levs)

# Surface gravity [cm/s^2] and mean molecular weight 
carma.set_physical_params(surface_grav=31600, wt_mol=mu_levs[0])
carma.set_atmospheric_parameters_from_defaults("Pure H2")  # H2-dominated
carma.calculate_z(mu_levs)        # derive altitudes from P/T/mu

# Add cloud species: TiO2 nucleates homogeneously, Mg2SiO4 grows on it.
# The second argument is the minimum particle radius [cm].
carma.add_hom_group("TiO2", 1e-8)
carma.add_het_group("Mg2SiO4", "TiO2", 1e-8 * 2**(1/3))

# Initialize gas abundances (via FastChem) and run
carmapy.chemistry.populate_abundances_at_cloud_base(carma)
carma.run()

results = carma.read_results()

See the tutorials for complete, runnable examples.

Citation

If you use CARMApy in your work, please cite CARMApy itself along with the underlying models it is built on. At a minimum:

This work uses CARMApy (Cukier et al. 2026), which is built on the ExoCARMA (Gao et al. 2018, Powell et al. 2018) version of the CARMA model (Turco et al. 1979, Toon et al. 1988, Bardeen et al. 2008).

If you use additional features such as the 2D mode or the FastChem chemistry interface, please also cite the relevant papers. See the citation page for the complete list of references and BibTeX entries.

License

CARMApy is released under the Apache License 2.0.

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

carmapy-1.0.0.tar.gz (36.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

carmapy-1.0.0-py3-none-win_amd64.whl (21.6 MB view details)

Uploaded Python 3Windows x86-64

carmapy-1.0.0-py3-none-win32.whl (21.6 MB view details)

Uploaded Python 3Windows x86

carmapy-1.0.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (21.6 MB view details)

Uploaded Python 3manylinux: glibc 2.26+ x86-64manylinux: glibc 2.28+ x86-64

carmapy-1.0.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (21.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

carmapy-1.0.0-py3-none-macosx_14_0_arm64.whl (21.7 MB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

Details for the file carmapy-1.0.0.tar.gz.

File metadata

  • Download URL: carmapy-1.0.0.tar.gz
  • Upload date:
  • Size: 36.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for carmapy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9cd7caeafc2d211448183f80bddc5527c413a7ab4fe908fe717a6def28cb183d
MD5 9081a89897f43466d0c22aaf235caab2
BLAKE2b-256 3703827919657cac475068ee96f61417accaf2bef48224db05a8c60deadb12ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-1.0.0.tar.gz:

Publisher: release.yml on wcukier/carmapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file carmapy-1.0.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: carmapy-1.0.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 21.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for carmapy-1.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f13da8e0553f05bed7f15a20580addb222a13dd7efa89881e91ffd3b3a89f9ac
MD5 a738666e362e38238f96c8ecb8113c17
BLAKE2b-256 5e947ac9aa6f2448b9faab9e13162881045a49735b34c03ea0555138c6db9c8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-1.0.0-py3-none-win_amd64.whl:

Publisher: release.yml on wcukier/carmapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file carmapy-1.0.0-py3-none-win32.whl.

File metadata

  • Download URL: carmapy-1.0.0-py3-none-win32.whl
  • Upload date:
  • Size: 21.6 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for carmapy-1.0.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 c6ff12465feedda80e7107503261fe4883200c08dda151fc83065a06ca88f351
MD5 9cfe2d6e927bc77793c2348b52292e3f
BLAKE2b-256 a05e14e35a46329d37e6b4d71d909ef81ec689ca56f62446726526d3db5a8fee

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-1.0.0-py3-none-win32.whl:

Publisher: release.yml on wcukier/carmapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file carmapy-1.0.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for carmapy-1.0.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96b62ff3f3b76aa91053b9c0d5f731ab7d3ec3bb96acc42a3b6e33f45588dfda
MD5 80431ce0163b5d792415e5f37914634d
BLAKE2b-256 e4af3f7b86b9100ac46ed55668d6b2ce402fa28973a55772d4fcf8bf5db6b38d

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-1.0.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on wcukier/carmapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file carmapy-1.0.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for carmapy-1.0.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4dd2cee9158e7d0c7e6291f6598846817f0210e80822dc773d5a1145a44986f4
MD5 737cc7a0aff6e4980b3175c0c05a89eb
BLAKE2b-256 06e7f87b5ec479f9fcc2f0247a0a0bbef4f567ad81311e87c16b872c005f17b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-1.0.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release.yml on wcukier/carmapy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file carmapy-1.0.0-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for carmapy-1.0.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d6846a7e2545ea1ca222cdeea77dcd40be1381b4e8960193ca55a72d4b719e70
MD5 f979baf6976bd164c9fb944fccf1f22d
BLAKE2b-256 27edee0c48ca984648fc96b96031f3580a2319fa6f127f3f4e81859a0e90a1f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-1.0.0-py3-none-macosx_14_0_arm64.whl:

Publisher: release.yml on wcukier/carmapy

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