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
 
 !-------------------!
