Skip to content

FormingWorlds/JANUS

Documentation Tests Coverage

JANUS (1D convective atmosphere model)

Generates a temperature profile using the generalised moist pseudoadiabat and a prescribed stratosphere. Calculates radiative fluxes using SOCRATES.

Pronounced jan-us. Jan as in "january", and us as in the collective pronoun.

Documentation

The documentation for JANUS can be found here.

Repository structure

  • README.md - This file
  • src/janus/data/ - Janus data files
  • src/janus/modules/ - Utility python scripts
  • src/janus/utils/ - Utility python scripts
  • examples/ - Typical use scripts
  • tools/ - Useful tools

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 developer installation only.

Prerequisites: git, Python 3.10+ (3.11 recommended), a Fortran/C build toolchain (gfortran, gcc, make), and NetCDF tools with NetCDF-Fortran development headers. See detailed installation instructions for more information.

0. Create a Conda environment (optional)

conda create -n janus python=3.11 -y
conda activate janus

1. Install SOCRATES

A helper script clones and builds SOCRATES:

bash tools/get_socrates.sh /path/to/socrates

If the path argument is omitted, SOCRATES is cloned into a socrates/ subdirectory of the current working directory. Once built, add the following to your ~/.bashrc or ~/.zshrc:

export RAD_DIR=/path/to/socrates

2. Install JANUS

git clone git@github.com:FormingWorlds/JANUS.git
cd JANUS
pip install -e .

3. Download JANUS data

Set FWL_DATA to define where spectral and stellar data are stored:

export FWL_DATA=/path/to/fwl_data

Download the default datasets:

janus download spectral
janus download stellar

To download a specific spectral dataset with a given number of bands:

janus download spectral -n Frostflow -b 4096

4. Verify installation

janus env

This prints the resolved locations of RAD_DIR and FWL_DATA.

Run instructions

In the examples/ folder you can find Python scripts showing typical use cases and workflows for atmosphere modelling with JANUS.

About

1-D prescribed atmosphere model of planetary atmospheres that makes use of the SOCRATES radiative transfer code.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors