Index: trunk/LMDZ.MARS/changelog.txt
===================================================================
--- trunk/LMDZ.MARS/changelog.txt	(revision 3715)
+++ trunk/LMDZ.MARS/changelog.txt	(revision 3726)
@@ -4795,2 +4795,5 @@
 Fix for the 1D following the reindexing in restartfi files: the "ind_cell_glo"
 array must also be allocated and filled at initialization.
+
+== 17/04/2025 == EM
+Turn "callkeys.h" into module "callkeys_mod.F90"
Index: trunk/LMDZ.MARS/libf/aeronomars/calchim_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/calchim_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/calchim_mod.F90	(revision 3726)
@@ -40,4 +40,5 @@
       use iono_h, only: temp_elect
       use wstats_mod, only: wstats
+      use callkeys_mod, only: photochem
 
       implicit none
@@ -80,6 +81,4 @@
 !
 !=======================================================================
-
-include "callkeys.h"
 
 !     input:
Index: trunk/LMDZ.MARS/libf/aeronomars/chemthermos.F90
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/chemthermos.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/chemthermos.F90	(revision 3726)
@@ -40,5 +40,5 @@
 !    ------------------
 !
-      include "callkeys.h"
+
 !-----------------------------------------------------------------------
 !    Input/Output
Index: trunk/LMDZ.MARS/libf/aeronomars/euvheat.F90
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/euvheat.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/euvheat.F90	(revision 3726)
@@ -14,4 +14,5 @@
       use conc_mod, only: rnew, cpnew
       use hrtherm_mod, only: hrtherm
+      use callkeys_mod, only: euveff
       IMPLICIT NONE
 !=======================================================================
@@ -38,5 +39,5 @@
 !    ------------------
 !
-      include "callkeys.h"
+
 !-----------------------------------------------------------------------
 !    Input/Output
Index: trunk/LMDZ.MARS/libf/aeronomars/hrtherm.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/hrtherm.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/hrtherm.F	(revision 3726)
@@ -20,8 +20,4 @@
 
       implicit none
-
-c     common variables and constants
-      include "callkeys.h"
-
 
 c    local parameters and variables
Index: trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F90
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F90	(revision 3726)
@@ -14,4 +14,6 @@
       use dust_param_mod, only: doubleq, submicron, dustbin
       use intrplf_mod, only: intrplf
+      use callkeys_mod, only: microphys, rdstorm, topflows
+      use callkeys_mod, only: co2clouds, co2useh2o, meteo_flux
       implicit none
 
@@ -44,5 +46,4 @@
 !=======================================================================
 
-      include "callkeys.h"
 
 ! inputs :
Index: trunk/LMDZ.MARS/libf/aeronomars/jthermcalc_e107.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/jthermcalc_e107.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/jthermcalc_e107.F	(revision 3726)
@@ -26,8 +26,7 @@
       use comsaison_h, only: dist_sol
       use jthermcalc_util, only: column, interfast
+      use callkeys_mod, only: solvarmod, fixed_euv_value
 
       implicit none
-
-      include "callkeys.h"
 
 c     input and output variables
Index: trunk/LMDZ.MARS/libf/aeronomars/jthermcalc_util.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/jthermcalc_util.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/jthermcalc_util.F	(revision 3726)
@@ -23,9 +23,4 @@
 
       implicit none
-
-
-c     common variables and constants
-      include 'callkeys.h'
-
 
 
@@ -719,14 +714,11 @@
       use param_v4_h, only: ninter, 
      .                      fluxtop, ct1, ct2, p1, p2
+      use callkeys_mod, only: solvarmod
       implicit none
 
 
-!     common variables and constants
-      include "callkeys.h"
-
-
 !     Arguments
 
-      real date
+      real,intent(inout) :: date
 
 
Index: trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F	(revision 3726)
@@ -22,5 +22,4 @@
 c
 c=======================================================================
-#include "callkeys.h"
 
 c-----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff_red.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff_red.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff_red.F	(revision 3726)
@@ -18,5 +18,4 @@
 c
 c=======================================================================
-      include "callkeys.h"
 
 c-----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/aeronomars/param_read_e107.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/param_read_e107.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/param_read_e107.F	(revision 3726)
@@ -25,12 +25,9 @@
       USE mod_phys_lmdz_para, ONLY: is_master
       USE mod_phys_lmdz_transfert_para, ONLY: bcast
+      use callkeys_mod, only: solvaryear
 
       implicit none
 
 
-c     common variables and constants
-      include "callkeys.h"
- 
- 
 c     local variables
 
Index: trunk/LMDZ.MARS/libf/aeronomars/paramfoto_compact.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/paramfoto_compact.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/paramfoto_compact.F	(revision 3726)
@@ -2017,6 +2017,4 @@
 
       implicit none
-
-      include 'callkeys.h'
 
 c     arguments
Index: trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F90
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F90	(revision 3726)
@@ -35,6 +35,4 @@
 
 implicit none
-
-include "callkeys.h"
 
 !===================================================================
@@ -3947,8 +3945,5 @@
      &                      igcm_hdo_vap, igcm_od, igcm_d, igcm_hd,      &
      &                      igcm_do2, igcm_hdo2
-
       implicit none
-
-      include "callkeys.h"
 
 !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
@@ -4255,6 +4250,4 @@
       implicit none
 
-#include "callkeys.h"
-
 !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
 !     inputs:
Index: trunk/LMDZ.MARS/libf/aeronomars/surfacearea.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/surfacearea.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/surfacearea.F	(revision 3726)
@@ -16,4 +16,5 @@
       use comcstfi_h, only: pi
       use wstats_mod, only: wstats
+      use callkeys_mod, only: microphys
       implicit none
 
@@ -25,6 +26,4 @@
 !     version 1.2 april 2012
 !==========================================================================
-
-      include "callkeys.h"
 
 ! input
Index: trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F
===================================================================
--- trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F	(revision 3726)
@@ -24,7 +24,7 @@
       USE comcstfi_h, only: r, cpp
       use mod_phys_lmdz_para, only : is_master
+      use callkeys_mod, only: calleuv, callconduct, callmoldiff
+      use callkeys_mod, only: callmolvis
       implicit none
-
-      include "callkeys.h"
 
       integer,intent(in) :: ngrid ! number of atmospheric columns
Index: trunk/LMDZ.MARS/libf/phymars/aeropacity_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/aeropacity_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/aeropacity_mod.F	(revision 3726)
@@ -41,4 +41,8 @@
       use surfdat_h,only: alpha_hmons,contains_mons
       use read_dust_scenario_mod, only: read_dust_scenario
+      use callkeys_mod, only: co2clouds, activeco2ice,
+     &                        water, activice, CLFvarying,
+     &                        CLFvaryingCO2, iaervar,
+     &                        rdstorm, topflows
       
        IMPLICIT NONE
@@ -60,5 +64,4 @@
 c   
 c=======================================================================
-      include "callkeys.h"
 
 c-----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/aeroptproperties.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/aeroptproperties.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/aeroptproperties.F	(revision 3726)
@@ -9,4 +9,5 @@
      &                omegaREFvis, omegaREFir
       use write_output_mod, only: write_output
+
       IMPLICIT NONE
 c     =============================================================
@@ -27,6 +28,4 @@
 c     Authors: J.-B. Madeleine, F. Forget, F. Montmessin
 c     =============================================================
-
-      include "callkeys.h"
 
 c     Local variables 
Index: trunk/LMDZ.MARS/libf/phymars/albedocaps.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/albedocaps.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/albedocaps.F90	(revision 3726)
@@ -13,6 +13,4 @@
 
 implicit none
-
-include"callkeys.h"
 
 ! arguments:
Index: trunk/LMDZ.MARS/libf/phymars/callkeys.h
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/callkeys.h	(revision 3715)
+++ 	(revision )
@@ -1,102 +1,0 @@
-!
-! For Fortran 77/Fortran 90 compliance always use line continuation
-! symbols '&' in columns 73 and 6
-!
-! NB: to keep commons aligned, it is better to split them in groups
-!     of given types (logical, integer, real, ...)
-
-      COMMON/callkeys_l/callrad,calldifv,calladj,callcond,callsoil      &
-     &   ,season,diurnal,calllott,calleofdump                           &
-     &   ,callnirco2,callnlte,callthermos,callconduct,calleuv           &
-     &   ,callmolvis,callmoldiff,thermochem,thermoswater,callemis       &
-     &   ,callg2d,linear,rayleigh                                       &
-     &   ,scavenging,sedimentation                                      &
-     &   ,activice,water,microphys,supersat,caps,photochem              &
-     &   ,calltherm,callrichsl,callslope,tituscap,callyamada4,co2clouds &
-     &   ,co2useh2o,meteo_flux,activeco2ice,CLFvaryingCO2,spantCO2      &
-     &   ,CLFvarying,satindexco2,rdstorm,topflows,calllott_nonoro       &
-     &   ,latentheat_surfwater,gwd_convective_source,startphy_file      &
-     &   ,hdo,hdofrac,cst_cap_albedo,temp_dependent_m,refill_watercap   &
-     &   ,cloud_adapt_ts,callatke,surfaceice_tifeedback                 &
-     &   , poreice_tifeedback
-!$OMP THREADPRIVATE(/callkeys_l/)
-
-     
-      COMMON/callkeys_i/iradia,iaervar,ilwd,ilwb,ilwn,ncouche           &
-     &   ,nltemodel,nircorr,solvarmod,solvaryear,dustinjection
-!$OMP THREADPRIVATE(/callkeys_i/)
-     
-      COMMON/callkeys_r/semi,alphan,euveff,                             &
-     &   tke_heat_flux,dustrefir,fixed_euv_value,CLFfixval,             &
-     &   coeff_injection,ti_injection,tf_injection,coeff_detrainment
-!$OMP THREADPRIVATE(/callkeys_r/)
-     
-      LOGICAL callrad,calldifv,calladj,callcond,callsoil,               &
-     &   season,diurnal,calllott,calllott_nonoro                        &
-     &   ,calleofdump                                                   &
-     &   ,callnirco2,callnlte,callthermos,callconduct,                  &
-     &    calleuv,callmolvis,callmoldiff,thermochem,thermoswater        &
-     &   ,calltherm,callrichsl,callslope,tituscap,callyamada4,callatke
-
-      COMMON/aeroutput/dustiropacity
-!$OMP THREADPRIVATE(/aeroutput/)
-
-      logical startphy_file
-
-      logical callemis
-      logical callg2d
-      logical linear
-      logical gwd_convective_source
-
-      real semi
-      real alphan
-      real fixed_euv_value
-      real euveff
-      real tke_heat_flux
-      real coeff_injection ! dust injection scheme coefficient
-      real ti_injection ! local time of beginning injection
-      real tf_injection ! local time of end injection
-      real coeff_detrainment ! rocket dust detrainment coefficient
-      real CLFfixval
-
-      integer iaervar
-      integer iradia
-      integer ilwd
-      integer ilwb
-      integer ilwn
-      integer ncouche
-      integer solvarmod   ! model for solar EUV variation
-      integer solvaryear  ! mars year for realisticly varying solar EUV 
-      integer dustinjection ! dust injection scheme number 
-
-      logical rayleigh
-      logical scavenging
-      logical rdstorm ! rocket dust storm parametrization
-      logical topflows ! entrainment by mountain top dust flows parametrization
-      logical latentheat_surfwater ! latent heat release from ground water ice sublimation/condensation
-      logical cst_cap_albedo ! polar cap albedo remains unchanged by water frost deposition
-      logical temp_dependent_m ! temperature-dependent water contact parameter
-      logical refill_watercap ! h2o_ice_s is converted to watercap when above threshold
-      logical cloud_adapt_ts ! adaptative timestep for cloud microphysics
-      logical sedimentation
-      logical activice,surfaceice_tifeedback,supersat,caps
-      logical poreice_tifeedback
-      logical co2clouds,co2useh2o,meteo_flux,CLFvaryingCO2,satindexco2
-      logical activeco2ice
-      integer spantCO2
-      logical CLFvarying
-      logical water
-      logical hdo
-      logical hdofrac
-      logical microphys
-      logical photochem
-      integer nltemodel
-      integer nircorr
-
-      character(len=100) dustiropacity
-      real               dustrefir 
-  
-      integer swrtype ! type of short wave (solar wavelength) radiative
-      ! transfer to use 1: Fouquart 2: Toon.
-      parameter (swrtype=2)
-!      parameter (swrtype=2)
Index: trunk/LMDZ.MARS/libf/phymars/callkeys_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/callkeys_mod.F90	(revision 3726)
+++ trunk/LMDZ.MARS/libf/phymars/callkeys_mod.F90	(revision 3726)
@@ -0,0 +1,121 @@
+MODULE callkeys_mod
+
+IMPLICIT NONE
+
+logical,save :: startphy_file
+!$OMP THREADPRIVATE(startphy_file)
+
+logical,save :: callrad,calldifv,calladj,callcond,callsoil
+!$OMP THREADPRIVATE(callrad,calldifv,calladj,callcond,callsoil)
+logical,save :: season,diurnal,calllott,calllott_nonoro
+!$OMP THREADPRIVATE(season,diurnal,calllott,calllott_nonoro)
+logical,save :: calleofdump
+!$OMP THREADPRIVATE(calleofdump)
+logical,save :: callnirco2,callnlte,callthermos,callconduct
+!$OMP THREADPRIVATE(callnirco2,callnlte,callthermos,callconduct)
+logical,save :: calleuv,callmolvis,callmoldiff,thermochem,thermoswater
+!$OMP THREADPRIVATE(calleuv,callmolvis,callmoldiff,thermochem,thermoswater)
+logical,save :: calltherm,callrichsl,callslope,tituscap
+!$OMP THREADPRIVATE(calltherm,callrichsl,callslope,tituscap)
+logical,save :: callyamada4,callatke
+!$OMP THREADPRIVATE(callyamada4,callatke)
+logical,save :: callemis
+logical,save :: callg2d
+!$OMP THREADPRIVATE(callemis,callg2d)
+logical,save :: linear ! ?!?
+!$OMP THREADPRIVATE(linear)
+logical,save :: gwd_convective_source
+!$OMP THREADPRIVATE(gwd_convective_source)
+
+real,save :: semi ! ?!?
+!$OMP THREADPRIVATE(semi)
+real,save :: alphan ! ?!?
+!$OMP THREADPRIVATE(alphan)
+real,save :: fixed_euv_value
+!$OMP THREADPRIVATE(fixed_euv_value)
+real,save :: euveff
+!$OMP THREADPRIVATE(euveff)
+real,save :: tke_heat_flux
+!$OMP THREADPRIVATE(tke_heat_flux)
+real,save :: coeff_injection ! dust injection scheme coefficient
+!$OMP THREADPRIVATE(coeff_injection)
+real,save :: ti_injection ! local time of beginning injection
+real,save :: tf_injection ! local time of end injection
+!$OMP THREADPRIVATE(ti_injection,tf_injection)
+real,save :: coeff_detrainment ! rocket dust detrainment coefficient
+!$OMP THREADPRIVATE(coeff_detrainment)
+real,save :: CLFfixval
+!$OMP THREADPRIVATE(CLFfixval)
+
+integer,save :: iaervar
+!$OMP THREADPRIVATE(iaervar)
+integer,save :: iradia
+!$OMP THREADPRIVATE(iradia)
+integer,save :: ilwd
+integer,save :: ilwb
+integer,save :: ilwn
+!$OMP THREADPRIVATE(ilwd,ilwb,ilwn)
+integer,save :: ncouche
+!$OMP THREADPRIVATE(ncouche)
+integer,save :: solvarmod   ! model for solar EUV variation
+!$OMP THREADPRIVATE(solvarmod)
+integer,save :: solvaryear  ! mars year for realisticly varying solar EUV 
+!$OMP THREADPRIVATE(solvaryear)
+integer,save :: dustinjection ! dust injection scheme number 
+!$OMP THREADPRIVATE(dustinjection)
+
+logical,save :: rayleigh
+!$OMP THREADPRIVATE(rayleigh)
+logical,save :: scavenging
+!$OMP THREADPRIVATE(scavenging)
+logical,save :: rdstorm ! rocket dust storm parametrization
+!$OMP THREADPRIVATE(rdstorm)
+logical,save :: topflows ! entrainment by mountain top dust flows parametrization
+!$OMP THREADPRIVATE(topflows)
+logical,save :: latentheat_surfwater ! latent heat release from ground water ice sublimation/condensation
+!$OMP THREADPRIVATE(latentheat_surfwater)
+logical,save :: cst_cap_albedo ! polar cap albedo remains unchanged by water frost deposition
+!$OMP THREADPRIVATE(cst_cap_albedo)
+logical,save :: temp_dependent_m ! temperature-dependent water contact parameter
+!$OMP THREADPRIVATE(temp_dependent_m)
+logical,save :: refill_watercap ! h2o_ice_s is converted to watercap when above threshold
+!$OMP THREADPRIVATE(refill_watercap)
+logical,save :: cloud_adapt_ts ! adaptative timestep for cloud microphysics
+!$OMP THREADPRIVATE(cloud_adapt_ts)
+logical,save :: sedimentation
+!$OMP THREADPRIVATE(sedimentation)
+logical,save :: activice,surfaceice_tifeedback,supersat,caps
+!$OMP THREADPRIVATE(activice,surfaceice_tifeedback,supersat,caps)
+logical,save :: poreice_tifeedback
+!$OMP THREADPRIVATE(poreice_tifeedback)
+logical,save :: co2clouds,co2useh2o,meteo_flux,CLFvaryingCO2,satindexco2
+!$OMP THREADPRIVATE(co2clouds,co2useh2o,meteo_flux,CLFvaryingCO2,satindexco2)
+logical,save :: activeco2ice
+!$OMP THREADPRIVATE(activeco2ice)
+integer,save :: spantCO2
+!$OMP THREADPRIVATE(spantCO2)
+logical,save :: CLFvarying
+!$OMP THREADPRIVATE(CLFvarying)
+logical,save :: water
+!$OMP THREADPRIVATE(water)
+logical,save :: hdo
+logical,save :: hdofrac
+!$OMP THREADPRIVATE(hdo,hdofrac)
+logical,save :: microphys
+!$OMP THREADPRIVATE(microphys)
+logical,save :: photochem
+!$OMP THREADPRIVATE(photochem)
+integer,save :: nltemodel
+!$OMP THREADPRIVATE(nltemodel)
+integer,save :: nircorr
+!$OMP THREADPRIVATE(nircorr)
+
+character(len=100),save :: dustiropacity
+!$OMP THREADPRIVATE(dustiropacity)
+real,save :: dustrefir 
+!$OMP THREADPRIVATE(dustrefir)
+  
+integer,parameter :: swrtype=2 ! type of short wave (solar wavelength) radiative
+      ! transfer to use 1: Fouquart 2: Toon.
+
+END MODULE callkeys_mod
Index: trunk/LMDZ.MARS/libf/phymars/callradite_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/callradite_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/callradite_mod.F	(revision 3726)
@@ -28,4 +28,6 @@
       use swmain_mod, only: swmain
       use dust_param_mod, only: doubleq, active, submicron
+      use callkeys_mod, only: water, activice, rdstorm, topflows,
+     &                        co2clouds, activeco2ice
       IMPLICIT NONE
 c=======================================================================
@@ -147,5 +149,4 @@
 c    -------------
 c
-      include "callkeys.h"
 
 c-----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F	(revision 3726)
@@ -27,4 +27,7 @@
       USE dimradmars_mod, only: naerkind
       USE dust_param_mod, ONLY: doubleq
+      use callkeys_mod, only: water, activice, microphys, rdstorm,
+     &                        topflows, co2clouds, co2useh2o,
+     &                        meteo_flux
       IMPLICIT NONE
 
@@ -49,6 +52,4 @@
 c   declarations:
 c   -------------
-      
-      include "callkeys.h"
 
 c
Index: trunk/LMDZ.MARS/libf/phymars/co2cloud.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/co2cloud.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/co2cloud.F90	(revision 3726)
@@ -110,4 +110,6 @@
   use microphys_h, only: nbinco2_cld, rad_cldco2, mco2
   use write_output_mod, only: write_output
+  use callkeys_mod, only: sedimentation, CLFvaryingCO2, co2useh2o, &
+                          satindexco2, meteo_flux
 #ifndef MESOSCALE
   use vertical_layers_mod, only: ap, bp
@@ -116,5 +118,4 @@
   implicit none
 
-  include "callkeys.h"
 !----------------------------------------------------------------------------------------------------------------------!
 ! VARIABLES DECLARATION
Index: trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F	(revision 3726)
@@ -38,4 +38,5 @@
       use comslope_mod, ONLY: subslope_dist,def_slope_mean
       USE paleoclimate_mod, ONLY: paleoclimate
+      use callkeys_mod, only: caps, co2clouds
 
        IMPLICIT NONE
@@ -56,5 +57,4 @@
 c    ------------------
 c
-      include "callkeys.h"
 
 c-----------------------------------------------------------------------
@@ -1027,6 +1027,6 @@
       use comcstfi_h, only: g
       use dust_param_mod, only: freedust
+      use callkeys_mod, only: water, microphys
       IMPLICIT NONE
-      include "callkeys.h" ! for the flags water and microphys
 c
 c
Index: trunk/LMDZ.MARS/libf/phymars/co2snow.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/co2snow.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/co2snow.F	(revision 3726)
@@ -28,6 +28,4 @@
 
       IMPLICIT NONE
-
-#include "callkeys.h"
 
 c=======================================================================
Index: trunk/LMDZ.MARS/libf/phymars/compute_dtau_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/compute_dtau_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/compute_dtau_mod.F90	(revision 3726)
@@ -26,8 +26,8 @@
         USE read_dust_scenario_mod, only: read_dust_scenario
         use write_output_mod, only: write_output
+        use callkeys_mod, only: iaervar, coeff_injection, ti_injection, &
+                                tf_injection
         
         IMPLICIT NONE
-        
-        include "callkeys.h"
         
         INTEGER, INTENT(in) :: ngrid
Index: trunk/LMDZ.MARS/libf/phymars/conc_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/conc_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/conc_mod.F90	(revision 3726)
@@ -59,5 +59,5 @@
          cpnew(:,:)=cpp
          mmean(:,:)=mugaz
-     return           
+
  end subroutine init_r_cp_mu
 
@@ -86,8 +86,4 @@
 !=======================================================================
 
-!     declarations
- 
-    include "callkeys.h"
-
 !     input/output
 
@@ -377,5 +373,4 @@
     end do
 
-    return 
  end subroutine update_r_cp_mu_ak
 
Index: trunk/LMDZ.MARS/libf/phymars/conf_phys.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/conf_phys.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/conf_phys.F	(revision 3726)
@@ -44,8 +44,31 @@
      &                     ads_massive_ice
       use nonoro_gwd_mix_mod, only: calljliu_gwimix
+      use callkeys_mod, only: startphy_file, activice, activeco2ice,
+     &                        alphan, calladj, callatke, callcond,
+     &                        callconduct, calldifv, callemis,
+     &                        calleofdump, calleuv, callg2d, calllott,
+     &                        calllott_nonoro, callmoldiff, callmolvis,
+     &                        callnirco2, callnlte, callrad, callrichsl,
+     &                        callslope, callsoil, calltherm, caps,
+     &                        callthermos, callyamada4, CLFvarying,
+     &                        CLFvaryingCO2, CLFfixval,
+     &                        cloud_adapt_ts, co2clouds,
+     &                        co2useh2o, coeff_detrainment, diurnal,
+     &                        coeff_injection, dustinjection,
+     &                        cst_cap_albedo, dustiropacity, dustrefir,
+     &                        euveff, fixed_euv_value, hdo, hdofrac,
+     &                        iaervar, ilwb, ilwd, ilwn, iradia,
+     &                        linear, latentheat_surfwater, microphys,
+     &                        meteo_flux, ncouche, nircorr, nltemodel,
+     &                        photochem, poreice_tifeedback, rayleigh,
+     &                        rdstorm, refill_watercap, satindexco2,
+     &                        scavenging, season, sedimentation, semi,
+     &                        solvarmod, solvaryear, spantCO2, supersat,
+     &                        surfaceice_tifeedback, temp_dependent_m,
+     &                        tf_injection, ti_injection, thermochem,
+     &                        thermoswater, tituscap, tke_heat_flux,
+     &                        topflows, water
 
       IMPLICIT NONE
-
-      include "callkeys.h"
 
       INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns
Index: trunk/LMDZ.MARS/libf/phymars/convadj.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/convadj.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/convadj.F	(revision 3726)
@@ -9,4 +9,5 @@
      &                      igcm_h2o_vap ! index of water vapor tracer
       use comcstfi_h, only: g
+      use callkeys_mod, only: water
       implicit none
 
@@ -27,11 +28,4 @@
 !
 !==================================================================
-
-!     ------------
-!     Declarations
-!     ------------
-
-      include "callkeys.h"
-
 
 !     Arguments
Index: trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90	(revision 3726)
@@ -45,4 +45,5 @@
 use comslope_mod,             only: nslope, subslope_dist, ini_comslope_h, end_comslope_h
 use co2condens_mod,           only: CO2cond_ps
+use callkeys_mod, only: water, photochem, callthermos
 ! Mostly for XIOS outputs:
 use mod_const_mpi,            only: COMM_LMDZ
@@ -51,5 +52,4 @@
 
 include "dimensions.h"
-include "callkeys.h"
 
 !=======================================================================
Index: trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90	(revision 3726)
@@ -22,4 +22,5 @@
 use parallel_lmdz,       only: init_parallel
 use version_info_mod,    only: print_version_info
+use callkeys_mod, only: water
 
 implicit none
@@ -46,15 +47,4 @@
 
 include "dimensions.h"
-!#include "dimradmars.h"
-!#include "comgeomfi.h"
-!#include "surfdat.h"
-!#include "slope.h"
-!#include "comsoil.h"
-!#include "comdiurn.h"
-include "callkeys.h"
-!#include "comsaison.h"
-!#include "control.h"
-include "netcdf.inc"
-!#include "advtrac.h"
 
 !--------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/hdo_surfex_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/hdo_surfex_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/hdo_surfex_mod.F	(revision 3726)
@@ -19,4 +19,5 @@
       use microphys_h, only: molco2, molh2o, molhdo
       use write_output_mod, only: write_output
+      use callkeys_mod, only: hdofrac
 
       implicit none
@@ -25,6 +26,4 @@
 c               for HDO, based of the fluxes for H2O
 c           L. Rossi.; M. Vals 2019
-c------------------------------------------------------------------
-      include "callkeys.h"
 c------------------------------------------------------------------
 c     Arguments:
@@ -164,5 +163,4 @@
 c    &                       ' ',alpha_c)
 
-       return
       end subroutine hdo_surfex
 c------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F	(revision 3726)
@@ -23,4 +23,6 @@
       use growthrate_mod, only: growthrate
       use write_output_mod, only: write_output
+      use callkeys_mod, only: activice, scavenging, cloud_adapt_ts,
+     &                        hdo, hdofrac
       implicit none
       
@@ -46,6 +48,4 @@
 c           A. Spiga, optimization (February 2012)
 c           J. Naar, adaptative subtimestep now done here (June 2023)
-c------------------------------------------------------------------
-      include "callkeys.h"
 c------------------------------------------------------------------
 c     Inputs/outputs:
Index: trunk/LMDZ.MARS/libf/phymars/improvedco2clouds_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/improvedco2clouds_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/improvedco2clouds_mod.F90	(revision 3726)
@@ -80,8 +80,7 @@
   use microphys_h, only: nbinco2_cld, rad_cldco2, m0co2, mco2
   use microphys_h, only: mteta, mtetaco2
+  use callkeys_mod, only: co2useh2o, meteo_flux
 
   implicit none
-
-  include "callkeys.h"
 
 !----------------------------------------------------------------------------------------------------------------------!
Index: trunk/LMDZ.MARS/libf/phymars/initracer.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/initracer.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/initracer.F	(revision 3726)
@@ -4,4 +4,8 @@
        use comcstfi_h, only: pi
        use dust_param_mod, only: doubleq, submicron, dustbin
+       use callkeys_mod, only: water, microphys, scavenging, rdstorm,
+     &                         topflows, photochem, callthermos, hdo,
+     &                         callnlte, nltemodel, dustinjection,
+     &                         co2clouds, co2useh2o, meteo_flux
        IMPLICIT NONE
 c=======================================================================
@@ -24,6 +28,4 @@
 c=======================================================================
 
-
-      include "callkeys.h"
 
       integer,intent(in) :: ngrid ! number of atmospheric columns
Index: trunk/LMDZ.MARS/libf/phymars/lwdiff.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/lwdiff.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/lwdiff.F	(revision 3726)
@@ -7,9 +7,7 @@
      &                          ndlo2
       use yomlw_h, only: nlaylte
-      USE comcstfi_h
+      use comcstfi_h, only: pi
       IMPLICIT NONE
  
-#include "callkeys.h"
-
 C-----------------------------------------------------------------------
 C
Index: trunk/LMDZ.MARS/libf/phymars/lwflux.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/lwflux.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/lwflux.F	(revision 3726)
@@ -21,6 +21,4 @@
       implicit none
  
-      include "callkeys.h"
-
 c----------------------------------------------------------------------
 c         0.1   arguments
Index: trunk/LMDZ.MARS/libf/phymars/lwi.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/lwi.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/lwi.F	(revision 3726)
@@ -14,8 +14,7 @@
       USE comcstfi_h, ONLY: g, cpp
       USE time_phylmdz_mod, ONLY: dtphys
+      use callkeys_mod, only: semi, iradia
       implicit none
 
-      include "callkeys.h"
- 
 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
 C
Index: trunk/LMDZ.MARS/libf/phymars/lwmain_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/lwmain_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/lwmain_mod.F	(revision 3726)
@@ -23,11 +23,8 @@
       use lwi_mod, only: lwi
       use lwflux_mod, only: lwflux
+      use callkeys_mod, only: ilwb, ilwd, ilwn
       
       implicit none
       
-c     declarations
-c     -------------   
-      include "callkeys.h"
-
 c----------------------------------------------------------------------
 c         0.1   arguments
Index: trunk/LMDZ.MARS/libf/phymars/lwu.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/lwu.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/lwu.F	(revision 3726)
@@ -37,6 +37,4 @@
       implicit none
 
-      include "callkeys.h"
-
 c----------------------------------------------------------------------
 c         0.1   arguments
Index: trunk/LMDZ.MARS/libf/phymars/lwxd.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/lwxd.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/lwxd.F	(revision 3726)
@@ -34,7 +34,6 @@
       use dimradmars_mod, only: ndlon, nuco2, nflev, ndlo2
       use yomlw_h, only: nlaylte, xi, xi_emis
+      use callkeys_mod, only: callemis
       implicit none
-
-      include "callkeys.h"
 
 c----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/lwxn.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/lwxn.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/lwxn.F	(revision 3726)
@@ -72,7 +72,6 @@
       use dimradmars_mod, only: ndlo2, nuco2, ndlon, nflev
       use yomlw_h, only: nlaylte, xi, xi_ground, xi_emis
+      use callkeys_mod, only: linear, alphan, ncouche
       implicit none
-
-#include "callkeys.h"
 
 c----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/nirco2abs.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/nirco2abs.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/nirco2abs.F	(revision 3726)
@@ -13,4 +13,5 @@
        USE time_phylmdz_mod, ONLY: daysec
        use nirdata_mod, only: npres, alfa, corgcm, oco21d, pres1d
+       use callkeys_mod, only: diurnal, nircorr
        IMPLICIT NONE
 c=======================================================================
@@ -55,5 +56,4 @@
 c    ------------------
 c
-      include "callkeys.h"
 
 c-----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/nltecool.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/nltecool.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/nltecool.F	(revision 3726)
@@ -193,7 +193,6 @@
       use tracer_mod, only: igcm_co2, igcm_co, igcm_o, igcm_n2, mmol
       use conc_mod, only: mmean
+      use callkeys_mod, only: nltemodel
       implicit none
-
-      include "callkeys.h"
 
 c Input and output variables
Index: trunk/LMDZ.MARS/libf/phymars/nlthermeq.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/nlthermeq.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/nlthermeq.F	(revision 3726)
@@ -16,6 +16,6 @@
       use yomlw_h, only: nlaylte
       use nlteparams_h, only: ptrans, pminte, zw
+      use callkeys_mod, only: callnlte
       implicit none
-      include "callkeys.h"
 
 c
@@ -26,11 +26,9 @@
 c
 c     Local:
-      integer igpmax, ismax
-      logical firstcall
-
+      integer ismax
+      integer,save :: igpmax
+      logical,save :: firstcall = .true.
 !$OMP THREADPRIVATE(firstcall,igpmax)
 
-      data firstcall /.true./
-      save firstcall, igpmax
 c
       if(firstcall) then
Index: trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_mix_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_mix_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_mix_mod.F90	(revision 3726)
@@ -36,10 +36,6 @@
       use geometry_mod, only: cell_area
       use write_output_mod, only: write_output
-#ifdef CPP_XIOS
-     use xios_output_mod, only: send_xios_field
-#endif      
       
       implicit none
-      include "callkeys.h"
 
       CHARACTER (LEN=20) :: modname='NONORO_GWD_MIX'
Index: trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_ran_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_ran_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_ran_mod.F90	(revision 3726)
@@ -48,10 +48,6 @@
       use geometry_mod, only: cell_area
       use write_output_mod, only: write_output
-#ifdef CPP_XIOS
-     use xios_output_mod, only: send_xios_field
-#endif      
       
       implicit none
-      include "callkeys.h"
 
       CHARACTER (LEN=20) :: modname='nonoro_gwd_ran'
Index: trunk/LMDZ.MARS/libf/phymars/nuclea.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/nuclea.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/nuclea.F	(revision 3726)
@@ -9,4 +9,5 @@
       use microphys_h, only: nbin_cld, rad_cld, nav, mteta, m0
       use microphys_h, only: desorp, kbz, nus, rgp, surfdif, vo1
+      use callkeys_mod, only: temp_dependent_m, cloud_adapt_ts
       implicit none
 *                                                     *
@@ -20,6 +21,4 @@
 *     Optimisation by A. Spiga (February 2012)        *  
 *******************************************************
-
-      include "callkeys.h"
 
 c     Inputs
Index: trunk/LMDZ.MARS/libf/phymars/nucleaco2.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/nucleaco2.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/nucleaco2.F90	(revision 3726)
@@ -29,6 +29,4 @@
  ! nucrate_h2o en sortie aussi :
 !nucleation sur dust et h2o separement ici
-
-include "callkeys.h"
 
 !     Inputs
Index: trunk/LMDZ.MARS/libf/phymars/pbl_parameters_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/pbl_parameters_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/pbl_parameters_mod.F90	(revision 3726)
@@ -28,4 +28,5 @@
       use watersat_mod, only: watersat
       use paleoclimate_mod, only: include_waterbuoyancy
+      use callkeys_mod, only: calladj, calltherm, callatke
 
       IMPLICIT NONE
@@ -79,6 +80,4 @@
 !   Declarations:
 !   -------------
-
-#include "callkeys.h"
 
 !   Arguments:
Index: trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90	(revision 3726)
@@ -34,8 +34,7 @@
 use comcstfi_h,          only: pi
 use geometry_mod,        only: latitude
+use callkeys_mod, only: startphy_file, rdstorm, hdo
 
 implicit none
-
-include "callkeys.h"
 
 !======================================================================
Index: trunk/LMDZ.MARS/libf/phymars/phyredem.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/phyredem.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/phyredem.F90	(revision 3726)
@@ -221,7 +221,6 @@
   use comslope_mod, only: nslope
   use paleoclimate_mod, only: paleoclimate
+  use callkeys_mod, only: calltherm, dustinjection, calllott_nonoro
   implicit none
-  
-  include "callkeys.h"
   
   character(len=*),intent(in) :: filename
Index: trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 3726)
@@ -128,4 +128,21 @@
       use lmdz_atke_turbulence_ini, only : atke_ini
       use waterice_tifeedback_mod, only : waterice_tifeedback
+      use callkeys_mod, only: calladj, calltherm, callatke, calldifv
+      use callkeys_mod, only: callrichsl, tke_heat_flux
+      use callkeys_mod, only: calllott, calllott_nonoro, calleofdump
+      use callkeys_mod, only: callrad, callnlte, callnirco2, nircorr
+      use callkeys_mod, only: diurnal, season, iradia, nltemodel
+      use callkeys_mod, only: water, activice, microphys, CLFvarying
+      use callkeys_mod, only: hdo, co2clouds, co2useh2o, meteo_flux
+      use callkeys_mod, only: callsoil, callslope, callcond
+      use callkeys_mod, only: tituscap, surfaceice_tifeedback
+      use callkeys_mod, only: refill_watercap, poreice_tifeedback
+      use callkeys_mod, only: cst_cap_albedo
+      use callkeys_mod, only: rdstorm, dustinjection
+      use callkeys_mod, only: topflows, dustiropacity
+      use callkeys_mod, only: sedimentation, scavenging
+      use callkeys_mod, only: photochem, callthermos
+      use callkeys_mod, only: startphy_file
+
       IMPLICIT NONE
 c=======================================================================
@@ -229,5 +246,4 @@
 c    ------------------
 
-      include "callkeys.h"
       include "netcdf.inc"
 
Index: trunk/LMDZ.MARS/libf/phymars/read_dust_scenario_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/read_dust_scenario_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/read_dust_scenario_mod.F90	(revision 3726)
@@ -15,7 +15,7 @@
 use planete_h, only: year_day
 USE mod_phys_lmdz_transfert_para, ONLY: bcast
+use callkeys_mod, only: iaervar, dustinjection, swrtype
+
 implicit none
-
-include "callkeys.h"
 
 integer, intent(in) :: ngrid,nlayer
@@ -66,5 +66,4 @@
    radeg=180/pi
    
-   ! assimilated dust file: (NB: iaervar is a common in "callkeys.h")
    ! iaervar=4 means read dust_tes.nc file
    ! iaervar=6 means read dust_cold.nc file
@@ -386,5 +385,5 @@
 endif
 
-if (swrtype.eq.1) then ! Fouquart (NB: swrtype is set in callkeys.h)
+if (swrtype.eq.1) then ! Fouquart (NB: swrtype is set in callkeys_mod)
  ! when using old radiative transfer (like in MCD 4.x)
  ! needed to decrease opacity (*0.825) to compensate overestimation of
Index: trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90	(revision 3726)
@@ -45,7 +45,6 @@
       USE callradite_mod, only: callradite
       use write_output_mod, only: write_output
+      use callkeys_mod, only: coeff_detrainment
       IMPLICIT NONE
-
-      include "callkeys.h"
 
 !--------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/simpleclouds.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/simpleclouds.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/simpleclouds.F	(revision 3726)
@@ -3,11 +3,12 @@
      &             pq,pdq,pdqcloud,pdtcloud,
      &             nq,tau,rice)
-      USE updaterad
+      USE updaterad, ONLY: updaterice_typ
       USE watersat_mod, ONLY: watersat
       use tracer_mod, only: igcm_h2o_vap, igcm_h2o_ice,
      &                      igcm_hdo_vap, igcm_hdo_ice,
      &                      qperemin
-      USE comcstfi_h
+      use comcstfi_h, only: cpp
       use dimradmars_mod, only: naerkind
+      use callkeys_mod, only: hdo, hdofrac
 
       implicit none
@@ -34,7 +35,4 @@
 c                            simpleclouds.F, and corrected calculations
 c                            of the typical CCN profile, Oct. 2011)
-c------------------------------------------------------------------
-#include "callkeys.h"
-
 c------------------------------------------------------------------
 c     Arguments:
@@ -233,4 +231,3 @@
 c     endif !hdo
 c------------------------------------------------------------------
-      return
       end
Index: trunk/LMDZ.MARS/libf/phymars/soil.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/soil.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/soil.F	(revision 3726)
@@ -9,4 +9,5 @@
       use surfdat_h, only: watercaptag, inert_h2o_ice
       use comslope_mod, ONLY: nslope
+      use callkeys_mod, only: surfaceice_tifeedback, poreice_tifeedback
       implicit none
 
@@ -19,6 +20,4 @@
 !        heat capacity are commons in comsoil_h
 !-----------------------------------------------------------------------
-
-#include "callkeys.h"
 
 c-----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/soilwater.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/soilwater.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/soilwater.F90	(revision 3726)
@@ -6,6 +6,6 @@
       use comsoil_h, only: igcm_h2o_vap_soil, igcm_h2o_ice_soil, igcm_h2o_vap_ads, layer, mlayer, choice_ads, porosity_reg, &
                            ads_const_D, ads_massive_ice 
-      use comcstfi_h
-      use tracer_mod
+      use comcstfi_h, only: pi, r
+      use tracer_mod, only: igcm_h2o_vap
       use surfdat_h, only: watercaptag ! use mis par AP15 essai
       use geometry_mod, only: cell_area, latitude_deg
@@ -46,15 +46,4 @@
 ! 
 ! =================================================================================================  = 
-
-! Libraries :
-! ===========  = 
-!#include "dimensions.h" 
-!#include "dimphys.h" 
-!#include "comsoil.h" 
-#include "callkeys.h" 
-!#include "comcstfi.h" 
-!#include "tracer.h" 
-!#include "watercap.h" 
-
 
 ! Arguments :
@@ -1636,5 +1625,5 @@
 !endif
 endif
-RETURN
+
 END
 
Index: trunk/LMDZ.MARS/libf/phymars/suaer.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/suaer.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/suaer.F90	(revision 3726)
@@ -14,4 +14,6 @@
 use datafile_mod, only: datadir
 USE mod_phys_lmdz_transfert_para, ONLY: bcast
+use callkeys_mod, only: dustrefir
+
 IMPLICIT NONE
 !==================================================================
@@ -43,8 +45,4 @@
 !    
 !==================================================================
-
-! Includes:
-
-include "callkeys.h"
 
 ! Optical properties (read in external ASCII files)
Index: trunk/LMDZ.MARS/libf/phymars/surfini_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/surfini_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/surfini_mod.F90	(revision 3726)
@@ -24,4 +24,5 @@
       use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat
       use datafile_mod, only: datadir
+      use callkeys_mod, only: water
 
       IMPLICIT NONE
@@ -34,5 +35,4 @@
 !   Declarations:
 !   -------------
-      include "callkeys.h"
 
       integer,intent(in) :: ngrid ! number of atmospheric columns
Index: trunk/LMDZ.MARS/libf/phymars/swmain_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/swmain_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/swmain_mod.F	(revision 3726)
@@ -14,9 +14,7 @@
      &                          nsun,naerkind
       use yomlw_h, only: nlaylte, gcp
+      use callkeys_mod, only: swrtype
       IMPLICIT NONE
 
-c     DECLARATIONS
-c     -------------      
-      include "callkeys.h"
 c     
 c     PURPOSE.
@@ -146,5 +144,5 @@
       DO INU = 1,2
 
-! NB: swrtype is set in callkeys.h
+! NB: swrtype is set in callkeys_mod
         if (swrtype.eq.1) then ! Fouquart
           CALL SWR_FOUQUART( KDLON, kflev, INU
Index: trunk/LMDZ.MARS/libf/phymars/swr_fouquart.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/swr_fouquart.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/swr_fouquart.F	(revision 3726)
@@ -7,8 +7,7 @@
      &                          ndlon, nflev, naerkind
       use yomlw_h, only: nlaylte
+      use callkeys_mod, only: rayleigh
       IMPLICIT NONE
 C     
-#include "callkeys.h"
-
 C     
 C   SWR - Continuum scattering computations
Index: trunk/LMDZ.MARS/libf/phymars/swr_toon.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/swr_toon.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/swr_toon.F	(revision 3726)
@@ -7,9 +7,8 @@
      &                          ndlon, naerkind
       use yomlw_h, only: nlaylte
+      use callkeys_mod, only: rayleigh
       
       IMPLICIT NONE
 C     
-#include "callkeys.h"
-
 C     
 C   SWR - Continuum scattering computations
Index: trunk/LMDZ.MARS/libf/phymars/updatereffrad_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/updatereffrad_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/updatereffrad_mod.F	(revision 3726)
@@ -29,4 +29,7 @@
      &            iaer_stormdust_doubleq,iaer_topdust_doubleq 
        use dust_param_mod, only: doubleq, active
+       use callkeys_mod, only: water, activice, microphys
+       use callkeys_mod, only: rdstorm, topflows
+       use callkeys_mod, only: co2clouds, activeco2ice, co2useh2o
        IMPLICIT NONE
 c=======================================================================
@@ -51,5 +54,4 @@
 c    -------------
 c
-      include "callkeys.h"
 
 c-----------------------------------------------------------------------
Index: trunk/LMDZ.MARS/libf/phymars/vdif_cd_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/vdif_cd_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/vdif_cd_mod.F90	(revision 3726)
@@ -18,5 +18,4 @@
    SUBROUTINE vdif_cd(ngrid,nlay,nslope,pz0,pg,pz,pp,pu,pv,wstar,pts,ph,mumean,pqvap,pqsurf,write_outputs,pcdv,pcdh)
    
-   use comcstfi_h
    use turb_mod, only: turb_resolved
    use watersat_mod, only: watersat
@@ -25,7 +24,6 @@
    use write_output_mod, only: write_output
    use comslope_mod, ONLY: iflat
+   use callkeys_mod, only: callrichsl, callatke
    IMPLICIT NONE
-   include "callkeys.h"      
-
 
 !=======================================================================
Index: trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F	(revision 3726)
@@ -40,4 +40,8 @@
       use lmdz_call_atke, only: call_atke
       use dust_windstress_lift_mod, only: dust_windstress_lift
+      use callkeys_mod, only: callcond, callrichsl, callyamada4,
+     &                        callatke, tke_heat_flux, water, hdo,
+     &                        co2clouds, rdstorm, dustinjection,
+     &                        latentheat_surfwater
       IMPLICIT NONE
 
@@ -61,6 +65,4 @@
 c   declarations:
 c   -------------
-
-      include "callkeys.h"
 
 c
Index: trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F	(revision 3726)
@@ -29,4 +29,6 @@
       use conc_mod, only: mmean
       use write_output_mod, only: write_output
+      use callkeys_mod, only: activice, microphys, supersat, hdo
+      use callkeys_mod, only: scavenging, CLFvarying
       IMPLICIT NONE
 
@@ -54,6 +56,4 @@
 c   declarations:
 c   -------------
-
-      include "callkeys.h"
 
 c   Inputs/outputs:
Index: trunk/LMDZ.MARS/libf/phymars/waterice_tifeedback_mod.F90
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/waterice_tifeedback_mod.F90	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/waterice_tifeedback_mod.F90	(revision 3726)
@@ -28,6 +28,7 @@
       use comsoil_h, only: layer, inertiedat, porosity_reg
       use surfdat_h, only: watercaptag, inert_h2o_ice
+      use callkeys_mod, only: poreice_tifeedback, surfaceice_tifeedback
       IMPLICIT NONE
-      include "callkeys.h"
+
 !=======================================================================
 !   Description :
Index: trunk/LMDZ.MARS/libf/phymars/yamada4.F
===================================================================
--- trunk/LMDZ.MARS/libf/phymars/yamada4.F	(revision 3715)
+++ trunk/LMDZ.MARS/libf/phymars/yamada4.F	(revision 3726)
@@ -612,12 +612,10 @@
 !     print*,'OKFIN'
       first=.false.
-      return
+
       end
       SUBROUTINE vdif_q2(timestep,gravity,rconst,ngrid,nlay
      & ,plev,temp,kmy,q2)
+!.......................................................................
       IMPLICIT NONE
-!.......................................................................
-! MARS
-      include "callkeys.h"
 !.......................................................................
 !
@@ -694,8 +692,6 @@
       SUBROUTINE vdif_q2e(timestep,gravity,rconst,ngrid,nlay,
      &   plev,temp,kmy,q2)
+!.......................................................................
       IMPLICIT NONE
-!.......................................................................
-! MARS
-      include "callkeys.h"
 !.......................................................................
 !
@@ -753,4 +749,4 @@
       enddo
 
-      return
+
       end
