source: LMDZ6/trunk/libf/phylmd/ecrad/radiation/radiation_ice_optics_yi.F90 @ 5260

Last change on this file since 5260 was 4773, checked in by idelkadi, 12 months ago
  • Update of Ecrad in LMDZ The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results. version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
  • Implementation of the double call of Ecrad in LMDZ


File size: 5.3 KB
Line 
1! radiation_ice_optics_yi.F90 - Yi et al. (2013) ice optical properties
2!
3! (C) Copyright 2017- 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! Authors: Mark Fielding and Robin Hogan
13! Email:   r.j.hogan@ecmwf.int
14!
15! The reference for this ice optics parameterization is Yi, B.,
16! P. Yang, B.A. Baum, T. L'Ecuyer, L. Oreopoulos, E.J. Mlawer,
17! A.J. Heymsfield, and K. Liou, 2013: Influence of Ice Particle
18! Surface Roughening on the Global Cloud Radiative
19! Effect. J. Atmos. Sci., 70, 2794-2807,
20! https://doi.org/10.1175/JAS-D-13-020.1
21
22module radiation_ice_optics_yi
23
24  implicit none
25  public
26
27  ! The number of ice coefficients depends on the parameterization
28  integer, parameter :: NIceOpticsCoeffsYiSW  = 69
29  integer, parameter :: NIceOpticsCoeffsYiLW  = 69
30
31  integer, parameter :: NSingleCoeffs = 23
32
33contains
34
35  !---------------------------------------------------------------------
36  ! Compute shortwave ice-particle scattering properties using Yi et
37  ! al. (2013) parameterization
38  subroutine calc_ice_optics_yi_sw(nb, coeff, ice_wp, &
39       &  re, od, scat_od, g)
40
41    use parkind1, only : jprb, jpim
42    !use yomhook,  only : lhook, dr_hook, jphook
43
44    ! Number of bands
45    integer, intent(in)  :: nb
46    ! Coefficients read from a data file
47    real(jprb), intent(in) :: coeff(:,:)
48    ! Ice water path (kg m-2)
49    real(jprb), intent(in) :: ice_wp
50    ! Effective radius (m)
51    real(jprb), intent(in) :: re
52    ! Total optical depth, scattering optical depth and asymmetry factor
53    real(jprb), intent(out) :: od(nb), scat_od(nb), g(nb)
54
55    ! Yi's effective diameter (microns)
56    real(jprb) :: de_um
57    ! Ice water path in g m-2
58    real (jprb) :: iwp_gm_2
59    ! LUT temp variables
60    real(jprb) :: wts_1, wts_2
61    integer(jpim) :: lu_idx
62    real(kind=jprb), parameter    :: lu_scale  = 0.2_jprb
63    real(kind=jprb), parameter    :: lu_offset = 1.0_jprb
64    !real(jphook) :: hook_handle
65
66    !if (lhook) call dr_hook('radiation_ice_optics:calc_ice_optics_yi_sw',0,hook_handle)
67
68    ! Convert to effective diameter using the relationship in the IFS
69    !de_um     = re * (1.0e6_jprb / 0.64952_jprb)
70    de_um     = re * 2.0e6_jprb
71
72    ! limit de_um to validity of LUT
73    de_um = max(de_um,10.0_jprb)
74    de_um = min(de_um,119.99_jprb) !avoid greater than or equal to 120 um
75
76    iwp_gm_2  = ice_wp * 1000.0_jprb
77
78    lu_idx = floor(de_um * lu_scale - lu_offset)
79    wts_2  = (de_um * lu_scale - lu_offset) - lu_idx
80    wts_1  = 1.0_jprb - wts_2
81    od     = 0.001_jprb * iwp_gm_2 * &
82             & ( wts_1 * coeff(1:nb,lu_idx) + wts_2 * coeff(1:nb,lu_idx+1) )
83    scat_od = od * &
84             & ( wts_1 * coeff(1:nb,lu_idx+NSingleCoeffs) + wts_2 * coeff(1:nb,lu_idx+NSingleCoeffs+1) )
85    g = wts_1 * coeff(1:nb,lu_idx+2*NSingleCoeffs) + wts_2 * coeff(1:nb,lu_idx+2*NSingleCoeffs+1)
86
87    !if (lhook) call dr_hook('radiation_ice_optics:calc_ice_optics_yi_sw',1,hook_handle)
88
89  end subroutine calc_ice_optics_yi_sw
90
91
92  !---------------------------------------------------------------------
93  ! Compute longwave ice-particle scattering properties using Yi et
94  ! al. (2013) parameterization
95  subroutine calc_ice_optics_yi_lw(nb, coeff, ice_wp, &
96       &  re, od, scat_od, g)
97
98    use parkind1, only : jprb, jpim
99    !use yomhook,  only : lhook, dr_hook, jphook
100
101    ! Number of bands
102    integer, intent(in)  :: nb
103    ! Coefficients read from a data file
104    real(jprb), intent(in) :: coeff(:,:)
105    ! Ice water path (kg m-2)
106    real(jprb), intent(in) :: ice_wp
107    ! Effective radius (m)
108    real(jprb), intent(in) :: re
109    ! Total optical depth, scattering optical depth and asymmetry factor
110    real(jprb), intent(out) :: od(nb), scat_od(nb), g(nb)
111
112    ! Yi's effective diameter (microns)
113    real(jprb) :: de_um
114    ! Ice water path in g m-2
115    real (jprb) :: iwp_gm_2
116    ! LUT temp variables
117    real(jprb) :: wts_1, wts_2
118    integer(jpim) :: lu_idx
119    real(kind=jprb), parameter    :: lu_scale  = 0.2_jprb
120    real(kind=jprb), parameter    :: lu_offset = 1.0_jprb
121    !real(jphook) :: hook_handle
122
123    !if (lhook) call dr_hook('radiation_ice_optics:calc_ice_optics_yi_sw',0,hook_handle)
124
125    ! Convert to effective diameter using the relationship in the IFS
126    !de_um     = re * (1.0e6_jprb / 0.64952_jprb)
127    de_um     = re * 2.0e6_jprb
128
129    ! limit de_um to validity of LUT
130    de_um = max(de_um,10.0_jprb)
131    de_um = min(de_um,119.99_jprb) !avoid greater than or equal to 120 um
132
133    iwp_gm_2  = ice_wp * 1000.0_jprb
134
135    lu_idx = floor(de_um * lu_scale - lu_offset)
136    wts_2  = (de_um * lu_scale - lu_offset) - lu_idx
137    wts_1  = 1.0_jprb - wts_2
138    od     = 0.001_jprb * iwp_gm_2 * &
139             & ( wts_1 * coeff(1:nb,lu_idx) + wts_2 * coeff(1:nb,lu_idx+1) )
140    scat_od = od * &
141             & ( wts_1 * coeff(1:nb,lu_idx+NSingleCoeffs) + wts_2 * coeff(1:nb,lu_idx+NSingleCoeffs+1) )
142    g = wts_1 * coeff(1:nb,lu_idx+2*NSingleCoeffs) + wts_2 * coeff(1:nb,lu_idx+2*NSingleCoeffs+1)
143
144     !if (lhook) call dr_hook('radiation_ice_optics:calc_ice_optics_yi_lw',1,hook_handle)
145
146  end subroutine calc_ice_optics_yi_lw
147
148end module radiation_ice_optics_yi
Note: See TracBrowser for help on using the repository browser.