exo_k.adatabase
¶
@author: jeremy leconte
Module containing a class to handle a database of CIA tables to compute opacities with it.
Module Contents¶
-
class
Adatabase
(*str_filters, filenames=None, remove_zeros=False, **kwargs)[source]¶ Bases:
exo_k.util.spectral_object.Spectral_object
Class to group
Atable
objects and combine them in radiative transferInitializes aerosol tables and supporting data from a list of filenames.
- Parameters
filenames (list) – List of names (not full path) of the input cia files. The files must be in the global search path.
A local search path can be specified with ‘search_path=’
See the options of
Atable
__init__ method.-
add_atables
(self, *atables)[source]¶ Adds new
Atable
objects to a Adatabase.- Parameters
atables (
Atable
) – As many Atables as you want.
-
property
names
(self)¶ Gives the names of the aerosols in the database
-
sample
(self, wngrid, remove_zeros=True, use_grid_filter=True, sample_all_vars=False)[source]¶ Samples all the Atables in the database on the same wavenumber grid to be able to use them in radiative transfer modules.
Important
For this method, the default options are remove_zeros=True and use_grid_filter=True. This ensures that you do not count several contributinns twice when you use two different aerosol tables to represent the same aerosol type over two different spectral window (typically VI and IR)
- Parameters
wngrid (array) – new wavenumber grid (cm-1)
See also
See :func:`exo_k.atable.Atable.sample for further details on options.
-
absorption_coefficient
(self, aer_reffs_densities, wngrid_limit=None, log_interp=None)[source]¶ Computes the absorption coefficient in m^-1 for the whole mix specified (assumes data in MKS).
- Parameters
aer_reffs_densities (dict) – A dictionary with aerosol names as keys and lists containing 2 floats (or arrays) as values. The values are the particle effective radii and number densities.
wngrid_limit (array, optional) – Smaller and bigger wavenumbers inside which to perform the calculation.
- Returns
The effective cross section coefficient profile for the aerosols (in m^2).
- Return type
array