Index: trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/compile
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/compile	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/compile	(revision 54)
@@ -24,4 +24,11 @@
 #nz=32
 ##################
+tracers=5
+nx=64
+ny=48
+nz=25
+##################
+
+
 
 
Index: trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/callphys.def
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/callphys.def	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/callphys.def	(revision 54)
@@ -3,5 +3,4 @@
 #Run with or without tracer transport ?
 tracer=.false.
-##true???
 
 #Diurnal cycle ?  if diurnal=False, diurnal averaged solar heating
Index: trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/callphys.def.csttau
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/callphys.def.csttau	(revision 54)
+++ trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/callphys.def.csttau	(revision 54)
@@ -0,0 +1,122 @@
+##General options
+##~~~~~~~~~~~~~~~
+#Run with or without tracer transport ?
+tracer=.true.
+
+#Diurnal cycle ?  if diurnal=False, diurnal averaged solar heating
+diurnal=.true.
+
+#Seasonal cycle ? if season=False, Ls stays constant, to value set in "start"
+season = .true.   
+
+#write some more output on the screen ?
+lwrite = .false.    
+
+#Save statistics in file "stats.nc" ?
+stats =.false.
+
+#Save EOF profiles in file "profiles" for Climate Database?
+calleofdump = .false.
+
+## Dust scenario. Used if the dust is prescribed (i.e. if tracer=F or active=F)
+## ~~~~~~~~~~~~~
+#  =1 Dust opt.deph read in startfi; =2 Viking scenario; =3 MGS scenario,
+#  =4 Mars Year 24 from TES assimilation (same as =24 for now)
+#  =24 Mars Year 24 from TES assimilation (ie: MCD reference case)
+#  =25 Mars Year 25 from TES assimilation (ie: a year with a global dust storm)
+#  =26 Mars Year 26 from TES assimilation
+iaervar = 1 
+# Dust opacity at 700 Pa (when constant, i.e. for the iaervar=1 case)
+tauvis=0.5
+# Dust vertical distribution: 
+# (=0: old distrib. (Pollack90), =1: top set by "topdustref",
+#  =2: Viking scenario; =3 MGS scenario)
+iddist  = 3
+# Dust top altitude (km). (Matters only if iddist=1)
+topdustref = 55.
+
+## Physical Parameterizations :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# call radiative transfer ?
+callrad   = .true.
+# call NLTE radiative schemes ?   matters only if callrad=T
+callnlte = .true.
+# call CO2 NIR absorption ?   matters only if callrad=T
+callnirco2 = .true.
+# call turbulent vertical diffusion ?
+calldifv  = .true.
+# call convective adjustment ?
+calladj  = .true.
+# call CO2 condensation ?
+callcond =.true.
+# call thermal conduction in the soil ?
+callsoil = .true.
+# call Lott's gravity wave/subgrid topography scheme ?
+calllott  = .true.
+
+## Radiative transfer options :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the rad.transfer is computed every "iradia" physical timestep
+iradia    = 1
+# Output of the exchange coefficient mattrix ? for diagnostic only
+callg2d  = .false.
+# Rayleigh scattering : (should be .false. for now)
+rayleigh  = .false.
+
+## Tracer (dust water, ice and/or chemical species) options (used if tracer=T):
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# DUST: Transported dust ? (if >0, use 'dustbin' dust bins)
+dustbin    = 0
+# DUST: Radiatively active dust ? (matters if dustbin>0)
+active  = .false.
+# DUST: use mass and number mixing ratios to predict dust size ?
+# (must also have dustbin=1)
+doubleq   = .false.
+# DUST: lifted by GCM surface winds ?
+lifting = .false.
+# DUST: lifted by dust devils ?
+callddevil = .false.
+# DUST: Scavenging by CO2 snowfall ?
+scavenging = .false.
+# DUST/WATERICE: Gravitationnal sedimentation ?
+sedimentation = .false.
+# WATERICE: Radiatively active transported atmospheric water ice ?
+activice   = .false.
+# WATER: Compute water cycle
+water = .false.
+# WATER: current permanent caps at both poles. True IS RECOMMENDED
+#        (with .true., North cap is a source of water and South pole
+#         is a cold trap)
+caps  = .true.
+# PHOTOCHEMISTRY: include chemical species 
+photochem  = .false.
+
+## Thermospheric options (relevant if tracer=T) :
+##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# call thermosphere ?
+callthermos = .false.
+# WATER: included without cycle (only if water=.false.)
+thermoswater = .false.
+# call thermal conduction ? (only if callthermos=.true.)
+callconduct = .false.
+# call EUV heating ? (only if callthermos=.true.)
+calleuv=.false.
+# call molecular viscosity ? (only if callthermos=.true.)
+callmolvis = .false.
+# call molecular diffusion ? (only if callthermos=.true.)
+callmoldiff = .false.
+# call thermospheric photochemistry ? (only if callthermos=.true.)
+thermochem = .false.
+# date for solar flux calculation: (1985 < date < 2002)
+## (Solar min=1996.4 ave=1993.4 max=1990.6)
+solarcondate = 1993.4
+       
+
+## albedoes of CO2 ice caps from TES ?
+TESicealbedo=.true.
+## Coefficient for Northern cap albedoes
+TESice_Ncoef=1.4
+## Coefficient for Southern cap albedoes
+TESice_Scoef=1.4
+
+
Index: trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/run.def
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/run.def	(revision 54)
+++ trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/run.def	(revision 54)
@@ -0,0 +1,112 @@
+#
+#----------------------------------------------------------------------- 
+#Parametres de controle du run:                                          
+#------------------------------                                          
+
+# Nombre de jours d'integration                                         
+     nday=20
+
+# nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )      
+ day_step = 960
+
+# periode pour le pas Matsuno (en pas)                                  
+  iperiod=5
+
+# periode de sortie des variables de controle (en pas)                  
+  iconser=120
+
+# periode d'ecriture du fichier histoire (en jour)                      
+    iecri=100
+
+# periode de stockage fichier histmoy (en jour)                         
+ periodav=60.
+
+# periode de la dissipation (en pas)                                    
+  idissip=5
+
+# choix de l'operateur de dissipation (star ou  non star )              
+ lstardis=.true.
+
+# avec ou sans coordonnee hybrides
+ hybrid=.true.
+
+# nombre d'iterations de l'operateur de dissipation   gradiv            
+nitergdiv=1
+
+# nombre d'iterations de l'operateur de dissipation  nxgradrot          
+nitergrot=2
+
+# nombre d'iterations de l'operateur de dissipation  divgrad            
+   niterh=2
+
+# temps de dissipation des plus petites long.d ondes pour u,v (gradiv)  
+ tetagdiv= 3500.
+
+# temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+ tetagrot=4500.
+
+# temps de dissipation des plus petites long.d ondes pour  h ( divgrad) 
+ tetatemp=4500.
+
+# coefficient pour gamdissip                                            
+  coefdis=0.
+
+# choix du shema d'integration temporelle (Matsuno ou Matsuno-leapfrog) 
+  purmats=.false.
+
+# avec ou sans physique                                                 
+   physic=.true.
+
+# periode de la physique (en pas)                                       
+  iphysiq=20
+
+# choix d'une grille reguliere                                          
+  grireg=.true.
+
+# frequence (en pas) de l'ecriture du fichier diagfi               
+ ecritphy=40
+
+# longitude en degres du centre du zoom                                 
+   clon=63.
+
+# latitude en degres du centre du zoom                                  
+   clat=0.
+
+# facteur de grossissement du zoom,selon longitude                      
+  grossismx=1.
+
+# facteur de grossissement du zoom ,selon latitude                      
+ grossismy=1.
+
+#  Fonction  f(y)  hyperbolique  si = .true.  , sinon  sinusoidale         
+  fxyhypb=.false.
+
+# extension en longitude  de la zone du zoom  ( fraction de la zone totale)
+   dzoomx= 0.
+
+# extension en latitude de la zone  du zoom  ( fraction de la zone totale)
+   dzoomy=0.
+
+#  raideur du zoom en  X
+    taux=2.
+
+#  raideur du zoom en  Y
+    tauy=2.
+
+#  Fonction  f(y) avec y = Sin(latit.) si = .TRUE. ,  Sinon  y = latit.
+  ysinus= .false.
+
+# Avec sponge layer
+  callsponge  = .true.
+ 
+# Sponge:  mode0(u=v=0), mode1(u=umoy,v=0), mode2(u=umoy,v=vmoy)
+  mode_sponge= 2
+
+# Sponge:  hauteur de sponge (km)
+  hsponge= 130
+
+# Sponge:  tetasponge (secondes)
+  tetasponge = 50000
+
+# some definitions for the physics, in file 'callphys.def'
+INCLUDEDEF=callphys.def
Index: trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/traceur.def
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/traceur.def	(revision 54)
+++ trunk/mesoscale/LMD_MM_MARS/SIMU/in_lmdz_mars_newphys/myGCM/traceur.def	(revision 54)
@@ -0,0 +1,2 @@
+1
+co2
Index: trunk/mesoscale/LMD_MM_MARS/SIMU/runmeso
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SIMU/runmeso	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SIMU/runmeso	(revision 54)
@@ -165,4 +165,5 @@
       0) tracers='1' ;;
       1) tracers='2' ;;
+     11) tracers='5' ;;
       *) tracers='1' ;;
   esac
Index: trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM	(revision 54)
@@ -113,4 +113,10 @@
 state  real  QH2O_ICE  ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "QH2O_ICE"   "Water ice mixing ratio"     "kg kg-1"
 state  real  QDUST     ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "QDUST"      "Dust mixing ratio"          "kg kg-1"
+####
+state  real  Qco2        ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt)  "Qco2"         "CO2 mixing ratio"          "kg kg-1"
+#state  real  Qdust_mass  ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt)  "Qdust_mass"   "dust_mass mixing ratio"    "kg kg-1"
+state  real  Qdust_number  ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt)  "Qdust_number"   "dust_number mixing ratio"    "kg kg-1"
+#state  real  Qh2o_vap  ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt)  "Qh2o_vap"   "h2o_vap mixing ratio"    "kg kg-1"
+#state  real  Qh2o_ice  ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt)  "Qh2o_ice"   "h2o_ice mixing ratio"    "kg kg-1"
 ####
 ####
@@ -1324,5 +1330,7 @@
 package   nowater      mars==0                      -              moist:qv
 package   water        mars==1                      -              moist:qv;scalar:qh2o,qh2o_ice
-package   dust         mars==2                      -              moist:qv;scalar:qdust 
+package   dust         mars==2                      -              moist:qv;scalar:qdust
+#package   newwater     mars==11                     -              scalar:qco2,qh2o,qh2o_ice
+package   newwater     mars==11                     -              scalar:qco2,qh2o,qh2o_ice,qdust,qdust_number
 ##### MARS OPTIONS
 ##### MARS OPTIONS
Index: trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F	(revision 54)
@@ -1253,5 +1253,5 @@
                             its , ite , jts , jte , kts , kte )
 
-if (config_flags%mars == 1) then
+if ( (config_flags%mars == 1) .OR. (config_flags%mars == 11) ) then
 !if (size(scalar(0,0,0,:)) > 2) then
 !! autre possibilite: activer les flags dans metgrid.tbl
Index: trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F	(revision 54)
@@ -2692,5 +2692,7 @@
 
 !!!!****MARS: pass water vapor at boundaries (and all other tracers if nested domains)
-IF ( ( (config_flags%mars .eq. 1) .AND. (is .EQ. 2) ) .OR. config_flags%nested ) THEN
+IF (  ( (config_flags%mars .eq. 1) .AND. (is .EQ. 2) ) &
+ .OR. ( (config_flags%mars .eq. 11) .AND. (is .EQ. 2) ) &
+ .OR. config_flags%nested ) THEN
          CALL relax_bdy_scalar ( scalar_tend(ims,kms,jms,is),            &
                                  scalar(ims,kms,jms,is),  grid%em_mut,         &
@@ -2750,5 +2752,7 @@
 !!!!****MARS: if parent domain and any other tracer than water vapor, no bdy and simple zero flux bdy condition
 IF (  config_flags%specified  ) THEN
-IF ( (config_flags%mars .ne. 1) .OR. ((config_flags%mars .eq. 1) .and. (is .ne. 2)) ) THEN
+IF (    (config_flags%mars .ne. 1) &
+   .OR. ((config_flags%mars .eq. 11) .and. (is .ne. 2)) &
+   .OR. ((config_flags%mars .eq. 1 ) .and. (is .ne. 2)) ) THEN
            CALL flow_dep_bdy  ( scalar(ims,kms,jms,is),     &
                                 grid%em_ru_m, grid%em_rv_m, config_flags,   &
Index: trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/main/real_em.F
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/main/real_em.F	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/main/real_em.F	(revision 54)
@@ -679,5 +679,5 @@
 !                    ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe )
 !!!!MARS : pb a regler avec P_QH2O qui n est pas reconnu si QH2O n est pas dans active dans le registry 
-IF ( config_flags%mars .eq. 1 ) THEN
+IF ( (config_flags%mars .eq. 1) .OR. (config_flags%mars == 11) ) THEN
       CALL couple ( grid%em_mu_2 , grid%em_mub , qbdy3dtemp1 , grid%scalar(:,:,:,2) , 't' , grid%msft , &
                     ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe )
@@ -742,5 +742,5 @@
 !                                                                 ips , ipe , jps , jpe , kps , kpe )
 !!!!MARS
-IF ( config_flags%mars .eq. 1 ) THEN
+IF ( (config_flags%mars .eq. 1) .OR. (config_flags%mars == 11) ) THEN
       CALL stuff_bdy     ( qbdy3dtemp1 , grid%scalar_b(:,:,:,:,2)   , 'T' , ijds , ijde , spec_bdy_width      , &
                                                                  ids , ide , jds , jde , kds , kde , &
@@ -808,5 +808,5 @@
 !                    ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe )
 !!!!MARS
-IF ( config_flags%mars .eq. 1 ) THEN
+IF ( (config_flags%mars .eq. 1) .OR. (config_flags%mars == 11) ) THEN
       CALL couple ( grid%em_mu_2 , grid%em_mub , qbdy3dtemp2 , grid%scalar(:,:,:,2) , 't' , grid%msft , &
                     ids, ide, jds, jde, kds, kde, ims, ime, jms, jme, kms, kme, ips, ipe, jps, jpe, kps, kpe )
@@ -874,5 +874,5 @@
 !                                                            ips , ipe , jps , jpe , kps , kpe )
 !!!!MARS
-IF ( config_flags%mars .eq. 1 ) THEN
+IF ( (config_flags%mars .eq. 1) .OR. (config_flags%mars == 11) ) THEN
       CALL stuff_bdytend ( qbdy3dtemp2 , qbdy3dtemp1 , REAL(interval_seconds) , grid%scalar_bt(:,:,:,:,2) , 'T' , &
                                                             ijds , ijde , spec_bdy_width      , &
@@ -1028,5 +1028,5 @@
 !                                                                    ips , ipe , jps , jpe , kps , kpe )
 !!!!MARS
-IF ( config_flags%mars .eq. 1 ) THEN
+IF ( (config_flags%mars .eq. 1) .OR. (config_flags%mars == 11) ) THEN
         CALL stuff_bdy     ( qbdy3dtemp1 , grid%scalar_b(:,:,:,:,2)   , 'T', ijds , ijde , spec_bdy_width      , &
                                                                     ids , ide , jds , jde , kds , kde , &
Index: trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd/libf/phymars/meso_physiq.F
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd/libf/phymars/meso_physiq.F	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/mars_lmd/libf/phymars/meso_physiq.F	(revision 54)
@@ -873,22 +873,22 @@
 
 
-c-----------------------------------------------------------------------
-c    3. Gravity wave and subgrid scale topography drag :
-c    -------------------------------------------------
-
-
-      IF(calllott)THEN
-
-        CALL calldrag_noro(ngrid,nlayer,ptimestep,
-     &                 pplay,pplev,pt,pu,pv,zdtgw,zdugw,zdvgw)
- 
-        DO l=1,nlayer
-          DO ig=1,ngrid
-            pdv(ig,l)=pdv(ig,l)+zdvgw(ig,l)
-            pdu(ig,l)=pdu(ig,l)+zdugw(ig,l)
-            pdt(ig,l)=pdt(ig,l)+zdtgw(ig,l)
-          ENDDO
-        ENDDO
-      ENDIF
+!c-----------------------------------------------------------------------
+!c    3. Gravity wave and subgrid scale topography drag :
+!c    -------------------------------------------------
+!
+!
+!      IF(calllott)THEN
+!
+!        CALL calldrag_noro(ngrid,nlayer,ptimestep,
+!     &                 pplay,pplev,pt,pu,pv,zdtgw,zdugw,zdvgw)
+! 
+!        DO l=1,nlayer
+!          DO ig=1,ngrid
+!            pdv(ig,l)=pdv(ig,l)+zdvgw(ig,l)
+!            pdu(ig,l)=pdu(ig,l)+zdugw(ig,l)
+!            pdt(ig,l)=pdt(ig,l)+zdtgw(ig,l)
+!          ENDDO
+!        ENDDO
+!      ENDIF
 
 c-----------------------------------------------------------------------
@@ -1153,44 +1153,44 @@
 c     ------------------
 
-c        --------------
-c        photochemistry :
-c        --------------
-         IF(photochem .or. thermochem) then
-          call calchim(ptimestep,pplay,pplev,pt,pdt,dist_sol,mu0,
-     .      zzlay,zday,pq,pdq,zdqchim,zdqschim,zdqcloud,zdqscloud)
-           
-c Photochemistry includes condensation of H2O2
-
-           do iq=nqchem_min,nq
-            if (noms(iq).eq."h2o2") then
-             DO l=1,nlayer
-               DO ig=1,ngrid
-                    pdq(ig,l,iq)=pdq(ig,l,iq)+ zdqchim(ig,l,iq)
-                    pdq(ig,l,iq)=pdq(ig,l,iq)+ zdqcloud(ig,l,iq)
-               ENDDO
-             ENDDO
-            else
-             DO l=1,nlayer
-               DO ig=1,ngrid
-                    pdq(ig,l,iq)=pdq(ig,l,iq)+ zdqchim(ig,l,iq)
-               ENDDO
-             ENDDO
-            endif
-           ENDDO
-           do iq=nqchem_min,nq
-            if (noms(iq).eq."h2o2") then
-               DO ig=1,ngrid
-                    dqsurf(ig,iq)= dqsurf(ig,iq) + zdqschim(ig,iq)
-                    dqsurf(ig,iq)= dqsurf(ig,iq) + zdqscloud(ig,iq)
-               ENDDO
-            else
-               DO ig=1,ngrid
-                    dqsurf(ig,iq)= dqsurf(ig,iq) + zdqschim(ig,iq)
-               ENDDO
-            endif
-           ENDDO
-
-         END IF  ! (photochem.or.thermochem)
-c        print*,'photochem ok'
+!c        --------------
+!c        photochemistry :
+!c        --------------
+!         IF(photochem .or. thermochem) then
+!          call calchim(ptimestep,pplay,pplev,pt,pdt,dist_sol,mu0,
+!     .      zzlay,zday,pq,pdq,zdqchim,zdqschim,zdqcloud,zdqscloud)
+!           
+!c Photochemistry includes condensation of H2O2
+!
+!           do iq=nqchem_min,nq
+!            if (noms(iq).eq."h2o2") then
+!             DO l=1,nlayer
+!               DO ig=1,ngrid
+!                    pdq(ig,l,iq)=pdq(ig,l,iq)+ zdqchim(ig,l,iq)
+!                    pdq(ig,l,iq)=pdq(ig,l,iq)+ zdqcloud(ig,l,iq)
+!               ENDDO
+!             ENDDO
+!            else
+!             DO l=1,nlayer
+!               DO ig=1,ngrid
+!                    pdq(ig,l,iq)=pdq(ig,l,iq)+ zdqchim(ig,l,iq)
+!               ENDDO
+!             ENDDO
+!            endif
+!           ENDDO
+!           do iq=nqchem_min,nq
+!            if (noms(iq).eq."h2o2") then
+!               DO ig=1,ngrid
+!                    dqsurf(ig,iq)= dqsurf(ig,iq) + zdqschim(ig,iq)
+!                    dqsurf(ig,iq)= dqsurf(ig,iq) + zdqscloud(ig,iq)
+!               ENDDO
+!            else
+!               DO ig=1,ngrid
+!                    dqsurf(ig,iq)= dqsurf(ig,iq) + zdqschim(ig,iq)
+!               ENDDO
+!            endif
+!           ENDDO
+!
+!         END IF  ! (photochem.or.thermochem)
+!c        print*,'photochem ok'
 
 c   7c. Aerosol particles
@@ -1274,32 +1274,33 @@
 
 
-c-----------------------------------------------------------------------
-c   8.5 THERMOSPHERE CALCULATION
-c-----------------------------------------------------------------------
-
-      if (callthermos) then
-        call thermosphere(pplev,pplay,dist_sol,
-     $     mu0,ptimestep,ptime,zday,tsurf,zzlev,zzlay,
-     &     pt,pq,pu,pv,pdt,pdq,
-     $     zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff)
-c           do iq=nqchem_min,nq
-c           write(*,*) 'thermo iq,pq',iq,pq(690,1,iq)
-c           enddo
-
-        DO l=1,nlayer
-          DO ig=1,ngrid
-            dtrad(ig,l)=dtrad(ig,l)+zdteuv(ig,l)
-            pdt(ig,l)=pdt(ig,l)+zdtconduc(ig,l)
-     &                         +zdteuv(ig,l)
-            pdv(ig,l)=pdv(ig,l)+zdvmolvis(ig,l)
-            pdu(ig,l)=pdu(ig,l)+zdumolvis(ig,l)
-            DO iq=1, nq
-              pdq(ig,l,iq)=pdq(ig,l,iq)+zdqmoldiff(ig,l,iq)
-            ENDDO
-          ENDDO
-        ENDDO
-
-
-      endif
+!c-----------------------------------------------------------------------
+!c   8.5 THERMOSPHERE CALCULATION
+!c-----------------------------------------------------------------------
+!
+!      if (callthermos) then
+!        call thermosphere(pplev,pplay,dist_sol,
+!     $     mu0,ptimestep,ptime,zday,tsurf,zzlev,zzlay,
+!     &     pt,pq,pu,pv,pdt,pdq,
+!     $     zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff)
+!c           do iq=nqchem_min,nq
+!c           write(*,*) 'thermo iq,pq',iq,pq(690,1,iq)
+!c           enddo
+!
+!        DO l=1,nlayer
+!          DO ig=1,ngrid
+!            dtrad(ig,l)=dtrad(ig,l)+zdteuv(ig,l)
+!            pdt(ig,l)=pdt(ig,l)+zdtconduc(ig,l)
+!     &                         +zdteuv(ig,l)
+!            pdv(ig,l)=pdv(ig,l)+zdvmolvis(ig,l)
+!            pdu(ig,l)=pdu(ig,l)+zdumolvis(ig,l)
+!            DO iq=1, nq
+!              pdq(ig,l,iq)=pdq(ig,l,iq)+zdqmoldiff(ig,l,iq)
+!            ENDDO
+!          ENDDO
+!        ENDDO
+!
+!
+!      endif
+
 c-----------------------------------------------------------------------
 c   8. Surface  and sub-surface soil temperature
Index: trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F	(revision 54)
@@ -697,15 +697,20 @@
    tsoil_val = tsoil_val*0. + tsurf_val
   ENDIF
+#ifdef NEWPHYS
+  isoil_val(:)=MARS_ISOIL(i,:,j)
+  dsoil_val(:)=MARS_DSOIL(i,:,j)
+#endif
 ELSE
   IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION tsoil is set to tsurf'
   do k=1,nsoil
    tsoil_val(k) = tsurf_val
+#ifdef NEWPHYS
+   IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION isoil and dsoil standard'
+   isoil_val(k) = inertiedat_val
+   dsoil_val(k) = sqrt(887.75/3.14)*((2.**(k-0.5))-1.) * inertiedat_val / wvolcapa
+   IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** ISOIL DSOIL are ',isoil_val(k), dsoil_val(k)
+#endif
   enddo
 ENDIF
-
-#ifdef NEWPHYS
-isoil_val(:)=MARS_ISOIL(i,:,j)
-dsoil_val(:)=MARS_DSOIL(i,:,j)
-#endif
 
 !-------------------!
Index: trunk/mesoscale/LMD_MM_MARS/makemeso
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/makemeso	(revision 51)
+++ trunk/mesoscale/LMD_MM_MARS/makemeso	(revision 54)
@@ -52,6 +52,7 @@
 justphys=0
 debug=0
+fresh_start=0
 phys=""
-while getopts "drc:njhgp" options; do
+while getopts "drc:njhgpf" options; do
   case $options in
    d ) donotcompile=1;;     ## just to check the compile folder
@@ -61,5 +62,6 @@
    j ) justphys=1;;         ## just compile LMD physics
    g ) debug=1;;            ## debug mode
-   p ) phys="newphys_";;
+   p ) phys="newphys_";;    ## with new physics
+   f ) fresh_start=1;;      ## a fresh start
    h ) echo "
 # Use:    
@@ -83,4 +85,6 @@
 #
 # makemeso -p                ## with new LMD physics
+#
+# makemeso -f                ## fresh start [clean -a]
 " ; exit ;;
   esac
@@ -185,26 +189,34 @@
     if [[ "${phys}" == "newphys_" ]]
     then
-    sed s+"mars_lmd"+"mars_lmd_new"+g copy_model > copy_model_tmp
-    chmod 755 copy_model_tmp
-    ./copy_model_tmp
-    \rm copy_model_tmp
-    mv WRFV2 ${conf_wrf}/
-    cd ${conf_wrf}/WRFV2
-    ln -sf mars_lmd_new mars_lmd
-    ln -sf meso_callkeys_newphys.h meso_callkeys.h
-    cd Registry ; Registry.bash ; cd ..
+     sed s+"mars_lmd"+"mars_lmd_new"+g copy_model > copy_model_tmp
+     chmod 755 copy_model_tmp
+     ./copy_model_tmp
+     \rm copy_model_tmp
+     mv WRFV2 ${conf_wrf}/
+     cd ${conf_wrf}/WRFV2
+     ln -sf mars_lmd_new mars_lmd
+     ln -sf meso_callkeys_newphys.h meso_callkeys.h
+     cd Registry ; Registry.bash ; cd ..
     else
-    ./copy_model
-    mv WRFV2 ${conf_wrf}/
-    cd ${conf_wrf}/WRFV2
-    cd Registry ; Registry.bash ; cd .. 
-    fi
+     ./copy_model
+     mv WRFV2 ${conf_wrf}/
+     cd ${conf_wrf}/WRFV2
+     cd Registry ; Registry.bash ; cd .. 
+     fi
   else
     cd ${conf_wrf}/WRFV2 
-    echo Did you modify anything in the Registry or clean ? y for yes, any key for no ; read answer
-    case ${answer} in
-      y) cd Registry ; mv Registry Registry.bak ; Registry.bash ; cd .. ;;
-      *) answer='no' ;;
-    esac 
+    if [ ${fresh_start} -eq 1 ] 
+    then
+      echo '*** FRESH START, I clean everything'
+      clean -a > /dev/null 2> /dev/null
+      cd Registry ; mv Registry Registry.bak ; Registry.bash ; cd ..
+      answer='y' ## a voir... pas si sur
+    else
+      echo Did you modify anything in the Registry or clean ? y for yes, any key for no ; read answer
+      case ${answer} in
+        y) cd Registry ; mv Registry Registry.bak ; Registry.bash ; cd .. ;;
+        *) answer='no' ;;
+      esac
+    fi 
   fi
   # summary
