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.0a13.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.0a13-py3-none-win_amd64.whl (21.6 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3Windows x86

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

File metadata

  • Download URL: carmapy-0.7.0a13.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.0a13.tar.gz
Algorithm Hash digest
SHA256 c4d5d7fafaafe39cc02470677f2005af1f9974a613668f10d878c3563e2c04b4
MD5 7a6b8261f1c937664f19c65deb8ead69
BLAKE2b-256 05f1403efd44ad8d0f49f35c7d9c9dd1e97cf5dd36b88c78f3dca27bf21b5c2a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: carmapy-0.7.0a13-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.0a13-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 35dcd7a3cc702d885a2e7400de48ac7b5c61a7648e58c90a1a011010ba9cf2cd
MD5 e3bf371939a7d442cd647f220d7e619c
BLAKE2b-256 1a57a57353ffe226ef08afe2249eede9c3f19c5ed2a42782304541893392b2a5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: carmapy-0.7.0a13-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.0a13-py3-none-win32.whl
Algorithm Hash digest
SHA256 40b2b532ec40fd0375bb088e3b90786109e63aa1eeb758ba45dc541378071a87
MD5 1593ca823db8a15ae89b959a26156f7d
BLAKE2b-256 643d129b7e6400b4f5aa6a1510e656761e4cb03003479c6ab92c9881bba3ff2d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for carmapy-0.7.0a13-py3-none-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 43bc7ef4a467bd61ab2ad33f3f16fd3acabdaa0fa8aeaee83c65fbc8b21d3a49
MD5 75fbc40820fade1cc6a8693c30fb4df4
BLAKE2b-256 470ec95df57a1972df1eb3df66713040c3b115f02d4d4da395ec1f048ded71fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for carmapy-0.7.0a13-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9039993e27dba5ee4d9f164e9a6a9f25d9e657360c920cd4c552130f72415704
MD5 d1b20803a5f32609b869a3a50cca5b9e
BLAKE2b-256 9fcca72c13f0f1202939c73e32809ff4cd84845ed92d8c10453bff81102d836d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for carmapy-0.7.0a13-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 33616e9603c1bd1eec1077ec35fab66a69a9ac0d9a731bbd22fb31a3d78b1837
MD5 0a4c2cea4fa67d5124415e70c27ef1ad
BLAKE2b-256 17bde6ce66dec8c3c22acddc2f7f77f952179877346f42790c2a62b6a6aae65b

See more details on using hashes here.

Provenance

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