Index: /LMDZ.3.3/branches/rel-LF/libf/phylmd/ini_histmth.h
===================================================================
--- /LMDZ.3.3/branches/rel-LF/libf/phylmd/ini_histmth.h	(revision 470)
+++ /LMDZ.3.3/branches/rel-LF/libf/phylmd/ini_histmth.h	(revision 471)
@@ -156,5 +156,5 @@
 c    .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
 c    .                "ave(X)", zsto,zout)
-cIM cf JLD
+c
          CALL histdef(nid_mth, "ffonte","Thermal flux for snow melting",
      .                "W/m2",iim,jjmp1,nhori, 1,1,1, -99, 32,
@@ -191,5 +191,5 @@
      $         iim,jjmp1,nhori, 1,1,1, -99, 32,
      $         "ave(X)", zsto,zout)
-cIM cf. JLD
+c
            call histdef(nid_mth, "fsw_"//clnsurf(nsrf),
      $         "SW "//clnsurf(nsrf), "W/m2",
@@ -302,4 +302,24 @@
 c
 c
+         CALL histdef(nid_mth, "upwd", "saturated updraft", "Kg/m2/s",
+     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_mth, "dnwd", "saturated downdraft","Kg/m2/s",
+     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_mth, "dnwd0", "unsat. downdraft", "Kg/m2/s",
+     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_mth,"Ma","undilute adiab updraft","Kg/m2/s",
+     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
+     .                "ave(X)", zsto,zout)
+c
+         CALL histdef(nid_mth, "prw", "Precipitable water", "kg/m2",
+     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
+     .                "ave(X)", zsto,zout)
+c
       ENDIF
 c34EK
@@ -338,5 +358,5 @@
      .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
-cIM cf. FH
+c
          CALL histdef(nid_mth, "rnebcon", "Convective Cloud Fraction"
      .                , "-",
@@ -485,23 +505,4 @@
          ENDIF
 c
-cKE43
-      IF (iflag_con.GE.3) THEN ! (sb)
-c
-         CALL histdef(nid_mth, "upwd", "saturated updraft", "Kg/m2/s",
-     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
-     .                "ave(X)", zsto,zout)
-c
-         CALL histdef(nid_mth, "dnwd", "saturated downdraft","Kg/m2/s",
-     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
-     .                "ave(X)", zsto,zout)
-c
-         CALL histdef(nid_mth, "dnwd0", "unsat. downdraft", "Kg/m2/s",
-     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
-     .                "ave(X)", zsto,zout)
-c
-         CALL histdef(nid_mth,"Ma","undilute adiab updraft","Kg/m2/s",
-     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
-     .                "ave(X)", zsto,zout)
-cccIM
          CALL histdef(nid_mth, "SWupTOA", "SWup at TOA","W/m2",
      .                iim,jjmp1,nhori, 1,1,1,-99,
@@ -519,5 +520,5 @@
      .                iim,jjmp1,nhori, 1,1,1,-99,
      .                32, "ave(X)", zsto,zout)
-cccIM clear sky
+c
          CALL histdef(nid_mth, "SWupTOAclr", 
      .                "SWup clear sky at TOA","W/m2",
@@ -539,9 +540,4 @@
      .                iim,jjmp1,nhori, 1,1,1,-99,
      .                32, "ave(X)", zsto,zout)
-      ENDIF
-c
-         CALL histdef(nid_mth, "prw", "Precipitable water", "kg/m2",
-     .                iim,jjmp1,nhori, 1,1,1, -99, 32,
-     .                "ave(X)", zsto,zout)
 
 c Champs interpolles sur des niveaux de pression
@@ -578,8 +574,5 @@
      .                iim,jjmp1,nhori, 1,1,1, -99, 32,
      .                "ave(X)", zsto,zout)
-
-
-cIM     ENDIF
-c34EK
+c
          CALL histend(nid_mth)
 c
Index: /LMDZ.3.3/branches/rel-LF/libf/phylmd/write_histmth.h
===================================================================
--- /LMDZ.3.3/branches/rel-LF/libf/phylmd/write_histmth.h	(revision 470)
+++ /LMDZ.3.3/branches/rel-LF/libf/phylmd/write_histmth.h	(revision 471)
@@ -24,5 +24,4 @@
       CALL histwrite(nid_mth,"tsol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
 c
-cccIM
       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zt2m,zx_tmp_2d)
       CALL histwrite(nid_mth,"t2m",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
@@ -130,5 +129,5 @@
 c      CALL histwrite(nid_mth,"frtv",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
 c
-cIM cf JLD
+c
        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxffonte,zx_tmp_2d)
        CALL histwrite(nid_mth,"ffonte",itau_w,zx_tmp_2d,iim*jjmp1,
@@ -166,5 +165,5 @@
         CALL histwrite(nid_mth,"flw_"//clnsurf(nsrf),itau_w,
      $      zx_tmp_2d,iim*jjmp1,ndex2d)
-cIM cf. JLD
+c
         zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, nsrf)
         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
@@ -261,4 +260,23 @@
       CALL histwrite(nid_mth,"fbase",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
 c
+      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, upwd, zx_tmp_3d)
+      CALL histwrite(nid_mth,"upwd",itau_w,zx_tmp_3d,
+     .                                   iim*jjmp1*klev,ndex3d)
+c
+      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, dnwd, zx_tmp_3d)
+      CALL histwrite(nid_mth,"dnwd",itau_w,zx_tmp_3d,
+     .                                   iim*jjmp1*klev,ndex3d)
+c
+      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, dnwd0, zx_tmp_3d)
+      CALL histwrite(nid_mth,"dnwd0",itau_w,zx_tmp_3d,
+     .                                   iim*jjmp1*klev,ndex3d)
+c
+      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, Ma, zx_tmp_3d)
+      CALL histwrite(nid_mth,"Ma",itau_w,zx_tmp_3d,
+     .                                   iim*jjmp1*klev,ndex3d)
+c
+      CALL gr_fi_ecrit(1, klon,iim,jjmp1, prw,zx_tmp_2d)
+      CALL histwrite(nid_mth,"prw",itau_w,zx_tmp_2d,
+     .               iim*jjmp1,ndex2d)
 c
       ENDIF
@@ -307,10 +325,10 @@
      .                                   iim*jjmp1*klev,ndex3d)
 c
+      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, clwcon0, zx_tmp_3d)
+      CALL histwrite(nid_mth,"clwcon",itau_w,zx_tmp_3d,
+     .                                   iim*jjmp1*klev,ndex3d)
+c
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldliq, zx_tmp_3d)
       CALL histwrite(nid_mth,"oliq",itau_w,zx_tmp_3d,
-     .                                   iim*jjmp1*klev,ndex3d)
-c
-      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, clwcon0, zx_tmp_3d)
-      CALL histwrite(nid_mth,"clwcon",itau_w,zx_tmp_3d,
      .                                   iim*jjmp1*klev,ndex3d)
 c
@@ -439,25 +457,6 @@
       ENDDO
       ENDIF
-cKE43
-      IF (iflag_con.GE.3) THEN ! (sb)
-c
-      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, upwd, zx_tmp_3d)
-      CALL histwrite(nid_mth,"upwd",itau_w,zx_tmp_3d,
-     .                                   iim*jjmp1*klev,ndex3d)
-c
-      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, dnwd, zx_tmp_3d)
-      CALL histwrite(nid_mth,"dnwd",itau_w,zx_tmp_3d,
-     .                                   iim*jjmp1*klev,ndex3d)
-c
-      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, dnwd0, zx_tmp_3d)
-      CALL histwrite(nid_mth,"dnwd0",itau_w,zx_tmp_3d,
-     .                                   iim*jjmp1*klev,ndex3d)
-c
-      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, Ma, zx_tmp_3d)
-      CALL histwrite(nid_mth,"Ma",itau_w,zx_tmp_3d,
-     .                                   iim*jjmp1*klev,ndex3d)
-c
-cccIM
-c      zx_tmp_fi2d(1 : klon) = ZFSUP( 1 : klon, klevp1)
+c
+c     zx_tmp_fi2d(1 : klon) = ZFSUP( 1 : klon, klevp1)
       zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, 2 )
       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
@@ -483,9 +482,4 @@
      .                               iim*jjmp1,ndex2d)
 c
-      CALL gr_fi_ecrit(1, klon,iim,jjmp1, prw,zx_tmp_2d)
-      CALL histwrite(nid_mth,"prw",itau_w,zx_tmp_2d,
-     .               iim*jjmp1,ndex2d)
-
-cccIM clear sky
 c      zx_tmp_fi2d(1 : klon) = ZFSUP0( 1 : klon, klevp1)
       zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, 2 )
@@ -501,4 +495,5 @@
 c
 c      zx_tmp_fi2d(1 : klon) = ZFSDN0( 1 : klon, klevp1)
+      zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, 2 )
       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
       CALL histwrite(nid_mth, "SWdnTOAclr",itau_w,zx_tmp_2d,
@@ -511,6 +506,4 @@
      .                               iim*jjmp1,ndex2d)
 c
-      ENDIF
-c
 c  Champs interpolles sur des niveaux de pression
 
@@ -538,11 +531,7 @@
       CALL gr_fi_ecrit(1, klon,iim,jjmp1, w500,zx_tmp_2d)
       CALL histwrite(nid_mth,"w500",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
-
-
-      
-
+c
       if (ok_sync) then
         call histsync(nid_mth)
       endif
-       ENDIF
-
+      ENDIF
