Temperature (taurex.temperature)

Base

class TemperatureProfile(name)[source]

Bases: taurex.data.fittable.Fittable, taurex.log.logger.Logger, taurex.output.writeable.Writeable, taurex.data.citation.Citable

Abstract Class

Defines temperature profile for an atmosphere

Must define:

Parameters

name (str) – Name used in logging

property averageTemperature
initialize_profile(planet=None, nlayers=100, pressure_profile=None)[source]

Initializes the profile

Parameters
  • planet (Planet) –

  • nlayers (int) – Number of layers in atmosphere

  • pressure_profile (array) – Pressure at each layer of the atmosphere

classmethod input_keywords()[source]

Return all input keywords

property profile

Must return a temperature profile at each layer of the atmosphere

Returns

temperature – Temperature in Kelvin

Return type

array

write(output)[source]

Isothermal

class Isothermal(T=1500)[source]

Bases: taurex.data.profiles.temperature.tprofile.TemperatureProfile

An isothermal temperature-pressure profile

Parameters

T (float) – Isothermal Temperature to set

classmethod input_keywords()[source]

Return all input keywords

property isoTemperature

Isothermal temperature in Kelvin

property profile

Returns an isothermal temperature profile

Returns: array

temperature profile

write(output)[source]

Two-stream approximation (Guillot)

class Guillot2010(T_irr=1500, kappa_irr=0.01, kappa_v1=0.005, kappa_v2=0.005, alpha=0.5, T_int=100)[source]

Bases: taurex.data.profiles.temperature.tprofile.TemperatureProfile

TP profile from Guillot 2010, A&A, 520, A27 (equation 49) Using modified 2stream approx. from Line et al. 2012, ApJ, 749,93 (equation 19)

Parameters
  • T_irr (float) – planet equilibrium temperature (Line fixes this but we keep as free parameter)

  • kappa_ir (float) – mean infra-red opacity

  • kappa_v1 (float) – mean optical opacity one

  • kappa_v2 (float) – mean optical opacity two

  • alpha (float) – ratio between kappa_v1 and kappa_v2 downwards radiation stream

  • T_int (float) – Internal heating parameter (K)

BIBTEX_ENTRIES = ['\n @article{guillot,\n author = {{Guillot, T.}},\n title = {On the radiative equilibrium of irradiated planetary atmospheres},\n DOI= "10.1051/0004-6361/200913396",\n url= "https://doi.org/10.1051/0004-6361/200913396",\n journal = {A\\&A},\n year = 2010,\n volume = 520,\n pages = "A27",\n month = "",\n }\n ']
property equilTemperature

Planet equilibrium temperature

classmethod input_keywords()[source]

Return all input keywords

property internalTemperature

ratio between kappa_v1 and kappa_v2

property meanInfraOpacity

mean infra-red opacity

property meanOpticalOpacity1

mean optical opacity one

property meanOpticalOpacity2

mean optical opacity two

property opticalRatio

ratio between kappa_v1 and kappa_v2

property profile

Returns a guillot temperature temperature profile

Returns

temperature_profile

Return type

:obj:np.array(float)

write(output)[source]

Multi Point

exception InvalidTemperatureException[source]

Bases: taurex.exceptions.InvalidModelException

Exception that is called when atmosphere mix is greater than unity

class NPoint(T_surface=1500.0, T_top=200.0, P_surface=None, P_top=None, temperature_points=[], pressure_points=[], smoothing_window=10, limit_slope=9999999)[source]

Bases: taurex.data.profiles.temperature.tprofile.TemperatureProfile

A temperature profile that is defined at various heights of the atmopshere and then smoothend.

At minimum, temepratures on both the top T_top and surface T_surface must be defined. If any intermediate points are given as temperature_points then the same number of pressure_points must be given as well.

A 2-point temperature profile has len(temperature_points) == 0 A 3-point temperature profile has len(temperature_points) == 1

etc.

Parameters
  • T_surface (float) – Temperature at the planets surface in Kelvin

  • T_top (float) – Temperature at the top of the atmosphere in Kelvin

  • P_surface (float , optional) – Pressure for T_surface (Optional) otherwise uses surface pressure from forward model

  • P_top (float , optional) – Pressure for T_top (Optional) otherwise uses top pressure from forward model

  • temperature_points (list) – temperature points between T_top and T_surface

  • pressure_points (list) – pressure points that the each temperature in temperature_points lie on

  • smoothing_window (int) – smoothing window

  • limit_slope (int) –

check_profile(Ppt, Tpt)[source]
generate_pressure_fitting_params()[source]

Generates the fitting parameters for the pressure points These are given the name P_point(number) for example, if two extra pressure points are defined between the top and surface then the fitting parameters generated are P_point0 and P_point1

generate_temperature_fitting_params()[source]

Generates the fitting parameters for the temeprature points These are given the name T_point(number) for example, if two extra temeprature points are defined between the top and surface then the fitting parameters generated are T_point0 and T_point1

classmethod input_keywords()[source]

Return all input keywords

property pressureSurface

None

property pressureTop

None

property profile

Must return a temperature profile at each layer of the atmosphere

Returns

temperature – Temperature in Kelvin

Return type

array

property temperatureSurface

Temperature at planet surface in Kelvin

property temperatureTop

Temperature at top of atmosphere in Kelvin

write(output)[source]

Rodgers

class Rodgers2000(temperature_layers=[], correlation_length=5.0, covariance_matrix=None)[source]

Bases: taurex.data.profiles.temperature.tprofile.TemperatureProfile

Layer-by-layer temperature - pressure profile retrieval using dampening factor Introduced in Rodgers (2000): Inverse Methods for Atmospheric Sounding (equation 3.26). Featured in NEMESIS code (Irwin et al., 2008, J. Quant. Spec., 109, 1136 (equation 19) Used in all Barstow et al. papers.

Parameters
  • temperature_layers (list) – Temperature in Kelvin per layer of pressure

  • correlation_length (float) – In scaleheights, Line et al. 2013 sets this to 7, Irwin et al sets this to 1.5 may be left as free and Pressure dependent parameter later.

  • covariance_matrix (array , optional) – User can supply their own covaraince matrix

BIBTEX_ENTRIES = ['\n @MISC{rodger_retrievals,\n author = {{Rodgers}, Clive D.},\n title = "{Inverse Methods for Atmospheric Sounding - Theory and Practice}",\n howpublished = {Inverse Methods for Atmospheric Sounding - Theory and Practice. Series: Series on Atmospheric Oceanic and Planetary Physics},\n year = "2000",\n month = "Jan",\n doi = {10.1142/9789812813718},\n adsurl = {https://ui.adsabs.harvard.edu/abs/2000SAOPP...2.....R},\n adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n }\n ']
correlate_temp(cov_mat)[source]
property correlationLength

Correlation length in scale heights

gen_covariance()[source]

Generate the covariance matrix if None is supplied

generate_temperature_fitting_params()[source]

Generates the temperature fitting parameters for each layer of the atmosphere For a 4 layer atmosphere the fitting parameters generated are T_0, T_1, T_2 and T_3

classmethod input_keywords()[source]

Return all input keywords

property profile

Must return a temperature profile at each layer of the atmosphere

Returns

temperature – Temperature in Kelvin

Return type

array

write(output)[source]

Array

class TemperatureArray(tp_array=[2000, 1000], p_points=None, reverse=False)[source]

Bases: taurex.data.profiles.temperature.tprofile.TemperatureProfile

Temperature profile loaded from array

classmethod input_keywords()[source]

Return all input keywords

property profile

Returns an isothermal temperature profile

Returns: :obj:np.array(float)

temperature profile

write(output)[source]

File

class TemperatureFile(filename=None, skiprows=0, temp_col=0, press_col=None, temp_units='K', press_units='Pa', delimiter=None, reverse=False)[source]

Bases: taurex.data.profiles.temperature.temparray.TemperatureArray

A temperature profile read from file

Parameters

filename (str) – File name for temperature profile

classmethod input_keywords()[source]

Return all input keywords