Skip to main content

Volatile partitioning between a rocky interior and atmosphere

Project description

atmodeller logo

Atmodeller

Release 0.10.0 Python 3.11+ License: GPL v3 CI Checked with pyright bear-ified 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, or data from Atmodeller, please cite:

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

The data from the above study are also available for download at https://doi.org/10.17605/OSF.IO/PC5TD.

Basic usage

Jupyter notebooks in the notebooks/ directory demonstrate how to perform single and batch calculations, and how to perform iterative updates with changing constraints. 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")
H2O_g = Species.create_gas("H2O", solubility=solubility_models["H2O_peridotite_sossi23"])
O2_g = Species.create_gas("O2")

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")

Funding

Atmodeller was created as part of a SERI-funded ERC Starting grant '2ATMO' granted to P. Sossi (Contract no. MB22.00033), with additional funding provided through a Swiss National Science Foundation (SNSF) Eccellenza Professorship (#203668).

K. Hakim acknowledges the FED-tWIN research program STELLA (Prf-2021-022) funded by the Belgian Science Policy Office (BELSPO) and the research grant G014425N funded by the Research Foundation Flanders (FWO).

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.10.0.tar.gz (9.2 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.10.0-py3-none-any.whl (9.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: atmodeller-0.10.0.tar.gz
  • Upload date:
  • Size: 9.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for atmodeller-0.10.0.tar.gz
Algorithm Hash digest
SHA256 c6f083b2b3d116a937ad40fed5d90563babd078f7a95a720950205619a849330
MD5 70c8fcc28a19d8b14446f208e4dae90f
BLAKE2b-256 2bc5981c65e0ee798862ed30a2b7d7ff639f0f2ae2e2c56e3a79c2049cee1cb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for atmodeller-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7070421fffbebe797120067a3a13b4f2c88867d793667c514d8f8c0c7495e31e
MD5 4c34826a84c7001cea9c28c73c6d68b4
BLAKE2b-256 65e2af4a519730ca09db05419d803ac85945e31d072cf5eb15040183fbcac609

See more details on using hashes here.

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