/[lmdze]/trunk/Sources/phylmd/CV30_routines/cv30_compress.f
ViewVC logotype

Diff of /trunk/Sources/phylmd/CV30_routines/cv30_compress.f

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

revision 196 by guez, Mon May 23 13:50:39 2016 UTC revision 198 by guez, Tue May 31 16:17:35 2016 UTC
# Line 4  module cv30_compress_m Line 4  module cv30_compress_m
4    
5  contains  contains
6    
7    SUBROUTINE cv30_compress(iflag1, nk1, icb1, icbs1, plcl1, tnk1, qnk1, &    SUBROUTINE cv30_compress(iflag1, icb1, icbs1, plcl1, tnk1, qnk1, gznk1, &
8         gznk1, pbase1, buoybase1, t1, q1, qs1, u1, v1, gz1, th1, h1, lv1, cpn1, &         pbase1, buoybase1, t1, q1, qs1, u1, v1, gz1, th1, h1, lv1, cpn1, p1, &
9         p1, ph1, tv1, tp1, tvp1, clw1, sig1, w01, nk, icb, icbs, plcl, tnk, &         ph1, tv1, tp1, tvp1, clw1, sig1, w01, icb, icbs, plcl, tnk, qnk, gznk, &
10         qnk, gznk, pbase, buoybase, t, q, qs, u, v, gz, th, h, lv, cpn, p, ph, &         pbase, buoybase, t, q, qs, u, v, gz, th, h, lv, cpn, p, ph, tv, tp, &
11         tv, tp, tvp, clw, sig, w0)         tvp, clw, sig, w0)
12    
13      ! Compress the fields (vectorization over convective gridpoints).      ! Compress the fields (vectorization over convective gridpoints).
14    
15      use cv30_param_m, only: nl      use cv30_param_m, only: nl
16      USE dimphy, ONLY: klev, klon      USE dimphy, ONLY: klev, klon
17        use nr_util, only: assert
18    
19      ! inputs:      ! inputs:
20      integer, intent(in):: iflag1(:), nk1(:), icb1(:), icbs1(:) ! (klon)      integer, intent(in):: iflag1(:), icb1(:), icbs1(:) ! (klon)
21      real, intent(in):: plcl1(klon), tnk1(klon), qnk1(klon), gznk1(klon)      real, intent(in):: plcl1(klon), tnk1(klon), qnk1(klon), gznk1(klon)
22      real pbase1(klon), buoybase1(klon)      real pbase1(klon), buoybase1(klon)
23      real, intent(in):: t1(klon, klev)      real, intent(in):: t1(klon, klev)
# Line 30  contains Line 31  contains
31      real sig1(klon, klev), w01(klon, klev)      real sig1(klon, klev), w01(klon, klev)
32    
33      ! outputs:      ! outputs:
34      integer nk(:) ! (klon)      integer, intent(out):: icb(:) ! (ncum) {2 <= icb <= nl - 3}
   
     integer, intent(out):: icb(:) ! (ncum)  
     ! {2 <= icb <= nl - 3}  
     ! {ph(i, icb(i) + 1) < plcl(i) <= ph(i, icb(i))}  
   
35      integer icbs(klon)      integer icbs(klon)
36      real, intent(out):: plcl(:) ! (ncum)      real, intent(out):: plcl(:) ! (ncum)
37      real tnk(:), qnk(:), gznk(:) ! (klon)      real tnk(:), qnk(:), gznk(:) ! (klon)
# Line 95  contains Line 91  contains
91            tnk(nn) = tnk1(i)            tnk(nn) = tnk1(i)
92            qnk(nn) = qnk1(i)            qnk(nn) = qnk1(i)
93            gznk(nn) = gznk1(i)            gznk(nn) = gznk1(i)
           nk(nn) = nk1(i)  
94            icb(nn) = icb1(i)            icb(nn) = icb1(i)
95            icbs(nn) = icbs1(i)            icbs(nn) = icbs1(i)
96         endif         endif
97      end do      end do
98    
99        do i = 1, ncum
100           call assert(2 <= icb(i) .and. icb(i) <= nl - 3 .and. ph(i, icb(i) + 1) &
101                < plcl(i) .and. (plcl(i) <= ph(i, icb(i)) .or. icb(i) == 2), &
102                "cv30_compress")
103        end do
104    
105    end SUBROUTINE cv30_compress    end SUBROUTINE cv30_compress
106    
107  end module cv30_compress_m  end module cv30_compress_m

Legend:
Removed from v.196  
changed lines
  Added in v.198

  ViewVC Help
Powered by ViewVC 1.1.21