1 !**********************************************************************************
2 ! This computer software was prepared by Battelle Memorial Institute, hereinafter
3 ! the Contractor, under Contract No. DE-AC05-76RL0 1830 with the Department of
4 ! Energy (DOE). NEITHER THE GOVERNMENT NOR THE CONTRACTOR MAKES ANY WARRANTY,
5 ! EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE.
7 !**********************************************************************************
8 module module_cam_mam_drydep
14 !-----------------------------------------------------------------------
15 subroutine cam_mam_drydep_driver( &
16 id, curr_secs, ktau, dtstep, config_flags, &
18 t_phy, rho_phy, p_phy, &
21 ids,ide, jds,jde, kds,kde, &
22 ims,ime, jms,jme, kms,kme, &
23 its,ite, jts,jte, kts,kte )
25 use module_configure, only: grid_config_rec_type, num_moist, num_chem
26 use module_state_description, only: param_first_scalar
28 USE modal_aero_data, only: ntot_amode_cam_mam => ntot_amode
29 USE module_data_cam_mam_asect, only: ai_phase, &
30 massptr_aer, maxd_aphase, maxd_asize, maxd_atype, &
31 ncomp_aer, nphase_aer, nsize_aer, ntype_aer, numptr_aer, &
37 integer, intent(in) :: &
40 integer, intent(in) :: &
41 ids, ide, jds, jde, kds, kde, &
42 ims, ime, jms, jme, kms, kme, &
43 its, ite, jts, jte, kts, kte
45 real(kind=8), intent(in) :: curr_secs
47 real, intent(in) :: dtstep, gmt
50 dimension( ims:ime, kms:kme, jms:jme ) :: &
54 dimension( ims:ime, jms:jme ) :: &
58 dimension( its:ite, jts:jte ) :: &
62 dimension( ims:ime, kms:kme, jms:jme, 1:num_moist ) :: &
65 real, intent(inout), &
66 dimension( ims:ime, kms:kme, jms:jme, 1:num_chem ) :: &
69 real, intent(inout), &
70 dimension( its:ite, jts:jte, 1:num_chem ) :: &
73 type(grid_config_rec_type), intent(in) :: config_flags
80 integer ktmaps, ktmape
82 integer levdbg_err, levdbg_info
84 integer idiagaa_dum, ijcount_dum
87 real vdep_aer(maxd_asize,maxd_atype,maxd_aphase)
99 ! compute deposition velocities
102 if ((j.ne.jts) .and. (j.ne.jte) .and. &
103 (j.ne.(jts+jte)/2)) idiagaa_dum = 0
104 if ((i.ne.its) .and. (i.ne.ite) .and. &
105 (i.ne.(its+ite)/2)) idiagaa_dum = 0
107 vdep_aer(:,:,:) = 0.0
109 ! rce 23-nov-2004 - change to using the "..._aer" species pointers
110 do iphase = 1, nphase_aer
111 do itype = 1, ntype_aer
112 do n = 1, nsize_aer(itype)
113 do ll = -1, ncomp_aer(itype)
115 l1 = numptr_aer(n,itype,iphase)
116 else if (ll .eq. 0) then
118 if (iphase .eq. ai_phase) l1 = waterptr_aer(n,itype)
120 l1 = massptr_aer(ll,n,itype,iphase)
122 if ((l1 .ge. param_first_scalar) .and. (l1 .le. num_chem)) then
123 ddvel(i,j,l1) = vdep_aer(n,itype,iphase)
133 ! write(*,*) 'leaving cam_mam_drydep_driver'
137 end subroutine cam_mam_drydep_driver
140 !-----------------------------------------------------------------------
141 end module module_cam_mam_drydep