Skip to content
Snippets Groups Projects
Commit b50fa341 authored by RODIER Quentin's avatar RODIER Quentin
Browse files

Quentin 20/12/2023: clean mesonh/ext, handle minpack file for temporary transfo in prep_code

change small_3D_lima reference from MesoNH contribution (5.6.1 to 5.7) + all mesonh KTEST reference pack
adapt call of lima and rain_ice in resolved_cloud with respect to change introduced at the merge
parent cd4ccdd8
No related branches found
No related tags found
No related merge requests found
Showing
with 1 addition and 15178 deletions
......@@ -17,7 +17,7 @@
"small_3D_alt10":"00148b1",
"small_3D_alt11":"00148b1",
"small_3D_alt12":"00148b1",
"small_3D_lima":"00148b1",
"small_3D_lima":"cd4ccdd8",
"small_3D_np2":"00148b1",
"big_3D":"00148b1"
}
......
This diff is collapsed.
!ORILAM_LIC Copyright 1994-2018 CNRS, Meteo-France and Universite Paul Sabatier
!ORILAM_LIC This is part of the ORILAM software governed by the CeCILL-C licence
!ORILAM_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!ORILAM_LIC for details.
! ######spl
MODULE MODI_AER_EFFIC
!! ########################
!!
!
INTERFACE
!!
SUBROUTINE AER_EFFIC(PRG,PVGG, & !aerosol radius/fall speed (m/s)
PRHODREF, & !Air density
PMUW, PMU, & !mu water/air
PDPG, PEFC, & !diffusivity, efficiency
PRRS, & ! Rain water m.r. at time
KMODE, & ! Number of aerosol modes
PTEMP, PCOR, & ! air temp, cunningham corr factor
PDENSITY_AER, & ! aerosol density
PRR, PNT ) ! radius and number of rain drops
!
IMPLICIT NONE
REAL, DIMENSION(:,:), INTENT(IN) :: PRG, PVGG
REAL, DIMENSION(:), INTENT(IN) :: PRHODREF
REAL, DIMENSION(:,:), INTENT(IN) :: PDPG
REAL, DIMENSION(:), INTENT(IN) :: PMU, PMUW
REAL, DIMENSION(:,:), INTENT(INOUT) :: PEFC
REAL, DIMENSION(:), INTENT(IN) :: PRRS
REAL, DIMENSION(:), INTENT(IN) :: PTEMP
REAL, DIMENSION(:,:), INTENT(IN) :: PCOR
REAL, DIMENSION(:), INTENT(IN) :: PRR, PNT
INTEGER, INTENT(IN) :: KMODE
REAL, DIMENSION(:,:), INTENT(IN) :: PDENSITY_AER
END SUBROUTINE AER_EFFIC
!!
END INTERFACE
END MODULE MODI_AER_EFFIC
! ######spl
SUBROUTINE AER_EFFIC(PRG,PVGG, & !aerosol radius/fall speed (m/s)
PRHODREF, & !Air density
PMUW, PMU, & !mu water/air
PDPG, PEFC, & !diffusivity, efficiency
PRRT, & ! Rain water m.r. at time t
KMODE, & ! Number of aerosol modes
PTEMP, PCOR, & ! air temp, cunningham corr factor
PDENSITY_AER, & ! aerosol density
PRR, PNT ) ! radius and number of rain drops
!! #######################################
!!**********AER_EFFIC**********
!! PURPOSE
!! -------
!! Calculate the collection efficiency of
! a falling drop interacting with a dust aerosol
! for use with aer_wet_dep_kmt_warm.f90
!!
!!** METHOD
!! ------
!! Using basic theory, and the one dimensional variables sent
!! from aer_wet_dep_kmt_warm.f90, calculation of the average
!! fall speed calculations, chapter 17.3.4, MESONH Handbook
!! droplet number based on the Marshall_Palmer distribution
!! and Stokes number, Reynolds number, etc. based on theory
!! (S&P, p.1019)
!!
!! REFERENCE
!! ---------
!! Seinfeld and Pandis p.1019
!! MESONH Handbook chapter 17.3.4
!!
!! AUTHOR
!! ------
!! K. Crahan Kaku / P. Tulet (CNRM/GMEI)
!!
!! MODIFICATIONS
!! -------------
!! T. Hoarau (LACy) 15/05/17 add LIMA
!! Philippe Wautelet 28/05/2018: corrected truncated integer division (1/12 -> 1./12.)
!! P. Tulet and C. Barthe (LAERO) 15/01/22 correction for lima
!!
!-----------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE MODD_RAIN_ICE_PARAM_n, ONLY : YFSEDR => XFSEDR, YEXSEDR => XEXSEDR
!++cb++
!++th++
USE MODD_RAIN_ICE_DESCR_n, ONLY : YCCR => XCCR, YLBR => XLBR, YLBEXR => XLBEXR, &
YCEXVT => XCEXVT
USE MODD_PARAM_LIMA_WARM, ONLY : WCCR => XCCR, WLBR => XLBR, WLBEXR => XLBEXR, &
XFSEDRR, XFSEDRC
USE MODD_PARAM_LIMA, ONLY : WCEXVT => XCEXVT, WFSEDR => XFSEDR, WFSEDC=>XFSEDC, &
XRTMIN
!--cb--
USE MODD_PARAM_n, ONLY: CCLOUD
!--th--
USE MODD_CST, ONLY : XPI, XRHOLW, XP00, XRD
USE MODD_PARAMETERS , ONLY : JPVEXT
USE MODD_REF, ONLY : XTHVREFZ
!
IMPLICIT NONE
!
!* 0.1 declarations of arguments
REAL, DIMENSION(:,:), INTENT(IN) :: PRG, PVGG
REAL, DIMENSION(:), INTENT(IN) :: PRHODREF
REAL, DIMENSION(:,:), INTENT(IN) :: PDPG
REAL, DIMENSION(:), INTENT(IN) :: PMU, PMUW
REAL, DIMENSION(:,:), INTENT(INOUT) :: PEFC
REAL, DIMENSION(:), INTENT(IN) :: PRRT
REAL, DIMENSION(:), INTENT(IN) :: PTEMP
REAL, DIMENSION(:), INTENT(IN) :: PRR, PNT
REAL, DIMENSION(:,:), INTENT(IN) :: PCOR
INTEGER, INTENT(IN) :: KMODE
REAL, DIMENSION(:,:), INTENT(IN) :: PDENSITY_AER
!
!
!* 0.2 declaration of local variables
!
INTEGER :: IKB ! Coordinates of the first physical
! points along z
REAL :: ZRHO00 ! Surface reference air density
!viscosity ratio, Reynolds number
REAL, DIMENSION(SIZE(PRG,1)) :: ZOMG, ZREY
!rain radius, m, and rain fall speed, m/s; aerosol radius (m),
REAL, DIMENSION(SIZE(PRG,1)) :: ZRR, ZVR
!lambda, number concentration according to marshall palmer,
REAL, DIMENSION(SIZE(PRG,1)) :: ZNT, ZLBDA1
!RHO_dref*r_r, Rain LWC
REAL, DIMENSION(SIZE(PRG,1)) :: RLWC
! schmidts number
REAL, DIMENSION(SIZE(PRG,1),KMODE) :: ZSCH
!
!Stokes number, ratio of diameters,aerosol radius
REAL, DIMENSION(SIZE(PRG,1),KMODE) :: ZSTO, ZPHI, ZRG
! S Star Term
REAL, DIMENSION(SIZE(PRG,1)) :: ZSTA, ZDIFF, ZTAU
!
!Term 1, Term 2, Term 3, Term 4 such that
! E = Term1 * Term 2 + Term 3 + Term 4
REAL, DIMENSION(SIZE(PRG,1),KMODE) :: ZT1, ZT2
REAL, DIMENSION(SIZE(PRG,1),KMODE) :: ZT3, ZT4
!
INTEGER :: JI,JK
!++th++
REAL :: KLBEXR, KLBR, KCEXVT, KCCR, ZFSEDR, ZBR, ZDR, ZEXSEDR
!--th--
!
!-----------------------------------------------------------------
IKB = 1 + JPVEXT
ZRHO00 = XP00 / (XRD * XTHVREFZ(IKB))
ZRG(:,:) = PRG(:,:) * 1.E-6 !change units to meters
ZVR(:) = 0.
SELECT CASE(CCLOUD)
CASE('ICE3')
KLBEXR = YLBEXR
KLBR = YLBR
KCEXVT = YCEXVT
KCCR = YCCR
ZFSEDR = YFSEDR
ZEXSEDR = YEXSEDR
!Fall Speed calculations
!similar to rain_ice.f90, chapter 17.3.4, MESONH Handbook
ZVR(:) = ZFSEDR * PRRT(:)**(ZEXSEDR-1) * &
PRHODREF(:)**(ZEXSEDR-KCEXVT)
CASE('LIMA')
KLBEXR = WLBEXR
KLBR = WLBR
KCEXVT = WCEXVT
KCCR = WCCR
ZFSEDR = XFSEDRR
ZBR = 3.0
ZDR = 0.8
ZEXSEDR = (ZBR + ZDR + 1.0) / (ZBR + 1.0)
WHERE (PRRT(:) > XRTMIN(3) .AND. PNT(:) > 0.)
ZLBDA1(:) = (KLBR * PNT(:) / PRRT(:))**KLBEXR
ZVR(:) = XFSEDRR * PRHODREF(:)**(1.-KCEXVT) * ZLBDA1(:)**(-ZDR)
END WHERE
END SELECT
!Fall speed cannot be faster than 7 m/s
ZVR(:) = MIN(ZVR(:), 7.)
KCCR = 8.E6
!Ref SEINFELD AND PANDIS p.1019
! Viscosity Ratio
ZOMG(:) = PMUW(:) / PMU(:)
!!Reynolds number
ZREY(:) = PRR(:) * ZVR(:) * PRHODREF(:) / PMU(:)
ZREY(:) = MAX(ZREY(:), 1.E-2)
!
!S Star
ZSTA(:) = (1.2 + 1./12. * LOG(1.+ZREY(:))) / (1. + LOG(1.+ZREY(:)))
PEFC(:,:) = 0.0
!
DO JI = 1, KMODE
!Scmidts number
ZSCH(:,JI) = PMU(:) / PRHODREF(:) / PDPG(:,JI)
!
! Rain-Aerosol relative velocity
ZDIFF(:) = MAX(ZVR(:)-PVGG(:,JI), 0.)
!
! Relaxation time
ZTAU(:) = (ZRG(:,JI)*2.)**2. * PDENSITY_AER(:,JI) * PCOR(:,JI) / (18. * PMU(:))
!
! Stockes number
ZSTO(:,JI) = ZTAU(:) * ZDIFF(:) / PRR(:)
!
!Ratio of diameters
ZPHI(:,JI) = ZRG(:,JI) / PRR(:)
ZPHI(:,JI) = MIN(ZPHI(:,JI), 1.)
!
!Term 1
ZT1(:,JI) = 4.0 / ZREY(:) / ZSCH(:,JI)
!
!Term 2
ZT2(:,JI) = 1.0 + 0.4 * ZREY(:)**(0.5) * ZSCH(:,JI)**(1./3.) + &
0.16 * ZREY(:)**(0.5) * ZSCH(:,JI)**(0.5)
!
!Brownian diffusion
ZT1(:,JI) = ZT1(:,JI) * ZT2(:,JI)
!
!Term 3 - interception
ZT3(:,JI) = 4. * ZPHI(:,JI) * (1. / ZOMG(:) + &
(1.0 + 2.0 * ZREY(:)**0.5) * ZPHI(:,JI))
!
ZT4(:,JI) = 0.0
!
WHERE(ZSTO(:,JI) .GT. ZSTA(:))
!Term 4 - impaction
ZT4(:,JI) = ((ZSTO(:,JI) - ZSTA(:)) / &
(ZSTO(:,JI) - ZSTA(:) + 2. / 3.))**(3./2.) * &
(XRHOLW / PDENSITY_AER(:,JI))**(1./2.)
END WHERE
!
!Collision Efficiancy
PEFC(:,JI) = ZT1(:,JI) + ZT3(:,JI) + ZT4(:,JI)
!
! Physical radius of a rain collector droplet up than 20 um
WHERE (PRR(:) .LE. 20.E-6)
PEFC(:,JI) = 0.
END WHERE
ENDDO
!
PEFC(:,:) = MIN(PEFC(:,:), 1.0)
PEFC(:,:) = MAX(PEFC(:,:), 0.0)
END SUBROUTINE AER_EFFIC
!ORILAM_LIC Copyright 1994-2018 CNRS, Meteo-France and Universite Paul Sabatier
!ORILAM_LIC This is part of the ORILAM software governed by the CeCILL-C licence
!ORILAM_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!ORILAM_LIC for details.
!
! ######spll
MODULE MODI_AER_EFFIC3D
!! ########################
!!
!
INTERFACE
!!
SUBROUTINE AER_EFFIC3D(PRG,PVGG, & !aerosol radius/fall speed (m/s)
PRHODREF, & !Air density
PMUW, PMU, & !mu water/air
PDPG, & !diffusivity
PURR, & ! Rain water m.r. at time t
NMODE_DST, & ! Number of aerosol modes
PTEMP, PCOR, & ! air temp, cunningham corr factor
PDENSITY_AER, & ! aerosol density
PEFFIC ) ! scavenging efficiency
!
IMPLICIT NONE
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PRG, PVGG
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHODREF
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PDPG
REAL, DIMENSION(:,:,:), INTENT(IN) :: PMU, PMUW
REAL, DIMENSION(:,:,:), INTENT(IN) :: PURR
REAL, DIMENSION(:,:,:), INTENT(IN) :: PTEMP
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PCOR
INTEGER, INTENT(IN) :: NMODE_DST
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PDENSITY_AER
REAL, DIMENSION(:,:,:,:), INTENT(INOUT):: PEFFIC
END SUBROUTINE AER_EFFIC3D
!!
END INTERFACE
END MODULE MODI_AER_EFFIC3D
! ######spll
SUBROUTINE AER_EFFIC3D(PRG,PVGG, & !aerosol radius/fall speed (m/s)
PRHODREF, & !Air density
PMUW, PMU, & !mu water/air
PDPG, & !diffusivity
PURR, & ! Rain water m.r. at time t
NMODE_DST, & ! Number of aerosol modes
PTEMP, PCOR, & ! air temp, cunningham corr factor
PDENSITY_AER, & ! aerosol density
PEFFIC ) ! scavenging efficiency
!! #######################################
!!**********AER_EFFIC3D**********
!! PURPOSE
!! -------
!! Calculate the collection efficiency of
! a falling drop interacting with a dust aerosol
! for use with aer_wet_dep_kmt_warm.f90
!!
!!** METHOD
!! ------
!! Using basic theory, and the one dimensional variables sent
!! from aer_wet_dep_kmt_warm.f90, calculation of the average
!! fall speed calculations, chapter 17.3.4, MESONH Handbook
!! droplet number based on the Marshall_Palmer distribution
!! and Stokes number, Reynolds number, etc. based on theory
!! (S&P, p.1019)
!!
!! REFERENCE
!! ---------
!! Seinfeld and Pandis p.1019
!! MESONH Handbook chapter 17.3.4
!!
!! AUTHOR
!! ------
!! K. Crahan Kaku / P. Tulet (CNRM/GMEI)
!!
!! MODIFICATIONS
!! -------------
!! Philippe Wautelet 28/05/2018: corrected truncated integer division (1/12 -> 1./12.)
!!
!-----------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE MODD_RAIN_ICE_PARAM_n
USE MODD_RAIN_ICE_DESCR_n
USE MODD_CST, ONLY : XPI, XRHOLW, XP00, XRD
USE MODD_PARAMETERS , ONLY : JPVEXT
USE MODD_REF, ONLY : XTHVREFZ
!
IMPLICIT NONE
!
!* 0.1 declarations of arguments
!
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PRG, PVGG
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHODREF
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PDPG
REAL, DIMENSION(:,:,:), INTENT(IN) :: PMU, PMUW
REAL, DIMENSION(:,:,:), INTENT(IN) :: PURR
REAL, DIMENSION(:,:,:), INTENT(IN) :: PTEMP
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PCOR
INTEGER, INTENT(IN) :: NMODE_DST
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PDENSITY_AER
REAL, DIMENSION(:,:,:,:), INTENT(INOUT):: PEFFIC
!
!* 0.2 declaration of local variables
!
INTEGER :: IKB ! Coordinates of the first physical
! points along z
REAL :: ZRHO00 ! Surface reference air density
!viscosity ratio, Reynolds number
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZOMG, ZREY
!rain radius, m, and rain fall speed, m/s; aerosol radius (m),
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZRR, ZVR
!lambda, number concentration according to marshall palmer,
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZNT, ZLBDA
! Rain water m.r. source
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZRRS
!RHO_dref*r_r, Rain LWC
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZRLWC
! schmidts number
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3),NMODE_DST) :: ZSCH
!
!Stokes number, ratio of diameters,aerosol radius
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3),NMODE_DST) :: ZSTO, ZPHI, ZRG
! S Star Term
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZSTA, ZDIFF, ZTAU
!
!Term 1, Term 2, Term 3, Term 4 such that
! E = Term1 * Term 2 + Term 3 + Term 4
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3),NMODE_DST) :: ZT1, ZT2
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3),NMODE_DST) :: ZT3, ZT4
!
INTEGER :: JI,JK
!
!-----------------------------------------------------------------
ZLBDA = 1E20
ZNT = 1E-20
ZRR = 10E-6
ZRRS(:,:,:)=PURR(:,:,:)
IKB = 1 + JPVEXT
ZRHO00 = XP00/(XRD*XTHVREFZ(IKB))
ZRG(:,:,:,:)=PRG(:,:,:,:)*1.E-6 !change units to meters
!
!Fall Speed calculations
!similar to rain_ice.f90, chapter 17.3.4, MESONH Handbook
!
ZVR (:,:,:)= XFSEDR * ZRRS(:,:,:)**(XEXSEDR-1) * &
PRHODREF(:,:,:)**(XEXSEDR-XCEXVT-1)
! Drop Radius calculation in m
!lbda = pi*No*rho(lwc)/(rho(dref)*rain rate) p.212 MESONH Handbook
! compute the slope parameter Lbda_r
WHERE((ZRRS(:,:,:).GT. 0.).AND.(PRHODREF(:,:,:) .GT. 0.))
ZLBDA(:,:,:) = XLBR*(PRHODREF(:,:,:)*ZRRS(:,:,:))**XLBEXR
!Number concentration NT=No/lbda p. 415 Jacobson
ZNT(:,:,:) = XCCR/ZLBDA(:,:,:)
!rain lwc (kg/m3) = rain m.r.(kg/kg) * rho_air(kg/m3)
ZRLWC(:,:,:)=ZRRS(:,:,:)*PRHODREF(:,:,:)
!4/3 *pi *r**3*NT*rho_eau(kg/m3) =rho(lwc)=rho(air)* qc(kg/kg)
ZRR(:,:,:) = (ZRLWC(:,:,:)/(XRHOLW*ZNT(:,:,:)*4./3.*XPI))**(1./3.)
END WHERE
ZRR(:,:,:) = MIN(ZRR(:,:,:), 100.E-6)
!Fall speed cannot be faster than 7 m/s
ZVR (:,:,:)=MIN(ZVR (:,:,:),7.)
!Ref SEINFELD AND PANDIS p.1019
! Viscosity Ratio
ZOMG(:,:,:)=PMUW(:,:,:)/PMU(:,:,:)
!!Reynolds number
ZREY(:,:,:)=ZRR(:,:,:)*ZVR(:,:,:)*PRHODREF(:,:,:)/PMU(:,:,:)
ZREY(:,:,:)= MAX(ZREY(:,:,:), 1E-2)
!S Star
ZSTA(:,:,:)=(1.2+(1./12.)*LOG(1.+ZREY(:,:,:)))/(1.+LOG(1.+ZREY(:,:,:)))
PEFFIC(:,:,:,:)=0.0
DO JI=1,NMODE_DST
!
!Scmidts number
ZSCH(:,:,:,JI)=PMU(:,:,:)/PRHODREF(:,:,:)/PDPG(:,:,:,JI)
! Rain-Aerosol relative velocity
ZDIFF(:,:,:) = MAX(ZVR(:,:,:)-PVGG(:,:,:,JI),0.)
! Relaxation time
ZTAU(:,:,:) = (ZRG(:,:,:,JI)*2.)**2. * PDENSITY_AER(:,:,:,JI) * PCOR(:,:,:,JI) / (18.*PMU(:,:,:))
! Stockes number
ZSTO(:,:,:,JI)= ZTAU(:,:,:) * ZDIFF(:,:,:) / ZRR(:,:,:)
!Ratio of diameters
ZPHI(:,:,:,JI)=ZRG(:,:,:,JI)/ZRR(:,:,:)
ZPHI(:,:,:,JI)=MIN(ZPHI(:,:,:,JI), 1.)
!Term 1
ZT1(:,:,:,JI)=4.0/ZREY(:,:,:)/ZSCH(:,:,:,JI)
!Term 2
ZT2(:,:,:,JI)=1.0+(0.4*ZREY(:,:,:)**(0.5)*ZSCH(:,:,:,JI)**(1./3.))+ &
(0.16*ZREY(:,:,:)**(0.5)*ZSCH(:,:,:,JI)**(0.5))
!Brownian diffusion
ZT1(:,:,:,JI)= ZT1(:,:,:,JI)*ZT2(:,:,:,JI)
!Term 3 - interception
ZT3(:,:,:,JI)=4.*ZPHI(:,:,:,JI)*(1./ZOMG(:,:,:)+ &
(1.0+(2.0*ZREY(:,:,:)**0.5))*ZPHI(:,:,:,JI))
ZT4(:,:,:,JI)=0.0
WHERE(ZSTO(:,:,:,JI).GT.ZSTA(:,:,:))
!Term 4 - impaction
ZT4(:,:,:,JI)=((ZSTO(:,:,:,JI)-ZSTA(:,:,:))/ &
(ZSTO(:,:,:,JI)-ZSTA(:,:,:)+2./3.))**(3./2.) &
*((XRHOLW/PDENSITY_AER(:,:,:,JI))**(1./2.))
END WHERE
!Collision Efficiancy
PEFFIC(:,:,:,JI)=ZT1(:,:,:,JI)+ ZT3(:,:,:,JI)+ZT4(:,:,:,JI)
! Physical radius of a rain collector droplet up than 20 um
WHERE (ZRR(:,:,:) .LE. 9.9E-6)
PEFFIC(:,:,:,JI)= 0.
END WHERE
ENDDO
PEFFIC(:,:,:,:)=MIN(PEFFIC(:,:,:,:),1.0)
PEFFIC(:,:,:,:)=MAX(PEFFIC(:,:,:,:),0.0)
END SUBROUTINE AER_EFFIC3D
This diff is collapsed.
!MNH_LIC Copyright 1994-2018 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
!
! ######spll
MODULE MODI_AERO_EFFIC3D
!! ########################
!!
!
INTERFACE
!!
SUBROUTINE AERO_EFFIC3D(PRG,PVGG, & !aerosol radius/fall speed (m/s)
PRHODREF, & !Air density
PMUW, PMU, & !mu water/air
PDPG, & !diffusivity
PURR, & ! Rain water m.r. at time t
KMODE, & ! Number of aerosol modes
PTEMP, PCOR, & ! air temp, cunningham corr factor
PDENSITY_AER, & ! aerosol density
PEFFIC_AER ) ! scavenging efficiency for aerosol
!
IMPLICIT NONE
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PRG, PVGG
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHODREF
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PDPG
REAL, DIMENSION(:,:,:), INTENT(IN) :: PMU, PMUW
REAL, DIMENSION(:,:,:), INTENT(IN) :: PURR
REAL, DIMENSION(:,:,:), INTENT(IN) :: PTEMP
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PCOR
INTEGER, INTENT(IN) :: KMODE
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PDENSITY_AER
REAL, DIMENSION(:,:,:,:), INTENT(INOUT):: PEFFIC_AER
END SUBROUTINE AERO_EFFIC3D
!!
END INTERFACE
END MODULE MODI_AERO_EFFIC3D
! ######spll
SUBROUTINE AERO_EFFIC3D(PRG,PVGG, & !aerosol radius/fall speed (m/s)
PRHODREF, & !Air density
PMUW, PMU, & !mu water/air
PDPG, & !diffusivity
PURR, & ! Rain water m.r. at time t
KMODE, & ! Number of aerosol modes
PTEMP, PCOR, & ! air temp, cunningham corr factor
PDENSITY_AER, & ! aerosol density
PEFFIC_AER ) ! scavenging efficiency for aerosol
!! #######################################
!!**********AERO_EFFIC3D**********
!! PURPOSE
!! -------
!! Calculate the collection efficiency of
! a falling drop interacting with a dust aerosol
! for use with aer_wet_dep_kmt_warm.f90
!!
!!** METHOD
!! ------
!! Using basic theory, and the one dimensional variables sent
!! from aer_wet_dep_kmt_warm.f90, calculation of the average
!! fall speed calculations, chapter 17.3.4, MESONH Handbook
!! droplet number based on the Marshall_Palmer distribution
!! and Stokes number, Reynolds number, etc. based on theory
!! (S&P, p.1019)
!!
!! REFERENCE
!! ---------
!! Seinfeld and Pandis p.1019
!! MESONH Handbook chapter 17.3.4
!!
!! AUTHOR
!! ------
!! K. Crahan Kaku / P. Tulet (CNRM/GMEI)
!!
!! MODIFICATIONS
!! -------------
!! Philippe Wautelet 28/05/2018: corrected truncated integer division (1/12 -> 1./12.)
!!
!-----------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE MODD_RAIN_ICE_PARAM_n
USE MODD_RAIN_ICE_DESCR_n
USE MODD_CST, ONLY : XPI, XRHOLW, XP00, XRD
USE MODD_PARAMETERS , ONLY : JPVEXT
USE MODD_REF, ONLY : XTHVREFZ
!
IMPLICIT NONE
!
!* 0.1 declarations of arguments
!
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PRG, PVGG
REAL, DIMENSION(:,:,:), INTENT(IN) :: PRHODREF
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PDPG
REAL, DIMENSION(:,:,:), INTENT(IN) :: PMU, PMUW
REAL, DIMENSION(:,:,:), INTENT(IN) :: PURR
REAL, DIMENSION(:,:,:), INTENT(IN) :: PTEMP
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PCOR
INTEGER, INTENT(IN) :: KMODE
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PDENSITY_AER
REAL, DIMENSION(:,:,:,:), INTENT(INOUT):: PEFFIC_AER
!
!* 0.2 declaration of local variables
!
INTEGER :: IKB ! Coordinates of the first physical
! points along z
REAL :: ZRHO00 ! Surface reference air density
!viscosity ratio, Reynolds number
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZOMG, ZREY
!rain radius, m, and rain fall speed, m/s; aerosol radius (m),
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZRR, ZVR
!lambda, number concentration according to marshall palmer,
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZNT, ZLBDA
! Rain water m.r. source
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZRRS
!RHO_dref*r_r, Rain LWC
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZRLWC
! schmidts number
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3),KMODE) :: ZSCH
!
!Stokes number, ratio of diameters,aerosol radius
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3),KMODE) :: ZSTO, ZPHI, ZRG
! S Star Term
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3)) :: ZSTA, ZDIFF, ZTAU
!
!Term 1, Term 2, Term 3, Term 4 such that
! E = Term1 * Term 2 + Term 3 + Term 4
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3),KMODE) :: ZT1, ZT2
REAL, DIMENSION(SIZE(PRG,1),SIZE(PRG,2),SIZE(PRG,3),KMODE) :: ZT3, ZT4
!
INTEGER :: JI,JK
!
!-----------------------------------------------------------------
ZLBDA = 1E20
ZNT = 1E-20
ZRR = 10E-6
ZRRS(:,:,:)=PURR(:,:,:)
IKB = 1 + JPVEXT
ZRHO00 = XP00/(XRD*XTHVREFZ(IKB))
ZRG(:,:,:,:)=PRG(:,:,:,:)*1.E-6 !change units to meters
!
!Fall Speed calculations
!similar to rain_ice.f90, chapter 17.3.4, MESONH Handbook
!
ZVR (:,:,:)= XFSEDR * ZRRS(:,:,:)**(XEXSEDR-1) * &
PRHODREF(:,:,:)**(XEXSEDR-XCEXVT-1)
! Drop Radius calculation in m
!lbda = pi*No*rho(lwc)/(rho(dref)*rain rate) p.212 MESONH Handbook
! compute the slope parameter Lbda_r
WHERE((ZRRS(:,:,:).GT. 0.).AND.(PRHODREF(:,:,:) .GT. 0.))
ZLBDA(:,:,:) = XLBR*(PRHODREF(:,:,:)*ZRRS(:,:,:))**XLBEXR
!Number concentration NT=No/lbda p. 415 Jacobson
ZNT(:,:,:) = XCCR/ZLBDA(:,:,:)
!rain lwc (kg/m3) = rain m.r.(kg/kg) * rho_air(kg/m3)
ZRLWC(:,:,:)=ZRRS(:,:,:)*PRHODREF(:,:,:)
!4/3 *pi *r**3*NT*rho_eau(kg/m3) =rho(lwc)=rho(air)* qc(kg/kg)
ZRR(:,:,:) = (ZRLWC(:,:,:)/(XRHOLW*ZNT(:,:,:)*4./3.*XPI))**(1./3.)
END WHERE
ZRR(:,:,:) = MIN(ZRR(:,:,:), 100.E-6)
!Fall speed cannot be faster than 7 m/s
ZVR (:,:,:)=MIN(ZVR (:,:,:),7.)
!Ref SEINFELD AND PANDIS p.1019
! Viscosity Ratio
ZOMG(:,:,:)=PMUW(:,:,:)/PMU(:,:,:)
!!Reynolds number
ZREY(:,:,:)=ZRR(:,:,:)*ZVR(:,:,:)*PRHODREF(:,:,:)/PMU(:,:,:)
ZREY(:,:,:)= MAX(ZREY(:,:,:), 1E-2)
!S Star
ZSTA(:,:,:)=(1.2+(1./12.)*LOG(1.+ZREY(:,:,:)))/(1.+LOG(1.+ZREY(:,:,:)))
PEFFIC_AER(:,:,:,:)=0.0
DO JI=1,KMODE
!
!Scmidts number
ZSCH(:,:,:,JI)=PMU(:,:,:)/PRHODREF(:,:,:)/PDPG(:,:,:,JI)
! Rain-Aerosol relative velocity
ZDIFF(:,:,:) = MAX(ZVR(:,:,:)-PVGG(:,:,:,JI),0.)
! Relaxation time
ZTAU(:,:,:) = (ZRG(:,:,:,JI)*2.)**2. * PDENSITY_AER(:,:,:,JI) * PCOR(:,:,:,JI) / (18.*PMU(:,:,:))
! Stockes number
ZSTO(:,:,:,JI)= ZTAU(:,:,:) * ZDIFF(:,:,:) / ZRR(:,:,:)
!Ratio of diameters
ZPHI(:,:,:,JI)=ZRG(:,:,:,JI)/ZRR(:,:,:)
ZPHI(:,:,:,JI)=MIN(ZPHI(:,:,:,JI), 1.)
!Term 1
ZT1(:,:,:,JI)=4.0/ZREY(:,:,:)/ZSCH(:,:,:,JI)
!Term 2
ZT2(:,:,:,JI)=1.0+(0.4*ZREY(:,:,:)**(0.5)*ZSCH(:,:,:,JI)**(1./3.))+ &
(0.16*ZREY(:,:,:)**(0.5)*ZSCH(:,:,:,JI)**(0.5))
!Brownian diffusion
ZT1(:,:,:,JI)= ZT1(:,:,:,JI)*ZT2(:,:,:,JI)
!Term 3 - interception
ZT3(:,:,:,JI)=4.*ZPHI(:,:,:,JI)*(1./ZOMG(:,:,:)+ &
(1.0+(2.0*ZREY(:,:,:)**0.5))*ZPHI(:,:,:,JI))
ZT4(:,:,:,JI)=0.0
WHERE(ZSTO(:,:,:,JI).GT.ZSTA(:,:,:))
!Term 4 - impaction
ZT4(:,:,:,JI)=((ZSTO(:,:,:,JI)-ZSTA(:,:,:))/ &
(ZSTO(:,:,:,JI)-ZSTA(:,:,:)+2./3.))**(3./2.) &
*((XRHOLW/PDENSITY_AER(:,:,:,JI))**(1./2.))
END WHERE
!Collision Efficiancy
PEFFIC_AER(:,:,:,JI)=ZT1(:,:,:,JI)+ ZT3(:,:,:,JI)+ZT4(:,:,:,JI)
! Physical radius of a rain collector droplet up than 20 um
WHERE (ZRR(:,:,:) .LE. 9.9E-6)
PEFFIC_AER(:,:,:,JI)= 0.
END WHERE
ENDDO
PEFFIC_AER(:,:,:,:)=MIN(PEFFIC_AER(:,:,:,:),1.0)
PEFFIC_AER(:,:,:,:)=MAX(PEFFIC_AER(:,:,:,:),0.0)
END SUBROUTINE AERO_EFFIC3D
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
!#########################
MODULE MODI_CPHASE_PROFILE
!#########################
!
INTERFACE
!
SUBROUTINE CPHASE_PROFILE (PZHAT,PCPHASE,PCPHASE_PBL,PCPHASE_PROFILE,PTKEM)
!
REAL, DIMENSION(:) , INTENT(IN) :: PZHAT ! height level without orography
REAL , INTENT(IN) :: PCPHASE ! prescribed phase velocity
REAL , INTENT(IN) :: PCPHASE_PBL ! prescribed phase velocity
REAL, DIMENSION(:,:) , INTENT(OUT) :: PCPHASE_PROFILE ! profile of Cphase speed
REAL, DIMENSION(:,:),OPTIONAL , INTENT(IN) :: PTKEM ! TKE at t-dt
!
END SUBROUTINE CPHASE_PROFILE
!
END INTERFACE
!
END MODULE MODI_CPHASE_PROFILE
!
! ##########################################################################
SUBROUTINE CPHASE_PROFILE (PZHAT,PCPHASE,PCPHASE_PBL,PCPHASE_PROFILE,PTKEM)
! ##########################################################################
!
!!**** *CPHASE_PROFILE* - defines a non-constant vertical profile for Cphase
!! velocity
!!
!! PURPOSE
!! -------
!
!!** METHOD
!! ------
!!
!!
!! REFERENCE
!! ---------
!!
!! AUTHOR
!! ------
!! V. Masson & C. Lac * Meteo France *
!!
!! MODIFICATIONS
!! -------------
!! Original 08/2010
!! Escobar 9/11/2010 : array bound problem if NO Turb => PTKEM optional
!! C.Lac 06/2013 : correction and introduction of PCPHASE_PBL
!!
!-------------------------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE MODD_TURB_n, ONLY: XTKEMIN
USE MODD_PARAMETERS
!
IMPLICIT NONE
!
!
!* 0.1 declarations of arguments
!
!
!
REAL, DIMENSION(:) , INTENT(IN) :: PZHAT ! height level without orography
REAL , INTENT(IN) :: PCPHASE ! prescribed phase velocity
REAL , INTENT(IN) :: PCPHASE_PBL ! prescribed phase velocity
REAL, DIMENSION(:,:) , INTENT(OUT) :: PCPHASE_PROFILE ! profile of Cphase speed
REAL, DIMENSION(:,:),OPTIONAL , INTENT(IN) :: PTKEM ! TKE at t-dt
!
!* 0.2 declarations of local variables
!
INTEGER :: IKB ! indice K Beginning in z direction
INTEGER :: IKE ! indice K End in z direction
!
REAL, DIMENSION(SIZE(PCPHASE_PROFILE,1)) :: ZTKE, ZTKEMIN
INTEGER :: JL,JK,JKTKE
!
!-------------------------------------------------------------------------------
!
!* 1. PROLOGUE
! --------
!
!* 1.1 Compute dimensions of arrays and other indices
!
IKB = 1 + JPVEXT
IKE = SIZE(PCPHASE_PROFILE,2) - JPVEXT
!
!
!* 1.2 Initializations
!
!
PCPHASE_PROFILE = 0.0
ZTKEMIN = PZHAT(IKE)
ZTKE = PZHAT(IKE-1)
!-------------------------------------------------------------------------------
!-------------------------------------------------------------------------------
!
IF (PRESENT(PTKEM)) THEN
!
DO JL = 1,SIZE(PCPHASE_PROFILE,1)
JKTKE=IKE-1
DO JK = IKB, IKE-1
IF (PTKEM(JL,JK) < 5.*XTKEMIN ) THEN
ZTKE (JL) = PZHAT (JK)
JKTKE = JK
EXIT
END IF
END DO
DO JK = JKTKE+1,IKE
IF (PTKEM(JL,JK) == XTKEMIN ) THEN
ZTKEMIN (JL) = PZHAT (JK)
EXIT
END IF
END DO
END DO
!
ELSE
ZTKE (:) = 1000.
ZTKEMIN (:) = 2000.
END IF
!
DO JL = 1,SIZE(PCPHASE_PROFILE,1)
DO JK = IKB, IKE
IF (PZHAT(JK) > ZTKEMIN (JL) ) THEN
PCPHASE_PROFILE(JL,JK) = PCPHASE
ELSE IF (PZHAT(JK) < ZTKE (JL) ) THEN
PCPHASE_PROFILE(JL,JK) = PCPHASE_PBL
ELSE
PCPHASE_PROFILE(JL,JK) = 1./(ZTKEMIN (JL) - ZTKE (JL)) * &
((PZHAT(JK) - ZTKE(JL)) * PCPHASE + (ZTKEMIN (JL) - PZHAT(JK)) * PCPHASE_PBL )
END IF
END DO
END DO
!
!-------------------------------------------------------------------------------
!
END SUBROUTINE CPHASE_PROFILE
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment