SAGE26 is a C99 semi-analytic code for modelling galaxy formation in a cosmological context. It is a major update to Croton et al. (2016), adding a two-regime CGM model, FIRE stellar feedback, feedback-free burst (FFB) galaxies, multiple H2-based star formation prescriptions, and extended bulge/ICS tracking.
SAGE reads N-body merger trees, evolves galaxies through cosmic time using semi-analytic prescriptions, and writes galaxy catalogues in HDF5 or binary format. It runs on any simulation whose trees are in a supported format and contain a minimum set of halo properties. Test trees for the Mini-Millennium Simulation are provided.
| Feature | Parameter | Reference |
|---|---|---|
| Two-regime CGM model with self-regulating precipitation | CGMrecipeOn |
Dekel & Birnboim (2006), Voit (2015) |
| FIRE stellar feedback | FIREmodeOn |
Muratov et al. (2015) |
| Feedback-free burst galaxies | FeedbackFreeModeOn |
Li et al. (2024), Boylan-Kolchin (2025) |
| 7 H2 star formation prescriptions | SFprescription |
BR06, KMT09, KD12, K13, GD14, S25 |
| Separate merger/instability bulge tracking | BulgeSizeOn |
Tonini et al. (2016) |
| ICS assembly tracking | TrackICSAssembly |
— |
| Full star formation history arrays | SaveFullSFH |
— |
| Concentration | ConcentrationOn |
Ishiyama+21 lookup table, Vmax/Vvir, Vmax/Vvir with subhalo infall freeze |
| ConsistentTrees, Genesis, Gadget-4 tree readers | TreeType |
— |
| HDF5 output + libsage.so for Python/PSO | OutputFormat |
— |
| Package | Required | Notes |
|---|---|---|
| C99 compiler (gcc or clang) | Yes | |
| GSL | Yes | required for tests |
| HDF5 | Optional | HDF5 tree reading and output |
| MPI | Optional | parallel execution |
git clone https://github.com/MBradley1985/SAGE26.git
cd SAGE26
make # serial build -- produces ./sage and libsage.so
make USE-MPI=yes # MPI-parallel build (switches compiler to mpicc)
make USE-HDF5=yes # enable HDF5 support
make MEM-CHECK=yes # address/UB sanitizers for debugging (gcc only)
make clean # remove all build artefacts./first_run.sh # create output dirs, download Mini-Millennium trees
./sage input/millennium.par # run the model (serial)
mpirun -np 4 ./sage input/millennium.par # run in parallel
python plotting/allresults-local.py # z=0 diagnostic plots
python plotting/allresults-history.py # multi-redshift diagnosticsFull details on the parameter file format, output format, and all physics switches are in
docs/parameters.md.
Every switch below is parsed by src/core_read_parameter_file.c.
Full descriptions, defaults, and the model-parameter (non-switch) list are in
docs/parameters.md.
| Value | Prescription |
|---|---|
| 0 | Croton et al. (2006) original |
| 1 | Blitz & Rosolowsky (2006) H2 |
| 2 | Somerville et al. (2025) SFR |
| 3 | Somerville et al. (2025) SFR + H2 |
| 4 | Krumholz & Dekel (2012) |
| 5 | Krumholz, McKee & Tumlinson (2009) |
| 6 | Krumholz (2013) |
| 7 | Gnedin & Draine (2014) |
| Value | Mode |
|---|---|
| 0 | Off |
| 1 | Empirical (Croton+2016 radio mode) |
| 2 | Bondi-Hoyle accretion |
| 3 | Cold-cloud accretion |
| Value | Mode |
|---|---|
| 0 | Off |
| 1 | Croton+2016 reheating/ejection |
| Value | Mode |
|---|---|
| 0 | Off |
| 1 | Kravtsov+2004 analytic suppression of infall |
| Value | Mode |
|---|---|
| 0 | Off |
| 1 | Toomre criterion drives bulge growth, instability starbursts, BH growth |
Galaxies below the Dekel & Birnboim (2006) shock mass are placed in Regime 0 (CGM / precipitation regime); those above are in Regime 1 (hot-halo / classical cooling regime). Each regime uses a dedicated cooling recipe.
| Parameter | Values | Effect |
|---|---|---|
CGMrecipeOn |
0/1 | 0=off (classical C16 cooling only); 1=on. Carr+2022 exact copy. |
The snapshot interval is integrated with a substep count that scales with
deltaT / t_dyn, so high-redshift snapshots spanning several dynamical times
are resolved with more substeps (bounded by a STEPS floor and MAX_STEPS
cap) rather than a fixed count.
| Parameter | Values | Effect |
|---|---|---|
SubstepResolution |
double | Runtime multiplier on both the adaptive-substep floor and cap; default 1.0. Sweep for convergence / N-invariance testing without recompiling |
| Value | Mode |
|---|---|
| 0 | Off |
| 1 | Muratov+2015 FIRE mass loading |
| Value | Mode |
|---|---|
| 0 | Off |
| 1 | Li+2024 sigmoid |
| 2 | Boylan-Kolchin+2025 (Ishiyama+21 concentration) |
| Value | Method |
|---|---|
| 0 | Off |
| 1 | Ishiyama+2021 lookup table |
| 2 | V_max / V_vir from the simulation |
| 3 | V_max / V_vir with subhalo infall freeze for satellites |
| Parameter | Values | Effect |
|---|---|---|
H2DiskAreaOption |
1–3 | Disk area for H2 surface density: 1=π r_disk²; 2=π (3 r_disk)²; 3=2π r_disk² |
H2RadialIntegrationOn |
0/1 | Radial ring integration for H2 fraction (slower, more accurate) |
H2RadialNBins |
int | Number of radial bins for ring integration |
| Parameter | Values | Effect |
|---|---|---|
TrackICSAssembly |
0/1 | Record satellite disruption / accretion contributions to ICS |
| Parameter | Values | Effect |
|---|---|---|
OutputFormat |
string | sage_hdf5 or sage_binary |
SaveFullSFH |
0/1 | Track per-snapshot SFR history arrays |
NumOutputs |
int | Number of snapshot outputs; -1 = all snapshots |
lhalo_binary, lhalo_hdf5, consistent_trees_ascii, consistent_trees_hdf5,
genesis_lhalo_hdf5, gadget4_hdf5
cd tests && make test # build and run all suites
cd tests && make test_conservation # conservation tests only (fastest)
cd tests && make quick # single fastest check
bash tests/run_integration_tests.sh # full integration test (slower)The regression baseline checks that output is bit-identical across 5444 datasets:
bash tests/regression_baseline.shAfter any physics change, recapture the baseline with:
python3 tests/regression_baseline.py capture input/millennium.parAutomated parameter calibration via Particle Swarm Optimization is available as a separate
package: SAGE-PSO. It drives libsage.so to
evaluate parameter samples against observational constraints (stellar mass functions,
star formation rates, etc.) and supports machine-learning emulators to accelerate
optimization.
If you use SAGE26 in a publication, please cite:
@article{bradley2026a,
title = {SAGE26 Paper I: Modelling the Baryon Cycle from Cosmic Dawn to the Present Day},
author = {Bradley, Michael and Croton, Darren J. and Paun, Robert A. Mostoghiu and Chowdhury, Dhruba Dutta and Willingham, Jayde},
year = 2026,
journal = {The Astrophysical Journal Supplement Series},
publisher = {(In prep.)}
}and the original SAGE paper:
@article{croton2016sage,
author = {Croton, D.~J. and Stevens, A.~R.~H. and Tonini, C. and
Garel, T. and Bernyk, M. and Bibiano, A. and Hodkinson, L. and
Mutch, S.~J. and Poole, G.~B. and Shattow, G.~M.},
title = {Semi-Analytic Galaxy Evolution (SAGE): Model Calibration and Basic Results},
journal = {ApJS},
year = {2016},
volume = {222},
pages = {22},
doi = {10.3847/0067-0049/222/2/22},
eprint = {1601.04709},
}Original SAGE is also available on ascl.net.
- Documentation
- Parameter reference
- Developer guide
- Changelog
- Contributing
- SAGE-PSO — automated parameter calibration
- Michael Bradley (@MBradley1985) — mbradley@swin.edu.au
- Darren Croton (@darrencroton)
Questions and comments welcome via GitHub Issues or email.
MIT — see LICENSE.
Claude Code (Anthropic) was used during development for documentation and style-guide work, linting, code-error fixes, building the test suite, and some code restructuring. All model design, physics choices, and results remain the authors' own, and all such changes were reviewed and tested before inclusion.
