How virtualplanetarylaboratory/atmos works
Project type and purpose
• Atmos is an open-source, domain-specific scientific modeling package written mostly in Fortran (F77/F90) with Bash orchestration. It couples two standalone atmospheric models—“PHOTO” (photochemical) and “CLIMA” (climate/radiative transfer)—in an iterative feedback loop to find a self-consistent, steady-state planetary atmosphere.
• Key indicators: a top‐level README describing two models, CLIMA/ and PHOTOCHEM/ folders containing Fortran sources, data directories of absorption cross-sections, input templates, makefiles (ClimaMake, PhotoMake), and orchestration scripts (RunModels.sh).
File structure
• Top‐level modules:
• CLIMA/ – climate model code subdivided into functional areas (CONVEC, RADTRANS, RRTM, SETUP, COUPLE, IO, DATA, INCLUDE, OBJECT_CLIMA)
• PHOTOCHEM/ – photochemical model code subdivided into DATA (cross-sections, flux files), INPUTFILES (templates & parameters), SUBROUTINES (core physics/chemistry routines), LINPACK/QUADPACK (numerical libraries), OBJECTFILES
• COUPLE/ – scripts and placeholders for coupling logic (fromPhoto2Clima.dat, fromClima2Photo.dat)
• Root scripts: RunModels.sh (interactive orchestrator), TestModels.sh, Makefiles for building each model
• Build system: GNU makefiles compile each module into an executable (Clima.run, Photo.run).
• Deployment: purely file-based; no external services. All I/O uses flat text files in prescribed folders.
README for insights
• The two models run alternately: photochemical → output coupling files → climate → output coupling files → photochemical … until convergence.
• RunModels.sh automates input propagation, compilation, execution, and iteration.
• Users choose from input templates (in PHOTOCHEM/INPUTFILES/TEMPLATES and CLIMA/IO/TEMPLATES).
• Each model has its own makefile; coupling toggles via ICOUPLE flags in input files.
Detail & essential elements
• Where include files (.inc) live and how they feed into the build.
• Template selection, code compilation, model invocation, coupling file exchange, and iteration control.