Temperature structure generator for planetory atmospheres.
Project description
JANUS
JANUS is the 1D convective-radiative atmosphere module of the PROTEUS coupled atmosphere-interior evolution framework. It builds the vertical temperature-pressure structure of a rocky-planet or magma-ocean atmosphere and computes its radiative fluxes.
Given a surface temperature and pressure, a set of volatile partial pressures, the instellation, and a spectral file, JANUS constructs the profile along a generalised multi-species moist pseudoadiabat capped by a prescribed stratosphere, then evaluates the shortwave, longwave, and net fluxes with SOCRATES. It returns the temperature-pressure profile, the tropopause temperature, and the top-of-atmosphere and surface fluxes. Within PROTEUS it is called each step through the atmos_clim interface; it is also usable standalone for atmosphere-structure studies.
Named for Janus, the two-faced Roman god of transitions and doorways. Pronounced jan-us: Jan as in "january", us as in the collective pronoun.
Atmosphere model
- Generalised moist pseudoadiabat. The troposphere follows the multi-species pseudoadiabat of Graham et al. (2021), which lets several volatiles condense together, capped by a prescribed stratosphere above a diagnosed tropopause.
- Radiative transfer. Shortwave, longwave, and net fluxes are computed with the SOCRATES correlated-k code over a user-selected spectral file and stellar spectrum.
- Two entry points.
RadConvEqmsets the atmosphere to a temperature profile along the general adiabat, whileMCPA_CBLbuilds the multiple-condensible pseudoadiabat and steps the surface temperature to conserve energy across a conductive boundary layer.
Documentation
Full documentation is at proteus-framework.org/JANUS, including:
- Getting started: installation and the quickest path to a first run.
- Tutorial: a first atmosphere-structure calculation.
- How-to guides: install, run the tests, build the documentation.
- Explanations: model overview and the testing suite.
- Validation anchors: the per-source reference-pinned test inventory.
- Publications: the papers that developed and applied JANUS.
Installation
Note: The standard way of installing JANUS is within the PROTEUS framework, as described in the PROTEUS installation guide. The steps below are for a standalone installation.
JANUS has one compiled dependency, SOCRATES, which a helper script clones and builds. Prerequisites: git, Python 3.10+, a Fortran/C build toolchain (gfortran, gcc, make), and NetCDF tools with NetCDF-Fortran development headers.
git clone https://github.com/FormingWorlds/JANUS.git
cd JANUS
# 1. Build SOCRATES and point RAD_DIR at it (omit the path to use ./socrates)
bash tools/get_socrates.sh /path/to/socrates
export RAD_DIR=/path/to/socrates
# 2. Install JANUS (add ,docs for a local documentation build)
pip install -e .[develop]
# 3. Point FWL_DATA at a data directory and download spectral + stellar data
export FWL_DATA=/path/to/fwl_data
janus download spectral
janus download stellar
janus env prints the resolved locations of RAD_DIR and FWL_DATA. The docs extra pulls in Zensical so you can build this documentation locally with zensical serve.
Quick start
The two entry points are importable directly from janus.modules:
from janus.modules import RadConvEqm, MCPA_CBL
The examples/ folder holds runnable scripts that set up an atmosphere, prepare a spectral file, and solve for the profile and fluxes:
python examples/demo_runaway_greenhouse.py # runaway-greenhouse OLR curve
python examples/demo_instellation.py # profile vs instellation
See the first-run tutorial for the full walkthrough.
Citation
If you use JANUS in published work, please cite the methods papers below. The full reference list is on the Publications page.
- Graham, R.J., Lichtenberg, T., Boukrouche, R., & Pierrehumbert, R.T. (2021). A multispecies pseudoadiabat for simulating condensable-rich exoplanet atmospheres. PSJ 2, 207. [DOI]
- Lichtenberg, T., Bower, D.J., Hammond, M., Boukrouche, R., Sanan, P., Tsai, S.-M., & Pierrehumbert, R.T. (2021). Vertically resolved magma ocean-protoatmosphere evolution. JGR Planets 126, e2020JE006711. [DOI]
- Boukrouche, R., Lichtenberg, T., & Pierrehumbert, R.T. (2021). Beyond runaway: initiation of the post-runaway greenhouse state on rocky exoplanets. ApJ 919, 130. [DOI]
License
Apache License 2.0. JANUS is part of the PROTEUS framework.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fwl_janus-26.7.13.tar.gz.
File metadata
- Download URL: fwl_janus-26.7.13.tar.gz
- Upload date:
- Size: 145.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd699d69618cbf453d8e0108af165a44b152125c9b5f6d228289e9895b7bc0f1
|
|
| MD5 |
0229fe91a7198ab35152b09fe374c8ec
|
|
| BLAKE2b-256 |
dde959afbc0ab8db9417acf86cb4ed6eb434be8a98145722759a77e282b81d79
|
Provenance
The following attestation bundles were made for fwl_janus-26.7.13.tar.gz:
Publisher:
publish.yaml on FormingWorlds/JANUS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fwl_janus-26.7.13.tar.gz -
Subject digest:
cd699d69618cbf453d8e0108af165a44b152125c9b5f6d228289e9895b7bc0f1 - Sigstore transparency entry: 2163307106
- Sigstore integration time:
-
Permalink:
FormingWorlds/JANUS@30e50ead4053515f4eca7776d470728a5f919c99 -
Branch / Tag:
refs/tags/26.07.13 - Owner: https://github.com/FormingWorlds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@30e50ead4053515f4eca7776d470728a5f919c99 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fwl_janus-26.7.13-py3-none-any.whl.
File metadata
- Download URL: fwl_janus-26.7.13-py3-none-any.whl
- Upload date:
- Size: 146.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c347ec903236668601dc4ba99cf9095d6194b62f104c89da0d2907119eba735
|
|
| MD5 |
80c307037f8e5e55c0f5f690b6b94940
|
|
| BLAKE2b-256 |
2b3e43b7df225f98f164e84f0478e62fe4cdd76b091c7883092d3dd6b7acc6e1
|
Provenance
The following attestation bundles were made for fwl_janus-26.7.13-py3-none-any.whl:
Publisher:
publish.yaml on FormingWorlds/JANUS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fwl_janus-26.7.13-py3-none-any.whl -
Subject digest:
3c347ec903236668601dc4ba99cf9095d6194b62f104c89da0d2907119eba735 - Sigstore transparency entry: 2163307159
- Sigstore integration time:
-
Permalink:
FormingWorlds/JANUS@30e50ead4053515f4eca7776d470728a5f919c99 -
Branch / Tag:
refs/tags/26.07.13 - Owner: https://github.com/FormingWorlds
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@30e50ead4053515f4eca7776d470728a5f919c99 -
Trigger Event:
release
-
Statement type: