Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | x | |||
real, | intent(in) | :: | y | |||
real, | intent(in) | :: | z_s | |||
real, | intent(in) | :: | z_r | |||
real, | intent(in) | :: | sig_z | |||
real, | intent(in) | :: | sig_y | |||
real, | intent(in) | :: | z_pbl | |||
real, | intent(in) | :: | FF |
function gauss_plume_cartesian_sigma_func(x,y,z_s,z_r,sig_z,sig_y,z_pbl,FF) implicit none real, intent(in) :: x,y,z_s,z_r,sig_y,sig_z,z_pbl,FF real gauss_plume_cartesian_sigma_func real pi,sig_limit parameter (pi=3.141592,sig_limit=3.) real z_loop(5) real c_z integer k,n_loop gauss_plume_cartesian_sigma_func=0. if (x.ge.0.and.abs(y).lt.sig_y*sig_limit) then !write(*,*) 'here' !If the emission height z_s is greater than the boundary layer height z_pbl then only allow reflection from the surface !Also if z_r+z_s<z_pbl/3 then only use surface reflections since the pbl reflection counts for so little !Otherwise allow reflection from surface and boundary layer if (z_s.gt.z_pbl.or.z_s+sig_z.lt.z_pbl/3.) then n_loop=2 z_loop(1)=z_s;z_loop(2)=-z_s else n_loop=5 z_loop(1)=z_s;z_loop(2)=-z_s;z_loop(3)=2.*z_pbl-z_s;z_loop(4)=2.*z_pbl+z_s;z_loop(5)=-2.*z_pbl+z_s endif !For large sigmaz set the plume to be evenly distributed in the boundary layer !A value of 0.9 is used as this is the correct value for surface level releases and within 2% for high level releases !Should not be used for above boundary layer releases but is not accounted for if (sig_z.gt.0.9*z_pbl) then c_z=1./z_pbl gauss_plume_cartesian_sigma_func=c_z/(sqrt(2.*pi)*sig_y)*exp(-0.5*(y*y)/(sig_y*sig_y))/FF else c_z=0. do k=1,n_loop c_z=c_z+exp(-0.5*((z_r-z_loop(k))/sig_z)*((z_r-z_loop(k))/sig_z)) enddo gauss_plume_cartesian_sigma_func=c_z/(2.*pi*sig_y*sig_z)*exp(-0.5*(y*y)/(sig_y*sig_y))/FF endif !if (x.eq.0) then ! write(*,*) gauss_plume_cartesian_sigma_func*FF,1./(2.*pi*sig_y*sig_z) !endif endif end function gauss_plume_cartesian_sigma_func