Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F	(revision 295)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F	(revision 301)
@@ -689,5 +689,5 @@
 cKE43
 c Initialisation pour la convection de K.E. (sb):
-         IF (iflag_con.EQ.4) THEN
+         IF (iflag_con.GE.3) THEN
 
          PRINT*, "*** Convection de Kerry Emanuel 4.3  "
@@ -1228,7 +1228,6 @@
      .                iim,jjmp1,nhori, 1,1,1, -99, 32, 
      .                "ave(X)", zsto,zout)
-c
 cKE43
-      IF (iflag_con .EQ. 4) THEN ! sb
+      IF (iflag_con .GE. 3) THEN ! sb
 c
          CALL histdef(nid_mth, "cape", "Conv avlbl pot ener", "J/Kg",
@@ -1335,9 +1334,9 @@
 
          CALL histdef(nid_mth, "ptconv", "POINTS CONVECTIFS"," ",
-     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
          CALL histdef(nid_mth, "ratqs", "RATQS"," ",
-     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+     .                iim,jjmp1,nhori, klev,1,klev,nvert, 32,
      .                "ave(X)", zsto,zout)
 
@@ -1415,5 +1414,5 @@
 c
 cKE43
-      IF (iflag_con.EQ.4) THEN ! (sb)
+      IF (iflag_con.GE.3) THEN ! (sb)
 c
          CALL histdef(nid_mth, "upwd", "saturated updraft", "Kg/m2/s",
@@ -1960,11 +1959,5 @@
          itop_con(i) = klev+1 - kctop(i)
       ENDDO
-      ELSE IF (iflag_con.EQ.3) THEN
-          stop'reactiver le call conlmd dans physiq.F'
-c     CALL conccm (dtime,paprs,pplay,t_seri,q_seri,conv_q,
-c    s             d_t_con, d_q_con, 
-c    s             rain_con, snow_con, ibas_con, itop_con)
-cKE43
-      ELSE IF (iflag_con.EQ.4) THEN
+      ELSE IF (iflag_con.GE.3) THEN
 c nb of tracers for the KE convection:
           if (nqmax .GE. 4) then
@@ -1973,16 +1966,5 @@
               ntra = 1 
           endif
-cke43 (arguments inutiles enleves => des SAVE dans conema43?)
-c$$$          CALL conema43(dtime,paprs,pplay,t_seri,q_seri,
-c$$$     $        u_seri,v_seri,tr_seri,nbtr,
-c$$$     .        ema_workcbmf,
-c$$$     .        d_t_con,d_q_con,d_u_con,d_v_con,d_tr,
-c$$$     .        wdn, tdn, qdn,
-c$$$     .        rain_con, snow_con, ibas_con, itop_con,
-c$$$     .        upwd,dnwd,dnwd0,bas,top,Ma,cape,tvp,rflag,
-c$$$     .        pbase
-c$$$     .        ,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr,
-c$$$     .        pori_con,plcl_con,dtma_con,dtlcl_con)
-          if (0.eq.1) then ! vectorise
+          if (iflag_con.eq.4) then ! vectorise
           CALL conemav (dtime,paprs,pplay,t_seri,q_seri,
      .        u_seri,v_seri,tr_seri,nbtr,
@@ -1993,19 +1975,17 @@
 c    .        Ma,cape,tvp,(/(nint(rflag(i)),i=1,size(rflag))/),
      .        Ma,cape,tvp,iflagctrl,
+     .        pbase,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr)
+
+          else
+
+          CALL conema (dtime,paprs,pplay,t_seri,q_seri,
+     .        u_seri,v_seri,tr_seri,nbtr,
+     .        ema_work1,ema_work2,
+     .        d_t_con,d_q_con,d_u_con,d_v_con,d_tr,
+     .        rain_con, snow_con, ibas_con, itop_con,
+     .        upwd,dnwd,dnwd0,bas,top,
+     .        Ma,cape,tvp,rflag,
      .       pbase
      .        ,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr)
-
-          else
-
-          CALL conema (dtime,paprs,pplay,t_seri,q_seri,
-     $        u_seri,v_seri,tr_seri,nbtr,
-     .        ema_work1,ema_work2,
-     .        d_t_con,d_q_con,d_u_con,d_v_con,d_tr,
-c$$$     .        wdn, tdn, qdn,
-     .        rain_con, snow_con, ibas_con, itop_con,
-     .        upwd,dnwd,dnwd0,bas,top,Ma,cape,tvp,rflag,
-     .        pbase
-     .        ,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr)
-c$$$     .        pori_con,plcl_con,dtma_con,dtlcl_con)
           endif
           DO i = 1, klon
@@ -2072,9 +2052,9 @@
       IF (nqmax.GT.2) THEN !--melange convectif de traceurs
 c
-          IF (iflag_con .NE. 2 .AND.  iflag_con .NE. 4 ) THEN 
+          IF (iflag_con .LT. 2 .AND.  iflag_con .GT. 4 ) THEN 
               PRINT*, 'Pour l instant, seul conflx fonctionne ',
      $            'avec traceurs', iflag_con
               PRINT*,' Mettre iflag_con', 
-     $            ' = 2  ou 4 dans run.def et repasser'
+     $            ' = 2, 3 ou 4 dans run.def et repasser'
               CALL abort
               ENDIF 
@@ -2348,5 +2328,5 @@
 C Pascale : il faut quand meme apeller phytrac car il gere les sorties
 cKE43       des traceurs => il faut donc mettre des flags a .false.
-      IF (iflag_con.EQ.4) THEN
+      IF (iflag_con.GE.3) THEN
 c           on ajoute les tendances calculees par KE43
 c$$$ OM on onhibe la convection sur les traceurs
@@ -2893,5 +2873,5 @@
       CALL histwrite(nid_mth,"vq",itap,zx_tmp_2d,iim*jjmp1,ndex2d)
 cKE43
-      IF (iflag_con .EQ. 4) THEN ! sb
+      IF (iflag_con .GE. 3) THEN ! sb
 c
       CALL gr_fi_ecrit(1, klon,iim,jjmp1, cape,zx_tmp_2d)
@@ -2995,9 +2975,9 @@
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zpt_conv, zx_tmp_3d)
       CALL histwrite(nid_mth,"ptconv",itap,zx_tmp_3d,
-     .                                   iim*(jjm+1)*klev,ndex3d)
+     .                                   iim*(jjmp1)*klev,ndex3d)
 c
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, ratqs, zx_tmp_3d)
       CALL histwrite(nid_mth,"ratqs",itap,zx_tmp_3d,
-     .                                   iim*(jjm+1)*klev,ndex3d)
+     .                                   iim*(jjmp1)*klev,ndex3d)
 c
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, d_t_ajs, zx_tmp_3d)
@@ -3072,5 +3052,5 @@
       ENDIF
 cKE43
-      IF (iflag_con.EQ.4) THEN ! (sb)
+      IF (iflag_con.GE.3) THEN ! (sb)
 c
       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, upwd, zx_tmp_3d)
