## Orbit / general options
## ~~~~~~~~~~~~~~~~~~~~~~~
# Run with or without tracer transport ?
tracer       = .true.
# Diurnal cycle ?  if diurnal=false, diurnally averaged solar heating
diurnal      = .false. 
# Seasonal cycle ? if season=false, Ls stays constant, to value set in "start"
season       = .true. 
# Tidally resonant orbit ? must have diurnal=false, correct rotation rate in newstart
tlocked      = .false.
# Tidal resonance ratio ? ratio T_orbit to T_rotation
nres         = 1
# Planet with rings?
rings_shadow = .false.
# Compute latitude-dependent gravity field??
oblate       = .true.
# Include non-zero flattening (a-b)/a?
flatten      = 0.06487
# Needed if oblate=.true.: J2
J2           = 0.01470
# Needed if oblate=.true.: Planet mean radius (m)
Rmean        = 69911000.
# Needed if oblate=.true.: Mass of the planet (*1e24 kg)
MassPlanet   = 1898.3
# Write some more output on the screen ?
lwrite       = .false.
# Save statistics in file "stats.nc" ?
callstats    = .false.
# Test energy conservation of model physics ?
enertest     = .false.
# Stop the simulation if radiative temperature is below minimum corrk temperature (default=.true.)
strictboundcorrk = .false.
# Stop the simulation if radiative temperature is below minimum cia temperature (default=.true.)
strictboundcia = .false.

## Directory where external input files are
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
datadir = datadir

## Radiative transfer options
## ~~~~~~~~~~~~~~~~~~~~~~~~~~
# call radiative transfer?
callrad          = .true.
# the rad. transfer is computed every "iradia" physical timestep
iradia           = 500
# call multilayer correlated-k radiative transfer ?
corrk            = .true.
# Include continuum absorption in radiative transfer (note CO2 is treated separately) ?
continuum        = .true.
# folder in which correlated-k data is stored ?
corrkdir         = LMDZ_Jupiter_water_var
# H2H2 CIA file version (2011 or 2018) ? (default=2011)
versH2H2cia = 2018
# normal or equilibrium H2 ortho-para mixture for CIA? (default=normal)
H2orthopara_mixture = equilibrium
# call visible gaseous absorption in radiative transfer ?
callgasvis       = .true.
# Include Rayleigh scattering in the visible ?
rayleigh         = .true.
# Uniform absorption coefficient in radiative transfer?
graybody         = .false.
# Characteristic planetary equilibrium (black body) temperature
# This is used only in the aerosol radiative transfer setup. (see aerave.F)
tplanet          = 100.
# Output spectral OLR in 1D/3D?
specOLR          = .true.
# Output global radiative balance in file 'rad_bal.out' - slow for 1D!!
meanOLR          = .false.
# Variable gas species: Radiatively active ?
varactive        = .true.
# Variable gas species: Fixed vertical distribution ?
#   (not to be used in time integration mode)
varfixed         = .false.
# Variable gas species: Saturation percentage value at ground ?
satval           = 0.0
# Force specific heat capacity and molecular mass values
cpp_mugaz_mode      = 1
# Specific heat capacity in J K-1 kg-1 [only used if force_cpp = T]
cpp              = 11500.
# Molecular mass in g mol-1 [only used if force_cpp = T]
mugaz            = 2.343
## DEBUG
# To not call abort when temperature is outside boundaries:
#strictboundcorrk = .false.
# To not stop run when temperature is greater than 400 K for H2-H2 CIA dataset:   
#strictboundcia = .false.
# Add temperature sponge effect after radiative transfer?
#callradsponge    = .false.



## Star type
## ~~~~~~~~~
##stelspec_file = sol_2columns.txt
stelspec_file = spectrum_Sun_2025.dat
tstellar=5800.
Fat1AU = 1366.0

## Tracer and aerosol options 
## ~~~~~~~~~~~~~~~~~~~~~~~~~~
# Gravitational sedimentation of tracers (just H2O ice for now) ?
sedimentation = .false.
# atm mass update due to tracer evaporation/condensation? (default=.false.)
mass_redistrib = .false.

## Other physics options
## ~~~~~~~~~~~~~~~~~~~~~
# call turbulent vertical diffusion ?
calldifv    = .true.
# use turbdiff instead of vdifc ?
UseTurbDiff = .true.
# call convective adjustment ?
calladj     = .true.
# call moist convective adjustment ?
moistadjustment = .true.
# call thermal plume model ?
calltherm   = .false.
# call thermal conduction in the soil ?
callsoil    = .false.
# Internal heat flux (matters only if callsoil=F)
intheat     = 7.5
# Remove lower boundary (e.g. for gas giant sims)
nosurf      = .true.

#########################################################################
## extra non-standard definitions for Earth
#########################################################################


## Tracer and aerosol options 
## ~~~~~~~~~~~~~~~~~~~~~~~~~~

### we do not need to compile with -s option, instead define here:
naerkind = 3

# Generic n-layer aerosols (replaces the former 2-layer and NH3 cloud)
# - - - - if set to true then s=s+nlayaero
aeronlay = .true.
nlayaero = 3 # NH3 cloud plus tropo haze plus strato haze
aeronlay_tauref       = 5.0   2.0     0.05
aeronlay_lamref       = 0.8e-6 0.8e-6  0.8e-6
aeronlay_choice       = 2      1        2
aeronlay_pbot         = 9.e4   8.0e4    1.8e4
aeronlay_ptop         = 5.e4   1.8e4    1
aeronlay_sclhght      = 0.2    1.0      1.0
aeronlay_size         = 10.e-6 1.e-6   4.0e-7
aeronlay_nueff        = 0.3    0.3      0.3
#aeronlay_stddev      = 0 0 0
#aeronlay_mid         = 0 0 0
optprop_aeronlay_vis  = optprop_nh3ice_vis.dat    optprop_jupiter_vis_n20.dat    optprop_jupiter_vis_n20.dat
optprop_aeronlay_ir   = optprop_nh3ice_ir.dat     optprop_jupiter_ir_n20.dat     optprop_jupiter_ir_n20.dat



# Auroral aerosols (Saturn/Jupiter)?
# ---- if set to true then s=s+1
aeroaurora     = .false.

### qvap_deep to force a source to get stable amount at the bottom
qvap_deep = 0.02


# Radiatively active water aerosol?
aeroh2o        = .false.
# Fixed water aerosol distribution?
aerofixh2o     = .false.
# Varying H2O cloud fraction?
CLFvarying     = .false.
# H2O cloud fraction if fixed?
CLFfixval      = 0.5
# fixed radii for cloud particles?
radfixed       = .true.
# number mixing ratio of water particles (for rafixed=.false.)
Nmix_h2o       = 1.e7
# number mixing ratio of water ice particles (for rafixed=.false.)
Nmix_h2o_ice   = 5.e5
# radius of H2O water particles (for rafixed=.true.):
rad_h2o        = 4.e-6
# radius of H2O ice particles (for rafixed=.true.):
rad_h2o_ice    = 10.e-6
# atm mass update due to tracer evaporation/condensation?
mass_redistrib = .false.

## Water options 
## ~~~~~~~~~~~~~
# Model water cycle
water         = .true.
# Model water cloud formation
watercond     = .true.
# Model water precipitation (including coagulation etc.)
waterrain     = .true.
# Use simple precipitation scheme?
precip_scheme = 1
# Evaporate precipitation?
evap_prec     = .true.
# multiplicative constant in Boucher 95 precip scheme
Cboucher      = 2.
rainthreshold = 1e-7
# Include hydrology ?
#hydrology     = .false.
# H2O snow (and ice) albedo ?
#albedosnow    = 0.6
# Maximum sea ice thickness ?
#maxicethick   = 10.
# Freezing point of seawater (degrees C) ?
#Tsaldiff      = 0.0
# Evolve surface water sources ?
#sourceevol    = .false.

