! First include the set of model-wide compiler flags #include "tm5.inc" module Mrweight !--------------------------------------------------------------------------- ! Contains routine to compute the intensity at the top of the atmosphere ! for a Rayleigh scattering atmosphere with a Lambertian surface. ! ! call rweight(wavelx,p_sfc,a_sfc,th0,th,dphix,refl) ! ! Pepijn Veefkind, Henk Eskes, KNMI, 1999 !--------------------------------------------------------------------------- implicit none private public :: rweight contains subroutine csalbr(xtau,xalb) implicit none real,intent(in) :: xtau real,intent(out) :: xalb xalb=0 xalb=(3*xtau-fintexp3(xtau)*(4+2*xtau)+2*exp(-xtau)) xalb=xalb/(4.+3*xtau) end subroutine csalbr function fintexp3(xtau) implicit none real,intent(in) :: xtau real :: fintexp3 real :: xx xx=(exp(-xtau)*(1.-xtau)+xtau*xtau*fint1exp(xtau))/2. fintexp3=xx end function fintexp3 function fint1exp(xtau) ! accuracy 2e-07... for 0 180.0 ) dphi=360.0-dphi ! ! redefine dphi dphi=180.-dphi ! ! Compute the rayleigh optical depth for surface and cloud top pressure ! approximation formula by Hansen and Travis ! tau=0.008569 * wavel**(-4.) * (1. + 0.0113 * wavel**(-2.) + 0.00013 * wavel**(-4.)) tau = (1. + 0.0113/(wavel*wavel) + 0.00013/(wavel*wavel*wavel*wavel))*0.008569/(wavel*wavel*wavel*wavel) tau_sfc= p_sfc / 1013.25 * tau tau=tau_sfc a=a_sfc ! compute the transmission, see Vermote and Tanre JQSRT 47, pp 305, 1992 t_mu0=( (2./3.+mu0)+(2./3.-mu0)*exp(-tau/mu0) )/( (4./3.)+tau ) t_mu =( (2./3.+mu )+(2./3.-mu )*exp(-tau/mu ) )/( (4./3.)+tau ) ! compute sherical albedo call csalbr(tau, a_sph) ! compute atm reflectance call chand (dphi,mu,mu0,tau,refl_a) ! compute total reflectance refl=refl_a + t_mu0 * t_mu* a / (1. - a_sph * a) ! Write result of RT to screen ! print*,'dphix, dphi ',dphix, dphi ! print*,'mu0, mu ',mu0, mu ! write(*,'(a,f9.3)') 'Transmission mu0 ',t_mu0 ! write(*,'(a,f9.3)') 'Transmission mu0 ',t_mu ! write(*,'(a,f9.3)') 'Spherical albedo ',a_sph ! write(*,'(a,f9.3)') 'Atmospheric reflectance ',refl_a ! write(*,'(a,f9.3)') 'Reflectance ',refl end subroutine rweight end module Mrweight