CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
GFS_MP_generic_pre.F90
1
4
7 contains
8
12 subroutine gfs_mp_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, progsigma, ntcw, nncl, &
13 ntrac, gt0, gq0, save_t, save_q, num_dfi_radar, errmsg, errflg)
14!
15 use machine, only: kind_phys
16
17 implicit none
18 integer, intent(in) :: im, levs, ntcw, nncl, ntrac, num_dfi_radar
19 logical, intent(in) :: ldiag3d, qdiag3d, do_aw, progsigma
20 real(kind=kind_phys), dimension(:,:), intent(in) :: gt0
21 real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0
22
23 real(kind=kind_phys), dimension(:,:), intent(inout) :: save_t
24 real(kind=kind_phys), dimension(:,:,:), intent(inout) :: save_q
25
26 character(len=*), intent(out) :: errmsg
27 integer, intent(out) :: errflg
28
29 integer :: i, k, n
30
31 ! Initialize CCPP error handling variables
32 errmsg = ''
33 errflg = 0
34
35 if (ldiag3d .or. do_aw .or. num_dfi_radar>0) then
36 do k=1,levs
37 do i=1,im
38 save_t(i,k) = gt0(i,k)
39 enddo
40 enddo
41 endif
42 if (ldiag3d .or. do_aw .or. progsigma) then
43 if(qdiag3d) then
44 do n=1,ntrac
45 do k=1,levs
46 do i=1,im
47 save_q(i,k,n) = gq0(i,k,n)
48 enddo
49 enddo
50 enddo
51 else if(do_aw .or. progsigma) then
52 ! if qdiag3d, all q are saved already
53 save_q(1:im,:,1) = gq0(1:im,:,1)
54 do n=ntcw,ntcw+nncl-1
55 save_q(1:im,:,n) = gq0(1:im,:,n)
56 enddo
57 endif
58 endif
59
60 end subroutine gfs_mp_generic_pre_run
61
62 end module gfs_mp_generic_pre
This module contains the CCPP-compliant MP generic pre interstitial codes.