pytmosph3r.chemistry.fastchemistry
Module Contents
- class FastChemistry(gases=None, filename=None)[source]
Bases:
pytmosph3r.chemistry.chemistry.Chemistry
Chemistry model based on FastChem: https://github.com/exoclime/FastChem
- Parameters:
gases (
list
) – List of gases in the atmospherefilename (str) – The path to the parameter file used by FastChem.
- build(atmosphere, input_atmosphere=None)[source]
General function that will be called to compute the chemistry after
atmosphere
has been initialized. It iterates overgases
by callingcompute_vmr()
on each gas.- Parameters:
atmosphere (
AltitudeAtmosphere
) – Altitude-based atmosphere in which to compute the volume mixing ratios ofgases
.input_atmosphere (
InputAtmosphere
, optional) – Input atmosphere if you need it (with input mix_ratios for example).
- compute_vmr(gas, mix_ratio)[source]
This function can be overridden to compute the volume mixing ratio of a gas
gas
usingmix_ratio
, initialized to an array with theshape
of the atmosphere.- Parameters:
gas (str) – Name of the gas
mix_ratio (array, np.ndarray) – Array full of ones of shape
shape
. The array is filled with the values in the atmosphere is the gas was already present, or else ones.