#
# $Id: physiq.def_NPv6.1 3668 2018-03-20 14:55:33Z lfairhead $
#

##############################################################
# PARAMETERS AND KEYS FOR LMDZ PHYSICS
##############################################################
# D: default value
#

###########################################################
# miscellaneous. should go to config.def ?
###########################################################
##   If=.T. ,  reading limit file with the correct year 
ok_limitvrai=n

###########################################################
# Surface layer parameters
###########################################################

          #  ...
f_cdrag_stable=1

          # factor on drags over continents
f_cdrag_ter=1

          # minimum wind speed value when calculatinf the drag coefficient 
          # Cd ( || V || + Vmin )
min_wind_speed=0.1

          #  High vegetation drag
ifl_pbltree=1
Cd_frein=0.016

###########################################################
# Sea-air flux parameters
###########################################################

          # Factor on latent and sensible heat fluxes
          # introduced to reduce evaporation when z0h=z0m
          # recommended : 1
f_cdrag_oce=1

          # z0 calculation flag
iflag_z0_oce=1

          # ratio between 'latent' z0 and 'sensible' z0
f_z0qh_oce=1.55

          # wind gust activation: yes 1 or no 0
iflag_gusts=2

          # factor for wind gust in thermals (boundary layer)
f_gust_bl=0.845

          # factor for cold pools (wake)
f_gust_wk=0.2

          # factor on qsat to account for salinity
f_qsat_oce=0.98

          #cdmmax : maximum value for momentum Cdrag, only over oceans
cdmmax=0.2

          #cdhmax : maximum value for heat/water Cdrag, only over oceans
cdhmax=0.2

####################################################################
# Turbulent boundary layer
####################################################################

          # New version for Mellor and Yamada turbulent diffusion code
new_yamada4=y

          # Numerical scheme for TKE equation integration new_yamada4=y
          #  1 MAR scheme. good for stable boundary layers, but overly dissipate stratocu.
          #  5 modified MAR scheme, recommended
yamada4_num=5

          # stable boundary layer control flag
iflag_corr_sta=4

          # stability function minimum threshold value in the surface layer
f_ri_cd_min=0.01

          # maximum Ric value for Kz. Higher values lead to decoupling in very stable conditions
yamada4_ric=0.18

          # mixing length minimum threshold for Kz
lmixmin=0

          #Boundary-layer turbulent diffusion scheme (D:1, 1:LMD, 8:Mellor-Yamada) 
iflag_pbl=12

          # turbulent diffusion thresholds
ksta_ter=1e-07
ksta=1e-10

          #ok_kzmin : Kzmin calculation in the boundary layer (D: y)
ok_kzmin=n

          # TKE generation by subgrid orography
addtkeoro=2
alphatkeoro=1
smallscales_tkeoro=y


####################################################################
# Subgrid orography / gravity waves
####################################################################

          #  Orodr (orographic drag) or not for orography
ok_orodr=y

          #  Orolf (orographic lift) or not for orography            
ok_orolf=y

          #Rugoro :including subgrid orography as an additional roughness length
          # Obsolete when activating the new gravity wave scheme
f_rugoro=0

          # Subgrid orography parameters
sso_gfrcri=0.7
sso_gkdrag=0.6
sso_gkwake=0.4
sso_gklift=0.1

          # Random gravity waves
          #A ctivitate the stochastic parameterization of convective GWs
          # (should be equal to ok_strato)
ok_gwd_rando=y

          # Scale the momentum fluxes due to convective GWs
gwd_rando_ruwmax=0.5

          #Scale the saturated momentum flux of  convective GWs 
gwd_rando_sat=0.6

          # Important for QBO period's control
gwd_front_ruwmax=3


###############################################################
# Radiation
###############################################################
          # Activating the new radiation code (RRTM)
          # 0 : old code and 1 : RRTM (D=0)
iflag_rrtm=0

          # Shorwave band number Set to 2 if iflag_rrtm=0
NSW=2

    # Albedo and thermal inertia over ice sheets
alb_vis_sno_lic=0.96
alb_nir_sno_lic=0.68
    # Landice and sea ice thermal inertia
    # inertie_sno : for snow (even for "ter" grid points when orchidee is deactivated)
    # inertie_lic/sic : for "land ice" and "sea ice" surfaces
inertie_sno=350
    # iflag_sic=1 to keep sea-ice inertia even in case of snow cover
iflag_sic=1
inertie_lic=2000
inertie_sic=2000
    # tau_gl = Nudging constant for ice syrface temperature (in number of days)
tau_gl=5.
          # ???
iflag_albedo=1

          # Radiation code call frequency (per day)
nbapp_cv=48

          # To come back to an old bug (duplication of thermodynamical constants between RRTM and LMDZ)
          # n : highly recommended
ok_bad_ecmwf_thermo=n

###############################################################
# Cloud parameters
###############################################################

          #Precipitation conversion thresholds in stratiform clouds (D: 2.6e-4 2.6e-4)
cld_lc_lsc=0.00065
cld_lc_con=0.00065

          # Time scales to remove large scale and convective water
          # (D: 3600. 3600.)
cld_tau_lsc=900
cld_tau_con=900

          #Correction factors on ice crystal fall velocity (D: 1 1)
ffallv_lsc=0.8
ffallv_con=0.8

          # rain re-evaporation coefficient  (D: 2.e-5 n)
          # set to 3.e-5 in 1D cumulus cases
coef_eva=0.0001

          # flag for rain re-evaporation
          # 0: nothing
          # 1: old-style
          # 2: account for maximum  overlying cloud fraction to compute maximum re-evaporation
          # as a difference from saturation. Recommended
iflag_evap_prec=2

          # Temperature range to distinguish between liquid and ice phase
          # in mixed-phase clouds
          # t_glace_min/max control, exposant_glace,
          # iflag_t_glace (D=0)
t_glace_min=243.15
t_glace_max=273.15
exposant_glace=0.5
iflag_t_glace=3

          # Switch for ice thermodynamics
iflag_ice_thermo=1

          # in principle, useless in firstilp
          # IF (zt(i) .LT. t_coup.and.reevap_ice) zrfln(i)=0. (Jean-Baptiste)
reevap_ice=n

          #Bergeron
iflag_bergeron=2

          # temperature dependency of qsat for iterative procedure
          # temporary flag to switch between the old (CMIP5, D=0)
          # and new versions (=1) versions 
iflag_fisrtilp_qsat=4

          # Convective cloud properties (D:1 0.375 1.e-4) 
iflag_cldcon=6
fact_cldcon=1

          # ?????
facttemps=0

          # Condensed water calculation and cloud fraction from PDF
          # (D:0, 0:version with ratqs, else new PDFs)  
iflag_pdf=1

          #Mean cloud optical depth and emissivity (D: y 1 0.01 0.3)
ok_newmicro=y

          # Control of large-scale ratqs
iflag_ratqs=4
ratqsp0=45000
ratqsdp=10000
ratqsbas=0.002
ratqshaut=0.4

          #effective radius of ice clouds(D:35)
rad_froid=35

          # effective radius of cloud droplets
          # active if ok_cdnc=0 if config.def. (D~9 a 12 microns)
rad_chau1=12
rad_chau2=11

	  # Effective droplet radius when ok_cdnc=0
          # Parameters in CDNC-maer link (Boucher&Lohmann 1995)
bl95_b0=1.3
bl95_b1=0.2

          #  New oliq: yes or no               
new_oliq=y

          # oliqmax, oicemax (en g/kg) threshold values
          # beyond which precipitation directly falls to the ground surface
oliqmax=0.0015
oicemax=0.0015

          #Min and max particle radius for ice clouds
rei_min=16
rei_max=61.29

          # Subgrid verical distribution for clouds
          # 0: nothing
          # 1: preliminary version by A. Jam,
          # 2 : J. Jouhaud, parametre cloudth_vert_alpha D=0.5
          # 3 : J. Jouhaud, parametre cloudth_vert_alpha D=0.5/C= 1.32
          #                           cloudth_vert_alpha_th C=2:91
iflag_cloudth_vert=3
cloudth_vert_alpha=0.5
cloudth_vert_alpha_th=0.5


######################################################################
# Convection 
######################################################################

          #Convection scheme switch
          # (D:2, 1:LMD, 2:Tiedtke, 3:KE New Physics, 30:KE AR4)
iflag_con=3

          #output level of energy conservation diagnostics
if_ebil=0

          #maximum efficiency of cld water->precipitation conversion (D: 0.993)
epmax=0.999

          #dry convective adjustment at beginning of Emanuel convective scheme (D: n 0)
ok_adj_ema=n
iflag_clw=0

          #Convective closure (D:1, 0:AR4, 2:ALE and ALP)
iflag_clos=2

          #Convective entrainment mixing law (D:1, 0:AR4=flat PDF, 1=PDF)
iflag_mix=1

          #weights of the bell shaped and flat PDF (used only if iflag_mix=1) (D: 1 0)
qqa1=1
qqa2=0

          #Parameters of the bell shaped PDF; Fmax=center (D= 0.65), Gammas=width (D=0.05)
cvl_corr=1

          #Multiplicative factor of Emanuel convective scheme precipitation (D: 1.)
Fmax=0.65

          #altitude, in hPa, above LCL at which buoybase is computed,
          # def = original: -40
dpbase=-40

          #reference fractional area of precipitating downdraughts,
          # def = original: 0.01
sigdz=0.003

          #unsaturated fraction of precipitating downdraughts, def = original: 0.15
spfac=0.15

          #relaxation time of cloud base mass flux, def = original: 8000
tau=8000

          #flag for wb (= vert velocity at LFC);
          # 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, D=1
          # Si iflag_wb>=10 : wbeff_min=iflag_wb*0.1
          # wbmax : assymptotic value 
flag_wb=50
wbmax=2.8

          #additional tests
ok_convstop=n
tau_stop=15000
ok_intermittent=n

          # nouvel epluchage de C.Rio
          # shedding coefficient (used when iflag_mix_adiab=1)
iflag_mix_adiab=0
coef_peel=0.25

          #Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature)
          #if 1, def=1
flag_epKEorig=1

          # Case : flag_epKEorig=1
          # elcrit : max condensed water concentration in kg/kg, D=0.0003,
          # tlcrit : temperature in degre Celsius, at which Ep=Epmax, D=-55. (original)
          # original: 0.0011, used only if flag_epKEorig=1
elcrit=0.0003
tlcrit=-55

          # Case : flag_epKEorig=0
          # pbcrit : pressure (hPa), above LCL below which Ep=0, D=150 (original)
          # ptcrit : pressure (hPa), above LCL above which Ep=Epmax, D=500 (original)
pbcrit=150
ptcrit=500

          # Prevent some crashes
          # Filter out bad wakes
flag_wk_check_trgl=n
iflag_wk_check_trgl=2
iflag_alp_wk_cond=1


          # Check whether parcel level temperature and specific humidity
          # are reasonable and demand that LCL be high enough
cv_flag_feed=2

          # save 20% CPU 
ok_optim_yield=y

          # Convective clouds
iflag_cld_cv=0

          # To get back to bug where convective output variables
          # were set to 0 at the start of the physics
ok_bug_cv_trac=n

##########################################################
# Convective closure and couplings
##########################################################

          # Appel separe des thermiques 
iflag_pbl_split=10

          # Power yield brought by thermals to convection
alp_bl_k=0.5

          # Constant value to be added to Alp (D: 0.)
alp_offset=0

          # Convection must reach a level at which T<t_top_max to be active
t_top_max=1000

          ### nrlmd le 10/04/2012: Triggering ###
          #Boundary-layer triggering (0: deterministic, 1: stochastic)
iflag_trig_bl=1

          #Critical surface at LCL
s_trig=12000000

          #Decorrelation time between cumulus scenes
tau_trig_shallow=1200

          #Decorrelation time between cumulus scenes
tau_trig_deep=1200

          # For stabilizing purposes
random_notrig_max=0.99

          # Temperature at which iced pools melt
tmax_fonte_cv=278.15

          #Boundary layer closure (Nicolas Rochetin)
          #(0: deterministic, 1: statistic, 2: statistic+large scale convergence)
iflag_clos_bl=1

          #coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape),
          # def: 0.33
stark=0.33

          #lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided
          # by wakes, def: 0.25
alpk=0.25

#
##########################################################
# convective boundary layer / thermal plume model
##########################################################

          # dry convection (D:0, 0:dry adjustment,=>1:thermal plume model) 
iflag_thermals=18

          # spliting time step for thermals
          # WORKS BUT CAUSE MORE PROBLEMS THAN IT SOLVES
nsplit_thermals=1

          # tau_thermals to get a timescale for thermals
          # Not valid
tau_thermals=0

          # Flag controlling detrainment and entrainment
iflag_thermals_ed=8

          # bring air from z * ( 1+fact_thermals_ed_dz) to compute
          # detrainment (A. Jam)
fact_thermals_ed_dz=0.07

          # Additional option for thermals
iflag_thermals_optflux=0

          # Coupling with deep convection
iflag_coupl=5

          # Threshold to deactivate thermals in case of strong inversion
          # at the top of the boundary layer. Activated if iflag_thermals is odd
seuil_inversion=-0.08

          # Activating moist closure for thermals 
          # iflag_thermals_closure=2 (D=1)
iflag_thermals_closure=2


##########################################################
# Flags wakes
##########################################################

          #Wake scheme switch (D:0, 0:AR4, 1:New Physics)
iflag_wake=1

          #multiplicative factor of the damping by gravity waves, def: 4.
coefgw=4

          #wake density = number of wake centers per m2, def: 8.E-12
          #wdens_ref=8.E-12
wdens_ref_o=1e-09
wdens_ref_l=8e-12

          # Convective adjusment before cold pool computation
ok_adjwk=y


####################################################################
#  Conservation 
####################################################################

          # The source terms of the TKE prognostic equation are diagnosed
          # from tendencies (du, dv, dT) 
          # associated with subrgrid scaleamotions and treated as an 
          # additional heat source.
          # Controled by a key, iflag_ener_conserv (D=-1):
          # 0 : no conservation, -1 : old adhoc correction for kinetic E only
          # (used for CMIP5) 
          # 1 : conservation, 101 : conversion from kinetic to heat only,
          # 110 conversion from potential to heat only
iflag_ener_conserv=10

          #Activation of corrections for water conservation (D: n). 
          ##The default is n for compatibility with earlier versions.
          ##generally it should be y.
ok_conserv_q=y

fl_cor_ebil=1

####################################################################
# Ozone
####################################################################
          # new treatment for ozone into the tropopause
adjust_tropopause=y

####################################################################
#  Water conservation
#####################################################################
          # water conservation over ice sheets
ok_lic_cond=y

cdnc_min=10.
