Skip to main content

Volatile partitioning between a rocky interior and atmosphere

Project description

atmodeller logo

Atmodeller

Release 0.7.1 Python 3.10+ License: GPL v3 Python package Test coverage

About

Atmodeller is a Python package that uses JAX to compute the partitioning of volatiles between a planetary atmosphere and its rocky interior. It is released under The GNU General Public License v3.0 or later.

Documentation

The documentation is available online, with options to download it in EPUB or PDF format:

https://atmodeller.readthedocs.io/en/latest/

Quick install

Atmodeller is a Python package that can be installed on a variety of platforms (e.g. Mac, Windows, Linux). It is recommended to install Atmodeller in a dedicated Python environment. Before installation, create and activate the environment, then run:

pip install atmodeller

Downloading the source code is also recommended if you'd like access to the example notebooks in notebooks/.

Citation

If you use Atmodeller please cite (prior to manuscript submission, check back to see if this reference has been updated):

  • Bower, D. J., Thompson, M. A., Hakim, K., Tian, M., and Sossi P. A. (2025), Diversity of rocky planet atmospheres in the C-H-O-N-S-Cl system with interior dissolution, non-ideality and condensation: Application to TRAPPIST-1e and sub-Neptunes, The Astrophysical Journal, submitted.

Basic usage

Jupyter notebooks in the notebooks/ directory demonstrate how to perform single and batch calculations, and how to integrate Atmodeller into time-dependent simulations. A simple example of how to use Atmodeller is provided below:

from atmodeller import (
    InteriorAtmosphere,
    Planet,
    Species,
    SpeciesCollection,
    earth_oceans_to_hydrogen_mass,
)
from atmodeller.solubility import get_solubility_models

solubility_models = get_solubility_models()
# Get the available solubility models
print("solubility models = ", solubility_models.keys())

H2_g = Species.create_gas("H2_g")
H2O_g = Species.create_gas("H2O_g", solubility=solubility_models["H2O_peridotite_sossi23"])
O2_g = Species.create_gas("O2_g")

species = SpeciesCollection((H2_g, H2O_g, O2_g))
planet = Planet()
interior_atmosphere = InteriorAtmosphere(species)

oceans = 1
h_kg = earth_oceans_to_hydrogen_mass(oceans)
o_kg = 6.25774e20
mass_constraints = {
    "H": h_kg,
    "O": o_kg,
}

# If you do not specify an initial solution guess then a default will be used
# Initial solution guess number density (molecules/m^3)
initial_log_number_density = 50

interior_atmosphere.solve(
    planet=planet,
    initial_log_number_density=initial_log_number_density,
    mass_constraints=mass_constraints,
)
output = interior_atmosphere.output

# Quick look at the solution
solution = output.quick_look()

# Get complete solution as a dictionary
solution_asdict = output.asdict()
print("solution_asdict =", solution_asdict)

# Write the complete solution to Excel
output.to_excel("example_single")

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

atmodeller-0.7.1.tar.gz (9.0 MB view details)

Uploaded Source

Built Distribution

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

atmodeller-0.7.1-py3-none-any.whl (9.2 MB view details)

Uploaded Python 3

File details

Details for the file atmodeller-0.7.1.tar.gz.

File metadata

  • Download URL: atmodeller-0.7.1.tar.gz
  • Upload date:
  • Size: 9.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for atmodeller-0.7.1.tar.gz
Algorithm Hash digest
SHA256 d12c4eb5693c1822db55191df0a0f91093c6b4b58a06c42acec0bd65b39f1883
MD5 25558012d1b739dc06d43e9a819785f4
BLAKE2b-256 7cf06a9b29bf9bf9bff1c0829c6d583cceccf20198b258715ecdb6b92cee1220

See more details on using hashes here.

Provenance

The following attestation bundles were made for atmodeller-0.7.1.tar.gz:

Publisher: publish.yaml on ExPlanetology/atmodeller

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

File details

Details for the file atmodeller-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: atmodeller-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for atmodeller-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f6c33e7669a68d3da5591a086c89f5805d8e49319f202ede49644394178e411
MD5 9f8920631a7da126e3a2a41a30440f8e
BLAKE2b-256 b26c608448a23b1fcf3de7cc39baae4c5bc567c5c5119f35b34ff4179251af1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for atmodeller-0.7.1-py3-none-any.whl:

Publisher: publish.yaml on ExPlanetology/atmodeller

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