Index: trunk/chantiers/commit_importants.log
===================================================================
--- trunk/chantiers/commit_importants.log	(revision 75)
+++ trunk/chantiers/commit_importants.log	(revision 76)
@@ -479,3 +479,68 @@
 * caladvtrac.F (dyn3d) : modifications cosmétiques
 
-
+********************
+**** commit_v76 ****  etape importante d'une serie de commit sur les traceurs dans le mesoscale
+********************
+
+LMD_MM_MARS: remise a plat du traitement des traceurs terminee 
+             [en particulier en vue de l'utilisation nouvelle physique]
+             --> fonctionnement concluant sur un cas Tharsis hydro 61x61x61
+             --> ne pas utiliser le cas FASTCASE trop instable avec traceurs
+             --> reste a tester l'effet d'especes radiativement actives
+
+             options dans namelist.input :
+             mars = 0   ---> pas de traceurs
+             mars = 1   ---> cycle de l'eau : water vapour + ice
+             mars = 2   ---> cycle poussieres : un dust bin
+             mars = 3   ---> cycle poussieres : dustq + dustn [NOUVELLE PHYS seulement] 
+             mars = 11  ---> cycle de l'eau + poussieres [1+3] [NOUVELLE PHYS seulement]
+                  NB: pour les deux derniers, reste un petit travail mineur sur qsurf
+                                                 (voir dans module_lmd_driver.F)
+             il faut definir conjointement le callphys.def associe et relancer real.exe
+                         (sinon on transporte juste dynamiquement des 'dummy' traceurs) 
+             il n'est necessaire de recompiler que si le nombre total de traceurs change
+
+Fichiers a mettre a jour si l'on ajoute une option "mars" dans le Registry
+--------------------------------------------------------------------------
+Attention suivant les inputs GCM, il faut peut etre egalement changer
+1. readmeteo.F90 dans PREP_MARS et 2. METGRID.TBL dans WPS/metgrid
+
+M               75   mesoscale/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM
+---> definition du scenario et de l'ordre des traceurs dans SCALAR
+
+M               75   mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F
+---> definition des interpolations verticales des champs de traceurs venant du GCM
+
+M               75   mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F
+---> definition du traitement a reserver aux bornes
+---> --- dans les 4 scenarios precites, on passe aux bornes les champs du GCM
+         [y compris QH2O_ICE contrairement a ce qui etait par defaut precedemment]
+---> --- les lignes relatives a un flux nul aux bornes sont laissees a un cas hypothetique mars>50
+
+M               75   mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F
+---> definition de l'ordre correct des traceurs pour le passage a la physique
+---> recuperation des tendances de la physique pour passage a la dynamique
+---> NB: c'est dans ce module que sont presents des STOP si mars = 4-10 ou mars > 11
+         .... il faut donc modifier si l'on ajoute des options
+
+M               75   mesoscale/LMD_MM_MARS/SRC/WRFV2/main/real_em.F
+---> definition et calcul des champs a appliquer aux bornes
+---> generalise desormais, il n'y a plus qu'a ajouter d'eventuelles nouvelles options 'mars'
+---> .... des modifications sont necessaires si on passe plus de 4 traceurs aux bornes
+
+M               75   mesoscale/LMD_MM_MARS/SIMU/runmeso
+---> definition du bon nombre de traceurs dans la compilation de la physique puis l'execution
+     [l'option mars est lue par le script dans namelist.input]
+
+Fichiers tests
+--------------
+A                0   mesoscale/TESTS/newphys_tracers/*
+---> pour la nouvelle physique (ici seulement les fichiers def)
+---> toutes les options precitees ont ete testes avec succes a l'execution [pas de crash]
+---> ... plausibilite physique verifiee rapidement, PAS d'ANALYSE APPROFONDIE pour le moment
+
+A                0   mesoscale/TESTS/LMD_MM_MARS_TESTCASE_water.tar.gz
+---> pour l'ancienne physique (introduit precedemment mais n'avait pas ete synchronise)
+
+M               75   mars/libf/phymars/meso_dustlift.F
+NB: correction mineure, de facon a recuperer alpha_lift de initracer
Index: trunk/mars/libf/phymars/meso_dustlift.F
===================================================================
--- trunk/mars/libf/phymars/meso_dustlift.F	(revision 75)
+++ trunk/mars/libf/phymars/meso_dustlift.F	(revision 76)
@@ -52,6 +52,8 @@
           IF(ierr.NE.0) THEN
              stress_seuil = 0.0225
-             alpha = 1.
-             write(*,*) 'No file stress.def - set ', stress_seuil, alpha
+!!!! defini dans initracer
+!             alpha = 1.
+             write(*,*) 'No file stress.def - set ', 
+     .                     stress_seuil, alpha_lift
              !stop
           ELSE
@@ -60,6 +62,6 @@
              write(*,*) 'definir seuil stress : ', stress_seuil, alpha
              CLOSE(99)
+             alpha_lift(1) = alpha
           ENDIF
-          alpha_lift(1) = alpha
 !****WRF
 !****WRF
Index: trunk/mesoscale/LMD_MM_MARS/SIMU/runmeso
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SIMU/runmeso	(revision 75)
+++ trunk/mesoscale/LMD_MM_MARS/SIMU/runmeso	(revision 76)
@@ -164,5 +164,7 @@
       0) tracers='1' ;;
       1) tracers='2' ;;
-     11) tracers='5' ;;
+      2) tracers='1' ;;
+      3) tracers='2' ;;
+     11) tracers='4' ;;
       *) 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 75)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/Registry/Registry.EM	(revision 76)
@@ -111,13 +111,9 @@
 ####
 state  real  -         ikjftb  scalar  1  -  -                         -
-state  real  QH2O      ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "QH2O"       "Water vapor mixing ratio"   "kg kg-1"
-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"
+state  real  qh2o      ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt)  "QH2O"          "Water vapor mixing ratio"   "kg kg-1"
+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  qdustn    ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt)  "QDUSTN"        "Dust_number mixing ratio"   "kg kg-1"
+state  real  qco2      ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt)  "QCO2"          "CO2 mixing ratio"           "kg kg-1"
 ####
 ####
@@ -1322,21 +1318,20 @@
 ##### MARS OPTIONS
 ##
-## CHANGING THE OPTION CHANGE THE NUMBER OF TRACERS WITHOUT ANY NEED TO RECOMPILE ENTIRELY WRF
-## HOWEVER, YOU STILL NEED TO RECOMPILE THE PHYSICS BEFORE CHANGING THE OPTION
-## JUST USE THE COMPILE_ALL SCRIPT FOR A FAST RECOMPILATION 
-## -------
-## ONE REMAINING PROBLEM IS THE FACT THAT YOU NEED TO RECOMPILE
-## ENTIRELY IF YOU DO NOT WANT TO OUTPUT THE TRACERS
-## (FOR EXAMPLE, IF THEY ARE TURNED OFF ...)
-## -------
+## CHANGING THE OPTION CHANGES TRACER REFERENCES WITHOUT ANY NEED TO RECOMPILE ENTIRELY LMD_MM 
+## --> EVEN IF FIELDS ARE SCHEDULED FOR OUTPUTS ABOVE [WITH h], THESE ARE NOT IN wrfout* FILES
+##       UNLESS THE CORRESPONDING mars OPTION IS SELECTED 
+## --> HOWEVER, YOU STILL NEED TO RECOMPILE THE PHYSICS BEFORE CHANGING THE OPTION
+##       AND PROBABLY YOU'LL ALSO HAVE TO CHANGE callphys.def
+## --> IF mars IS CHANGED IN THE NAMELIST, YOU HAVE TO RE-RUN real.exe
 ##
+## IF YOU ADD A mars REFERENCE BELOW, YOU HAVE TO RECOMPILE ENTIRELY THE MODEL
 ##
-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   newwater     mars==11                     -              scalar:qco2,qh2o,qh2o_ice
-#package   newwater     mars==11                     -              scalar:qco2,qh2o,qh2o_ice,qdust,qdust_number
-### NOTE: toujours CO2 en dernier 
-package   newwater     mars==11                     -              scalar:qh2o,qh2o_ice,qdust,qdust_number,qco2
+## THE ORDER of TRACERS IN EACH OPTION IS VERY IMPORTANT
+##
+package   default      mars==0                      -              -
+package   water        mars==1                      -              scalar:qh2o,qh2o_ice
+package   dust1        mars==2                      -              scalar:qdust
+package   dust2eq      mars==3                      -              scalar:qdust,qdustn
+package   newwater     mars==11                     -              scalar:qh2o,qh2o_ice,qdust,qdustn
 ##### MARS OPTIONS
 ##### MARS OPTIONS
@@ -1352,5 +1347,5 @@
 package   ncepcloud3    mp_physics==98               -             moist:qv,qc,qr
 package   ncepcloud5    mp_physics==99               -             moist:qv,qc,qr,qi,qs
-package   thompson       mp_physics==8               -             moist:qv,qc,qr,qi,qs,qg;scalar:qni
+package   thompson      mp_physics==8                -             moist:qv,qc,qr,qi,qs,qg;scalar:qni
 
 package   rrtmscheme    ra_lw_physics==1             -             -
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 75)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F	(revision 76)
@@ -1259,8 +1259,13 @@
                             its , ite , jts , jte , kts , kte )
 
-                         
-if ( config_flags%mars == 2 ) then
-       print *, '**** ONE DUST BIN ****'
-       print *, '**** I assume this is dustq in met_em ****'
+                        
+!!!!!!****MARS****!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!! ****MARS MARS MARS for order in rank for each option, check in REGISTRY.EM
+!!!!!!       [a little bit too hardcoded here unfortunately... but e.g. P_QH2O must be known]
+!!!!!!       [there is a more flexible option with flags in metgrid.tbl, TBD?]
+!!!!!! NB: real_em.F must also be modified 
+!!!!!! NB2: qvapor is not used to avoid collision with earth-related calculations
+if ( ( config_flags%mars == 2 ) .OR. ( config_flags%mars == 3 ) ) then
+       print *, '**** INTERPOLATE DUSTQ **** RANK 2 in SCALAR'
        CALL vert_interp_old ( grid%em_dustq_gc , grid%em_pd_gc , scalar(:,:,:,2) , grid%em_pb , &
                                     num_metgrid_levels , 'Q' , &
@@ -1271,25 +1276,7 @@
                                     its , ite , jts , jte , kts , kte )
 endif        
-
-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
-!!
-!! pour l'instant les indices sont indiqués en dur en attendant plus souple
-!!
-!!
-
-        print *, '**** WATER CYCLE ON ****' 
-        print *, size(scalar(0,0,0,:)), P_QH2O, P_QH2O_ICE
-
-        
-        !!****MARS: initialization for water cycle
-        !!****MARS:
-        !!****MARS: -- note that -real.F was modified to include GCM QH2O boundary conditions
-        !!****MARS: 		 -qvapor was not used to avoid any terrestrial calculations in WRF unsuitable for Mars
-        !!****MARS:		 -any change and/or modification of variables has to be recorded in the Registry
-        !!****MARS:
-        !CALL vert_interp_old ( grid%em_hv_gc , grid%em_pd_gc , scalar(:,:,:,P_QH2O) , grid%em_pb , &
-        CALL vert_interp_old ( grid%em_hv_gc , grid%em_pd_gc , scalar(:,:,:,2) , grid%em_pb , &
+if ( ( config_flags%mars == 3 ) ) then
+       print *, '**** INTERPOLATE DUSTN **** RANK 3 in SCALAR'
+       CALL vert_interp_old ( grid%em_dustn_gc , grid%em_pd_gc , scalar(:,:,:,3) , grid%em_pb , &
                                     num_metgrid_levels , 'Q' , &
                                     interp_type , lagrange_order , lowest_lev_from_sfc , &
@@ -1298,6 +1285,9 @@
                                     ims , ime , jms , jme , kms , kme , &
                                     its , ite , jts , jte , kts , kte )
-        !CALL vert_interp_old ( grid%em_hi_gc , grid%em_pd_gc , scalar(:,:,:,P_QH2O_ICE) , grid%em_pb , &
-        CALL vert_interp_old ( grid%em_hi_gc , grid%em_pd_gc , scalar(:,:,:,3) , grid%em_pb , &
+endif        
+if ( ( config_flags%mars == 1 ) .OR. ( config_flags%mars == 11 ) ) then
+       print *, '**** INTERPOLATE HV **** RANK 2 in SCALAR'
+       !print *, size(scalar(0,0,0,:)), P_QH2O, P_QH2O_ICE
+       CALL vert_interp_old ( grid%em_hv_gc , grid%em_pd_gc , scalar(:,:,:,2) , grid%em_pb , &
                                     num_metgrid_levels , 'Q' , &
                                     interp_type , lagrange_order , lowest_lev_from_sfc , &
@@ -1306,12 +1296,16 @@
                                     ims , ime , jms , jme , kms , kme , &
                                     its , ite , jts , jte , kts , kte )
-        !!****MARS:
-
+       print *, '**** INTERPOLATE HI **** RANK 3 in SCALAR'
+       CALL vert_interp_old ( grid%em_hi_gc , grid%em_pd_gc , scalar(:,:,:,3) , grid%em_pb , &
+                                    num_metgrid_levels , 'Q' , &
+                                    interp_type , lagrange_order , lowest_lev_from_sfc , &
+                                    zap_close_levels , force_sfc_in_vinterp , &
+                                    ids , ide , jds , jde , kds , kde , &
+                                    ims , ime , jms , jme , kms , kme , &
+                                    its , ite , jts , jte , kts , kte )
 endif
 #ifdef NEWPHYS
-if (config_flags%mars == 11) then
-        print *, '**** DUST var RADIUS ON ****'
-        !print *, size(scalar(0,0,0,:)), P_QDUST, P_Qdust_number
-
+if ( config_flags%mars == 11 ) then
+       print *, '**** INTERPOLATE DUSTQ **** RANK 4 in SCALAR'             
        CALL vert_interp_old ( grid%em_dustq_gc , grid%em_pd_gc , scalar(:,:,:,4) , grid%em_pb , &
                                     num_metgrid_levels , 'Q' , &
@@ -1321,5 +1315,5 @@
                                     ims , ime , jms , jme , kms , kme , &
                                     its , ite , jts , jte , kts , kte )
-
+       print *, '**** INTERPOLATE DUSTQ **** RANK 5 in SCALAR'
        CALL vert_interp_old ( grid%em_dustn_gc , grid%em_pd_gc , scalar(:,:,:,5) , grid%em_pb , &
                                     num_metgrid_levels , 'Q' , &
@@ -1331,4 +1325,5 @@
 endif
 #endif
+!!!!!!****MARS****!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 #if 0
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 75)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F	(revision 76)
@@ -2692,8 +2692,13 @@
      IF ( ( config_flags%specified .or. config_flags%nested ) .and. rk_step == 1) THEN
 
-!!!!****MARS MARS MARS: what to do with tracers at the boundaries ???
-IF (  ( (config_flags%mars .eq.  1) .AND. (is .EQ. 2) ) &    !! 1   pass only water vapor
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!****MARS MARS MARS: what to do with tracers at the boundaries ??? !!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!IF (  ( (config_flags%mars .eq.  1) .AND. (is .EQ. 2) ) &    !! 1   pass only water vapor
+IF  ( (  config_flags%mars .eq.  1                    ) &    !! 1   pass water vapor AND ice
  .OR. (  config_flags%mars .eq.  2                    ) &    !! 2   pass the dust tracer
- .OR. ( (config_flags%mars .eq. 11) .AND. (is .EQ. 2) ) &    !! 11  pass only water vapor
+ .OR. (  config_flags%mars .eq.  3                    ) &    !! 3   pass dust Q and N 
+! .OR. ( (config_flags%mars .eq. 11) .AND. (is .EQ. 2) ) &    !! 11  pass only water vapor
+ .OR. (  config_flags%mars .eq. 11                    ) &    !! 11  pass EVERYTHING
  .OR. config_flags%nested ) THEN                             !! *   pass all tracers if nested
          CALL relax_bdy_scalar ( scalar_tend(ims,kms,jms,is),            &
@@ -2752,8 +2757,9 @@
                               k_start    , k_end               )
 
-!!!!****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 .eq. 1 ) .and. (is .ne. 2))  &   
-     .OR. ((config_flags%mars .eq. 11) .and. (is .ne. 2))  ) THEN
+!!!!!****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 .eq. 1 ) .and. (is .ne. 2))  &   
+!     .OR. ((config_flags%mars .eq. 11) .and. (is .ne. 2))  ) THEN
+IF ( config_flags%mars .gt. 50 ) THEN
 
      !!! YOU HAVE TO ADD A CONDITION HERE IF YOU ADD A mars OPTION in REGISTRY  !!!
Index: trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/main/real_em.F
===================================================================
--- trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/main/real_em.F	(revision 75)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/main/real_em.F	(revision 76)
@@ -711,4 +711,5 @@
 !!!!!MARS: ... mais il est facile d'en ajouter... ajouter simplement des tableaux type q2bdy3dtemp1 
 IF ( (config_flags%mars .eq. 1) .OR. &
+     (config_flags%mars .eq. 3) .OR. &
      (config_flags%mars .eq. 11) ) THEN
       CALL couple ( grid%em_mu_2 , grid%em_mub , q2bdy3dtemp1 , grid%scalar(:,:,:,3) , 't' , grid%msft , &
@@ -784,4 +785,5 @@
 ENDIF
 IF ( (config_flags%mars .eq. 1) .OR. &
+     (config_flags%mars .eq. 3) .OR. &
      (config_flags%mars .eq. 11) ) THEN
       CALL stuff_bdy     ( q2bdy3dtemp1 , grid%scalar_b(:,:,:,:,3)   , 'T' , ijds , ijde , spec_bdy_width      , &
@@ -860,4 +862,5 @@
 ENDIF
 IF ( (config_flags%mars .eq. 1) .OR. &
+     (config_flags%mars .eq. 3) .OR. &
      (config_flags%mars .eq. 11) ) THEN
       CALL couple ( grid%em_mu_2 , grid%em_mub , q2bdy3dtemp2 , grid%scalar(:,:,:,3) , 't' , grid%msft , &
@@ -937,4 +940,5 @@
 ENDIF
 IF ( (config_flags%mars .eq. 1) .OR. &
+     (config_flags%mars .eq. 3) .OR. &
      (config_flags%mars .eq. 11) ) THEN
       CALL stuff_bdytend ( q2bdy3dtemp2 , q2bdy3dtemp1 , REAL(interval_seconds) ,grid%scalar_bt(:,:,:,:,3) , 'T' , &
@@ -1107,4 +1111,5 @@
 ENDIF
 IF ( (config_flags%mars .eq. 1) .OR. &
+     (config_flags%mars .eq. 3) .OR. &
      (config_flags%mars .eq. 11) ) THEN
         CALL stuff_bdy     ( q2bdy3dtemp1 , grid%scalar_b(:,:,:,:,3)   , 'T', ijds , ijde , spec_bdy_width      , &
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 75)
+++ trunk/mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F	(revision 76)
@@ -618,22 +618,44 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!
-#ifdef NEWPHYS
-!!! name of tracers -- see Registry.EM for order and traceur.def for names
+
+SELECT CASE (MARS_MODE) !! ONLY ALLOW FOR MODES DEFINED IN Registry.EM
+   CASE(4-10,12:)      !! -- CHANGE THIS if YOU ADDED CASES in REGISTRY.EM
+   PRINT *, 'NOT SUPPORTED, to be done'
+   STOP
+END SELECT
+!!!!!!!!!!!!!!!!!!! FOR REFERENCE ; FROM REGISTRY.EM
+!package   default      mars==0                      -              -
+!package   water        mars==1                      -              scalar:qh2o,qh2o_ice
+!package   dust1        mars==2                      -              scalar:qdust
+!package   dust2eq      mars==3                      -              scalar:qdust,qdustn
+!package   newwater     mars==11                     -              scalar:qh2o,qh2o_ice,qdust,qdustn
+!!!!!!!!!!!!!!!!!!! FOR REFERENCE
+
+#ifdef NEWPHYS
+!!! name of tracers to mimic entries in tracer.def 
+!!! ----> IT IS IMPORTANT TO KEEP SAME ORDERING AS IN THE REGISTRY !!!!
+!!!                               SAME NAMING   AS IN THE LMD PHYSICS !!!!
 SELECT CASE (MARS_MODE)
-    CASE(0)  !! NO TRACERS (mars=0)
+    CASE(0)  
       wtnom(nq) = 'co2'
     CASE(1)
-      wtnom(1) = 'h2o_vap'  
-      wtnom(2) = 'h2o_ice'
+      wtnom(1)  = 'h2o_vap'     
+      wtnom(2)  = 'h2o_ice'     
     CASE(2)
-      wtnom(1) = 'dust01'      
-    CASE(11) !! newwater mars==11 scalar:qh2o,qh2o_ice,qdust,qdust_number,qco2
-      wtnom(1) = 'h2o_vap'
-      wtnom(2) = 'h2o_ice'
-      wtnom(3) = 'dust_mass'
-      wtnom(4) = 'dust_number'
-      wtnom(nq) = 'co2'
+      wtnom(1)  = 'dust01'      
+    CASE(3)
+      wtnom(1)  = 'dust_mass'
+      wtnom(2)  = 'dust_number'
+    CASE(11) 
+      wtnom(1)  = 'h2o_vap'
+      wtnom(2)  = 'h2o_ice'
+      wtnom(3)  = 'dust_mass'
+      wtnom(4)  = 'dust_number'
 END SELECT
 #endif
+
+
+!!*******************************************!!
+!!*******************************************!!
 
 DO j = jps,jpe
@@ -685,4 +707,7 @@
     water_vapor_prof(:) = 0.
     water_ice_prof(:) = 0.
+    CASE(3:)
+    print *, 'OOOPS... not ready yet.'
+    STOP
 END SELECT
 #endif
@@ -799,20 +824,27 @@
 !-------------------!
 SELECT CASE (MARS_MODE)
-    CASE(0)  !! NO TRACERS (mars=0)
+    CASE(0)  
     qsurf_val(:)=0.
-    CASE(1)  !! WATER CYCLE (mars=1)
-#ifdef NEWPHYS    
+    CASE(1) 
+    qsurf_val(1)=0. 
     qsurf_val(2)=MARS_WICE(i,j)    !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus
+                                   !! ----- retrocompatible ancienne physique
+                                   !! ----- [H2O ice is tracer nqmx in qsurf in LMD physics]
+    CASE(2)  
+    qsurf_val(1)=10000.            !! infinite amount of dust, basically
+#ifdef NEWPHYS
+    CASE(3)
+    qsurf_val(:)=0.                !!! temporaire, a definir            
+    CASE(11) 
     qsurf_val(1)=0.
+    qsurf_val(2)=MARS_WICE(i,j)    !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus
+    !!!! petit probleme... alors QSURF sorti dans wrfout n'est pas h2o_ice !
+    qsurf_val(3)=10000.            !! infinite amount of dust, basically
 #else
-    qsurf_val(2)=MARS_WICE(i,j)    !! attention... H2O ice is tracer nqmx in qsurf in LMD physics
-    qsurf_val(1)=0.
-#endif    
-    CASE(2)  !! DUST CYCLE (mars=2)
-    qsurf_val(1)=10000.    !! infinite amount, basically
-#ifdef NEWPHYS
-    CASE(11)
-    qsurf_val(:)=0. !! provisoire        
-#endif
+    CASE(3:)
+    print *, 'OOOPS... not ready yet.'
+    STOP
+#endif
+
 END SELECT
 
@@ -950,4 +982,7 @@
     CASE(2)  !! DUST CYCLE (mars=2)
     pq(subs,:,nq) = water_vapor_prof(:) !! NB: which is 0, actually (see above)
+    CASE(3:)
+    print *, 'OOOPS... not ready yet.'
+    STOP    
 END SELECT
 #endif
@@ -1158,5 +1193,7 @@
         !!! Dust 
         SCALAR(i,kps:kpe,j,2)=SCALAR(i,kps:kpe,j,2)+pdq(subs,kps:kpe,nq)
-!!CASE(11) !!!
+CASE(3:)
+        print *, 'OOOPS... not ready yet.'
+        STOP    
 END SELECT
 #endif
Index: trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars0
===================================================================
--- trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars0	(revision 76)
+++ trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars0	(revision 76)
@@ -0,0 +1,116 @@
+##General options
+##~~~~~~~~~~~~~~~
+#Run with or without tracer transport ?
+tracer=.false.
+
+#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" ?
+callstats =.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 (old version of MY24; dust_tes.nc file)
+#  =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 = 26 
+# Dust opacity at 700 Pa (when constant, i.e. for the iaervar=1 case)
+tauvis=0.2
+# 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 = .false.
+# 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  = .false.
+# Impose polar cap surface albedos as observed by TES?
+TESicealbedo = .true.
+
+## Radiative transfer options :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the rad.transfer is computed every "iradia" physical timestep
+iradia    = 6
+# 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 ?
+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  = .false.
+# 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
+       
+
+
Index: trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars1
===================================================================
--- trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars1	(revision 76)
+++ trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars1	(revision 76)
@@ -0,0 +1,116 @@
+##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" ?
+callstats =.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 (old version of MY24; dust_tes.nc file)
+#  =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 = 26 
+# Dust opacity at 700 Pa (when constant, i.e. for the iaervar=1 case)
+tauvis=0.2
+# 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 = .false.
+# 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  = .false.
+# Impose polar cap surface albedos as observed by TES?
+TESicealbedo = .true.
+
+## Radiative transfer options :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the rad.transfer is computed every "iradia" physical timestep
+iradia    = 6
+# 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 ?
+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 = .true.
+# WATERICE: Radiatively active transported atmospheric water ice ?
+activice   = .false.
+# WATER: Compute water cycle
+water = .true.
+# 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  = .false.
+# 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
+       
+
+
Index: trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars11
===================================================================
--- trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars11	(revision 76)
+++ trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars11	(revision 76)
@@ -0,0 +1,116 @@
+##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" ?
+callstats =.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 (old version of MY24; dust_tes.nc file)
+#  =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 = 26 
+# Dust opacity at 700 Pa (when constant, i.e. for the iaervar=1 case)
+tauvis=0.2
+# 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 = .false.
+# 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  = .false.
+# Impose polar cap surface albedos as observed by TES?
+TESicealbedo = .true.
+
+## Radiative transfer options :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the rad.transfer is computed every "iradia" physical timestep
+iradia    = 6
+# 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    = 2
+# DUST: Radiatively active dust ? (matters if dustbin>0)
+active  = .false.
+# DUST: use mass and number mixing ratios to predict dust size ?
+doubleq   = .true. 
+# DUST: lifted by GCM surface winds ?
+lifting = .true. 
+# DUST: lifted by dust devils ?
+callddevil = .false.
+# DUST: Scavenging by CO2 snowfall ?
+scavenging = .false.
+# DUST/WATERICE: Gravitationnal sedimentation ?
+sedimentation = .true.
+# WATERICE: Radiatively active transported atmospheric water ice ?
+activice   = .false.
+# WATER: Compute water cycle
+water = .true.
+# 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  = .false. #.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
+       
+
+
Index: trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars2
===================================================================
--- trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars2	(revision 76)
+++ trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars2	(revision 76)
@@ -0,0 +1,116 @@
+##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" ?
+callstats =.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 (old version of MY24; dust_tes.nc file)
+#  =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 = 26 
+# Dust opacity at 700 Pa (when constant, i.e. for the iaervar=1 case)
+tauvis=0.2
+# 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 = .false.
+# 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  = .false.
+# Impose polar cap surface albedos as observed by TES?
+TESicealbedo = .true.
+
+## Radiative transfer options :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the rad.transfer is computed every "iradia" physical timestep
+iradia    = 6
+# 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    = 1
+# DUST: Radiatively active dust ? (matters if dustbin>0)
+active  = .false.
+# DUST: use mass and number mixing ratios to predict dust size ?
+doubleq   = .false.
+# DUST: lifted by GCM surface winds ?
+lifting = .true. #.false.
+# DUST: lifted by dust devils ?
+callddevil = .false.
+# DUST: Scavenging by CO2 snowfall ?
+scavenging = .false.
+# DUST/WATERICE: Gravitationnal sedimentation ?
+sedimentation = .true.
+# WATERICE: Radiatively active transported atmospheric water ice ?
+activice   = .false.
+# WATER: Compute water cycle
+water = .false. #.true.
+# 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  = .false. #.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
+       
+
+
Index: trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars3
===================================================================
--- trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars3	(revision 76)
+++ trunk/mesoscale/TESTS/newphys_tracers/callphys.def.mars3	(revision 76)
@@ -0,0 +1,116 @@
+##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" ?
+callstats =.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 (old version of MY24; dust_tes.nc file)
+#  =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 = 26 
+# Dust opacity at 700 Pa (when constant, i.e. for the iaervar=1 case)
+tauvis=0.2
+# 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 = .false.
+# 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  = .false.
+# Impose polar cap surface albedos as observed by TES?
+TESicealbedo = .true.
+
+## Radiative transfer options :
+## ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the rad.transfer is computed every "iradia" physical timestep
+iradia    = 6
+# 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    = 2
+# DUST: Radiatively active dust ? (matters if dustbin>0)
+active  = .false.
+# DUST: use mass and number mixing ratios to predict dust size ?
+doubleq   = .true. #.false.
+# DUST: lifted by GCM surface winds ?
+lifting = .true. #.false.
+# DUST: lifted by dust devils ?
+callddevil = .false.
+# DUST: Scavenging by CO2 snowfall ?
+scavenging = .false.
+# DUST/WATERICE: Gravitationnal sedimentation ?
+sedimentation = .true.
+# WATERICE: Radiatively active transported atmospheric water ice ?
+activice   = .false.
+# WATER: Compute water cycle
+water = .false. #.true.
+# 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  = .false. #.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
+       
+
+
Index: trunk/mesoscale/TESTS/newphys_tracers/namelist.input
===================================================================
--- trunk/mesoscale/TESTS/newphys_tracers/namelist.input	(revision 76)
+++ trunk/mesoscale/TESTS/newphys_tracers/namelist.input	(revision 76)
@@ -0,0 +1,66 @@
+ &time_control
+ start_year       = 2024,    !! (p1) Start Martian Year (20XX for MY XX)
+ start_month      = 05,      !! (p1) Start Martian Month
+ start_day        = 01,      !! (p1) Start Martian Day
+ start_hour       = 01,      !! (p1) Start Martian Hour (at longitude 0)
+ end_year         = 2024,    !! (p1) End Martian Year (20XX for MY XX)
+ end_month        = 05,      !! (p1) End Martian Month
+ end_day          = 03,      !! (p1) End Martian Day
+ end_hour         = 01,      !! (p1) End Martian Hour (at longitude 0)
+ history_interval    = 10,   !! Frequency of outputs (37 --> 3700s = 1 Martian hour)  
+ frames_per_outfile  = 24,   !! Size of time dimension in files 
+ restart          = .false.  !! (*) Output restart files ?
+ restart_interval = 8880     !! (*) Frequency of output restart files ?
+ io_form_history  = 2        !! (*) Choice of NETCDF for ouputs
+ io_form_restart  = 2        !! (*) Choice of NETCDF for ouputs     
+ io_form_input    = 2        !! (*) Choice of NETCDF for ouputs
+ io_form_boundary = 2        !! (*) Choice of NETCDF for ouputs
+ debug_level      = 0        !! (*) Verbose level
+ /
+
+ &domains
+ time_step   = 50            !! Dynamical timestep  !!! BAISSER NE CHANGE RIEN
+ dx = 30000,                 !! (p2) Horizontal resolution
+ dy = 30000,                 !! (p2) Horizontal resolution (should be equal to dx)
+ e_we   = 61,                !! (r)(p2) Number of longitude grid points
+ e_sn   = 61,                !! (r)(p2) Number of latitude grid points
+ e_vert = 61,                !! (r)(p2) Number of vertical levels
+ p_top_requested = 5         !! (p3) Chosen value of pressure at the top of the model
+ !!
+ !! OPTIONAL
+ !!
+ num_metgrid_levels = 26     !! (p1) number of vertical levels in GCM inputs (+1)
+ /
+
+ &physics
+ mars = 11  ! 0 1 2 3 11 
+ num_soil_layers = 18 !!! NOUVELLE PHYSIQUE
+ !!
+ !! OPTIONAL
+ !!
+ /
+
+ &dynamics
+ tiso = 100.
+ pd_scalar = T    !!! tres IMPORTANT, sinon valeurs negatives 
+ !!
+ !! OPTIONAL
+ !!
+ non_hydrostatic = F,        !! Integrate in non-hydrostatic/hydrostatic mode
+                             !! --- necessaire pour garder un pas de tps long
+                             !! --- et parce qu'un bout d'Arsia est au bord
+ /
+
+ &bdy_control
+ /
+
+ &grib2
+ /
+
+ &fdda
+ /
+
+ &namelist_quilt              !! (*)
+ nio_tasks_per_group = 0,     !! (*)
+ nio_groups = 1,              !! (*)
+ /                            !! (*)
Index: trunk/mesoscale/TESTS/newphys_tracers/namelist.wps
===================================================================
--- trunk/mesoscale/TESTS/newphys_tracers/namelist.wps	(revision 76)
+++ trunk/mesoscale/TESTS/newphys_tracers/namelist.wps	(revision 76)
@@ -0,0 +1,38 @@
+&share				      	
+ wrf_core = 'ARW',                    !!   [do not modify: choice of dynamical core]
+ max_dom = 1 !! (r)(n)(p2) Total number of domains
+ start_date = '2024-05-01_01:00:00','2024-05-01_01:00:00','2024-05-01_01:00:00'   !! YYYY-MM-DD_HH:mm:ss start date
+ end_date   = '2024-05-03_01:00:00','2024-05-01_01:00:00','2024-05-01_01:00:00'   !! YYYY-MM-DD_HH:mm:ss end date
+ interval_seconds = 3700 !! (p2) Frequency of large-scale fields update (s)
+ io_form_geogrid = 2,                 !!   [do not modify: choice of NETCDF outputs]	
+ debug_level = 0,                     !! verbose level of the programs 
+ opt_output_from_geogrid_path='./'    !! location of the geogrid outputs
+/
+
+
+&geogrid
+ parent_id = 0, !! (n)(p2) Associated parent domain
+ parent_grid_ratio = 1, !! (n)(p2) Ratio of horizontal resolution parent/nest
+ i_parent_start = 0, !! (n)(p2) x-position of the bottom-left nest corner
+ j_parent_start = 0, !! (n)(p2) y-position of the bottom-left nest corner
+  e_we   = 61,                !! (r)(p2) Number of longitude grid points
+  e_sn   = 61,                !! (r)(p2) Number of latitude grid points
+ dx = 30000
+ dy = 30000
+ geog_data_res     = '64ppd_noHRti',       !! choice of static data sources
+                                            !! NB: possible: '64ppd', '32ppd', ...
+                                            !! NB: please glance at geogrid/GEOGRID.TBL
+ map_proj = 'mercator',           !! map projection: 'mercator', 'lambert' or 'polar'
+ ref_lat   =  7.,            !! north latitude of the center of the domain 
+ ref_lon   =  -109.,            !! east longitude of the center of the domain
+ truelat1  =  7.,            !! (lambert or polar) lat position of projection cone
+ truelat2  =  0.0,                !!   [do not modify]
+ stand_lon =  -109.,            !! (lambert or polar) lon position of projection cone
+ geog_data_path = './WPS_GEOG',   !!   [do not modify: symbolic link in the WPS folder]
+/
+
+&metgrid
+ fg_name = './WPSFEED/LMD'        !!   [do not modify: symbolic link in the WPS folder]
+ io_form_metgrid = 2,             !!   [do not modify: choice of NETCDF outputs]
+ opt_output_from_metgrid_path='./WRFFEED/current'  !!   [do not modify: symbolic link]
+/
Index: trunk/mesoscale/TESTS/newphys_tracers/run.def
===================================================================
--- trunk/mesoscale/TESTS/newphys_tracers/run.def	(revision 76)
+++ trunk/mesoscale/TESTS/newphys_tracers/run.def	(revision 76)
@@ -0,0 +1,2 @@
+# some definitions for the physics, in file 'callphys.def'
+INCLUDEDEF=callphys.def
