Configuring AGNI
AGNI configuration files are formatted using TOML. There are examples in res/config/. The default configuration file contains comments explaining the purpose of each parameter. Take care to format the variables in the TOML file correctly. There are no 'default values': not all parameters are required in all cases, but the model will return an error naming any parameters which are both necessary and absent.
Run AGNI with a specific configuration file by passing its path as an argument:
./agni.jl res/config/hotdry.tomlConfiguration sections
The configuration files are broken into four sections (or "tables"). A full description of every parameter is given in the Configuration reference.
[planet]- General properties of the planet: surface temperature, instellation, gravity, stellar spectrum properties, and surface material.[files]- Input/output files and other paths: spectral file, stellar spectrum, output directory, and optional RFM parameter file.[composition]- Atmospheric composition and chemistry. There are three main ways to set the composition: partial pressures (p_dict), mixing ratios (vmr_dictorvmr_file), or by metallicities (metallicities).[execution]- Parameters that control what the model does: number of levels, solver choice, solution type, convergence tolerances, initial temperature profile, and runtime limits.[physics]- Physics toggles: convection, condensation, chemistry, real-gas EOS, continua, Rayleigh scattering, aerosols, clouds, sensible heat.[plots]- Toggle which diagnostic plots are generated by AGNI.
Choosing a solution type
The execution.solution_type integer tells AGNI what atmospheric state to solve for:
- 1 – Conserve energy fluxes with fixed surface temperature (
planet.tmp_surf). - 2 – Conserve energy fluxes with the surface temperature set by heat conduction through a solid conductive boundary layer; requires
planet.skin_d,planet.skin_k, andplanet.tmp_magma. - 3 – Solve for a state where the net flux at each level equals
planet.flux_int(radiative equilibrium).
See Obtaining a solution in the model description for a detailed explanation.
Choosing a solver
The execution.solver string selects the numerical solver:
""(empty) – no solving; fluxes are calculated from the initial state only."newton"– Newton-Raphson algorithm."gauss"– Gauss-Newton algorithm."levenberg"– Levenberg–Marquardt algorithm."transparent"– use whencomposition.transparent=true.
The step taken by the non-linear solvers is controlled by execution.linesearch. The non-monotone Armijo linesearch (linesearch = 3) is recommended when steps are limited by execution.dx_max, since the backtracking linesearch (linesearch = 2) can stall in that case by repeatedly taking its smallest permitted step. Setting execution.broyden = true updates the Jacobian with Broyden's method between finite-difference evaluations. This substantially reduces the number of radiative transfer calculations when the solver converges, but it may need more steps, and it is intended for use with linesearch = 3. See Iterative steps for details.
Setting the initial temperature profile
execution.initial_state is an ordered list of descriptors applied in sequence to build the starting T(p) profile. Available descriptors:
| Descriptor | Argument | Effect |
|---|---|---|
dry | – | Dry adiabatic lapse rate from the surface upwards |
str | tmp | Isothermal stratosphere at temperature tmp |
iso | tmp | Set the whole atmosphere isothermal at tmp |
csv | pth | Load profile from a CSV file at path pth |
sat | gas | Clausius-Clapeyron saturation curve for gas gas |
ncdf | pth | Load profile from a NetCDF file at path pth |
loglin | tmp | Log-linear profile between tmp_surf and tmp at the top |
ana | – | Guillot (2010) analytical solution |
Example: initial_state = ["dry", "sat", "H2O", "str", "180"] applies the dry adiabat from the surface, the water condensation curve above that, then an isothermal stratosphere at 180 K. Use tmp="Teq" to substitute the planet's radiative equilibrium temperature automatically.
Gas opacity overlap method
physics.overlap_method tells SOCRATES how to combine gas opacities in mixtures:
"ee"– equivalent extinction (fastest)"rorr"– random overlap with resorting and re-binning"ro"– random overlap (most accurate, slowest)
See Amundsen+2017 for a comparison.
Gases loaded from the spectral file
By default, AGNI loads every gas in the spectral file into SOCRATES, including gases that are not in the atmosphere. With physics.load_all_opacities = false, SOCRATES loads only the gases in the composition of the atmosphere. Each band then includes fewer absorbers, which makes the RT faster. For an atmosphere of H₂O, CO₂ and N₂ with Proudspire 32, each longwave calculation takes about a third less time with "ee", and about half the time with "rorr" (with this flag set to physics.load_all_opacities=false).
The fluxes do not change when the first gas listed in each band of the spectral file is in the atmosphere, since the gases left out have zero abundance. SOCRATES treats the first gas listed in a band as its major absorber.
All opacities and gases are always loaded when physics.chemistry=true.
Transparent atmosphere
Setting composition.transparent = true configures a transparent (opacity-free) atmosphere. This is useful for computing bare-rock emission spectra or surface temperatures without an overlying atmosphere. When enabled, use solver = "transparent" and omit all other [composition] parameters.