source: LMDZ6/trunk/libf/phylmd/ecrad/radiation_liquid_optics_socrates.F90 @ 3908

Last change on this file since 3908 was 3908, checked in by idelkadi, 3 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.8 KB
Line 
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
18module 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
34contains
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
77end module radiation_liquid_optics_socrates
Note: See TracBrowser for help on using the repository browser.