Index: LMDZ6/trunk/libf/phylmd/conf_phys_m.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/conf_phys_m.F90	(revision 3876)
+++ LMDZ6/trunk/libf/phylmd/conf_phys_m.F90	(revision 3900)
@@ -27,6 +27,4 @@
     USE phys_cal_mod
     USE carbon_cycle_mod,  ONLY: carbon_cycle_tr, carbon_cycle_cpl, carbon_cycle_rad, level_coupling_esm
-    USE carbon_cycle_mod,  ONLY: read_fco2_ocean_cor,var_fco2_ocean_cor
-    USE carbon_cycle_mod,  ONLY: read_fco2_land_cor,var_fco2_land_cor
     USE mod_grid_phy_lmdz, ONLY: klon_glo
     USE print_control_mod, ONLY: lunout
@@ -90,8 +88,11 @@
     CHARACTER (len = 8), SAVE  :: aer_type_omp
     INTEGER, SAVE       :: landice_opt_omp
-    INTEGER, SAVE       :: n_dtis_omp
-    INTEGER, SAVE       :: iflag_tsurf_inlandsis_omp
-    INTEGER, SAVE       :: iflag_albzenith_omp    
-    LOGICAL, SAVE       :: SnoMod_omp,BloMod_omp,ok_outfor_omp
+    INTEGER, SAVE       :: iflag_tsurf_inlandsis_omp,iflag_temp_inlandsis_omp
+    INTEGER, SAVE       :: iflag_albcalc_omp,iflag_z0m_snow_omp   
+    LOGICAL, SAVE       :: SnoMod_omp,BloMod_omp,ok_outfor_omp,ok_zsn_ii_omp
+    LOGICAL, SAVE       :: discret_xf_omp,opt_runoff_ac_omp  
+    LOGICAL, SAVE       :: is_ok_slush_omp,is_ok_z0h_rn_omp,is_ok_density_kotlyakov_omp
+    REAL, SAVE          :: prescribed_z0m_snow_omp,correc_alb_omp
+    REAL, SAVE          :: buf_sph_pol_omp,buf_siz_pol_omp
     LOGICAL, SAVE       :: ok_newmicro_omp
     LOGICAL, SAVE       :: ok_all_xml_omp
@@ -239,8 +240,4 @@
     LOGICAL, SAVE :: carbon_cycle_rad_omp
     INTEGER, SAVE :: level_coupling_esm_omp
-    LOGICAL, SAVE :: read_fco2_ocean_cor_omp
-    REAL, SAVE    :: var_fco2_ocean_cor_omp
-    LOGICAL, SAVE :: read_fco2_land_cor_omp
-    REAL, SAVE    :: var_fco2_land_cor_omp
     LOGICAL, SAVE :: adjust_tropopause_omp
     LOGICAL, SAVE :: ok_daily_climoz_omp
@@ -340,28 +337,30 @@
 
     !Etienne
+    !Config Key  = iflag_temp_inlandsis
+    !Config Desc = which method to calculate temp within the soil in INLANDSIS
+    !Config Def  = 0
+    iflag_temp_inlandsis_omp = 0
+    CALL getin('iflag_temp_inlandsis', iflag_temp_inlandsis_omp)
+
+    !Etienne
     !Config Key  = iflag_tsurf_inlandsis
     !Config Desc = which method to calculate tsurf in INLANDSIS
     !Config Def  = 0
-    iflag_tsurf_inlandsis_omp = 0
+    iflag_tsurf_inlandsis_omp = 1
     CALL getin('iflag_tsurf_inlandsis', iflag_tsurf_inlandsis_omp)
 
+
     !Etienne
-    !Config Key  = iflag_albzenith
-    !Config Desc = method to account for albedo sensitivity to solar zenith angle
-    !Config Def  = 0
-    iflag_albzenith_omp = 0
-    CALL getin('iflag_albzenith', iflag_albzenith_omp)
-
-    !Etienne
-    !Config Key  = n_dtis
-    !Config Desc = number of subtimesteps for INLANDSIS
-    !Config Def  = 1
-    n_dtis_omp = 1
-    CALL getin('n_dtis', n_dtis_omp)
+    !Config Key  = iflag_albcalc
+    !Config Desc = method to calculate snow albedo in INLANDSIS
+    !Config Def  = 0
+    iflag_albcalc_omp = 0
+    CALL getin('iflag_albcalc', iflag_albcalc_omp)
+
 
     !Etienne
     !Config Key  = SnoMod
     !Config Desc = activation of snow modules in inlandsis
-    !Config Def  = 1
+    !Config Def  = .TRUE.
     SnoMod_omp = .TRUE.
     CALL getin('SnoMod', SnoMod_omp)
@@ -370,5 +369,5 @@
     !Config Key  = BloMod
     !Config Desc = activation of blowing snow in inlandsis
-    !Config Def  = 1
+    !Config Def  = .FALSE.
     BloMod_omp = .FALSE.
     CALL getin('BloMod', BloMod_omp)
@@ -377,7 +376,92 @@
     !Config Key  = ok_outfor
     !Config Desc = activation of output ascii file in inlandsis
-    !Config Def  = 1
+    !Config Def  = .FALSE.
     ok_outfor_omp = .FALSE.
     CALL getin('ok_outfor', ok_outfor_omp)
+
+
+    !Etienne
+    !Config Key  = ok_sn_ii
+    !Config Desc = activation of ice/snow detection
+    !Config Def  = .TRUE.
+    ok_zsn_ii = .TRUE.
+    CALL getin('ok_zsn_ii', ok_zsn_ii_omp)
+
+
+    !Etienne
+    !Config Key  = discret_xf
+    !Config Desc = snow discretization following XF
+    !Config Def  = .TRUE.
+    discret_xf = .TRUE.
+    CALL getin('discret_xf', discret_xf_omp)
+
+
+    !Etienne
+    !Config Key  = is_ok_slush
+    !Config Desc = activation of the slush option
+    !Config Def  = .TRUE.
+    is_ok_slush_omp = .TRUE.
+    CALL getin('is_ok_slush', is_ok_slush_omp)
+
+    !Etienne
+    !Config Key  = opt_runoff_ac
+    !Config Desc = option runoff AC
+    !Config Def  = .TRUE.
+    opt_runoff_ac_omp = .TRUE.
+    CALL getin('opt_runoff_ac', opt_runoff_ac_omp)
+
+    !Etienne
+    !Config Key  = is_ok_z0h_rn
+    !Config Desc = z0h calculation following RN method
+    !Config Def  = .TRUE.
+    is_ok_z0h_rn = .TRUE.
+    CALL getin('is_ok_z0h_rn', is_ok_z0h_rn_omp)
+
+
+    !Etienne
+    !Config Key  = is_ok_density_kotlyakov
+    !Config Desc = snow density calculation following kotlyakov
+    !Config Def  = .FALSE.
+    is_ok_density_kotlyakov = .FALSE.
+    CALL getin('is_ok_density_kotlyakov', is_ok_density_kotlyakov_omp)
+
+
+    !Etienne
+    !Config Key  = prescribed_z0m_snow
+    !Config Desc = prescribed snow z0m
+    !Config Def  = 0.005
+    prescribed_z0m_snow = 0.005
+    CALL getin('prescribed_z0m_snow', prescribed_z0m_snow_omp)
+
+
+    !Etienne
+    !Config Key  = iflag_z0m_snow
+    !Config Desc = method to calculate snow z0m
+    !Config Def  = 0
+    iflag_z0m_snow = 0
+    CALL getin('iflag_z0m_snow', iflag_z0m_snow_omp)
+
+
+    !Etienne
+    !Config Key  = correc_alb
+    !Config Desc = correction term for albedo
+    !Config Def  = 1.01
+    correc_alb_omp=1.01
+    CALL getin('correc_alb', correc_alb_omp)
+
+
+    !Etienne
+    !Config Key  = buf_sph_pol
+    !Config Desc = sphericity of buffer layer in polar regions
+    !Config Def  = 99.
+    buf_sph_pol_omp=99.
+    CALL getin('buf_sph_pol', buf_sph_pol_omp)
+
+    !Etienne
+    !Config Key  = buf_siz_pol
+    !Config Desc = grain size of buffer layer in polar regions in e-4m
+    !Config Def  = 4.
+    buf_siz_pol_omp=4.
+    CALL getin('buf_siz_pol', buf_siz_pol_omp)
 
     !==================================================================
@@ -1140,4 +1224,7 @@
     CALL getin('coefw_cld_cv',coefw_cld_cv_omp)
 
+
+
+
     !
     !Config Key  = iflag_pdf 
@@ -1148,5 +1235,4 @@
     iflag_pdf_omp = 0
     CALL getin('iflag_pdf',iflag_pdf_omp)
-
     !
     !Config Key  = fact_cldcon
@@ -1175,5 +1261,4 @@
     ok_newmicro_omp = .TRUE.
     CALL getin('ok_newmicro',ok_newmicro_omp)
-
     !
     !Config Key  = ratqsbas
@@ -1184,5 +1269,4 @@
     ratqsbas_omp = 0.01
     CALL getin('ratqsbas',ratqsbas_omp)
-
     !
     !Config Key  = ratqshaut
@@ -2218,16 +2302,5 @@
     CALL getin('carbon_cycle_rad',carbon_cycle_rad_omp)
 
-    read_fco2_ocean_cor_omp=.FALSE.
-    CALL getin('read_fco2_ocean_cor',read_fco2_ocean_cor_omp)
-
-    var_fco2_ocean_cor_omp=0. ! default value
-    CALL getin('var_fco2_ocean_cor',var_fco2_ocean_cor_omp)
-
-    read_fco2_land_cor_omp=.FALSE.
-    CALL getin('read_fco2_land_cor',read_fco2_land_cor_omp)
-
-    var_fco2_land_cor_omp=0. ! default value
-    CALL getin('var_fco2_land_cor',var_fco2_land_cor_omp)
-
+    ! >> PC
     ! level_coupling_esm : level of coupling of the biogeochemical fields between LMDZ, ORCHIDEE and NEMO
     ! Definitions of level_coupling_esm in physiq.def
@@ -2242,4 +2315,5 @@
     level_coupling_esm_omp=0 ! default value
     CALL getin('level_coupling_esm',level_coupling_esm_omp)
+    ! << PC
 
     !$OMP END MASTER
@@ -2358,13 +2432,24 @@
        ok_veget=.FALSE.
     ENDIF
-    ! SISVAT and INLANDSIS
+    ! INLANDSIS
     !=================================================
     landice_opt = landice_opt_omp
     iflag_tsurf_inlandsis = iflag_tsurf_inlandsis_omp
-    iflag_albzenith = iflag_albzenith_omp
-    n_dtis=n_dtis_omp
+    iflag_temp_inlandsis = iflag_temp_inlandsis_omp
+    iflag_albcalc = iflag_albcalc_omp
     SnoMod=SnoMod_omp
     BloMod=BloMod_omp
     ok_outfor=ok_outfor_omp
+    is_ok_slush=is_ok_slush_omp
+    opt_runoff_ac=opt_runoff_ac_omp
+    is_ok_z0h_rn=is_ok_z0h_rn_omp
+    is_ok_density_kotlyakov=is_ok_density_kotlyakov_omp
+    prescribed_z0m_snow=prescribed_z0m_snow_omp
+    correc_alb=correc_alb_omp
+    iflag_z0m_snow=iflag_z0m_snow_omp
+    ok_zsn_ii=ok_zsn_ii_omp
+    discret_xf=discret_xf_omp
+    buf_sph_pol=buf_sph_pol_omp
+    buf_siz_pol=buf_siz_pol_omp
     !=================================================
     ok_all_xml = ok_all_xml_omp
@@ -2507,8 +2592,4 @@
     carbon_cycle_rad = carbon_cycle_rad_omp
     level_coupling_esm = level_coupling_esm_omp
-    read_fco2_ocean_cor = read_fco2_ocean_cor_omp
-    var_fco2_ocean_cor = var_fco2_ocean_cor_omp
-    read_fco2_land_cor = read_fco2_land_cor_omp
-    var_fco2_land_cor = var_fco2_land_cor_omp
 
     ! Test of coherence between type_ocean and version_ocean
@@ -2831,10 +2912,20 @@
     WRITE(lunout,*) ' level_coupling_esm = ', level_coupling_esm
     WRITE(lunout,*) ' iflag_tsurf_inlandsis = ', iflag_tsurf_inlandsis
-    WRITE(lunout,*) ' iflag_albzenith = ', iflag_albzenith
-    WRITE(lunout,*) ' n_dtis = ', n_dtis
+    WRITE(lunout,*) ' iflag_temp_inlandsis = ', iflag_temp_inlandsis
+    WRITE(lunout,*) ' iflag_albcalc = ', iflag_albcalc
     WRITE(lunout,*) ' SnoMod = ', SnoMod
     WRITE(lunout,*) ' BloMod = ', BloMod
     WRITE(lunout,*) ' ok_outfor = ', ok_outfor
-
+    WRITE(lunout,*) ' is_ok_slush = ', is_ok_slush
+    WRITE(lunout,*) ' opt_runoff_ac = ', opt_runoff_ac
+    WRITE(lunout,*) ' is_ok_z0h_rn = ', is_ok_z0h_rn
+    WRITE(lunout,*) ' is_ok_density_kotlyakov = ', is_ok_density_kotlyakov
+    WRITE(lunout,*) ' prescribed_z0m_snow = ', prescribed_z0m_snow
+    WRITE(lunout,*) ' iflag_z0m_snow = ', iflag_z0m_snow
+    WRITE(lunout,*) ' ok_zsn_ii = ', ok_zsn_ii
+    WRITE(lunout,*) ' discret_xf = ', discret_xf
+    WRITE(lunout,*) ' correc_alb= ', correc_alb
+    WRITE(lunout,*) ' buf_sph_pol = ', buf_sph_pol
+    WRITE(lunout,*) ' buf_siz_pol= ', buf_siz_pol
 
     !$OMP END MASTER
