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. in prep), 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-0.7.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-0.7.0-py3-none-win_amd64.whl (21.6 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3Windows x86

carmapy-0.7.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-0.7.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-0.7.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-0.7.0.tar.gz.

File metadata

  • Download URL: carmapy-0.7.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-0.7.0.tar.gz
Algorithm Hash digest
SHA256 597c156e0b374cb0ac0026bb49b6a4139197a51ca8448e040be33be90edc1aa8
MD5 a4071e154f8f435ea10cc9b77573ac4c
BLAKE2b-256 4c56167e5212fcb22aa89537eecb3d5fbfcac689df53aa12bb053c6cae4e895f

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-0.7.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-0.7.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: carmapy-0.7.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-0.7.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6edb22ecf731b7e2272609fd02a895d1496fad25a3939a90692bf9e1ba6db744
MD5 ee02edb08b5f998ead0d6a87e88cbfa0
BLAKE2b-256 567413d97cec74017e782e2e39cc48143c30c6998900c7b15a5352168e59430a

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-0.7.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-0.7.0-py3-none-win32.whl.

File metadata

  • Download URL: carmapy-0.7.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-0.7.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 076f2216f812c02314b2bf9c1bb29bd5281cf981be49c7b4a4c1b43f1d697730
MD5 b511f879b4fd7c534c8fc79f4c93207f
BLAKE2b-256 22a26ee4179942316dfc0628e4dc21c136498b02309cbc484b8dc938bb8b11f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-0.7.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-0.7.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for carmapy-0.7.0-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c0dd416c83876b30d43968195d13a96af9620df43d15caba804d83d19460254a
MD5 7bd254aaf785281e4d0933b483c5fe7a
BLAKE2b-256 48d8f26925bbf3814fe41d1f65a0087a463876d348db3a4f0aeec27c6248c758

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-0.7.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-0.7.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for carmapy-0.7.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bc31988d745d2e5ae73b109052b70905e2f0d3b59a0761c133e4617e372abcf3
MD5 6ea5c25c0b0639f7e2fd86882953be5f
BLAKE2b-256 426d62b873a95f6198fe815ce67f57505b9df05015eb23f8f227b5111deab26b

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-0.7.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-0.7.0-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for carmapy-0.7.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c1ae499a1a114e27ec97eeae70d6ce9bf4587de5a2277835715a1b96c3335a09
MD5 5ecc2cc1e7cfcf490a4a291d7e8e8f7f
BLAKE2b-256 3b44635acfbada5bd9c6fbf2b62729aab8274a9c681c3c815f70972045df411d

See more details on using hashes here.

Provenance

The following attestation bundles were made for carmapy-0.7.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