[3880] | 1 | ! radiation_liquid_optics_socrates.F90 - SOCRATES method for parameterizing liquid droplet optics |
---|
| 2 | ! |
---|
| 3 | ! (C) Copyright 2014- ECMWF. |
---|
| 4 | ! |
---|
| 5 | ! This software is licensed under the terms of the Apache Licence Version 2.0 |
---|
| 6 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
---|
| 7 | ! |
---|
| 8 | ! In applying this licence, ECMWF does not waive the privileges and immunities |
---|
| 9 | ! granted to it by virtue of its status as an intergovernmental organisation |
---|
| 10 | ! nor does it submit to any jurisdiction. |
---|
| 11 | ! |
---|
| 12 | ! Author: Robin Hogan |
---|
| 13 | ! Email: r.j.hogan@ecmwf.int |
---|
| 14 | ! |
---|
| 15 | ! Modifications |
---|
| 16 | ! 2020-08-10 R. Hogan Bounded re to be >=1.2um and <=50um |
---|
| 17 | |
---|
| 18 | module radiation_liquid_optics_socrates |
---|
| 19 | |
---|
| 20 | use parkind1, only : jprb |
---|
| 21 | |
---|
| 22 | implicit none |
---|
| 23 | public |
---|
| 24 | |
---|
| 25 | ! SOCRATES (Edwards-Slingo) parameterizes info on the dependence of |
---|
| 26 | ! the scattering properties in each band on effective radius in |
---|
| 27 | ! terms of 16 coefficients |
---|
| 28 | integer, parameter :: NLiqOpticsCoeffsSOCRATES = 16 |
---|
| 29 | |
---|
| 30 | ! Range of valid input effective radius, in microns |
---|
| 31 | real(jprb), parameter :: MinEffectiveRadius = 1.2e-6 |
---|
| 32 | real(jprb), parameter :: MaxEffectiveRadius = 50.0e-6 |
---|
| 33 | |
---|
| 34 | contains |
---|
| 35 | |
---|
| 36 | !--------------------------------------------------------------------- |
---|
| 37 | ! Compute liquid-droplet scattering properties using a |
---|
| 38 | ! parameterization consisting of Pade approximants from the |
---|
| 39 | ! SOCRATES (Edwards-Slingo) code |
---|
| 40 | subroutine calc_liq_optics_socrates(nb, coeff, lwp, re_in, od, scat_od, g) |
---|
| 41 | |
---|
| 42 | use parkind1, only : jprb |
---|
| 43 | !use yomhook, only : lhook, dr_hook |
---|
| 44 | |
---|
| 45 | ! Number of bands |
---|
| 46 | integer, intent(in) :: nb |
---|
| 47 | ! Coefficients read from a data file |
---|
| 48 | real(jprb), intent(in) :: coeff(:,:) |
---|
| 49 | ! Liquid water path (kg m-2) and effective radius (m) |
---|
| 50 | real(jprb), intent(in) :: lwp, re_in |
---|
| 51 | ! Total optical depth, scattering optical depth and asymmetry factor |
---|
| 52 | real(jprb), intent(out) :: od(nb), scat_od(nb), g(nb) |
---|
| 53 | |
---|
| 54 | ! Local effective radius (m), after applying bounds |
---|
| 55 | real(jprb) :: re |
---|
| 56 | |
---|
| 57 | !real(jprb) :: hook_handle |
---|
| 58 | |
---|
| 59 | !if (lhook) call dr_hook('radiation_liquid_optics_socrates:calc_liq_optics_socrates',0,hook_handle) |
---|
| 60 | |
---|
| 61 | ! Apply the bounds of validity to effective radius |
---|
| 62 | re = max(MinEffectiveRadius, min(re_in, MaxEffectiveRadius)) |
---|
| 63 | |
---|
| 64 | od = lwp * (coeff(1:nb,1) + re*(coeff(1:nb,2) + re*coeff(1:nb,3))) & |
---|
| 65 | & / (1.0_jprb + re*(coeff(1:nb,4) + re*(coeff(1:nb,5) & |
---|
| 66 | & + re*coeff(1:nb,6)))) |
---|
| 67 | scat_od = od * (1.0_jprb & |
---|
| 68 | & - (coeff(1:nb,7) + re*(coeff(1:nb,8) + re*coeff(1:nb,9))) & |
---|
| 69 | & / (1.0_jprb + re*(coeff(1:nb,10) + re*coeff(1:nb,11)))) |
---|
| 70 | g = (coeff(1:nb,12) + re*(coeff(1:nb,13) + re*coeff(1:nb,14))) & |
---|
| 71 | & / (1.0_jprb + re*(coeff(1:nb,15) + re*coeff(1:nb,16))) |
---|
| 72 | |
---|
| 73 | !if (lhook) call dr_hook('radiation_liquid_optics_socrates:calc_liq_optics_socrates',1,hook_handle) |
---|
| 74 | |
---|
| 75 | end subroutine calc_liq_optics_socrates |
---|
| 76 | |
---|
| 77 | end module radiation_liquid_optics_socrates |
---|