-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexoatmos_params.py
99 lines (86 loc) · 4.1 KB
/
exoatmos_params.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#---------------------------------------------------------------------
# define Library parameters
# -----------------------------------------------------------------------------
def load_exoatmos_lib_parameters(libdir="", variable_parameters=False) :
#initialize parameters dictionary
p = {}
####### SET LIBRARY DIRECTORY ############
p['LIBDIR'] = libdir
#-----------------------------------------------------
##################### VARIABLES ######################
# Define list of parameters considered as POSSIBLE variables
p['VARIABLES'] = ['TEQ', 'AB_He', 'AB_H2', 'ABUNDANCES', 'MP', 'RP', 'TINT', 'P0', 'KAPPA', 'GAMMA']
# Note: in fact only TEQ, ABUNDANCE (for 1 species), RP, and MP are variables
# but the list above may be used in future implementations to allow
# other variables in the library grid.
# Set index below for the selected species which the abundance is variable
p['VARIABLE_SPECIES_INDEX'] = 0
# Note: the index above is because we consider only one species to vary abundance at a time
# One can include more species in the model, but the abundances must be constant
#-----------------------------------------------------
############### RESOLUTION MODE ######################
# Define resolution mode:
# high-resolution: p['mode'] = 'lbl'
#p['MODE'] = 'lbl'
# low-resolution: p['mode'] = 'c-k'
p['MODE'] = 'c-k'
#-----------------------------------------------------
########### SPECTRAL RANGE (in nm) ####################
p['WL0'] = 950.
p['WLF'] = 2500.
#-----------------------------------------------------
########### EQUILIBRIUM TEMPERATURE [K] ###############
# Equilibrium temperature [K]
# For ranges insert 3 values: [ini, end, nsamples]
if variable_parameters :
p['TEQ'] = [1000, 1200, 3]
else :
# For constant temperature insert a single value: Teq
p['TEQ'] = 1100
### Follow the same format for all variables below
#-----------------------------------------------------
######### CHEMICAL COMPOSITION #############
# Define abundance of Helium
p['AB_He'] = 0.24
# Define abundance of H2
p['AB_H2'] = 0.74
# Whether or not to generate separate models for each species
# E. Martioli 01/09/2020: this is not implemented, i.e., this variable doesn't do anything
p['SEPARATE_SPECIES'] = True
# Species for the atmospheric composition of models
#p['SPECIES'] = ['H2O', 'CO2', 'CO', 'CH4'] # to include other species in the model
p['SPECIES'] = ['H2O']
# Log of molar fraction abundances: log([X]/[H2])
if variable_parameters :
#p['ABUNDANCES'] = [[-6,-2, 3], -6, -3, -8] # to include other species in the model
# ! WARNING: only one species can vary abundance at a time!
# One can change which species is variable by re-setting p['VARIABLE_SPECIES_INDEX'], or
# by simply changing the order of species in p['SPECIES'] above
p['ABUNDANCES'] = [[-4,-2,3]]
else :
p['ABUNDANCES'] = [-3.5]
#############################################
# Define species included in the Rayleigh scattering
p['RAYLEIGH_SPECIES'] = ['H2','He']
# Define pairs of molecules contributing to the continuum opacities
p['CONTINUUM_OPACITIES'] = ['H2-H2', 'H2-He']
#-------------------------------------------------------
######### PLANET PHYSICAL PARAMETERS ##########
# planet mass in [MJup]
p['MP'] = 1.142
# planet radius in [RJup]
p['RP'] = 1.138
# planet internal temperature in [K]
p['TINT'] = 500.
# atmospheric pressure [bar] at "surface" defined by planet radius
p['P0'] = 0.01
# cross section. in the near-infrared kappa_IR=0.01
p['KAPPA'] = 0.01
# Define gamma, which is a free parameter for the T-P profile adopted in the Guillot model
p['GAMMA'] = 0.4
# Define pressure range (log scale) to calculate T-P profile
p['P_START'] = -6
p['P_STOP'] = 2
p['P_NSAMPLES'] = 100
#-------------------------------------------------------
return p