Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/LMD_LES_MARS_install
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/LMD_LES_MARS_install	(revision 1235)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/LMD_LES_MARS_install	(revision 1236)
@@ -65,4 +65,5 @@
 cd Registry
 ln -sf ../modif_mars/Registry.EM .
+ln -sf ../modif_mars/Registry.EM.newphys .
 ln -sf ../modif_mars/Registry.bash .
 cd ..
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/Registry.EM
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/Registry.EM	(revision 1235)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/Registry.EM	(revision 1236)
@@ -217,26 +217,29 @@
 #### variables dans wrf
 ####
-state  real   albedo_gcm      ij   misc  1  -  i012rd  "MARS_ALB"    "albedo of naked ground"  "0 - 1 fraction"
-state  real   therm_inert     ij   misc  1  -  i012rd  "MARS_TI"     "thermal inertia"         "J/m2/K/s0.5"
-state  real   mars_z0         ij   misc  1  -  i012rd  "MARS_Z0"     "surface roughness"       "m"
-state  real   slpx            ij   misc  1  -  i012rd  "SLOPEX"      "slope x direction"       "rad"
-state  real   slpy            ij   misc  1  -  i012rd  "SLOPEY"      "slope y direction"       "rad"
-state  real   mars_emiss      ij   misc  1  -  i012rd  "MARS_EMISS"  "emissivity"              "0 - 1 fraction"
-state  real   mars_cice       ij   misc  1  -  i012rd  "MARS_CICE"   "co2 ice"                 "kg"
-state  real   mars_wice       ij   misc  1  -  i012rd  "MARS_WICE"   "h2o ice"                 "kg/m2"
-state  real   mars_tsurf      ij   misc  1  -  i012rd  "MARS_TSURF"   "surface temperature" "K"
-state  real   mars_fluxrad    ij   misc  1  -  i012rd  "MARS_FLUXRAD" "net rad flux at surf"     "W.m-2"
-state  real   mars_wstar      ij   misc  1  -  i012rd  "MARS_WSTAR"   "free convection velocity" "m.s-1"
-state  real   mars_tsoil     ilj   misc  1  -  i012rd  "MARS_TSOIL"   "soil temperatures"        "K"
-state  real   mars_q2        ikj   misc  1  Z  i012rd  "MARS_Q2"      "turbulent kinetic energy" "kg.m-3"
-state  real   mars_isoil     ilj   misc  1  -  i012rd  "MARS_ISOIL"  "soil thermal inertia"    "tiu"
-state  real   mars_dsoil     ilj   misc  1  -  i012rd  "MARS_DSOIL"  "soil depths"             "m"
-state  real   mars_gw        ilj   misc  1  -  i012rd  "MARS_GW"     "gwparam"                 " "
+#### 'm_' prefix is to avoid redundancies with possible existing terrestrial variables
+####
+####          vvvv nom pour module_initialize, solve_em, lmd_driver (interne fortran)
+####                                                vvvv nom fichier netCDF (important initialisation
+################################################################################################################
+state  real   m_albedo     ij   misc  1  -  i012rd  "MARS_ALB"     "albedo of naked ground"   "0 - 1 fraction"
+state  real   m_ti         ij   misc  1  -  i012rd  "MARS_TI"      "thermal inertia"          "J/m2/K/s0.5"
+state  real   m_z0         ij   misc  1  -  i012rd  "MARS_Z0"      "surface roughness"        "m"
+state  real   slpx         ij   misc  1  -  i012rd  "SLOPEX"       "slope x direction"        "rad"
+state  real   slpy         ij   misc  1  -  i012rd  "SLOPEY"       "slope y direction"        "rad"
+state  real   m_emiss      ij   misc  1  -  i012rd  "MARS_EMISS"   "emissivity"               "0 - 1 fraction"
+state  real   m_co2ice     ij   misc  1  -  i012rd  "MARS_CICE"    "co2 ground ice"           "kg/m2"
+state  real   m_h2oice     ij   misc  1  -  i012rd  "MARS_WICE"    "h2o ground ice"           "kg/m2"
+state  real   m_fluxrad    ij   misc  1  -  i012rd  "MARS_FLUXRAD" "net rad flux at surf"     "W.m-2"
+state  real   m_wstar      ij   misc  1  -  i012rd  "MARS_WSTAR"   "free convection velocity" "m.s-1"
+state  real   m_tsurf      ij   misc  1  -  i012rd  "MARS_TSURF"   "surface temperature"      "K"
+state  real   m_tsoil     ilj   misc  1  -  i012rd  "MARS_TSOIL"   "soil temperatures"        "K"
+state  real   m_q2        ikj   misc  1  Z  i012rd  "MARS_Q2"      "parameterized TKE"        "kg.m-3"
+state  real   m_isoil     ilj   misc  1  -  i012rd  "MARS_ISOIL"   "soil thermal inertia"     "tiu"
+state  real   m_dsoil     ilj   misc  1  -  i012rd  "MARS_DSOIL"   "soil depths"              "m"
+state  real   m_gw        ilj   misc  1  -  i012rd  "MARS_GW"      "gwparam"                  " "
 ####
 ####
 ####MARS MARS MARS MARS MARS
 ####MARS MARS MARS MARS MARS
-
-
 
 #-----------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -348,15 +351,4 @@
 ##
 state    real   ptot           ikj     dyn_em      1         -      irh       "PTOT"        "total pressure"      "Pa"
-####### if you choose h here, you will probably want not to output u,v,w,t,etc...
-state    real   uave           ikj     dyn_em      1         -      ir       "UAVE"        "average zonal wind"  "m/s"
-state    real   ustd           ikj     dyn_em      1         -      ir       "USTD"        "std dev zonal wind"  "m/s"
-state    real   vave           ikj     dyn_em      1         -      ir       "VAVE"        "average meridional wind"  "m/s"
-state    real   vstd           ikj     dyn_em      1         -      ir       "VSTD"        "std dev meridional wind"  "m/s"
-state    real   wave           ikj     dyn_em      1         -      ir       "WAVE"        "average vertical wind"  "m/s"
-state    real   wstd           ikj     dyn_em      1         -      ir       "WSTD"        "std dev vertical wind"  "m/s"
-state    real   tave           ikj     dyn_em      1         -      ir       "TAVE"        "average pert. potential temperature"  "K"
-state    real   tstd           ikj     dyn_em      1         -      ir       "TSTD"        "std dev pert. potential temperature"  "K"
-#######
-## ajouter tk, ptot, phtot ??? les deux derniers sont assez smooth...
 
 #                                               
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_first_rk_step_part1.F
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_first_rk_step_part1.F	(revision 1235)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_first_rk_step_part1.F	(revision 1236)
@@ -574,6 +574,6 @@
          CALL lmd_driver(                                                 &
            ! structure
-     &         id=grid%id,max_dom=grid%max_dom                            &
-     &        ,DT=grid%dt                                                 &
+     &         id=grid%id,max_dom=grid%max_dom      &
+     &        ,DT=grid%dt                   &
      &        ,ITIMESTEP=grid%itimestep                                   &
            ! position
@@ -585,8 +585,7 @@
      &        ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde          &
      &        ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme          &
-!     &        ,IPS=ips,IPE=ipe, JPS=jps,JPE=jpe, KPS=kps,KPE=kpe          &
-     &        ,I_START=grid%i_start,I_END=min(grid%i_end, ide-1)          &
-     &        ,J_START=grid%j_start,J_END=min(grid%j_end, jde-1)          &
-     &        ,KTS=k_start, KTE=min(k_end,kde-1)                          &
+     &        ,i_start=grid%i_start,i_end=min(grid%i_end, ide-1)          &
+     &        ,j_start=grid%j_start,j_end=min(grid%j_end, jde-1)          &
+     &        ,kts=k_start, kte=min(k_end,kde-1)                          &
      &        ,num_tiles=grid%num_tiles                                   &
            ! time variables
@@ -600,5 +599,5 @@
                         ! ... (cf phy_prep in module_big_step_utilities_em)
      &        ,HT=grid%ht                                                 &
-     &        ,U=u_phy            ,V=v_phy,         W=w_phy               &
+     &        ,U=u_phy            ,V=v_phy             ,W=w_phy           &
      &        ,TH=th_phy          ,T=t_phy                                &
      &        ,P=p_phy            ,EXNER=pi_phy               ,RHO=rho    &
@@ -606,47 +605,38 @@
      &        ,PTOP=grid%p_top                                            &
            ! physics calls
-     &        ,RADT=grid%radt                                             &
-     &        ,CUDT=grid%cudt                                             &
+     &        ,RADT=grid%radt                          &
+     &        ,CUDT=grid%cudt                          &
            ! surface temperature and surface pressure
      &        ,TSK=grid%tsk,PSFC=grid%psfc                                &
            ! tendencies for the dynamics
-     &        ,RTHBLTEN=grid%rthblten,RUBLTEN=grid%rublten,RVBLTEN=grid%rvblten    &
+     &        ,RTHBLTEN=grid%rthblten  ,RUBLTEN=grid%rublten,RVBLTEN=grid%rvblten    &
            ! scalars
 !     &        ,NUM_3D_S=num_3d_s,SCALAR=grid%scalar                       &
      &        ,NUM_3D_S=num_scalar,SCALAR=grid%scalar                      &
            ! mode
-     &        ,MARS_MODE=config_flags%mars                                &
+     &        ,MARS_MODE=config_flags%mars   &
            ! added variables
-     &        ,MARS_ALB=grid%albedo_gcm,MARS_TI=grid%therm_inert          &
-     &        ,MARS_CICE=grid%mars_cice,MARS_EMISS=grid%mars_emiss        &
-     &        ,MARS_WICE=grid%mars_wice         &
-     &        ,MARS_TSOIL=grid%mars_tsoil                                 &
-     &        ,MARS_Q2=grid%mars_q2                                       &
-     &        ,MARS_TSURF=grid%mars_tsurf                                 &
+     &        ,M_ALBEDO=grid%m_albedo,M_TI=grid%m_ti  &
+     &        ,M_CO2ICE=grid%m_co2ice,M_EMISS=grid%m_emiss   &  
+     &        ,M_H2OICE=grid%m_h2oice     &
+     &        ,M_TSOIL=grid%m_tsoil       &
+     &        ,M_Q2=grid%m_q2             &
+     &        ,M_TSURF=grid%m_tsurf       &
 #ifdef NEWPHYS
-     &        ,MARS_FLUXRAD=grid%mars_fluxrad                             &
-     &        ,MARS_WSTAR=grid%mars_wstar                                 &
-     &        ,MARS_ISOIL=grid%mars_isoil       &
-     &        ,MARS_DSOIL=grid%mars_dsoil       &
-     &        ,MARS_Z0=grid%mars_z0             &
+     &        ,M_FLUXRAD=grid%m_fluxrad   &
+     &        ,M_WSTAR=grid%m_wstar       &
+     &        ,M_ISOIL=grid%m_isoil       &
+     &        ,M_DSOIL=grid%m_dsoil       &
+     &        ,M_Z0=grid%m_z0             &
      &        ,CST_Z0=config_flags%init_Z0      &
 #endif
-     &        ,MARS_GW=grid%mars_gw                                       &
-     &        ,NUM_SOIL_LAYERS=config_flags%num_soil_layers               &
+     &        ,M_GW=grid%m_gw  &  
+     &        ,NUM_SOIL_LAYERS=config_flags%num_soil_layers    &
            ! cst fields
-     &        ,CST_AL=config_flags%init_AL                                &
-     &        ,CST_TI=config_flags%init_TI                                &
-     &        ,ISFFLX=config_flags%isfflx                                 &
-     &        ,DIFF_OPT=config_flags%diff_opt                             &
-     &        ,KM_OPT=config_flags%km_opt                                 &
-           ! additional diagnostics
-!     &        ,UAVE=grid%em_uave, USTD=grid%em_ustd &
-!     &        ,VAVE=grid%em_vave, VSTD=grid%em_vstd &
-!     &        ,WAVE=grid%em_wave, WSTD=grid%em_wstd &
-!     &        ,TAVE=grid%em_tave, TSTD=grid%em_tstd &
-     &        ,UAVE=grid%uave, USTD=grid%ustd &
-     &        ,VAVE=grid%vave, VSTD=grid%vstd &
-     &        ,WAVE=grid%wave, WSTD=grid%wstd &
-     &        ,TAVE=grid%tave, TSTD=grid%tstd &
+     &        ,CST_AL=config_flags%init_AL  &
+     &        ,CST_TI=config_flags%init_TI  &
+     &        ,ISFFLX=config_flags%isfflx   &
+     &        ,DIFF_OPT=config_flags%diff_opt     &
+     &        ,KM_OPT=config_flags%km_opt         &
      &        ,HISTORY_INTERVAL=model_config_rec%history_interval(1)  &
 #ifndef NOPHYS
@@ -654,8 +644,27 @@
           ! OUTPUT VARIABLES !
           !------------------!
+#ifdef NEWPHYS
+     &       ,HR_SW=grid%HR_SW   &
+     &       ,HR_LW=grid%HR_LW   &
+     &       ,SWDOWNZ=grid%SWDOWNZ   &
+     &       ,TAU_DUST=grid%TAU_DUST   &
+     &       ,RDUST=grid%RDUST   &
+     &       ,QSURFDUST=grid%QSURFDUST   &
+     &       ,MTOT=grid%MTOT   &
+     &       ,ICETOT=grid%ICETOT   &
+     &       ,VMR_ICE=grid%VMR_ICE   &
+     &       ,TAU_ICE=grid%TAU_ICE   &
+     &       ,RICE=grid%RICE   &
+     &       ,ZMAX=grid%ZMAX   &
+     &       ,HFMAX=grid%HFMAX &
+     &       ,USTM=grid%USTM   &
+     &       ,HFX=grid%HFX &
+#else 
 #include "module_lmd_driver_output4.inc"
+#endif
 #endif 
      &        ,SLPX=grid%slpx,SLPY=grid%slpy,RESTART=config_flags%restart)
 ENDIF
+
 !!!!!!!!!!!!!!!!!!!!!!!
 ! call to LMD physics !
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_initialize_les.F
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_initialize_les.F	(revision 1235)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_initialize_les.F	(revision 1236)
@@ -335,27 +335,26 @@
 !!MARS
     grid%ht(i,j) = alt_input
-    grid%tsk(i,j) = tsurf_input
+    grid%m_tsurf(i,j) = tsurf_input
 !!MARS
     grid%xlat(i,j) = lat_input !+ float(j)*config_flags%dy/59000.
     grid%xlong(i,j) = lon_input !+ float(i)*config_flags%dx/59000.
-    grid%mars_emiss(i,j)=0.95
-    grid%mars_cice(i,j)=0.
-    grid%mars_wice(i,j)=0.
+    grid%m_emiss(i,j)=0.95
+    grid%m_co2ice(i,j)=0.
+    grid%m_h2oice(i,j)=0.
 !! >> Used for restarts only:
-    grid%mars_q2(i,:,j)=0.
-    grid%mars_fluxrad(i,j)=0.
-    grid%mars_wstar(i,j)=0.
-    grid%mars_tsurf(i,j)=0. 
+    grid%m_q2(i,:,j)=0.
+    grid%m_fluxrad(i,j)=0.
+    grid%m_wstar(i,j)=0.
 !! <<
     grid%slpx(i,j) = 0.
     grid%slpy(i,j) = 0.
    DO k=1,config_flags%num_soil_layers
-    grid%mars_tsoil(i,k,j) = 0.
+    grid%m_tsoil(i,k,j) = 0.
    ENDDO
-    grid%mars_gw(i,1,j) = 0.
-    grid%mars_gw(i,2,j) = 0.
-    grid%mars_gw(i,3,j) = 0.
-    grid%mars_gw(i,4,j) = 0.
-    grid%mars_gw(i,5,j) = 0.
+    grid%m_gw(i,1,j) = 0.
+    grid%m_gw(i,2,j) = 0.
+    grid%m_gw(i,3,j) = 0.
+    grid%m_gw(i,4,j) = 0.
+    grid%m_gw(i,5,j) = 0.
 !!MARS
   ENDDO
