CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
GFS_PBL_generic_common.F90
1
3
5
6 implicit none
7
8 private
9
10 public :: set_aerosol_tracer_index
11
12 contains
13
14 subroutine set_aerosol_tracer_index(imp_physics, imp_physics_wsm6, &
15 imp_physics_thompson, ltaerosol,mraerosol, &
16 imp_physics_mg, ntgl, imp_physics_gfdl, &
17 imp_physics_zhao_carr, imp_physics_nssl,&
18 nssl_hail_on, nssl_ccn_on, kk, &
19 errmsg, errflg)
20 implicit none
21 !
22 integer, intent(in ) :: imp_physics, imp_physics_wsm6, &
23 imp_physics_thompson, &
24 imp_physics_mg, ntgl, imp_physics_gfdl, &
25 imp_physics_zhao_carr,imp_physics_nssl
26 logical, intent(in ) :: ltaerosol, mraerosol, nssl_hail_on, nssl_ccn_on
27 integer, intent(out) :: kk
28 character(len=*), intent(out) :: errmsg
29 integer, intent(out) :: errflg
30
31 errflg = 0
32
33! Set Interstitial%kk = last index in diffused tracer array before chemistry-aerosol tracers
34 if (imp_physics == imp_physics_wsm6) then
35! WSM6
36 kk = 4
37 elseif (imp_physics == imp_physics_thompson) then
38! Thompson
39 if(ltaerosol) then
40 kk = 12
41 else if(mraerosol) then
42 kk = 10
43 else
44 kk = 9
45 endif
46! MG
47 elseif (imp_physics == imp_physics_mg) then
48 if (ntgl > 0) then
49 kk = 12
50 else
51 kk = 10
52 endif
53 elseif (imp_physics == imp_physics_gfdl) then
54! GFDL MP
55 kk = 7
56 elseif (imp_physics == imp_physics_zhao_carr) then
57! Zhao/Carr/Sundqvist
58 kk = 3
59 elseif (imp_physics == imp_physics_nssl) then
60 IF ( nssl_hail_on ) THEN
61 kk = 16
62 ELSE
63 kk = 13
64 ENDIF
65 IF ( nssl_ccn_on ) kk = kk + 1
66 else
67 write(errmsg,'(*(a))') 'Logic error: unknown microphysics option in set_aerosol_tracer_index'
68 kk = -999
69 errflg = 1
70 return
71 endif
72
73 end subroutine set_aerosol_tracer_index
74
75 end module gfs_pbl_generic_common