exo_k.chemistry

@author: jeremy leconte

Module Contents

class exo_k.chemistry.EquChemTable(filename=None, remove_zeros=False)[source]

Bases: object

Class to load and interpolate chemistry data.

Initializes chemical composition tables from various init files

Parameters:

filename (str) – Name of the input file

filename
tgrid = None
pgrid = None
logpgrid = None
p_unit = None
Nt = None
Np = None
molecules = None
vol_mix_ratio
logx_interp
read_composition_in(filename=None, remove_zeros=False, skiprows=7)[source]

Initializes chemical composition tables from composition.in files

Parameters:
  • filename (str) – Name of the input file

  • skiprows (int, optional) – Number of lines to skip in the file

read_composition_dat(filename=None, remove_zeros=False, skiprows=1)[source]

Initializes chemical composition tables from composition.in files

Parameters:
  • filename (str) – Name of the input file

  • skiprows (int, optional) – Number of lines to skip in the file

remove_zeros(deltalog_min_value=30.0)[source]

Finds zeros in the chem data and set them to (10.^-deltalog_min_value) times the minimum positive value in the table. This is to be able to work in logspace.

setup_interpolation()[source]

Creates interpolating functions to be called later on.

vmr(logP, T, mol)[source]

Interpolates a single molecule on a logP-T value

interpolate_vmr(logp_array=None, t_array=None, mols=None, grid=False)[source]

Interpolates all molecules in mols on a logP-T grid

class exo_k.chemistry.InterpolationChemistry(filename=None, t_min=260)[source]

Bases: object

Chemistry model interpolating Volume Mixing Ratios based on a datafile provided by V. Parmentier.

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

  • t_min (float) – minimal temperature to consider. Cannot be below 260K because not enough data in the file.

df
tgrid
logpgrid
data
compute_vmr(molecule=None, logp_array=None, t_array=None)[source]
Parameters:
  • molecule (str) – Name of molecule to deal with

  • logp_array (array, np.ndarray) – Array of log10 pressures (Pa)

  • t_array (array, np.ndarray) – Array of temperatures (K)

compute_vmr_grid(molecule=None, logp_array=None, t_array=None)[source]