How exoclime/helios works
1. Repository purpose and top-level flow
HELIOS is a GPU-accelerated 1D atmospheric radiative-transfer solver for exoplanets. The main scientific flow is: read planetary/stellar/atmospheric inputs, build or load opacity data, solve radiative-convective equilibrium on a vertical column, then write temperature profiles and emission spectra.
2. Main application entry point
helios.py is the primary run script and likely the orchestration layer. It sits above the source/ package and coordinates parameter parsing, model setup, solver execution, convergence, and output generation.
3. Core compute engine boundary
source/ contains the runtime engine for the model. This is where the physics and numerics live, separated from documentation, plotting, and preprocessing tools. The presence of source/kernels.cu indicates the expensive radiative-transfer and/or iteration work is offloaded to CUDA on the GPU.
4. Radiative-transfer and atmosphere physics
The core physics boundary is in source/computation.py, with supporting modules for constants, derived quantities, and host-side execution. The model is described by the README as hemispheric two-stream radiative transfer with non-isotropic scattering, radiative-convective equilibrium, and optional solid-surface handling.
5. Atmospheric ingredients and parameter sources
Several source/* modules provide model inputs and physical subcomponents:
- species_database.py, planet_database.py, phys_const.py define reference data and constants.
- clouds.py, additional_heating.py, realtime_plotting.py add optional physical or workflow features.
- read.py and write.py form the I/O boundary for loading inputs and producing outputs.
- tools.py and host_functions.py are utility and CPU-side helper layers.
6. Opacity handling is its own subsystem
HELIOS separates opacity generation and opacity use. The main solver consumes opacity tables, while the ktable/ subtree generates or combines them. The README notes support for premixed tables, on-the-fly opacity mixing, correlated-k, and random overlap mixing, so opacity preparation is a distinct upstream stage from the atmosphere solve.
7. ktable/ preprocessing pipeline
ktable/ktable.py is the entry script for k-distribution table generation. The ktable/source_ktable/ package splits the task into smaller stages: building individual opacities, handling continuum and Rayleigh terms, parameter management, and combining species into final tables. Inputs and outputs are kept under ktable/input/ and ktable/param_ktable.dat.
8. Input data and configuration boundary
The repo uses flat parameter files like param.dat and input/species.dat at the top level, plus package-specific input folders. install_input_files.bash installs the canonical input archive from Zenodo, which makes model data a required external asset rather than something generated inside the repository.
9. Stellar spectrum tooling is separate from the atmosphere solver
star_tool/ is a preprocessing utility for creating stellar input spectra, with star_tool/run.py as its driver and star_tool/functions.py plus ASCII solar-spectrum data under star_tool/input/. This produces boundary-condition data for HELIOS rather than participating in the radiative-transfer solve itself.
10. Visualization and analysis are downstream tools
plotting/plot_spectrum.py and plotting/plot_tp.py are post-processing scripts for viewing output spectra and temperature-pressure profiles. They sit outside the solver path and consume generated results.
11. Documentation and reproducibility assets
docs/ is a Sphinx documentation tree, with generated HTML already checked in under docs/build/. supplementary/reproducing_Fig4_of_Malik2017/ contains a self-contained scientific reproduction bundle, including TEA chemistry outputs and analysis scripts, showing the repo’s emphasis on reproducible experiments.
12. Practical architecture diagram takeaway
A good diagram should show three main zones:
- preprocessing/data preparation (install_input_files.bash, ktable/, star_tool/),
- the GPU-based solver core (helios.py, source/, source/kernels.cu),
- and post-processing/docs (plotting/, docs/, supplementary/).
The key data flow is from input databases and opacity tables into the solver, then to temperature-profile and spectrum outputs.
Main entry points: helios.py HELIOS run · computation.py Computation · run.py Star tool · param.dat Param files
Components 21
Preprocessing
Input preparation, opacity generation, and stellar boundary-condition tooling.
- Param files · Top-level runtime parameters and species configuration.
param.dat - Species list · Canonical species definition list used by the model.
input/species.dat - Install data · Bootstrap script for installing the required external input archive.
install_input_files.bash - K-table driver · Entry point for generating k-distribution opacity tables.
ktable/ktable.py - Opacity build · Builds individual species opacities before mixing.
ktable/source_ktable/build_individual_opacities.py - Continuum terms · Handles continuum and Rayleigh contributions in table generation.
ktable/source_ktable/continuous.py - Mixing stage · Combines species into final correlated-k or overlap tables.
ktable/source_ktable/combination.py - Star tool · Driver for producing stellar input spectra.
star_tool/run.py - Star functions · Utility functions and solar-spectrum data used by the stellar preprocessing tool.
star_tool/functions.py
Solver Core
Main GPU-accelerated radiative-convective atmosphere model.
- HELIOS run · Primary entry script coordinating a full model run.
helios.py - Computation · Host-side radiative-transfer and equilibrium computation logic.
source/computation.py - GPU kernels · CUDA implementation of the expensive radiative-transfer and iteration work.
source/kernels.cu - I/O layer · Reads model inputs and writes solved profiles and spectra.
source/read.py - Reference data · Constants, planetary databases, species data, and derived quantities used by the solver.
source/phys_const.py - Host tools · CPU-side helpers, optional physics, realtime plotting, and output formatting.
source/tools.py - Clouds · Cloud and aerosol treatment used as an optional atmospheric ingredient.
source/clouds.py - Extra heating · Additional heating terms coupled into the atmosphere solve.
source/additional_heating.py
Post-processing
Plotting, documentation, and reproduction artifacts.
- Spectrum plot · Post-processing script for model spectra.
plotting/plot_spectrum.py - TP plot · Post-processing script for temperature-pressure profiles.
plotting/plot_tp.py - Docs · Sphinx documentation sources and built site.
docs/index.rst - Reproduction bundle · Self-contained materials for reproducing a published figure.
supplementary/reproducing_Fig4_of_Malik2017
Connections 20
- Install data → Param files: installs · Sets up required input assets and configuration.
- Param files → HELIOS run: configures · Runtime parameters steer the main solver run.
- Species list → HELIOS run: species · Species definitions feed the atmosphere setup.
- Star tool → HELIOS run: stellar BC · Produces stellar spectra used as boundary conditions.
- Star tool → Star functions: uses · Driver relies on stellar preprocessing helpers.
- K-table driver → Opacity build: starts · Coordinates generation of individual opacities.
- Opacity build → Continuum terms: adds terms · Incorporates continuum and Rayleigh contributions.
- Continuum terms → Mixing stage: feeds · Prepared opacity terms are combined into final tables.
- Mixing stage → HELIOS run: opacity tables · Final k-tables are consumed by the atmosphere solver.
- HELIOS run → I/O layer: loads/writes · Main run reads inputs and emits solved outputs.
- HELIOS run → Computation: executes · Entry point delegates physics and numerics to computation.
- Computation → GPU kernels: offloads · Heavy radiative-transfer work is accelerated on the GPU.
- Computation → Reference data: uses · Computation depends on model constants and reference data.
- Computation → Host tools: helpers · Uses host-side utilities and optional runtime support.
- Computation → Clouds: couples · Cloud physics modifies radiative and atmospheric properties.
- Computation → Extra heating: couples · Extra heating terms are folded into the energy balance.
- Spectrum plot → HELIOS run: analyzes output · Consumes generated spectra for visualization.
- TP plot → HELIOS run: analyzes output · Consumes solved temperature profiles for visualization.
- Docs → HELIOS run: documents · Documentation describes the solver, parameters, and preprocessing.
- Reproduction bundle → HELIOS run: reproduces · Supplementary bundle demonstrates a scientific reproduction workflow.