Skip to content

Commit

Permalink
Microphysics: take care of some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
CasparJungbacker committed Nov 6, 2024
1 parent a047535 commit 3607836
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions src/bulkmicro_kk.f90
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module bulkmicro_kk
use modprecision, only: field_r
use modtimer, only: timer_tic, timer_toc


implicit none

private
Expand Down Expand Up @@ -427,6 +428,7 @@ subroutine sedimentation_rain(qr, Nr, rhof, dzf, qrbase, qrroof, qrmask, &

end subroutine sedimentation_rain

#ifdef DALES_GPU
!> Calculate the sedimentation term. Optimized for GPU's.
!!
!! \param qr Rain water mixing ratio.
Expand Down Expand Up @@ -611,5 +613,6 @@ subroutine sedimentation_rain_gpu(qr, Nr, rhof, dzf, qrbase, qrroof, qrmask, &
call timer_toc('bulkmicro_kk/sedimentation_rain')

end subroutine sedimentation_rain_gpu
#endif

end module bulkmicro_kk
18 changes: 9 additions & 9 deletions src/bulkmicro_sb.f90
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ subroutine accretion(ql0, qr, Nr, exnf, rhof, qcbase, qcroof, qrbase, qrroof, &
sc = k_rr *rhof(k)* qr(i,j,k) * Nr(i,j,k) &
* (1 + kappa_r / lbdr(i,j,k) * pirhow**(1.0_field_r/3))**(-9) &
* (1.225_field_r / rhof(k))**0.5_field_r
if (Dvr(i,j,k) .gt. 0.30_field_rE-3) then
if (Dvr(i,j,k) .gt. 0.30E-3_field_r) then
phi_br = k_br * (Dvr(i,j,k) - D_eq)
br = (phi_br + 1) * sc
else
Expand Down Expand Up @@ -500,10 +500,9 @@ subroutine sedimentation_rain(qr, Nr, rhof, dzf, qrbase, qrroof, qrmask, &
real(field_r), intent(inout) :: Nrp(2:i1,2:j1,1:k1)
real(field_r), intent(out) :: precep(2:i1,2:j1,1:k1)

integer :: i, j, k, jn, sedimbase
integer :: i, j, k, jn
integer :: n_spl !< sedimentation time splitting loop
real(field_r) :: pwcont
real(field_r) :: delt_inv
real(field_r) :: Dgr !< lognormal geometric diameter
real(field_r) :: wfall_qr !< fall velocity for qr
real(field_r) :: wfall_Nr !< fall velocity for Nr
Expand Down Expand Up @@ -623,6 +622,7 @@ subroutine sedimentation_rain(qr, Nr, rhof, dzf, qrbase, qrroof, qrmask, &

end subroutine sedimentation_rain

#ifdef DALES_GPU
!> Calculate the sedimentation term.
!!
!! \param qr Rain water mixing ratio.
Expand Down Expand Up @@ -913,7 +913,7 @@ subroutine sedimentation_rain_gpu(qr, Nr, rhof, dzf, qrbase, qrroof, qrmask, &
call timer_toc('bulkmicro_sb/sedimentation_rain')

end subroutine sedimentation_rain_gpu

#endif

real function sed_flux(Nin, Din, sig2, Ddiv, nnn)
!*********************************************************************
Expand Down Expand Up @@ -1025,11 +1025,11 @@ real function erfint(beta, D, D_min, D_max, sig2,nnn )
real(field_r), intent(in) :: beta, D, D_min, D_max, sig2
integer, intent(in) :: nnn

real(field_r), parameter :: eps = 1e-10 &
,a1 = 0.278393 & !a1 till a4 constants in polynomial fit to the error
,a2 = 0.230389 & !function 7.1.27 in Abramowitz and Stegun
,a3 = 0.000972 &
,a4 = 0.078108
real(field_r), parameter :: eps = 1e-10
! ,a1 = 0.278393 & !a1 till a4 constants in polynomial fit to the error
! ,a2 = 0.230389 & !function 7.1.27 in Abramowitz and Stegun
! ,a3 = 0.000972 &
! ,a4 = 0.078108
real(field_r) :: nn, ymin, ymax, erfymin, erfymax, D_inv

D_inv = 1./(eps + D)
Expand Down

0 comments on commit 3607836

Please sign in to comment.