Radiative Generic Condensable Specie

From Planets
Revision as of 11:13, 20 October 2023 by Noe clement (talk | contribs) (What to add it in my set up)

Jump to: navigation, search

What to add it in my set up

- profile_TRACERNAME_vap & profile_TRACERNAME_ice files (similar to « profile » for temperature) to initialize

- in « traceur.def » (flag is « tracer » but name file is « traceur »…), add the lines :

#ModernTrac-v1
2
TRACERNAME_vap is_condensable=1
TRACERNAME_ice is_condensable=1

- in « gases.def » :

# gases
3
H2_ (or other main gaz)
He_ (or other main gaz)
TRACERNAME
0.8
0.15
-1

- in datadir/ (datagcm), add a file « table_tacers_condensable » with lines similar to :

#name_traceur delta_vapH=J/mol Tref=K Pref=Pa mass=g/mol metallicity_coeff heat_capacity_at_constant_volume
CH4 delta_vapH=10000.0   Tref=90.69 Pref=11700 mass=16.0425  metallicity_coeff=0.0 RCPV_generic=1709
Fe  delta_vapH=401900.0 Tref=2903.0 Pref=100000.0 mass=55.8450  metallicity_coeff=0.0
Cr  delta_vapH=394200.0 Tref=2749.0 Pref=100000.0 mass=51.9961  metallicity_coeff=0.0
Mg  delta_vapH=521700.0 Tref=2303.0 Pref=100000.0 mass=140.6931 metallicity_coeff=2.3025
Na  delta_vapH=265900.0 Tref=1624.0 Pref=100000.0 mass=78.0445  metallicity_coeff=1.1513
KCl delta_vapH=217900.0 Tref=1495.0 Pref=100000.0 mass=74.5498  metallicity_coeff=0.0
Mn  delta_vapH=455800.0 Tref=2064.0 Pref=100000.0 mass=87.0031  metallicity_coeff=2.3025
Zn  delta_vapH=303900.0 Tref=1238.0 Pref=100000.0 mass=97.4450  metallicity_coeff=2.3025

delta_vapH is enthalpy of condensation or sublimation (choose it depending on your P/T conditions).

Tref and Pref are temperature and pressure reference for state change law (Clausius-Clapeyron).

mass is the molar mass.

metallicity_coeff is the metallicity (if you're not concerned by metallicity you can put it to zero).

RCPV_generic is the heat capacity at constant volume (needed for moist convection adjustment).

- in the callphys.def you have to add the flags

# Generic Condensable Tracer
tracer = .true.
generic_condensation = .true. # to activate condensation

# ALREADY AVAILABLE
qvap_deep = 0.20 # kg/kg fixed quantity in the deep atmosphere - works as a sink/source
qvap_top = 1.5e-3 # kg/kg fixed quantity at the top of atmosphere - works as a sink/source
perfect_vap_profile = .true. # to cheat your profile and put the cold trap value in the whole stratosphere for example (can be tuned) in 1D only
generic_rain = .true. # to make condensates precipitating
evap_prec_generic = .true. # to re-evaporate precipitations
rainthreshold_generic = 1e-10 # kg/kg - default value is 0 – how much condensates are kept
evap_coeff_generic = 0.5e5 # evaporation efficiency - default value is 1.

# SOON AVAILABLE
virtual_convadj = .true. # in convadj, virtual potential temperature instead of potential temperature
moistadjustment = .true. # moist adjustment for generic tracer

if you want to make it radiative active (taking into account the variable quantity), you have to build a 5d corrk table and add this flag:

varactive = .true.

Radiative considerations

The model can take into account the radiative effects of Generic condensable specie in the radiative transfer. This is only tested for Hot Jupiter simulations for now. Here is just a copy of the merge request to include the code into the master branch. This will need further editing:


We can activate the scheme by putting aerogeneric = # of aerosols in callphys.def. This is the only needed thing for activating the radiative effects. They must be tracer in modern tracer.def

Commented out the abort if we use more than 4 aerosols

Added reading of optprop files for Radiative Generic Condensable Aerosols

We use the same file for IR and VI channel. For now, only MnS, Cr,Fe and Mg2SiO4 can be read. If you want to add another specie, check the code, it is explained how to quickly do that (right above the Initializations)

Added radii calculation for Radiative Generic Condensable aerosols

Changed the hardcoded size of the totalemit array

The hardcoded size is now 1900 instead of 100 so we don't exceed the array size when working at high spectral resolution (very rare case)

Added opacity computation for Radiative Generic Condensable aerosols

We do this computation in the same fashion as what's performed on water and dust.

switch iniaerosol and initracer order, to prepare for the RGCS scheme

Needed to switch the order of initialization so we can use the RGCS scheme without the assumption that ice and vap tracer of the same specie are following each other in the traceur.def file All my commits regarding the radiative effects of generic tracers. A lot of changes have been made. I've rebased the branch on the latest revision of master + squashed a lot of commits together to avoid the "avalanche de commits". By default, the scheme is NOT activated. Read above on how to activate it


Adding stuff on how to really add a specie (because I'm once again stuck even though I coded that)

go to suaer_corrk. There, need to add the reading of the optical properties file.

Check that in your datadir, the table_tracers_condensable containe the species you wan. You need to have delta_vapH Tref, Pref, mass and metallicity_coeff. In you have all that, you need your traceur.def with the mmol (actually we do't since it's in the table ? check that because weird), the radius and is_condensable=1, is_Rgcs=1