:py:mod:`exo_k.atm_profile` =========================== .. py:module:: exo_k.atm_profile .. autoapi-nested-parse:: @author: jeremy leconte This module contain classes to handle atmospheric profiles. Radiative properties are handled in atm.py which contains a daughter class. The nomenclature for layers, levels, etc., can be found in atm.py. Module Contents --------------- .. py:class:: Atm_profile(composition=None, psurf=None, ptop=None, logplay=None, tlay=None, Tsurf=None, Tstrat=None, grav=None, Rp=None, Mgas=None, Rstar=None, rcp=None, Nlay=20, logplev=None, aerosols=None, Nlev=None, tlev=None, **kwargs) Bases: :py:obj:`object` A class defining an atmospheric PT profile with some global data (gravity, etc.) The derived class :class:`~exo_k.atm.Atm` handles radiative transfer calculations. Initializes atmospheric profiles :param composition: Keys are molecule names and values the vmr. Vmr can be arrays of size Nlev-1 (i.e. the number of layers). :type composition: :class:`dict` :param grav: Planet surface gravity (gravity constant with altitude for now). :type grav: :class:`float` :param Rp: Planet radius. If float, meters are assumed. :type Rp: :class:`float` or :class:`Astropy.unit quantity` :param rcp: Adiabatic lapse rate for the gas (R/cp) :type rcp: :class:`float` :param Mgas: Molar mass of the gas (kg/mol). If given, overrides the molar mass computed from composition. :type Mgas: :class:`float`, *optional* There are two ways to define the profile. You can define: * Nlay: int Number of layers * psurf, Tsurf: float Surface pressure (Pa) and temperature * ptop: float Pressure at the top of the model (Pa) * Tstrat: float Stratospheric temperature This way you will have an adiabatic atmosphere with Tsurf at the ground that becomes isothermal wherever T==ilay layer (accounting for a factor of 2 due to symmetry) .. py:method:: plot_T_profile(ax, invert_p=True, use_altitudes=False, xscale=None, yscale=None, **kwarg) Plot the T P profile :param ax: A pyplot axes instance where to put the plot. :type ax: :class:`pyplot.Axes` :param x/yscale: If 'log' log axes are used. :type x/yscale: :class:`str`, *optional* .. py:method:: write_soundings(dirname='.', fmt='%.10e', cp=None, qvap=None, p0=None, p_dry=None) Writes sounding files that can be used to initiate the mesoscale model