pytmosph3r.chemistry.interpolation

Module Contents

class InterpolationChemistry(gases=None, filename=None, t_min=260)[source]

Bases: pytmosph3r.chemistry.chemistry.Chemistry

Chemistry model interpolating Volume Mixing Ratios based on a datafile. See the Abundances-TiO.dat for an example. VMRs should be in the logarithmic space. See logp_grid for details on the pressure format.

Parameters:
  • gases (list) – List of gases to consider for interpolation.

  • filename (str) – The path to the datafile.

t_grid

Temperature grid (in K).

logp_grid

Log(P) grid in Pa. For this, the pressure ‘x’ from the file is transformed via \(log_{10}(exp(x)))+2\).

compute_vmr(gas, mix_ratio)[source]

This function can be overridden to compute the volume mixing ratio of a gas gas using mix_ratio, initialized to an array with the shape 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.

inputs()[source]