source: LMDZ6/branches/cirrus/libf/phylmd/ecrad.v1.5.1/radiation_ice_optics_baran2017.F90 @ 5435

Last change on this file since 5435 was 3908, checked in by idelkadi, 4 years ago

Online implementation of the radiative transfer code ECRAD in the LMDZ model.

  • Inclusion of the ecrad directory containing the sources of the ECRAD code
    • interface routine : radiation_scheme.F90
  • Adaptation of compilation scripts :
    • compilation under CPP key CPP_ECRAD
    • compilation with option "-rad ecard" or "-ecard true"
    • The "-rad old/rtm/ecran" build option will need to replace the "-rrtm true" and "-ecrad true" options in the future.
  • Runing LMDZ simulations with ecrad, you need :
    • logical key iflag_rrtm = 2 in physiq.def
    • namelist_ecrad (DefLists?)
    • the directory "data" containing the configuration files is temporarily placed in ../libfphylmd/ecrad/
  • Compilation and execution are tested in the 1D case. The repository under svn would allow to continue the implementation work: tests, verification of the results, ...
File size: 2.6 KB
Line 
1! radiation_ice_optics_baran2017.F90 - 2017 parameterization of Baran's 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! Author:  Robin Hogan
13! Email:   r.j.hogan@ecmwf.int
14!
15
16module radiation_ice_optics_baran2017
17
18  implicit none
19  public
20
21  ! The number of ice coefficients depends on the parameterization
22  integer, parameter :: NIceOpticsCoeffsBaran2017 = 9
23  integer, parameter :: NIceOpticsGeneralCoeffsBaran2017 = 5
24
25contains
26
27 
28  !---------------------------------------------------------------------
29  ! Compute ice-particle scattering properties using a
30  ! parameterization as a function of ice water mixing ratio and
31  ! temperature
32  subroutine calc_ice_optics_baran2017(nb, coeff_gen, coeff, ice_wp, &
33       &  qi, temperature, od, scat_od, g)
34
35    use parkind1, only : jprb
36    !use yomhook,  only : lhook, dr_hook
37
38    ! Number of bands
39    integer, intent(in)  :: nb
40    ! General coefficients read from a data file
41    real(jprb), intent(in) :: coeff_gen(:)
42    ! Band-specific coefficients read from a data file
43    real(jprb), intent(in) :: coeff(:,:)
44    ! Ice water path (kg m-2) and mixing ratio (kg kg-1)
45    real(jprb), intent(in) :: ice_wp, qi
46    ! Temperature (K)
47    real(jprb), intent(in) :: temperature
48    ! Total optical depth, scattering optical depth and asymmetry factor
49    real(jprb), intent(out) :: od(nb), scat_od(nb), g(nb)
50   
51    ! Modified ice mixing ratio, and the same raised to an appropriate power
52    real(jprb) :: qi_mod, qi_mod_od, qi_mod_ssa, qi_mod_g
53   
54    !real(jprb) :: hook_handle
55
56    !if (lhook) call dr_hook('radiation_ice_optics:calc_ice_optics_baran2017',0,hook_handle)
57
58    qi_mod     = qi * exp(coeff_gen(1)*(temperature-coeff_gen(2)))
59    qi_mod_od  = qi_mod ** coeff_gen(3)
60    qi_mod_ssa = qi_mod ** coeff_gen(4)
61    qi_mod_g   = qi_mod ** coeff_gen(5)
62
63    od      = ice_wp * (coeff(1:nb,1) + coeff(1:nb,2)/(1.0_jprb+qi_mod_od *coeff(1:nb,3)))
64    scat_od = od     * (coeff(1:nb,4) + coeff(1:nb,5)/(1.0_jprb+qi_mod_ssa*coeff(1:nb,6)))
65    g       =           coeff(1:nb,7) + coeff(1:nb,8)/(1.0_jprb+qi_mod_g  *coeff(1:nb,9))
66
67    !if (lhook) call dr_hook('radiation_ice_optics:calc_ice_optics_baran2017',1,hook_handle)
68
69  end subroutine calc_ice_optics_baran2017
70
71end module radiation_ice_optics_baran2017
Note: See TracBrowser for help on using the repository browser.