Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/RUN/vert_level_python/levspe.py
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/RUN/vert_level_python/levspe.py	(revision 1745)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/RUN/vert_level_python/levspe.py	(revision 1746)
@@ -14,6 +14,15 @@
 #psurf=92.e5 # Venus
 psurf=1.212862e6 
+
+hache = 10.
+psurf = 610.
+
+
 print hache, psurf
 #read paramlevspe
+
+
+
+
 param=np.loadtxt('paramlevspe')
 nlev=param[0]
@@ -52,5 +61,5 @@
 #print ptop
 etas=(pressions-ptop)/(psurf-ptop)
-etas[nlev-1]=0.
+etas[int(nlev)-1]=0.
 #print etas
 press=etas*(psurf-ptop)+ptop
@@ -68,7 +77,7 @@
 np.savetxt('levels',etas)
 
-plt.figure(figsize=(15, 15))
+plt.figure(figsize=(12, 6))
 plt.subplot(221)
-plt.plot(x, etas)
+plt.plot(x, etas, 'b.')
 plt.xlabel('levels')
 plt.ylabel('etas')
@@ -76,19 +85,25 @@
 #plt.title('a) NINO3 Sea Surface Temperature (seasonal)')
 #plt.hold(False)
+axes = plt.gca()
+axes.set_ylim([0,1])
 
 plt.subplot(222)
-plt.plot(x, pseudo)
+plt.plot(x, pseudo, 'b.')
 plt.xlabel('levels')
 plt.grid()
 plt.ylabel('pseudo-altitude (km)')
+plt.semilogy()
+axes = plt.gca()
+axes.set_ylim([0,60])
+
 
 plt3 = plt.subplot(223)
-plt.semilogy(x, press)
+plt.semilogy(x, press, 'b.')
 plt.xlabel('levels')
 plt.grid()
-plt.ylabel('pression (Pa)')
+plt.ylabel('pressure (Pa)')
 
 plt4 = plt.subplot(224)
-plt.plot(x, res)
+plt.plot(x, res, 'b.')
 plt.xlabel('levels')
 plt.grid()
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/RUN/vert_level_python/paramlevspe
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/RUN/vert_level_python/paramlevspe	(revision 1745)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/RUN/vert_level_python/paramlevspe	(revision 1746)
@@ -3,6 +3,6 @@
 #epsilon augmentation totale en pourcentage de l'ecart max (modifie inflexion). epsilon = 0   : point d'inflexion parfaitement plat. epsilon = 100 : pas de point d'inflexion
 #elong_cos plus petit rapproche l'inflexion du sol ;; 2/3 parfait pour un nlev divisible par 3
-201 
-280. 
-0
-0.000000044
+61 
+60. 
+100
+1.75
Index: trunk/MESOSCALE/LMD_MM_MARS/SIMU/namelist.input_full
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/SIMU/namelist.input_full	(revision 1745)
+++ trunk/MESOSCALE/LMD_MM_MARS/SIMU/namelist.input_full	(revision 1746)
@@ -88,4 +88,6 @@
  h_sca_adv_order = 5,        !! (*d) Horizontal scalar advection order
  v_sca_adv_order = 3,        !! (*d) Vertical scalar advection order
+ khdif = 10.,      !! ** direct diffusion for tests (km_opt=1). horizontal diffusion constant (m^2/s)
+ kvdif = 10.,      !! ** direct diffusion for tests (km_opt=1). vertical diffusion constant (m^2/s)
  /
 
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 1745)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_initialize_les.F	(revision 1746)
@@ -86,5 +86,5 @@
 
    INTEGER, PARAMETER :: nl_max = 1000
-   REAL, DIMENSION(nl_max) :: zk, p_in, theta, Tz, rho, u, v, qv, pd_in
+   REAL, DIMENSION(nl_max) :: zk, p_in, theta, rho, u, v, qv, pd_in
    INTEGER :: nl_in
 
@@ -116,9 +116,5 @@
  ! for mode 3
  REAL, DIMENSION(nl_max) :: profdustq,profdustn
- REAL, DIMENSION(nl_max) :: hrsw,hrlw,hrdyn
- REAL, DIMENSION(nl_max) :: trac
- REAL, DIMENSION(nl_max) :: prescribed_sw,prescribed_lw,prescribed_dyn
- REAL, DIMENSION(nl_max) :: venus_hrdyn
- REAL, DIMENSION(nl_max) :: altitude
+ REAL, DIMENSION(nl_max) :: prescribed_sw,prescribed_lw
 !!MARS
 
@@ -127,8 +123,11 @@
       !INTEGER :: hypsometric_opt = 2 ! Wee et al. 2012 correction
 
+character(len=10) :: planet
 
 #ifdef DM_PARALLEL
 #    include <data_calls.inc>
 #endif
+ 
+   call init_planet_constants
 
    SELECT CASE ( model_data_order )
@@ -173,12 +172,12 @@
 
 
-   stretch_grid = .false.
+   !stretch_grid = .false.
 !  FOR LES, set stretch to false
-   !stretch_grid = .true.
+   stretch_grid = .true.
    delt = 3.
 !   z_scale = .50
 !   z_scale = .10
 !   z_scale = .25
-!   z_scale = .1
+!   z_scale = .15
    pi = 2.*asin(1.0)
    write(6,*) ' pi is ',pi
@@ -303,4 +302,5 @@
    grid%rdx = 1./config_flags%dx
    grid%rdy = 1./config_flags%dy
+
 !  get the sounding from the ascii sounding file, first get dry sounding and 
 !  calculate base state
@@ -310,5 +310,5 @@
   write(6,*) ' getting dry sounding for base state '
 
-  CALL get_sounding( zk, p_in, pd_in, theta, Tz, rho, u, v, qv, dry_sounding, nl_max, nl_in )
+  CALL get_sounding( zk, p_in, pd_in, theta, rho, u, v, qv, dry_sounding, nl_max, nl_in )
   ENDIF
   CALL wrf_dm_bcast_real( zk , nl_max )
@@ -316,5 +316,4 @@
   CALL wrf_dm_bcast_real( pd_in , nl_max )
   CALL wrf_dm_bcast_real( theta , nl_max )
-  CALL wrf_dm_bcast_real( Tz , nl_max )
   CALL wrf_dm_bcast_real( rho , nl_max )
   CALL wrf_dm_bcast_real( u , nl_max )
@@ -385,17 +384,14 @@
   ENDDO
 
-  xs=ide/2 -25
-  !xs=ids   -3
-  !xe=xs + 6
-  xe=xs + 25
-  !ys=jde/2 -3
-  ys=jde/2 -25
-  !ye=ys + 6
-  ye=ys + 25
-  mtn_ht = 1000
+  xs=ide/2 -3
+  xs=ids   -3
+  xe=xs + 6
+  ys=jde/2 -3
+  ye=ys + 6
+  mtn_ht = 500
 #ifdef MTN
   DO j=max(ys,jds),min(ye,jde-1)
   DO i=max(xs,ids),min(xe,ide-1)
-     grid%ht(i,j) = alt_input + mtn_ht * 0.25 * &
+     grid%ht(i,j) = mtn_ht * 0.25 * &
                ( 1. + COS ( 2*pi/(xe-xs) * ( i-xs ) + pi ) ) * &
                ( 1. + COS ( 2*pi/(ye-ys) * ( j-ys ) + pi ) )
@@ -438,6 +434,5 @@
       p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top
       grid%pb(i,k,j) = p_level
-      grid%t_init(i,k,j) = interp_0_log( theta, p_in, p_level, nl_in ) - t0
-      grid%tz_init(i,k,j) = interp_0_log( Tz, p_in, p_level, nl_in )
+      grid%t_init(i,k,j) = interp_0( theta, p_in, p_level, nl_in ) - t0
       grid%alb(i,k,j) = (r_d/p1000mb)*(grid%t_init(i,k,j)+t0)*(grid%pb(i,k,j)/p1000mb)**cvpm
     ENDDO
@@ -463,4 +458,5 @@
   ENDDO
   ENDDO
+
   IF ( wrf_dm_on_monitor() ) THEN
     write(6,*) ' ptop is ',grid%p_top
@@ -472,5 +468,5 @@
   write(6,*) ' getting moist sounding for full state '
   dry_sounding = .false.
-  CALL get_sounding( zk, p_in, pd_in, theta, Tz, rho, u, v, qv, dry_sounding, nl_max, nl_in )
+  CALL get_sounding( zk, p_in, pd_in, theta, rho, u, v, qv, dry_sounding, nl_max, nl_in )
 
   DO J = jts, min(jde-1,jte)
@@ -495,6 +491,6 @@
       p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top
 
-      moist(i,k,j,P_QV) = interp_0_log( qv, pd_in, p_level, nl_in )
-      grid%t_1(i,k,j)          = interp_0_log( theta, pd_in, p_level, nl_in ) - t0
+      moist(i,k,j,P_QV) = interp_0( qv, pd_in, p_level, nl_in )
+      grid%t_1(i,k,j)          = interp_0( theta, pd_in, p_level, nl_in ) - t0
       grid%t_2(i,k,j)          = grid%t_1(i,k,j)
       
@@ -698,5 +694,5 @@
     DO K = 1, kte-1
       p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top
-      grid%v_1(i,k,j) = interp_0_log( v, p_in, p_level, nl_in )
+      grid%v_1(i,k,j) = interp_0( v, p_in, p_level, nl_in )
       grid%v_2(i,k,j) = grid%v_1(i,k,j)
     ENDDO
@@ -722,5 +718,5 @@
     DO K = 1, kte-1
       p_level = grid%znu(k)*(p_surf - grid%p_top) + grid%p_top
-      grid%u_1(i,k,j) = interp_0_log( u, p_in, p_level, nl_in )
+      grid%u_1(i,k,j) = interp_0( u, p_in, p_level, nl_in )
       grid%u_2(i,k,j) = grid%u_1(i,k,j)
     ENDDO
@@ -851,5 +847,5 @@
       DO k=1,kte-1
          p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top
-         scalar(its:ite,k,jts:jte,2) = interp_0_log( qv, pd_in, p_level, nl_in )
+         scalar(its:ite,k,jts:jte,2) = interp_0( qv, pd_in, p_level, nl_in )
          scalar(its:ite,k,jts:jte,3) = 0.
            !! water ice is set to 0 (was put into water vapor when building prof from MCD)
@@ -866,6 +862,6 @@
       DO k=1,kte-1
          p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top
-         scalar(its:ite,k,jts:jte,4) = interp_0_log( profdustq, pd_in, p_level, nl_in )
-         scalar(its:ite,k,jts:jte,5) = interp_0_log( profdustn, pd_in, p_level, nl_in )
+         scalar(its:ite,k,jts:jte,4) = interp_0( profdustq, pd_in, p_level, nl_in )
+         scalar(its:ite,k,jts:jte,5) = interp_0( profdustn, pd_in, p_level, nl_in )
       ENDDO
       print *, "DUST Q", scalar(its,:,jts,4)
@@ -886,6 +882,6 @@
        DO i = its, ite
          !!! we use Q2 as a vehicle for heating rates! sick!
-         grid%m_q2(i,k,j) = interp_0_log( profdustq, pd_in, p_level, nl_in ) &
-                          + interp_0_log( profdustn, pd_in, p_level, nl_in )
+         grid%m_q2(i,k,j) = interp_0( profdustq, pd_in, p_level, nl_in ) &
+                          + interp_0( profdustn, pd_in, p_level, nl_in )
        ENDDO
        ENDDO
@@ -893,42 +889,19 @@
        !print*,k,grid%m_q2(1,k,1)
     ENDDO
-
+    print*,'planet',planet   
     IF (planet.eq."prescribed") Then
-      call read_hr(hrsw,hrlw,hrdyn,nl_in)
+      call read_hr(profdustq,profdustn,nl_in)
       open(unit=17,file="prescribed_sw.txt",action="write")
       open(unit=18,file="prescribed_lw.txt",action="write")
-      open(unit=19,file="prescribed_dyn.txt",action="write")
       DO k=1,kte!-1
         p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top
-        prescribed_sw(k) = interp_0_log( hrsw, pd_in, p_level, nl_in )
-        prescribed_lw(k) = interp_0_log( hrlw, pd_in, p_level, nl_in )
-        prescribed_dyn(k) = interp_0_log( hrdyn, pd_in, p_level, nl_in )
+        prescribed_sw(k) = interp_0( profdustq, pd_in, p_level, nl_in )
+        prescribed_lw(k) = interp_0( profdustn, pd_in, p_level, nl_in )
         write (17,*) prescribed_sw(k)
         write (18,*) prescribed_lw(k)
-        write (19,*) prescribed_dyn(k)
       ENDDO
-      close(unit=19)
+      close(unit=17)
       close(unit=18)
-      close(unit=17)
     ENDIF
-    
-    IF (planet.eq."venus") Then
-      call read_hr(hrsw,hrlw,hrdyn,nl_in)
-      open(unit=20,file="venus_hrdyn.txt",action="write")
-      DO k=1,kte!-1
-        p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top
-        venus_hrdyn(k) = interp_0_log( hrdyn, pd_in, p_level, nl_in )
-        write (20,*) venus_hrdyn(k)
-      ENDDO
-      close(unit=20)
-    ENDIF
-
-    open(unit=21,file="altitude.txt",action="write")
-    DO k=1,kte!-1
-      p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top
-      altitude(k) = interp_0_log( zk, pd_in, p_level, nl_in )
-      write (21,*) altitude(k)
-    ENDDO
-    close(unit=21)
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -968,5 +941,5 @@
 !---------------------------------------------------------------------------
 
-      subroutine get_sounding( zk, p, p_dry, theta, Tz, rho, &
+      subroutine get_sounding( zk, p, p_dry, theta, rho, &
                                u, v, qv, dry, nl_max, nl_in )
       implicit none
@@ -974,5 +947,5 @@
       integer nl_max, nl_in
       real zk(nl_max), p(nl_max), theta(nl_max), rho(nl_max), &
-           u(nl_max), v(nl_max), qv(nl_max), p_dry(nl_max),Tz(nl_max)
+           u(nl_max), v(nl_max), qv(nl_max), p_dry(nl_max)
       logical dry
 
@@ -1139,5 +1112,4 @@
           v(k) = v_input(k)
           qv(k) = qv_input(k)
-          Tz(k) = t_therm(k)
 
         enddo
@@ -1226,5 +1198,5 @@
       implicit none
       integer n
-      real pdustq(n+1),pdustn(n+1)
+      real pdustq(n),pdustn(n)
       logical end_of_file
 
@@ -1251,8 +1223,8 @@
       end subroutine read_dust
 !!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
-      subroutine read_hr(hr_sw,hr_lw,hr_dyn,n)
+      subroutine read_hr(hr_sw,hr_lw,n)
       implicit none
       integer n
-      real hr_sw(n+1),hr_lw(n+1),hr_dyn(n+1)
+      real hr_sw(n),hr_lw(n)
       logical end_of_file
 
@@ -1267,8 +1239,8 @@
       do while (.not. end_of_file)
 
-        read(11,*,end=103) hr_sw(k+1),hr_lw(k+1),hr_dyn(k+1)
-        write(*,*) k,hr_sw(k+1),hr_lw(k+1),hr_dyn(k+1)
+        read(11,*,end=103) hr_sw(k+1),hr_lw(k+1)
+        write(*,*) k,hr_sw(k+1),hr_lw(k+1)
         k = k+1
-        go to 114
+        go to 113
  103    end_of_file = .true.
  114    continue
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 1745)
+++ trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/dyn_em/module_initialize_real.F	(revision 1746)
@@ -21,5 +21,4 @@
    USE module_soil_pre
    USE module_date_time
-   use module_init_utilities
 #ifdef DM_PARALLEL
    USE module_dm
@@ -119,9 +118,7 @@
       REAL :: max_dz
 
-      INTEGER , PARAMETER :: nl_max = 1000
-      INTEGER :: nl_in
+!      INTEGER , PARAMETER :: nl_max = 1000
 !      REAL , DIMENSION(nl_max) :: grid%em_dn
-      REAL, DIMENSION(nl_max) :: pd_in
-      REAL, DIMENSION(nl_max) :: profdustq,profdustn
+
 integer::oops1,oops2
 
@@ -152,5 +149,5 @@
       !LOGICAL :: interp_theta = .false. ! Wee et al. 2012 correction
       REAL :: pfu, pfd, phm
-      REAL :: tpot
+
 
 #ifdef DM_PARALLEL
@@ -1083,32 +1080,32 @@
 !!END DO
 
-IF ( planet == "mars" ) then
+
 !--get vertical size of the GCM input array and allocate new stuff
-  sizegcm=SIZE(grid%em_rh_gc(1,:,1))
-  ALLOCATE(sig(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))
-  !ALLOCATE(ap(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))
-  ALLOCATE(bp(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))
-
-  DO j = jts , MIN ( jde-1 , jte )
-  DO i = its , MIN (ide-1 , ite )
+sizegcm=SIZE(grid%em_rh_gc(1,:,1))
+ALLOCATE(sig(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))
+!ALLOCATE(ap(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))
+ALLOCATE(bp(MIN(ite,ide-1)-its+1,sizegcm, MIN(jte,jde-1)-jts+1))
+
+DO j = jts , MIN ( jde-1 , jte )
+DO i = its , MIN (ide-1 , ite )
 
 !!! Define old sigma levels for each column
-          sig(i,:,j)=grid%em_p_gc(i,:,j)/grid%em_psfc_gc(i,j)
+        sig(i,:,j)=grid%em_p_gc(i,:,j)/grid%em_psfc_gc(i,j)
 
 !!! Compute new sigma levels from old sigma levels with GCM (low-res) and WRF (hi-res) surface pressure 
 !!!                        (dimlevs,sigma_gcm, ps_gcm,                ps_hr,         sigma_hr)
-          CALL build_sigma_hr(sizegcm,sig(i,:,j),grid%em_psfc_gc(i,j),grid%psfc(i,j),bp(i,:,j))
+        CALL build_sigma_hr(sizegcm,sig(i,:,j),grid%em_psfc_gc(i,j),grid%psfc(i,j),bp(i,:,j))
 
 !!! Calculate new pressure levels
-          grid%em_pd_gc(i,:,j)=bp(i,:,j)*grid%psfc(i,j)
-
-  END DO
-  END DO
-
-  DEALLOCATE(sig)
-  DEALLOCATE(bp)
+        grid%em_pd_gc(i,:,j)=bp(i,:,j)*grid%psfc(i,j)
+
+END DO
+END DO
+
+DEALLOCATE(sig)
+DEALLOCATE(bp)
 
 !!****MARS who knows...
-  grid%em_rh_gc(:,:,:)=0.
+grid%em_rh_gc(:,:,:)=0.
 
 
@@ -1116,5 +1113,5 @@
 !grid%em_pd_gc=grid%em_p_gc
 !!****MARS
-ELSE ! VENUS
+
 
 
@@ -1123,28 +1120,26 @@
          !!  dry top pressure (constant).
          !
-           CALL p_dts ( grid%em_mu0 , grid%em_intq_gc , grid%psfc , grid%p_top , &
-                        ids , ide , jds , jde , 1   , num_metgrid_levels , &
-                        ims , ime , jms , jme , 1   , num_metgrid_levels , &
-                        its , ite , jts , jte , 1   , num_metgrid_levels )
-ENDIF
-IF ( planet == "mars" ) then
+         !CALL p_dts ( grid%em_mu0 , grid%em_intq_gc , grid%psfc , grid%p_top , &
+         !             ids , ide , jds , jde , 1   , num_metgrid_levels , &
+         !             ims , ime , jms , jme , 1   , num_metgrid_levels , &
+         !             its , ite , jts , jte , 1   , num_metgrid_levels )
+
 !!****MARS
-  DO j = jts , MIN ( jde-1 , jte )
-  DO i = its , MIN (ide-1 , ite )
-
-     grid%em_mu0(i,j) = grid%psfc(i,j) - grid%p_top
-
-  END DO
-  END DO
+DO j = jts , MIN ( jde-1 , jte )
+DO i = its , MIN (ide-1 , ite )
+
+   grid%em_mu0(i,j) = grid%psfc(i,j) - grid%p_top
+
+END DO
+END DO
 !!****MARS
-ELSE ! VENUS
+
    
          !!  Compute the dry, hydrostatic surface pressure.
          !
-           CALL p_dhs ( grid%em_pdhs , grid%ht , p00 , t00 , a , &
-                        ids , ide , jds , jde , kds , kde , &
-                        ims , ime , jms , jme , kms , kme , &
-                        its , ite , jts , jte , kts , kte )
-ENDIF
+         !CALL p_dhs ( grid%em_pdhs , grid%ht , p00 , t00 , a , &
+         !             ids , ide , jds , jde , kds , kde , &
+         !             ims , ime , jms , jme , kms , kme , &
+         !             its , ite , jts , jte , kts , kte )
 !!****MARS: voir remarques dans la routine
 !!****MARS: dry hydrostatic pressure comes from the GCM ...
@@ -2299,9 +2294,5 @@
 IF (( i .EQ. its ) .AND. ( j .EQ. jts )) print *, temp, k
 !!! MODIF WRFV3.1 - parameter tiso
-               IF (planet .eq. "mars" ) THEN
-                 grid%em_t_init(i,k,j) = temp*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0
-               ELSE
-                 grid%em_t_init(i,k,j) = (temp**nu + nu*(TT00**nu)*log((p00/grid%em_pb(i,k,j))**rcp))**(1/nu) -t0
-               ENDIF
+               grid%em_t_init(i,k,j) = temp*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0
                grid%em_alb(i,k,j) = (r_d/p1000mb)*(grid%em_t_init(i,k,j)+t0)*(grid%em_pb(i,k,j)/p1000mb)**cvpm
             END DO
@@ -2610,4 +2601,5 @@
 !!NB: q2 is used for other purpose ...
 
+
 !      END IF
 
@@ -2788,9 +2780,6 @@
 temp1 = MAX(tiso,t00+A*LOG(grid%em_pb(i,k,j)/p00))
 temp2 = MAX(tiso,t00+A*LOG(           pb_int/p00))
-IF (planet .eq. "mars" ) THEN
-  grid%em_t_init(i,k,j) = temp1*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0
-  t_init_int(i,k,j)     = temp2*(p00/pb_int           )**(r_d/cp) - t0
-ELSE
-ENDIF
+grid%em_t_init(i,k,j) = temp1*(p00/grid%em_pb(i,k,j))**(r_d/cp) - t0
+t_init_int(i,k,j)     = temp2*(p00/pb_int           )**(r_d/cp) - t0
                grid%em_alb(i,k,j) = (r_d/p1000mb)*(grid%em_t_init(i,k,j)+t0)*(grid%em_pb(i,k,j)/p1000mb)**cvpm
             END DO
@@ -4980,9 +4969,5 @@
 !            temp =             t00 + A*LOG(pb/p00)
 temp = MAX ( tiso, t00 + A*LOG(pb/p00) )
-           IF (planet .eq. "mars" ) THEN
-              t_init = temp*(p00/pb)**(r_d/cp) - t0
-            ELSE
-              t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) - t0
-            ENDIF
+            t_init = temp*(p00/pb)**(r_d/cp) - t0
             alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm
          END DO
@@ -5020,9 +5005,5 @@
 !            temp =             t00 + A*LOG(pb/p00)
 temp = MAX ( tiso, t00 + A*LOG(pb/p00) )
-           IF (planet .eq. "mars" ) THEN
-              t_init = temp*(p00/pb)**(r_d/cp) - t0
-            ELSE
-              t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0
-            ENDIF
+            t_init = temp*(p00/pb)**(r_d/cp) - t0
             alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm
             znw(k+1) = znw(k) - dz*g / ( mub*alb(k) )
@@ -5044,9 +5025,5 @@
 !                  temp =             t00 + A*LOG(pb/p00)
 temp = MAX ( tiso, t00 + A*LOG(pb/p00) )
-           IF (planet .eq. "mars" ) THEN
-              t_init = temp*(p00/pb)**(r_d/cp) - t0
-            ELSE
-              t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0
-            ENDIF
+                  t_init = temp*(p00/pb)**(r_d/cp) - t0
                   alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm
                   znw(k+1) = znw(k) - dz*g / ( mub*alb(k) )
@@ -5075,9 +5052,5 @@
 !               temp =             t00 + A*LOG(pb/p00)
 temp = MAX ( tiso, t00 + A*LOG(pb/p00) )
-           IF (planet .eq. "mars" ) THEN
-              t_init = temp*(p00/pb)**(r_d/cp) - t0
-            ELSE
-              t_init = (temp**nu + nu*(TT00**nu)*log((p00/pb)**(rcp)))**(1/nu) -t0
-            ENDIF
+               t_init = temp*(p00/pb)**(r_d/cp) - t0
                alb(k) = (r_d/p1000mb)*(t_init+t0)*(pb/p1000mb)**cvpm
             END DO
@@ -5747,4 +5720,8 @@
       end subroutine build_sigma_hr
 
+
+
+
+
 END MODULE module_initialize
 
Index: trunk/MESOSCALE/LMD_MM_MARS/makemeso
===================================================================
--- trunk/MESOSCALE/LMD_MM_MARS/makemeso	(revision 1745)
+++ trunk/MESOSCALE/LMD_MM_MARS/makemeso	(revision 1746)
@@ -74,6 +74,4 @@
 # makemeso -p mars_lmd_new   ## choose physics
 #             venus_lmd_new
-#             generic_lmd_new
-#             titan_lmd_new
 #
 # makemeso -f                ## fresh start [clean -a]
@@ -244,29 +242,7 @@
       cd ..
 
-     # remove files adapted to parallel GCM and useless for mesoscale
-     #cd mars_lmd
-     #cd libf/phymars
-     #\rm tabfi* soil_settings* phyetat0* phyredem* iostart* writediagfi* mkstat* writediagsoil* eofdump* wstats* inistats* mod_*
-     #\rm iniphysiq* init_phys_lmdz* comgeomphy* planetwide_mod*
-     #mv ../dyn3d/control_mod.F90 .
-     #cd ../..
-     #cd ..
-
-    else
-         if [[ "${config}" == "les" ]] 
-         then
-           #### NB: With physics: LES folder // Without physics : LESnophys_ folder
-           #### ---- because differences in 'modif' folder ----
-           #sed s+"PWD/SRC/"+"PWD/SRC/LES$phys/"+g SRC/SCRIPTS/copy_model > copy_model_tmp
-           sed s+"PWD/SRC/"+"PWD/SRC/LES/"+g SRC/SCRIPTS/copy_model > copy_model_tmp
-         else
-           cp SRC/SCRIPTS/copy_model copy_model_tmp
-         fi   
-     chmod 755 copy_model_tmp
-     ./copy_model_tmp
-     \rm copy_model_tmp
-     mv zeWRFV2 ${conf_wrf}/WRFV2
-     cd ${conf_wrf}/WRFV2
-     cd Registry ; ./Registry.bash ; cd .. 
+     else
+      cd ${conf_wrf}/WRFV2
+      cd Registry ; ./Registry.bash ; cd .. 
      fi
           #### sparadrap consequent a l'utilisation de copy_model pour les liens
@@ -414,5 +390,4 @@
                        then
                          sed s+"-lnetcdf"+"-lnetcdf -L../$phys/libo -llmd $NETCDF/lib/libnetcdf.a"+g   configure.wrf > yeah ; mv -f yeah configure.wrf
-                         #sed s+"O3"+"O3"+g configure.wrf > yeah ; mv -f yeah configure.wrf
                        else
                          sed s+"-lnetcdf"+"-lnetcdf $NETCDF/lib/libnetcdf.a"+g   configure.wrf > yeah ; mv -f yeah configure.wrf
@@ -481,5 +456,5 @@
                          mv -f yeah configure.wrf ;;
      mpifort_64)     # MPI+IFORT, 64 bits, no nesting / nesting
-                       echo 9 | ./configure > log_compile 2> log_error 
+                       echo 9 | configure > log_compile 2> log_error 
                        sed -f physics.sed configure.wrf > yeah ; mv -f yeah configure.wrf 
                        sed s+"-f90=ifort"+" "+g configure.wrf > yeah ; mv -f yeah configure.wrf 
@@ -492,5 +467,5 @@
                              then
                              echo 'DEBUG DEBUG DEBUG DEBUG'
-                             sed s+"#-g"+" -g -no-ftz -traceback -ftrapuv -fp-stack-check -check"+g configure.wrf > yeah
+                             sed s+"# -g"+" -g -no-ftz -traceback -ftrapuv -fp-stack-check -check"+g configure.wrf > yeah
                              mv -f yeah configure.wrf
                        fi
@@ -512,9 +487,5 @@
                          sed s+"mpicc"+"mpicc -DMPI2_SUPPORT"+g configure.wrf > yeah ; mv -f yeah configure.wrf
                          ## !!! NETCDF must be defined
-                         if [[ "${phys}" != *"void"* ]]
-                           sed s+"-L../$phys/libo -llmd"+"-L../$phys/libo -llmd $NETCDF/lib/libnetcdf.a $NETCDF/lib/libnetcdff.a"+g configure.wrf > yeah 
-                         else
-                           sed s+"-lesmf_time"+"-lesmf_time $NETCDF/lib/libnetcdf.a $NETCDFF/lib/libnetcdff.a"+g configure.wrf > yeah
-                         fi
+                         sed s+"-L../$phys/libo -llmd"+"-L../$phys/libo -llmd $NETCDF/lib/libnetcdf.a"+g configure.wrf > yeah 
                          mv -f yeah configure.wrf 
                          #### POUR LE TRAITEMENT PARTICULIERS des NESTS sur iDATAPLEX [cf. module_lmd_driver]
@@ -614,6 +585,4 @@
     sed s+"LIB_BUNDLED     = "+"LIB_BUNDLED     =    /usr/lib64/liblapack.so  \ "+g configure.wrf > yeah ; mv -f yeah configure.wrf
     #sed s+"RWORDSIZE       =       "+"RWORDSIZE       =       8 # "+g configure.wrf > yeah ; mv -f yeah configure.wrf
-    #sed s+"PROMOTION       =       -i4"+'PROMOTION       = -real-size "expr 8 \* $(RWORDSIZE)" -i4'+g configure.wrf > yeah ; mv -f yeah configure.wrf
-    #sed s+"PROMOTION       =       -i4"+"PROMOTION       =       -real_size 64 -i4"+g configure.wrf > yeah ; mv -f yeah configure.wrf
     #sed s+"-DLWORDSIZE=4 "+"-DLWORDSIZE=8 "+g configure.wrf > yeah ; mv -f yeah configure.wrf
     #sed s+"-DIWORDSIZE=4 "+"-DIWORDSIZE=8 "+g configure.wrf > yeah ; mv -f yeah configure.wrf
@@ -704,17 +673,11 @@
   then 
     cd libf/phyvenus
-  elif [[ "${phys}" == *"generic"* ]]
-  then
-    cd libf/phystd
-  elif [[ "${phys}" == *"titan"* ]]
-  then
-    cd libf/phytitan
   fi
   \rm dimphys.h 2> /dev/null
-  #if [[ "${phys}" == "newphys_" ]]
-  #then
-  #  ln -sf ../../meso_dimphys.h_ref . ## ne sert plus !!
-  #else
-  if [[ "${phys}" != "newphys_" ]] 
+#  if [[ "${phys}" == "newphys_" ]]
+#  then
+#    ln -sf ../../meso_dimphys.h_ref . ## ne sert plus !!
+#  else
+  if [[ "${phys}" == "mars_lmd" ]]
   then
     physize=$(expr ${physx} \* ${physy})
@@ -722,15 +685,15 @@
     head -15 dimphys.h
   fi
-     ### TEST new new phys
+     #### TEST new new phys
      #if [[ "${phys}" == "newphys_" ]]
      #then
      #  touch gr_fi_dyn.F.lien
      #    ln -sf ../dyn3d/gr_fi_dyn.F .  ## dommage, a corriger 
-     ###############################
-     ###############################
-     ###############################
+     ################################
+     ################################
+     ################################
      #fi 
-     ###
-     ###
+     ####
+     ####
   cd ../..
 
@@ -748,5 +711,5 @@
   echo compilation info in: 
   echo $PWD/libo/log_compile_phys
-  
+
   if [ ${debug} -ne 0 ]  
   then
@@ -754,29 +717,17 @@
     then
       echo 'DEBUG DEBUG DEBUG DEBUG'
-      nohup makegcm_${compilo} debug -t ${tra} -p mars -d ${physz} testphys1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
+      nohup makegcm_${compilo} -debug -full -t ${tra} -p mars -d ${physz} testphys1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
     elif [[ "${phys}" == *"venus"* ]]
     then 
       echo 'DEBUG DEBUG DEBUG DEBUG'
-      nohup ./makelmdz -debug -full -p venus -d 181 rcm1d -arch X64_MESU -cpp MESOSCALE | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
-    elif [[ "${phys}" == *"generic"* ]]
-    then
-      echo 'DEBUG DEBUG DEBUG DEBUG'
-      nohup ./makegcm_ifort -debug -t ${tra} -p std -b 36x32 -d 25 rcm1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
-      #nohup ./makegcm_ifort -t ${tra} -p std -b 36x32 -d 25 rcm1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
+      nohup makelmdz -debug -full -p venus -d 181 rcm1d -arch linux-ifort -cpp MESOSCALE | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
     fi
   else
-    if [[ "${phys}" == *"mars"* ]]
+  if [[ "${phys}" == *"mars"* ]]
     then
       nohup makegcm_${compilo} -t ${tra} -p mars -d ${physz} testphys1d | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
     elif [[ "${phys}" == *"venus"* ]]
     then
-      nohup ./makelmdz -full -p venus -d 51 rcm1d -arch linux-ifort_meso -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys # on /u/ and /planeto/
-      nohup ./makelmdz -p venus -d 51 rcm1d -arch linux-ifort_meso -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
-      #nohup ./makelmdz -full -p venus -d 51 rcm1d -arch CICLADifort -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys # on CICLAD
-      #nohup ./makelmdz -p venus -d 51 rcm1d -arch CICLADifort -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
-      #nohup ./makelmdz -full -p venus -d 51 rcm1d -arch X64_MESU -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys #on MESU
-      #nohup ./makelmdz -p venus -d 51 rcm1d -arch X64_MESU -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
-      #nohup makelmdz -full -p venus -d 51 rcm1d -arch X64_OCCIGEN -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys #on OCCIGEN
-      #nohup makelmdz -p venus -d 51 rcm1d -arch X64_OCCIGEN -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys 
+      nohup makelmdz -full -p venus -d 51 rcm1d -arch linux-ifort -cpp MESOSCALE  | tee libo/log_compile_phys | grep 'warnings' >> libo/log_compile_phys
     fi
   fi
@@ -791,9 +742,7 @@
   cd libo
   mkdir temp
-  if [[ ("${phys}" == *"venus"*) ]]
-  then
-    cp -f linux*/*.a temp/ # on /u/ and /planeto/
-    #cp -f /home/mlefevre/modipsl/lib/libioipsl.a temp/ #on CICLAD
-    #cp -f X64*/*.a temp #on MESU and OCCIGEN
+  if [[ "${phys}" == *"venus"* ]]
+  then
+    cp -f linux*/*.a temp/
     cp -f ../ioipsl/libioipsl.a temp/
   else 
@@ -806,6 +755,5 @@
    ar x libphymars.a
    ar x libaeronomars.a
-  elif [[ "${phys}" == *"venus"* ]]
-  then 
+  else 
    ar x libphyvenus.a
    ar x libmisc.a
@@ -821,5 +769,4 @@
   # finish merge
   cd ..
-  echo ${phys}
   if [[ "${phys}" == *"new"* ]]
   then
@@ -828,10 +775,8 @@
       # include modules for interfacing
       mv  *.mod ../inc/
-    elif  [[ ("${phys}" == *"venus"*)]] 
-    then
-      mv  ./libo/linux*/*.mod ../inc/ # on /u/ and /planeto/
-      #mv  ./libo/CICLAD*/*.mod ../inc/ # on CICLAD
-      #mv  ./libo/X64*/*.mod ../inc/ # on MESU and OCCIGEN
+    else # [[ "${phys}" == *"venus"* ]] 
+      mv  ./libo/linux*/*.mod ../inc/
       cp -f ./ioipsl/*.mod ../inc/
+      
     fi
   fi
