Index: /trunk/LMDZ.MARS/README
===================================================================
--- /trunk/LMDZ.MARS/README	(revision 318)
+++ /trunk/LMDZ.MARS/README	(revision 319)
@@ -1076,2 +1076,5 @@
 ********************
 
+== 14/10/2011 == AS + AC
+- Monin-Obukhov length is now output from surflay_interpol and written in diagfi if z_out not 0.
+- in calltherm_interface, defaut settings for qtransport_thermals and dtke_thermals
Index: /trunk/LMDZ.MARS/libf/phymars/calltherm_interface.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/calltherm_interface.F90	(revision 318)
+++ /trunk/LMDZ.MARS/libf/phymars/calltherm_interface.F90	(revision 319)
@@ -8,5 +8,5 @@
      & pdu_th,pdv_th,pdt_th,pdq_th,lmax_th,zmax_th,pbl_dtke,hfmax,wmax)
 
-       USE ioipsl_getincom
+       !USE ioipsl_getincom
 
       implicit none
@@ -107,6 +107,6 @@
 
             pq_therm(:,:,:)=0.
-            qtransport_thermals=.true.
-            call getin("qtransport_thermals",qtransport_thermals)
+            qtransport_thermals=.true. !! default setting
+            !call getin("qtransport_thermals",qtransport_thermals)
             if(qtransport_thermals) then
             if(tracer) then
@@ -124,6 +124,6 @@
             buoyancyEst(:,:)=0.
 
-       dtke_thermals=.false.
-       call getin("dtke_thermals",dtke_thermals)
+       dtke_thermals=.false. !! default setting
+       !call getin("dtke_thermals",dtke_thermals)
          if(dtke_thermals) then
 
Index: /trunk/LMDZ.MARS/libf/phymars/physiq.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/physiq.F	(revision 318)
+++ /trunk/LMDZ.MARS/libf/phymars/physiq.F	(revision 319)
@@ -327,6 +327,7 @@
       REAL zcdv(ngridmx), zcdh(ngridmx)
       REAL Teta_out(ngridmx),u_out(ngridmx)  ! Interpolated teta and u at z_out
-      REAL z_out                          ! height of interpolation between z0 and z1
+      REAL z_out                          ! height of interpolation between z0 and z1 [meters]
       REAL ustar(ngridmx),tstar(ngridmx)  ! friction velocity and friction potential temp
+      REAL L_mo(ngridmx)
       REAL zu2(ngridmx)
 c=======================================================================
@@ -1658,8 +1659,8 @@
 
 
-         z_out=0.
+         z_out=1. !0.
          if (calltherm .and. (z_out .gt. 0.)) then
          call surflayer_interpol(ngrid,nlayer,z0,g,zzlay,zu,zv,wmax_th
-     &              ,tsurf,zh,z_out,Teta_out,u_out,ustar,tstar)
+     &              ,tsurf,zh,z_out,Teta_out,u_out,ustar,tstar,L_mo)
 
          zu2(:)=sqrt(zu(:,1)*zu(:,1)+zv(:,1)*zv(:,1))
@@ -1680,4 +1681,7 @@
      &              'friction potential temperature','K',
      &                         2,tstar)
+         call WRITEDIAGFI(ngrid,'L',
+     &              'Monin Obukhov length','m',
+     &                         2,L_mo)
          else
            if((.not. calltherm).and.(z_out .gt. 0.)) then
Index: /trunk/LMDZ.MARS/libf/phymars/surflayer_interpol.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/surflayer_interpol.F	(revision 318)
+++ /trunk/LMDZ.MARS/libf/phymars/surflayer_interpol.F	(revision 319)
@@ -1,4 +1,4 @@
       SUBROUTINE surflayer_interpol(ngrid,nlay,pz0, 
-     & pg,pz,pu,pv,wmax,pts,ph,z_out,Teta_out,u_out,ustar,tstar)
+     & pg,pz,pu,pv,wmax,pts,ph,z_out,Teta_out,u_out,ustar,tstar,L_mo)
       IMPLICIT NONE
 !=======================================================================
@@ -45,4 +45,5 @@
       REAL, INTENT(OUT) :: Teta_out(ngrid),u_out(ngrid)! interpolated fields at z_out : potential temperature and norm(uv)
       REAL, INTENT(OUT) :: ustar(ngrid), tstar(ngrid) ! u* and teta*
+      REAL, INTENT(OUT) :: L_mo(ngrid)                ! Monin-Obukhov length
 
 !   Local:
@@ -81,5 +82,4 @@
 
       REAL zu2(ngrid)                  ! Large-scale wind at first layer
-      REAL L_mo(ngrid)                ! Monin-Obukhov length
 !-----------------------------------------------------------------------
 !   couche de surface:
@@ -331,7 +331,4 @@
 ! Usefull diagnostics for the interpolation routine :
 
-!         call WRITEDIAGFI(ngrid,'L',
-!     &              'Monin Obukhov length','m',
-!     &                         2,L_mo)
 !         call WRITEDIAGFI(ngrid,'z0T',
 !     &              'thermal roughness length','m',
