CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
cs_conv_post.F90
1
3
5 contains
6
10 subroutine cs_conv_post_run(im, kmax, do_aw, sigmatot, sigmafrac, errmsg, errflg)
11
12 use machine , only : kind_phys
13
14 implicit none
15
16! --- inputs
17 integer, intent(in) :: im, kmax
18 logical, intent(in) :: do_aw
19 real(kind_phys), dimension(:,:), intent(in) :: sigmatot
20
21! --- input/output
22 real(kind_phys), dimension(:,:), intent(out) :: sigmafrac
23
24 character(len=*), intent(out) :: errmsg
25 integer, intent(out) :: errflg
26
27! --- locals
28 integer :: i, k, kk
29
30 ! Initialize CCPP error handling variables
31 errmsg = ''
32 errflg = 0
33
34 if (do_aw) then
35 do k=1,kmax
36 kk = min(k+1,kmax) ! assuming no cloud top reaches the model top
37 do i=1,im !DD
38 sigmafrac(i,k) = 0.5 * (sigmatot(i,k)+sigmatot(i,kk))
39 enddo
40 enddo
41 endif
42
43 return
44 end subroutine cs_conv_post_run
45
46end module cs_conv_post