atmodeller


Nameatmodeller JSON
Version 0.9.0 PyPI version JSON
download
home_pageNone
SummaryVolatile partitioning between a rocky interior and atmosphere
upload_time2025-08-03 07:32:46
maintainerNone
docs_urlNone
authorNone
requires_python<=3.13,>=3.11
licenseNone
keywords astrobiology atmospheres chemical-equilibrium degassing equinox exoplanets geochemistry habitability jax magma-ocean numerical-modeling planetary-science thermodynamics volatile-partitioning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<img src="https://github.com/ExPlanetology/atmodeller/blob/main/docs/logo.png" alt="atmodeller logo" width="300"/>
</p>

# Atmodeller

[![Release 0.9.0](https://img.shields.io/badge/Release-0.9.0-blue.svg)](https://github.com/ExPlanetology/atmodeller/releases/tag/v0.9.0)
[![Python 3.11+](https://img.shields.io/badge/Python-3.11+-blue.svg)](https://www.python.org/downloads/release/python-3110/)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-yellow.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![CI](https://github.com/ExPlanetology/atmodeller/actions/workflows/ci.yml/badge.svg)](https://github.com/ExPlanetology/atmodeller/actions/workflows/ci.yml)
[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
[![bear-ified](https://raw.githubusercontent.com/beartype/beartype-assets/main/badge/bear-ified.svg)](https://beartype.readthedocs.io)
[![Test coverage](https://img.shields.io/badge/Coverage-87%25-brightgreen)](https://github.com/ExPlanetology/atmodeller)

## About
Atmodeller is a Python package that uses [JAX](https://jax.readthedocs.io/en/latest/index.html) 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](https://www.gnu.org/licenses/gpl-3.0.en.html).

## Documentation

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

[https://atmodeller.readthedocs.io/en/latest/](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 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. ArXiv e-print [2507.00499](https://arxiv.org/abs/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 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")
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).
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "atmodeller",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<=3.13,>=3.11",
    "maintainer_email": null,
    "keywords": "astrobiology, atmospheres, chemical-equilibrium, degassing, equinox, exoplanets, geochemistry, habitability, jax, magma-ocean, numerical-modeling, planetary-science, thermodynamics, volatile-partitioning",
    "author": null,
    "author_email": "Dan J Bower <dbower@eaps.ethz.ch>",
    "download_url": "https://files.pythonhosted.org/packages/7f/40/52d50f09a31665cbec63870c7825704d412bd28732995837068b1186b980/atmodeller-0.9.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n<img src=\"https://github.com/ExPlanetology/atmodeller/blob/main/docs/logo.png\" alt=\"atmodeller logo\" width=\"300\"/>\n</p>\n\n# Atmodeller\n\n[![Release 0.9.0](https://img.shields.io/badge/Release-0.9.0-blue.svg)](https://github.com/ExPlanetology/atmodeller/releases/tag/v0.9.0)\n[![Python 3.11+](https://img.shields.io/badge/Python-3.11+-blue.svg)](https://www.python.org/downloads/release/python-3110/)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-yellow.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![CI](https://github.com/ExPlanetology/atmodeller/actions/workflows/ci.yml/badge.svg)](https://github.com/ExPlanetology/atmodeller/actions/workflows/ci.yml)\n[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)\n[![bear-ified](https://raw.githubusercontent.com/beartype/beartype-assets/main/badge/bear-ified.svg)](https://beartype.readthedocs.io)\n[![Test coverage](https://img.shields.io/badge/Coverage-87%25-brightgreen)](https://github.com/ExPlanetology/atmodeller)\n\n## About\nAtmodeller is a Python package that uses [JAX](https://jax.readthedocs.io/en/latest/index.html) 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](https://www.gnu.org/licenses/gpl-3.0.en.html).\n\n## Documentation\n\nThe documentation is available online, with options to download it in EPUB or PDF format:\n\n[https://atmodeller.readthedocs.io/en/latest/](https://atmodeller.readthedocs.io/en/latest/)\n\n## Quick install\n\nAtmodeller 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:\n\n```pip install atmodeller```\n\nDownloading the source code is also recommended if you'd like access to the example notebooks in `notebooks/`.\n\n## Citation\n\nIf you use Atmodeller, or data from Atmodeller, please cite:\n\n- 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. ArXiv e-print [2507.00499](https://arxiv.org/abs/2507.00499).\n\nThe data from the above study are also available for download at https://doi.org/10.17605/OSF.IO/PC5TD.\n\n## Basic usage\n\nJupyter 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:\n\n```\nfrom atmodeller import (\n    InteriorAtmosphere,\n    Planet,\n    Species,\n    SpeciesCollection,\n    earth_oceans_to_hydrogen_mass,\n)\nfrom atmodeller.solubility import get_solubility_models\n\nsolubility_models = get_solubility_models()\n# Get the available solubility models\nprint(\"solubility models = \", solubility_models.keys())\n\nH2_g = Species.create_gas(\"H2\")\nH2O_g = Species.create_gas(\"H2O\", solubility=solubility_models[\"H2O_peridotite_sossi23\"])\nO2_g = Species.create_gas(\"O2\")\n\nspecies = SpeciesCollection((H2_g, H2O_g, O2_g))\nplanet = Planet()\ninterior_atmosphere = InteriorAtmosphere(species)\n\noceans = 1\nh_kg = earth_oceans_to_hydrogen_mass(oceans)\no_kg = 6.25774e20\nmass_constraints = {\n    \"H\": h_kg,\n    \"O\": o_kg,\n}\n\n# If you do not specify an initial solution guess then a default will be used\n# Initial solution guess number density (molecules/m^3)\ninitial_log_number_density = 50\n\ninterior_atmosphere.solve(\n    planet=planet,\n    initial_log_number_density=initial_log_number_density,\n    mass_constraints=mass_constraints,\n)\noutput = interior_atmosphere.output\n\n# Quick look at the solution\nsolution = output.quick_look()\n\n# Get complete solution as a dictionary\nsolution_asdict = output.asdict()\nprint(\"solution_asdict =\", solution_asdict)\n\n# Write the complete solution to Excel\noutput.to_excel(\"example_single\")\n```\n\n## Funding\nAtmodeller 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).",
    "bugtrack_url": null,
    "license": null,
    "summary": "Volatile partitioning between a rocky interior and atmosphere",
    "version": "0.9.0",
    "project_urls": {
        "documentation": "https://atmodeller.readthedocs.io/en/latest",
        "homepage": "https://planetology.ethz.ch",
        "issues": "https://github.com/ExPlanetology/atmodeller/issues",
        "repository": "https://github.com/ExPlanetology/atmodeller"
    },
    "split_keywords": [
        "astrobiology",
        " atmospheres",
        " chemical-equilibrium",
        " degassing",
        " equinox",
        " exoplanets",
        " geochemistry",
        " habitability",
        " jax",
        " magma-ocean",
        " numerical-modeling",
        " planetary-science",
        " thermodynamics",
        " volatile-partitioning"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "055b3d635cb4cdaabb4cbd84e8b0cbbebbb83013678517f9e640d44d2a80b689",
                "md5": "72cdfeed41abbacfa2620b66006e82cd",
                "sha256": "a886070939040177b44ff1bf5a5dea16be2293f20b26dc6fd2f3d1f3ca606672"
            },
            "downloads": -1,
            "filename": "atmodeller-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72cdfeed41abbacfa2620b66006e82cd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<=3.13,>=3.11",
            "size": 9191115,
            "upload_time": "2025-08-03T07:32:43",
            "upload_time_iso_8601": "2025-08-03T07:32:43.766361Z",
            "url": "https://files.pythonhosted.org/packages/05/5b/3d635cb4cdaabb4cbd84e8b0cbbebbb83013678517f9e640d44d2a80b689/atmodeller-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7f4052d50f09a31665cbec63870c7825704d412bd28732995837068b1186b980",
                "md5": "4f53677cf168923ce0068debc2be701c",
                "sha256": "b7acf283f0413868efda36ef048469169f28d9f451d12a322bba83426b0828b9"
            },
            "downloads": -1,
            "filename": "atmodeller-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4f53677cf168923ce0068debc2be701c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<=3.13,>=3.11",
            "size": 9225000,
            "upload_time": "2025-08-03T07:32:46",
            "upload_time_iso_8601": "2025-08-03T07:32:46.266995Z",
            "url": "https://files.pythonhosted.org/packages/7f/40/52d50f09a31665cbec63870c7825704d412bd28732995837068b1186b980/atmodeller-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-03 07:32:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ExPlanetology",
    "github_project": "atmodeller",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "atmodeller"
}
        
Elapsed time: 0.72634s