/[lmdze]/trunk/Sources/phylmd/cv_driver.f
ViewVC logotype

Diff of /trunk/Sources/phylmd/cv_driver.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 82 by guez, Wed Mar 5 14:57:53 2014 UTC revision 91 by guez, Wed Mar 26 17:18:58 2014 UTC
# Line 9  contains Line 9  contains
9         sig1, w01, icb1, inb1, delt, Ma1, upwd1, dnwd1, dnwd01, qcondc1, wd1, &         sig1, w01, icb1, inb1, delt, Ma1, upwd1, dnwd1, dnwd01, qcondc1, wd1, &
10         cape1, da1, phi1, mp1)         cape1, da1, phi1, mp1)
11    
12      ! From LMDZ4/libf/phylmd/cv_driver.F, version 1.3 2005/04/15 12:36:17      ! From LMDZ4/libf/phylmd/cv_driver.F, version 1.3, 2005/04/15 12:36:17
13    
14      ! Main driver for convection      ! Main driver for convection
15    
16      ! S. Bony, Mar 2002:      ! S. Bony, March 2002:
17    
18      ! Several modules corresponding to different physical processes      ! Several modules corresponding to different physical processes
19    
20      ! Several versions of convect may be used:      ! Several versions of convect may be used:
21      ! - iflag_con=3: version lmd  (previously named convect3)      ! - iflag_con = 3: version lmd  (previously named convect3)
22      ! - iflag_con=4: version 4.3b (vect. version, previously convect1/2)      ! - iflag_con = 4: version 4.3b (vect. version, previously convect1/2)
23    
24      ! Plus tard :      ! Plus tard :
25      ! - iflag_con=5: version lmd with ice (previously named convectg)      ! - iflag_con = 5: version lmd with ice (previously named convectg)
26    
27      ! S. Bony, Oct 2002:      ! S. Bony, Oct 2002:
28      ! Vectorization of convect3 (ie version lmd)      ! Vectorization of convect3 (ie version lmd)
29    
30      use clesphys2, only: iflag_con      use clesphys2, only: iflag_con
31        use cv3_compress_m, only: cv3_compress
32      use cv3_param_m, only: cv3_param      use cv3_param_m, only: cv3_param
33      USE dimphy, ONLY: klev, klon      USE dimphy, ONLY: klev, klon
34    
# Line 69  contains Line 70  contains
70      real, intent(in):: t1(len, nd)      real, intent(in):: t1(len, nd)
71      real q1(len, nd)      real q1(len, nd)
72      real qs1(len, nd)      real qs1(len, nd)
73      real u1(len, nd)      real, intent(in):: u1(len, nd)
74      real v1(len, nd)      real, intent(in):: v1(len, nd)
75      real, intent(in):: tra1(len, nd, ntra)      real, intent(in):: tra1(len, nd, ntra)
76      real p1(len, nd)      real p1(len, nd)
77      real ph1(len, ndp1)      real ph1(len, ndp1)
# Line 247  contains Line 248  contains
248      ! (local) compressed fields:      ! (local) compressed fields:
249    
250      integer nloc      integer nloc
251      parameter (nloc=klon) ! pour l'instant      parameter (nloc = klon) ! pour l'instant
252    
253      integer idcum(nloc)      integer idcum(nloc)
254      integer iflag(nloc), nk(nloc), icb(nloc)      integer iflag(nloc), nk(nloc), icb(nloc)
# Line 318  contains Line 319  contains
319      ! --- INITIALIZE OUTPUT ARRAYS AND PARAMETERS      ! --- INITIALIZE OUTPUT ARRAYS AND PARAMETERS
320      !---------------------------------------------------------------------      !---------------------------------------------------------------------
321    
322      do k=1, nd      do k = 1, nd
323         do  i=1, len         do  i = 1, len
324            ft1(i, k)=0.0            ft1(i, k) = 0.0
325            fq1(i, k)=0.0            fq1(i, k) = 0.0
326            fu1(i, k)=0.0            fu1(i, k) = 0.0
327            fv1(i, k)=0.0            fv1(i, k) = 0.0
328            tvp1(i, k)=0.0            tvp1(i, k) = 0.0
329            tp1(i, k)=0.0            tp1(i, k) = 0.0
330            clw1(i, k)=0.0            clw1(i, k) = 0.0
331            !ym            !ym
332            clw(i, k)=0.0            clw(i, k) = 0.0
333            gz1(i, k) = 0.            gz1(i, k)  =  0.
334            VPrecip1(i, k) = 0.            VPrecip1(i, k) = 0.
335            Ma1(i, k)=0.0            Ma1(i, k) = 0.0
336            upwd1(i, k)=0.0            upwd1(i, k) = 0.0
337            dnwd1(i, k)=0.0            dnwd1(i, k) = 0.0
338            dnwd01(i, k)=0.0            dnwd01(i, k) = 0.0
339            qcondc1(i, k)=0.0            qcondc1(i, k) = 0.0
340         end do         end do
341      end do      end do
342    
343      do  j=1, ntra      do  j = 1, ntra
344         do  k=1, nd         do  k = 1, nd
345            do  i=1, len            do  i = 1, len
346               ftra1(i, k, j)=0.0               ftra1(i, k, j) = 0.0
347            end do            end do
348         end do         end do
349      end do      end do
350    
351      do  i=1, len      do  i = 1, len
352         precip1(i)=0.0         precip1(i) = 0.0
353         iflag1(i)=0         iflag1(i) = 0
354         wd1(i)=0.0         wd1(i) = 0.0
355         cape1(i)=0.0         cape1(i) = 0.0
356         VPrecip1(i, nd+1)=0.0         VPrecip1(i, nd+1) = 0.0
357      end do      end do
358    
359      if (iflag_con.eq.3) then      if (iflag_con.eq.3) then
360         do il=1, len         do il = 1, len
361            sig1(il, nd)=sig1(il, nd) + 1.            sig1(il, nd) = sig1(il, nd) + 1.
362            sig1(il, nd) = min(sig1(il, nd), 12.1)            sig1(il, nd)  =  min(sig1(il, nd), 12.1)
363         enddo         enddo
364      endif      endif
365    
# Line 420  contains Line 421  contains
421         CALL cv_trigger(len, nd, icb1, cbmf1, tv1, tvp1, iflag1)         CALL cv_trigger(len, nd, icb1, cbmf1, tv1, tvp1, iflag1)
422      endif      endif
423    
     !=====================================================================  
424      ! --- IF THIS POINT IS REACHED, MOIST CONVECTIVE ADJUSTMENT IS NECESSARY      ! --- IF THIS POINT IS REACHED, MOIST CONVECTIVE ADJUSTMENT IS NECESSARY
     !=====================================================================  
425    
426      ncum=0      ncum = 0
427      do  i=1, len      do  i = 1, len
428         if(iflag1(i).eq.0)then         if(iflag1(i).eq.0)then
429            ncum=ncum+1            ncum = ncum+1
430            idcum(ncum)=i            idcum(ncum) = i
431         endif         endif
432      end do      end do
433    
# Line 579  contains Line 578  contains
578         !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^         !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
579         ! --- UNCOMPRESS THE FIELDS         ! --- UNCOMPRESS THE FIELDS
580         !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^         !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
581         ! set iflag1 =42 for non convective points         ! set iflag1  = 42 for non convective points
582         do  i=1, len         do  i = 1, len
583            iflag1(i)=42            iflag1(i) = 42
584         end do         end do
585    
586         if (iflag_con.eq.3) then         if (iflag_con.eq.3) then

Legend:
Removed from v.82  
changed lines
  Added in v.91

  ViewVC Help
Powered by ViewVC 1.1.21