source: LMDZ6/trunk/libf/phylmd/ecrad/driver/test_cloud_generator.F90 @ 5248

Last change on this file since 5248 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: 2.0 KB
Line 
1! (C) Copyright 2017- ECMWF.
2!
3! This software is licensed under the terms of the Apache Licence Version 2.0
4! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5!
6! In applying this licence, ECMWF does not waive the privileges and immunities
7! granted to it by virtue of its status as an intergovernmental organisation
8! nor does it submit to any jurisdiction.
9
10program test_cloud_generator
11
12  use parkind1,                  only : jprb
13  use radiation_cloud_generator, only : cloud_generator
14  use radiation_pdf_sampler,     only : pdf_sampler_type
15  use radiation_cloud_cover,     only : &
16       & IOverlapMaximumRandom, IOverlapExponentialRandom, IOverlapExponential
17
18  implicit none
19
20  integer,    parameter :: ncol = 2000
21  integer,    parameter :: nlev = 137
22  integer,    parameter :: i_overlap_scheme = IOverlapExponential
23  real(jprb), parameter :: scale_height = 8000.0_jprb
24  real(jprb), parameter :: cloud_inhom_decorr_scaling = 0.5_jprb
25  real(jprb), parameter :: frac_threshold = 1.0e-6_jprb
26
27  real(jprb) :: cloud_fraction(nlev), overlap_param(nlev-1), fractional_std(nlev)
28!  real(jprb) :: pressure_hl(nlev+1)
29
30!  real(jprb) :: decorrelation_length
31
32  real(jprb) :: od_scaling(ncol,nlev)
33  real(jprb) :: total_cloud_cover
34
35  integer :: iseed
36
37  integer :: jcol, jlev
38
39  type(pdf_sampler_type) :: pdf_sampler
40
41  iseed = 1
42  cloud_fraction = 0.0_jprb
43  overlap_param  = 0.9_jprb
44  fractional_std = 1.0_jprb ! Value up to 45R1
45
46  ! Insert cloud layers
47  cloud_fraction(115:125) = 0.1_jprb !0.5_jprb
48  cloud_fraction(20:100) = 0.1_jprb !0.75_jprb
49
50  call pdf_sampler%setup('data/mcica_gamma.nc', iverbose=0)
51
52  call cloud_generator(ncol, nlev, i_overlap_scheme, &
53       &  iseed, frac_threshold, &
54       &  cloud_fraction, overlap_param, &
55       &  cloud_inhom_decorr_scaling, &
56       &  fractional_std, pdf_sampler, &
57       &  od_scaling, total_cloud_cover)
58
59  do jlev = 1,nlev
60    do jcol = 1,ncol
61      write(6,'(f5.2,a)',advance='no') od_scaling(jcol,jlev), ' '
62    end do
63    write(6,*)
64  end do
65
66
67end program test_cloud_generator
Note: See TracBrowser for help on using the repository browser.