LCOV - code coverage report
Current view: top level - chemistry/bulk_aero - aerosol_depvel.F90 (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 36 0.0 %
Date: 2025-01-13 21:54:50 Functions: 0 1 0.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! used for dust and seasalt 
       3             : !--------------------------------------------------------------------------------
       4             : module aerosol_depvel
       5             : 
       6             : contains
       7             : 
       8             : !--------------------------------------------------------------------------------
       9             : ! settling velocity
      10             : !--------------------------------------------------------------------------------
      11           0 : subroutine aerosol_depvel_compute( ncol, nlev, naero, t, pmid, ram1, fv, diam, stk_crc, dns_aer, &
      12           0 :                                    vlc_dry, vlc_trb, vlc_grv )
      13             : 
      14             :   use shr_kind_mod, only: r8 => shr_kind_r8
      15             :   use physconst,    only: pi, gravit, rair, boltz
      16             : 
      17             :   ! !ARGUMENTS:
      18             :   !
      19             :   implicit none
      20             :   !
      21             :   integer,  intent(in) :: ncol,nlev
      22             :   integer,  intent(in) :: naero
      23             :   real(r8), intent(in) :: t(:,:)          !atm temperature (K)
      24             :   real(r8), intent(in) :: pmid(:,:)       !atm pressure (Pa)
      25             :   real(r8), intent(in) :: fv(:)           !friction velocity (m/s)
      26             :   real(r8), intent(in) :: ram1(:)         !aerodynamical resistance (s/m)
      27             :   real(r8), intent(in) :: diam(:,:,:)
      28             :   real(r8), intent(in) :: stk_crc(:)
      29             :   real(r8), intent(in) :: dns_aer
      30             : 
      31             :   real(r8), intent(out) :: vlc_trb(:,:)    !Turbulent deposn velocity (m/s)
      32             :   real(r8), intent(out) :: vlc_grv(:,:,:)  !grav deposn velocity (m/s)
      33             :   real(r8), intent(out) :: vlc_dry(:,:,:)  !dry deposn velocity (m/s)
      34             : 
      35             :   !------------------------------------------------------------------------
      36             :   ! Local Variables
      37             :   integer  :: m,i,k          !indices
      38           0 :   real(r8) :: vsc_dyn_atm(ncol,nlev)   ![kg m-1 s-1] Dynamic viscosity of air
      39           0 :   real(r8) :: vsc_knm_atm(ncol,nlev)   ![m2 s-1] Kinematic viscosity of atmosphere
      40             :   real(r8) :: shm_nbr_xpn   ![frc] Sfc-dep exponent for aerosol-diffusion dependence on Schmidt number
      41             :   real(r8) :: shm_nbr       ![frc] Schmidt number
      42             :   real(r8) :: stk_nbr       ![frc] Stokes number
      43           0 :   real(r8) :: mfp_atm(ncol,nlev)       ![m] Mean free path of air
      44             :   real(r8) :: dff_aer       ![m2 s-1] Brownian diffusivity of particle
      45             :   real(r8) :: rss_trb       ![s m-1] Resistance to turbulent deposition
      46           0 :   real(r8) :: slp_crc(ncol,nlev,naero) ![frc] Slip correction factor
      47           0 :   real(r8) :: rss_lmn(naero) ![s m-1] Quasi-laminar layer resistance
      48             :   real(r8) :: tmp          !temporary 
      49             : 
      50             :   ! constants
      51             :   real(r8),parameter::shm_nbr_xpn_lnd=-2._r8/3._r8 ![frc] shm_nbr_xpn over land
      52             :   real(r8),parameter::shm_nbr_xpn_ocn=-1._r8/2._r8 ![frc] shm_nbr_xpn over ccean
      53             : 
      54             :   real(r8) :: rho                 !atm density (kg/m**3)
      55             : 
      56             :   ! needs fv and ram1 passed in from lnd model
      57             : 
      58             :   !------------------------------------------------------------------------
      59             : 
      60           0 :   do k=1,nlev
      61           0 :      do i=1,ncol
      62           0 :         rho = pmid(i,k)/rair/t(i,k)
      63             :         ! from subroutine dst_dps_dry (consider adding sanity checks from line 212)
      64             :         ! when code asks to use midlayer density, pressure, temperature,
      65             :         ! I use the data coming in from the atmosphere, ie t(i,k), pmid(i,k)
      66             : 
      67             :         ! Quasi-laminar layer resistance: call rss_lmn_get
      68             :         ! Size-independent thermokinetic properties
      69           0 :         vsc_dyn_atm(i,k) = 1.72e-5_r8 * ((t(i,k)/273.0_r8)**1.5_r8) * 393.0_r8 / &
      70           0 :              (t(i,k)+120.0_r8)      ![kg m-1 s-1] RoY94 p. 102
      71             :         mfp_atm(i,k) = 2.0_r8 * vsc_dyn_atm(i,k) / &   ![m] SeP97 p. 455
      72           0 :              (pmid(i,k)*sqrt(8.0_r8/(pi*rair*t(i,k))))
      73           0 :         vsc_knm_atm(i,k) = vsc_dyn_atm(i,k) / rho ![m2 s-1] Kinematic viscosity of air
      74             : 
      75           0 :         do m = 1, naero
      76           0 :            slp_crc(i,k,m) = 1.0_r8 + 2.0_r8 * mfp_atm(i,k) * &
      77           0 :                 (1.257_r8+0.4_r8*exp(-1.1_r8*diam(i,k,m)/(2.0_r8*mfp_atm(i,k)))) / &
      78           0 :                 diam(i,k,m)   ![frc] Slip correction factor SeP97 p. 464
      79           0 :            vlc_grv(i,k,m) = (1.0_r8/18.0_r8) * diam(i,k,m) * diam(i,k,m) * dns_aer * &
      80           0 :                 gravit * slp_crc(i,k,m) / vsc_dyn_atm(i,k) ![m s-1] Stokes' settling velocity SeP97 p. 466
      81           0 :            vlc_grv(i,k,m) = vlc_grv(i,k,m) * stk_crc(m)         ![m s-1] Correction to Stokes settling velocity
      82           0 :            vlc_dry(i,k,m)=vlc_grv(i,k,m)
      83             :         end do
      84             : 
      85             :      enddo
      86             :   enddo
      87           0 :   k=nlev  ! only look at bottom level for next part
      88           0 :   do m = 1, naero
      89           0 :      do i=1,ncol
      90           0 :         stk_nbr = vlc_grv(i,k,m) * fv(i) * fv(i) / (gravit*vsc_knm_atm(i,k))    ![frc] SeP97 p.965
      91           0 :         dff_aer = boltz * t(i,k) * slp_crc(i,k,m) / &    ![m2 s-1]
      92           0 :              (3.0_r8*pi*vsc_dyn_atm(i,k)*diam(i,k,m)) !SeP97 p.474
      93           0 :         shm_nbr = vsc_knm_atm(i,k) / dff_aer                        ![frc] SeP97 p.972
      94           0 :         shm_nbr_xpn = shm_nbr_xpn_lnd                          ![frc]
      95             :         !           if(ocnfrac.gt.0.5) shm_nbr_xpn=shm_nbr_xpn_ocn
      96             :         ! fxm: Turning this on dramatically reduces
      97             :         ! deposition velocity in low wind regimes
      98             :         ! Schmidt number exponent is -2/3 over solid surfaces and
      99             :         ! -1/2 over liquid surfaces SlS80 p. 1014
     100             :         ! if (oro(i)==0.0) shm_nbr_xpn=shm_nbr_xpn_ocn else shm_nbr_xpn=shm_nbr_xpn_lnd
     101             :         ! [frc] Surface-dependent exponent for aerosol-diffusion dependence on Schmidt # 
     102           0 :         tmp = shm_nbr**shm_nbr_xpn + 10.0_r8**(-3.0_r8/stk_nbr)
     103           0 :         rss_lmn(m) = 1.0_r8 / (tmp*fv(i)) ![s m-1] SeP97 p.972,965
     104             : 
     105           0 :         rss_trb = ram1(i) + rss_lmn(m) + ram1(i)*rss_lmn(m)*vlc_grv(i,k,m) ![s m-1]
     106           0 :         vlc_trb(i,m) = 1.0_r8 / rss_trb                            ![m s-1]
     107           0 :         vlc_dry(i,k,m) = vlc_trb(i,m)  +vlc_grv(i,k,m)
     108             :      end do !ncol
     109             :   end do
     110             : 
     111           0 : end subroutine aerosol_depvel_compute
     112             : 
     113             : end module aerosol_depvel

Generated by: LCOV version 1.14