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 1588)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_first_rk_step_part1.F	(revision 1590)
@@ -644,5 +644,4 @@
      &        ,KM_OPT=config_flags%km_opt         &
      &        ,HISTORY_INTERVAL=model_config_rec%history_interval(1)  &
-#ifndef NOPHYS
           !------------------!
           ! OUTPUT VARIABLES !
@@ -667,5 +666,4 @@
 #include "module_lmd_driver_output4.inc"
 #endif
-#endif 
      &        ,SLPX=grid%slpx,SLPY=grid%slpy,RESTART=config_flags%restart)
 ENDIF
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/SCRIPTS/copy_model
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/SCRIPTS/copy_model	(revision 1588)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/SCRIPTS/copy_model	(revision 1590)
@@ -47,6 +47,4 @@
 ln -sf $WRFSRC/WRFV2/call_meso_inifis?.inc .
 ln -sf $WRFSRC/WRFV2/call_meso_physiq?.inc .
-
-sed s+"YORGLYORGL"+"$laphysiq"+g $WRFSRC/WRFV2/physics.sed > physics.sed
 
 #\rm meso_dimphys.h
@@ -139,26 +137,42 @@
 mkdir external/io_mcel
 ln -sf $WRFSRC/WRFV2/external/io_mcel/* external/io_mcel/
-mkdir $laphysiq
-mkdir $laphysiq/libf
-ln -sf $WRFSRC/WRFV2/$laphysiq/makegcm* $laphysiq/
-ln -sf $WRFSRC/WRFV2/$laphysiq/meso_dimphys.h* $laphysiq/
-ln -sf $WRFSRC/WRFV2/$laphysiq/create_make_gcm $laphysiq/
-#ln -sf $WRFSRC/WRFV2/$laphysiq/makefile $laphysiq/
-ln -sf $WRFSRC/WRFV2/$laphysiq/libf/duplicate* $laphysiq/libf/
-ln -sf $WRFSRC/WRFV2/$laphysiq/libf/generate* $laphysiq/libf/
 
-mkdir $laphysiq/libf/grid
-ln -sf $WRFSRC/WRFV2/$laphysiq/libf/grid/* $laphysiq/libf/grid/
-mkdir $laphysiq/libf/phymars
-ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phymars/* $laphysiq/libf/phymars/
-ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phy_common/* $laphysiq/libf/phymars/
-mkdir $laphysiq/libf/dyn3d
-ln -sf $WRFSRC/WRFV2/$laphysiq/libf/dyn3d/* $laphysiq/libf/dyn3d/
-mkdir $laphysiq/libf/aeronomars
-ln -sf $WRFSRC/WRFV2/$laphysiq/libf/aeronomars/* $laphysiq/libf/aeronomars/
-mkdir $laphysiq/libf/bibio
-ln -sf $WRFSRC/WRFV2/$laphysiq/libf/bibio/* $laphysiq/libf/bibio/
-mkdir $laphysiq/libo
-#touch $laphysiq/makefile
+if [[ "${laphysiq}" == *"void"* ]]
+then
+
+  ## case with no physics
+  rm -f physics.sed
+  touch physics.sed
+
+else
+
+  ## case with physics
+  mkdir $laphysiq
+  mkdir $laphysiq/libf
+  ln -sf $WRFSRC/WRFV2/$laphysiq/makegcm* $laphysiq/
+  ln -sf $WRFSRC/WRFV2/$laphysiq/meso_dimphys.h* $laphysiq/
+  ln -sf $WRFSRC/WRFV2/$laphysiq/create_make_gcm $laphysiq/
+  #ln -sf $WRFSRC/WRFV2/$laphysiq/makefile $laphysiq/
+  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/duplicate* $laphysiq/libf/
+  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/generate* $laphysiq/libf/
+
+  mkdir $laphysiq/libf/grid
+  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/grid/* $laphysiq/libf/grid/
+  mkdir $laphysiq/libf/phymars
+  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phymars/* $laphysiq/libf/phymars/
+  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/phy_common/* $laphysiq/libf/phymars/
+  mkdir $laphysiq/libf/dyn3d
+  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/dyn3d/* $laphysiq/libf/dyn3d/
+  mkdir $laphysiq/libf/aeronomars
+  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/aeronomars/* $laphysiq/libf/aeronomars/
+  mkdir $laphysiq/libf/bibio
+  ln -sf $WRFSRC/WRFV2/$laphysiq/libf/bibio/* $laphysiq/libf/bibio/
+  mkdir $laphysiq/libo
+  #touch $laphysiq/makefile
+
+  \rm $laphysiq/libf/phymars/dimphys.h
+
+  sed s+"YORGLYORGL"+"$laphysiq"+g $WRFSRC/WRFV2/physics.sed > physics.sed
+fi
 
 mkdir test
@@ -167,9 +181,4 @@
 ln -sf $WRFSRC/WRFV2/test/em_real/* test/em_real/
 
-cd $laphysiq/libf/phymars/
-\rm dimphys.h
-#ln -sf ../../../meso_dimphys.h dimphys.h
-cd ../../..
-
 echo '*** end'
 
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 1588)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/solve_em.F	(revision 1590)
@@ -886,5 +886,4 @@
      &        ,KM_OPT=config_flags%km_opt         &
      &        ,HISTORY_INTERVAL=model_config_rec%history_interval(1)  &
-#ifndef NOPHYS
           !------------------!
           ! OUTPUT VARIABLES !
@@ -908,5 +907,4 @@
 #else 
 #include "module_lmd_driver_output4.inc"
-#endif
 #endif
      &        ,SLPX=grid%slpx,SLPY=grid%slpy,RESTART=config_flags%restart)
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_mars_lmd_new/update_outputs_physiq_mod.F
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_mars_lmd_new/update_outputs_physiq_mod.F	(revision 1588)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_mars_lmd_new/update_outputs_physiq_mod.F	(revision 1590)
@@ -153,4 +153,53 @@
 END SUBROUTINE update_outputs_physiq_turb
 
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_outputs_physiq_diag( &
+            ims,ime,jms,jme,kms,kme,&
+            ips,ipe,jps,jpe,kps,kpe,&
+            SWDOWNZ,TAU_DUST,QSURFDUST,&
+            MTOT,ICETOT,TAU_ICE,&
+            HR_SW,HR_LW,&
+            RDUST,VMR_ICE,RICE)
+
+   USE comm_wrf !! to get fields to be written from physiq
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: &
+     SWDOWNZ,TAU_DUST,QSURFDUST,&
+     MTOT,ICETOT,TAU_ICE
+   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: &
+     HR_SW,HR_LW,RDUST,VMR_ICE,RICE
+   INTEGER :: i,j,subs
+
+   DO j = jps,jpe
+   DO i = ips,ipe
+
+     !-----------------------------------!
+     ! 1D subscript for physics "cursor" !
+     !-----------------------------------!
+     subs = (j-jps)*(ipe-ips+1)+(i-ips+1)
+
+     !! get diagnostics from physics
+     SWDOWNZ(i,j) = comm_SWDOWNZ(subs)
+     TAU_DUST(i,j) = comm_TAU_DUST(subs)
+     QSURFDUST(i,j) = comm_QSURFDUST(subs)
+     MTOT(i,j) = comm_MTOT(subs)
+     ICETOT(i,j) = comm_ICETOT(subs)
+     TAU_ICE(i,j) = comm_TAU_ICE(subs)
+     HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe)
+     HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe)
+     RDUST(i,kps:kpe,j) = comm_RDUST(subs,kps:kpe)
+     VMR_ICE(i,kps:kpe,j) = comm_VMR_ICE(subs,kps:kpe)
+     RICE(i,kps:kpe,j) = comm_RICE(subs,kps:kpe)
+
+   ENDDO
+   ENDDO
+
+   CALL deallocate_comm_wrf
+
+END SUBROUTINE update_outputs_physiq_diag
+
 END MODULE update_outputs_physiq_mod
 
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/callphysiq_mod.F
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/callphysiq_mod.F	(revision 1590)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/callphysiq_mod.F	(revision 1590)
@@ -0,0 +1,58 @@
+!
+! $Id: $
+!
+MODULE callphysiq_mod
+
+IMPLICIT NONE
+
+ !! ----------------------------------------------------------
+ !! ---- CALL TO NO PHYSICS
+ !! ----------------------------------------------------------
+
+CONTAINS
+
+SUBROUTINE call_physiq(planet_type, klon,llm,nqtot,tname,                 &
+                       debut_split,lafin_split,                           &
+                       jD_cur,jH_cur_split,zdt_split,                     &
+                       zplev_omp,zplay_omp,                               &
+                       zpk_omp,zphi_omp,zphis_omp,                        &
+                       presnivs_omp,                                      &
+                       zufi_omp,zvfi_omp,zrfi_omp,ztfi_omp,zqfi_omp,      &
+                       flxwfi_omp,                                        &
+                       zdufi_omp,zdvfi_omp,zdtfi_omp,zdqfi_omp,zdpsrf_omp)
+
+  IMPLICIT NONE
+
+  character(len=10),INTENT(IN) :: planet_type ! planet type ('earth','mars',...)
+
+  INTEGER,INTENT(IN) :: klon ! (local) number of atmospheric columns
+  INTEGER,INTENT(IN) :: llm  ! number of atmospheric layers
+  INTEGER,INTENT(IN) :: nqtot ! number of tracers
+  CHARACTER(len=*),INTENT(IN) :: tname(nqtot) ! tracer names
+  LOGICAL,INTENT(IN) :: debut_split ! .true. if very first call to physics
+  LOGICAL,INTENT(IN) :: lafin_split ! .true. if last call to physics
+  REAL,INTENT(IN) :: JD_cur ! Julian day
+  REAL,INTENT(IN) :: JH_cur_split ! Julian hour (fraction of day)
+  REAL,INTENT(IN) :: zdt_split ! time step over which the physics are evaluated
+  REAL,INTENT(IN) :: zplev_omp(klon,llm+1) ! interlayer pressure (Pa)
+  REAL,INTENT(IN) :: zplay_omp(klon,llm) ! mid-layer pressure (Pa)
+  REAL,INTENT(INOUT) :: zpk_omp(klon,llm)
+  REAL,INTENT(IN) :: zphi_omp(klon,llm) ! geopotential at midlayer
+  REAL,INTENT(INOUT) :: zphis_omp(klon) ! surface geopotential
+  REAL,INTENT(INOUT) :: presnivs_omp(llm) ! approximate pressure of atm. layers
+  REAL,INTENT(IN) :: zufi_omp(klon,llm) ! zonal wind (m/s)
+  REAL,INTENT(IN) :: zvfi_omp(klon,llm) ! meridional wind (m/s)
+  REAL,INTENT(INOUT) :: zrfi_omp(klon,llm) ! relative wind vorticity, in s-1
+  REAL,INTENT(IN) :: ztfi_omp(klon,llm) ! temperature (K)
+  REAL,INTENT(IN) :: zqfi_omp(klon,llm,nqtot) ! tracers (*/kg of air)
+  REAL,INTENT(IN) :: flxwfi_omp(klon,llm) ! Vertical mass flux on lower mesh interfaces (kg/s) 
+  ! tendencies (in */s) from the physics:
+  REAL,INTENT(OUT) :: zdufi_omp(klon,llm) ! tendency on zonal winds
+  REAL,INTENT(OUT) :: zdvfi_omp(klon,llm) ! tendency on meridional winds
+  REAL,INTENT(OUT) :: zdtfi_omp(klon,llm) ! tendency on temperature
+  REAL,INTENT(OUT) :: zdqfi_omp(klon,llm,nqtot) ! tendency on tracers
+  REAL,INTENT(OUT) :: zdpsrf_omp(klon) ! tendency on surface pressure
+
+END SUBROUTINE call_physiq
+
+END MODULE callphysiq_mod
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/iniphysiq_mod.F
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/iniphysiq_mod.F	(revision 1590)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/iniphysiq_mod.F	(revision 1590)
@@ -0,0 +1,28 @@
+MODULE iniphysiq_mod
+
+CONTAINS
+
+subroutine iniphysiq(ngrid,nlayer,nq,phour_ini,piphysiq,&
+                     punjours, pdayref,ptimestep, &
+                     prad,pg,pr,pcpp,iflag_phys)
+
+implicit none
+
+real,intent(in) :: prad ! radius of the planet (m)
+real,intent(in) :: pg ! gravitational acceleration (m/s2)
+real,intent(in) :: pr ! ! reduced gas constant R/mu
+real,intent(in) :: pcpp ! specific heat Cp
+real,intent(in) :: punjours ! length (in s) of a standard day [daysec]
+integer,intent(in) :: pdayref ! reference day of for the simulation [day_ini]
+real,intent(in) :: ptimestep !physics time step (s) [dtphys]
+integer,intent(in) :: iflag_phys ! type of physics to be called
+
+integer,intent(in) :: ngrid ! number of physics columns for this MPI process
+integer,intent(in) :: nlayer ! number of atmospheric layers
+integer,intent(in) :: nq ! number of tracers
+real,intent(in) :: phour_ini   ! start time (fraction of day) of the run 0=<phour_ini<1
+real,intent(in) :: piphysiq   ! call physics every piphysiq dynamical timesteps
+
+end subroutine iniphysiq
+
+END MODULE iniphysiq_mod
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_inputs_physiq_mod.F
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_inputs_physiq_mod.F	(revision 1590)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_inputs_physiq_mod.F	(revision 1590)
@@ -0,0 +1,151 @@
+MODULE update_inputs_physiq_mod
+
+CONTAINS
+
+!SUBROUTINE update_inputs_physiq_time
+!SUBROUTINE update_inputs_physiq_tracers
+!SUBROUTINE update_inputs_physiq_constants
+!SUBROUTINE update_inputs_physiq_geom
+!SUBROUTINE update_inputs_physiq_surf
+!SUBROUTINE update_inputs_physiq_soil
+!SUBROUTINE update_inputs_physiq_turb
+!SUBROUTINE update_inputs_physiq_rad
+!SUBROUTINE update_inputs_physiq_slope
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_time(&
+            JULYR,JULDAY,GMT,&
+            elaps,&
+            lct_input,lon_input,ls_input,&
+            ptime,pday,MY)
+
+  INTEGER, INTENT(IN) :: JULDAY, JULYR
+  REAL, INTENT(IN) :: GMT,elaps,lon_input,ls_input,lct_input
+  REAL,INTENT(OUT) :: pday,ptime,MY
+
+END SUBROUTINE update_inputs_physiq_time
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_tracers(nq,MARS_MODE,tname)
+
+  INTEGER, INTENT(IN) :: nq,MARS_MODE
+  CHARACTER(len=*), INTENT(INOUT) :: tname(nq) ! tracer names
+
+END SUBROUTINE update_inputs_physiq_tracers
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_constants
+
+END SUBROUTINE update_inputs_physiq_constants
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_geom( &
+            ims,ime,jms,jme,&
+            ips,ipe,jps,jpe,&
+            JULYR,ngrid,&
+            DX,DY,MSFT,&
+            lat_input, lon_input,&
+            XLAT,XLONG)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,ngrid
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
+     MSFT,XLAT,XLONG
+   REAL, INTENT(IN) :: dx,dy
+   REAL, INTENT(IN) :: lat_input, lon_input
+
+END SUBROUTINE update_inputs_physiq_geom
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_surf( &
+            ims,ime,jms,jme,&
+            ips,ipe,jps,jpe,&
+            JULYR,MARS_MODE,&
+            M_ALBEDO,CST_AL,&
+            M_TSURF,M_EMISS,M_CO2ICE,&
+            M_GW,M_Z0,&
+            M_H2OICE,&
+            phisfi_val)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,MARS_MODE
+   INTEGER :: i,j,subs,nlast
+   REAL, INTENT(IN  ) :: CST_AL, phisfi_val
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
+     M_ALBEDO,M_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0
+   REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN   )  :: M_GW  
+
+END SUBROUTINE update_inputs_physiq_surf
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_soil( &
+            ims,ime,jms,jme,&
+            ips,ipe,jps,jpe,&
+            JULYR,nsoil,&
+            M_TI,CST_TI,&
+            M_ISOIL,M_DSOIL,&
+            M_TSOIL,M_TSURF)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR,nsoil
+   INTEGER :: i,j,subs,nlast
+   REAL, INTENT(IN  ) :: CST_TI 
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: &
+     M_TI, M_TSURF
+   REAL, DIMENSION( ims:ime, nsoil, jms:jme ), INTENT(IN)  :: &
+     M_TSOIL, M_ISOIL, M_DSOIL
+
+END SUBROUTINE update_inputs_physiq_soil
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_turb( &
+            ims,ime,jms,jme,kms,kme,&
+            ips,ipe,jps,jpe,&
+            RESTART,isles,&
+            M_Q2,M_WSTAR)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: M_WSTAR
+   REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(IN) :: M_Q2
+   LOGICAL, INTENT(IN ) :: RESTART,isles
+
+END SUBROUTINE update_inputs_physiq_turb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_rad( &
+            ims,ime,jms,jme,&
+            ips,ipe,jps,jpe,&
+            RESTART,&
+            M_FLUXRAD)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: M_FLUXRAD
+   LOGICAL, INTENT(IN ) :: RESTART
+
+END SUBROUTINE update_inputs_physiq_rad
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_inputs_physiq_slope( &
+            ims,ime,jms,jme,&
+            ips,ipe,jps,jpe,&
+            JULYR,&
+            SLPX,SLPY)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,JULYR
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN)  :: SLPX,SLPY
+
+END SUBROUTINE update_inputs_physiq_slope
+
+END MODULE update_inputs_physiq_mod
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_outputs_physiq_mod.F
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_outputs_physiq_mod.F	(revision 1590)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/dynphy_wrf_void_lmd_new/update_outputs_physiq_mod.F	(revision 1590)
@@ -0,0 +1,91 @@
+MODULE update_outputs_physiq_mod
+
+CONTAINS
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_outputs_physiq_surf( &
+            ims,ime,jms,jme,&
+            ips,ipe,jps,jpe,&
+            MARS_MODE,&
+            M_TSURF,M_CO2ICE,&
+            M_H2OICE)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
+   INTEGER, INTENT(IN) :: MARS_MODE
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT)  :: &
+     M_TSURF,M_CO2ICE,M_H2OICE
+
+END SUBROUTINE update_outputs_physiq_surf
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_outputs_physiq_soil( &
+            ims,ime,jms,jme,&
+            ips,ipe,jps,jpe,&
+            nsoil,&
+            M_TSOIL)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,nsoil
+   REAL, DIMENSION( ims:ime, nsoil, jms:jme ), INTENT(INOUT)  :: &
+     M_TSOIL
+
+END SUBROUTINE update_outputs_physiq_soil
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_outputs_physiq_rad( &
+            ims,ime,jms,jme,&
+            ips,ipe,jps,jpe,&
+            M_FLUXRAD)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT)  :: M_FLUXRAD
+
+END SUBROUTINE update_outputs_physiq_rad
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_outputs_physiq_turb( &
+            ims,ime,jms,jme,kms,kme,&
+            ips,ipe,jps,jpe,&
+            M_Q2,M_WSTAR,&
+            HFMAX,ZMAX,USTM,HFX)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT)  :: &
+     M_WSTAR,HFMAX,ZMAX,USTM,HFX
+   REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT) :: M_Q2
+  
+END SUBROUTINE update_outputs_physiq_turb
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+SUBROUTINE update_outputs_physiq_diag( &
+            ims,ime,jms,jme,kms,kme,&
+            ips,ipe,jps,jpe,kps,kpe,&
+            SWDOWNZ,TAU_DUST,QSURFDUST,&
+            MTOT,ICETOT,TAU_ICE,&
+            HR_SW,HR_LW,&
+            RDUST,VMR_ICE,RICE)
+
+   INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme
+   INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe
+   REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: &
+     SWDOWNZ,TAU_DUST,QSURFDUST,&
+     MTOT,ICETOT,TAU_ICE
+   REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: &
+     HR_SW,HR_LW,RDUST,VMR_ICE,RICE
+   INTEGER :: i,j,subs
+
+END SUBROUTINE update_outputs_physiq_diag
+
+
+END MODULE update_outputs_physiq_mod
+
+
+
Index: trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new	(revision 1588)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new	(revision 1590)
@@ -40,6 +40,4 @@
         isfflx, diff_opt, km_opt, &
         HISTORY_INTERVAL, &
-! sert a rien ce NOPHYS. il le faudrait sur tout.
-#ifndef NOPHYS
         HR_SW,HR_LW,SWDOWNZ,&
         TAU_DUST,RDUST,QSURFDUST,&
@@ -47,5 +45,4 @@
         HFMAX,ZMAX,&
         USTM,HFX,&
-#endif
         SLPX,SLPY,RESTART)
 ! NB: module_lmd_driver_output1.inc : output arguments generated from Registry
@@ -60,11 +57,10 @@
    USE module_model_constants
    USE module_wrf_error
-#ifndef NOPHYS
+   !!!!!!!! interface modules
    USE update_inputs_physiq_mod !! to set inputs for physiq
    USE update_outputs_physiq_mod !! to get outputs from physiq
-   USE comm_wrf !! to get fields to be written from physiq
    USE iniphysiq_mod !! to get iniphysiq subroutine
    USE callphysiq_mod !! to call the LMD physics
-#endif
+   !!!!!!!! interface modules
 
 !==================================================================
@@ -414,7 +410,4 @@
 !----------!
 ! inputs ...
-#ifndef NOPHYS
-CALL allocate_comm_wrf(ngrid,nlayer)
-#endif
 ALLOCATE(pplev(ngrid,nlayer+1))  !!!!!
 ALLOCATE(pplay(ngrid,nlayer))    !!!!!
@@ -447,5 +440,4 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-#ifndef NOPHYS
 !! INITIALIZE AND ALLOCATE EVERYTHING !! here, only firstcall
 allocation_firstcall: IF (firstcall .EQV. .true.) THEN
@@ -470,5 +462,4 @@
                      1./reradius,g,r_d,cp,1)
 ENDIF allocation_firstcall
-#endif
 
 !!*****************************!!
@@ -657,5 +648,4 @@
 pdt(:,:)=0.
 pdq(:,:,:)=0.
-#ifndef NOPHYS
 print *, '** ',planet_type,'** CALL TO LMD PHYSICS'
 !!!
@@ -676,5 +666,4 @@
                        pdu,pdv,pdt,pdq,pdpsrf)
 !!!
-#endif
 
 !! specific scenario. necessary to add the right amount of dust.
@@ -745,28 +734,13 @@
             M_Q2,M_WSTAR,&
             HFMAX,ZMAX,USTM,HFX)
-
-DO j = jps,jpe
-DO i = ips,ipe
-
-  subs = (j-jps)*(ipe-ips+1)+(i-ips+1)
-
-  !! output only (cf comm_wrf)
-  SWDOWNZ(i,j) = comm_SWDOWNZ(subs)
-  TAU_DUST(i,j) = comm_TAU_DUST(subs)
-  QSURFDUST(i,j) = comm_QSURFDUST(subs)
-  MTOT(i,j) = comm_MTOT(subs)
-  ICETOT(i,j) = comm_ICETOT(subs)
-  TAU_ICE(i,j) = comm_TAU_ICE(subs)
-  HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe)
-  HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe)
-  RDUST(i,kps:kpe,j) = comm_RDUST(subs,kps:kpe)
-  VMR_ICE(i,kps:kpe,j) = comm_VMR_ICE(subs,kps:kpe)
-  RICE(i,kps:kpe,j) = comm_RICE(subs,kps:kpe)
-
-ENDDO
-ENDDO
-
-CALL deallocate_comm_wrf
-
+!!!
+CALL update_outputs_physiq_diag( &
+            ims,ime,jms,jme,kms,kme,&
+            ips,ipe,jps,jpe,kps,kpe,&
+            SWDOWNZ,TAU_DUST,QSURFDUST,&
+            MTOT,ICETOT,TAU_ICE,&
+            HR_SW,HR_LW,&
+            RDUST,VMR_ICE,RICE)
+!!!
 ENDIF call_physics
 
