source: LMDZ6/branches/LMDZ_cdrag_LSCE/libf/phylmd/ecrad/rrtm_kgb4.F90 @ 5407

Last change on this file since 5407 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: 13.7 KB
Line 
1SUBROUTINE RRTM_KGB4
2
3!     Originally by Eli J. Mlawer, Atmospheric & Environmental Research.
4!     BAND 4:  630-700 cm-1 (low - H2O,CO2; high - O3,CO2)
5!     Reformatted for F90 by JJMorcrette, ECMWF
6!     R. Elkhatib 12-10-2005 Split for faster and more robust compilation.
7!     G.Mozdzynski March 2011 read constants from files
8!     ABozzo 201306 updated to rrtmg v4.85
9!     T. Wilhelmsson and K. Yessad (Oct 2013) Geometry and setup refactoring.
10!     ------------------------------------------------------------------
11
12USE PARKIND1  ,ONLY : JPRB
13USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
14USE YOMLUN    ,ONLY : NULRAD
15USE MPL_MODULE,ONLY : MPL_BROADCAST
16USE YOMTAG    ,ONLY : MTAGRAD
17USE YOMMP0    , ONLY : NPROC, MYPROC
18
19USE YOERRTO4 , ONLY :  KAO     ,KBO     ,KAO_D,KBO_D,SELFREFO   ,FORREFO, FRACREFAO  ,FRACREFBO
20
21
22!     ------------------------------------------------------------------
23
24IMPLICIT NONE
25REAL(KIND=JPRB) :: ZHOOK_HANDLE
26
27#include "abor1.intfb.h"
28
29IF (LHOOK) CALL DR_HOOK('RRTM_KGB4',0,ZHOOK_HANDLE)
30
31IF( MYPROC==1 )THEN
32  READ(NULRAD,ERR=1001) KAO_D,KBO_D
33 ! Convert the data into model actual precision.
34  KAO = REAL(KAO_D,JPRB)
35  KBO = REAL(KBO_D,JPRB)
36ENDIF
37IF( NPROC>1 )THEN
38  CALL MPL_BROADCAST (KAO,MTAGRAD,1,CDSTRING='RRTM_KGB4:')
39  CALL MPL_BROADCAST (KBO,MTAGRAD,1,CDSTRING='RRTM_KGB4:')
40ENDIF
41
42
43! Planck fraction mapping level : P = 142.5940 mbar, T = 215.70 K
44      FRACREFAO(:, 1) = (/ &
45     &   1.5572E-01_JPRB,1.4925E-01_JPRB,1.4107E-01_JPRB,1.3126E-01_JPRB,1.1791E-01_JPRB,1.0173E-01_JPRB, &
46     &   8.2949E-02_JPRB,6.2393E-02_JPRB,4.2146E-02_JPRB,4.5907E-03_JPRB,3.7965E-03_JPRB,2.9744E-03_JPRB, &
47     &   2.2074E-03_JPRB,1.4063E-03_JPRB,5.3012E-04_JPRB,7.4595E-05_JPRB/)
48      FRACREFAO(:, 2) = (/ &
49     &   1.5572E-01_JPRB,1.4925E-01_JPRB,1.4107E-01_JPRB,1.3126E-01_JPRB,1.1791E-01_JPRB,1.0173E-01_JPRB, &
50     &   8.2949E-02_JPRB,6.2392E-02_JPRB,4.2146E-02_JPRB,4.5906E-03_JPRB,3.7965E-03_JPRB,2.9745E-03_JPRB, &
51     &   2.2074E-03_JPRB,1.4063E-03_JPRB,5.3012E-04_JPRB,7.4595E-05_JPRB/)
52      FRACREFAO(:, 3) = (/ &
53     &   1.5572E-01_JPRB,1.4925E-01_JPRB,1.4107E-01_JPRB,1.3126E-01_JPRB,1.1791E-01_JPRB,1.0173E-01_JPRB, &
54     &   8.2949E-02_JPRB,6.2393E-02_JPRB,4.2146E-02_JPRB,4.5907E-03_JPRB,3.7965E-03_JPRB,2.9745E-03_JPRB, &
55     &   2.2074E-03_JPRB,1.4063E-03_JPRB,5.3012E-04_JPRB,7.4595E-05_JPRB/)
56      FRACREFAO(:, 4) = (/ &
57     &   1.5572E-01_JPRB,1.4925E-01_JPRB,1.4107E-01_JPRB,1.3126E-01_JPRB,1.1791E-01_JPRB,1.0173E-01_JPRB, &
58     &   8.2949E-02_JPRB,6.2393E-02_JPRB,4.2146E-02_JPRB,4.5907E-03_JPRB,3.7964E-03_JPRB,2.9744E-03_JPRB, &
59     &   2.2074E-03_JPRB,1.4063E-03_JPRB,5.3012E-04_JPRB,7.4595E-05_JPRB/)
60      FRACREFAO(:, 5) = (/ &
61     &   1.5572E-01_JPRB,1.4925E-01_JPRB,1.4107E-01_JPRB,1.3126E-01_JPRB,1.1791E-01_JPRB,1.0173E-01_JPRB, &
62     &   8.2949E-02_JPRB,6.2393E-02_JPRB,4.2146E-02_JPRB,4.5907E-03_JPRB,3.7965E-03_JPRB,2.9744E-03_JPRB, &
63     &   2.2074E-03_JPRB,1.4063E-03_JPRB,5.3012E-04_JPRB,7.4595E-05_JPRB/)
64      FRACREFAO(:, 6) = (/ &
65     &   1.5572E-01_JPRB,1.4925E-01_JPRB,1.4107E-01_JPRB,1.3126E-01_JPRB,1.1791E-01_JPRB,1.0173E-01_JPRB, &
66     &   8.2949E-02_JPRB,6.2393E-02_JPRB,4.2146E-02_JPRB,4.5907E-03_JPRB,3.7965E-03_JPRB,2.9744E-03_JPRB, &
67     &   2.2074E-03_JPRB,1.4063E-03_JPRB,5.3012E-04_JPRB,7.4595E-05_JPRB/)
68      FRACREFAO(:, 7) = (/ &
69     &   1.5572E-01_JPRB,1.4926E-01_JPRB,1.4107E-01_JPRB,1.3126E-01_JPRB,1.1791E-01_JPRB,1.0173E-01_JPRB, &
70     &   8.2949E-02_JPRB,6.2393E-02_JPRB,4.2146E-02_JPRB,4.5908E-03_JPRB,3.7964E-03_JPRB,2.9745E-03_JPRB, &
71     &   2.2074E-03_JPRB,1.4063E-03_JPRB,5.3012E-04_JPRB,7.4595E-05_JPRB/)
72      FRACREFAO(:, 8) = (/ &
73     &   1.5571E-01_JPRB,1.4926E-01_JPRB,1.4107E-01_JPRB,1.3125E-01_JPRB,1.1791E-01_JPRB,1.0173E-01_JPRB, &
74     &   8.2949E-02_JPRB,6.2393E-02_JPRB,4.2146E-02_JPRB,4.5907E-03_JPRB,3.7964E-03_JPRB,2.9744E-03_JPRB, &
75     &   2.2074E-03_JPRB,1.4063E-03_JPRB,5.3012E-04_JPRB,7.4595E-05_JPRB/)
76      FRACREFAO(:, 9) = (/ &
77     &   1.5952E-01_JPRB,1.5155E-01_JPRB,1.4217E-01_JPRB,1.3077E-01_JPRB,1.1667E-01_JPRB,1.0048E-01_JPRB, &
78     &   8.1511E-02_JPRB,6.1076E-02_JPRB,4.1111E-02_JPRB,4.4432E-03_JPRB,3.6910E-03_JPRB,2.9076E-03_JPRB, &
79     &   2.1329E-03_JPRB,1.3566E-03_JPRB,5.2235E-04_JPRB,7.9935E-05_JPRB/)
80
81! Planck fraction mapping level : P = 95.58350 mb, T = 215.70 K
82      FRACREFBO(:, 1) = (/ &
83     &   1.5558E-01_JPRB,1.4931E-01_JPRB,1.4104E-01_JPRB,1.3124E-01_JPRB,1.1793E-01_JPRB,1.0160E-01_JPRB, &
84     &   8.3142E-02_JPRB,6.2403E-02_JPRB,4.2170E-02_JPRB,4.5935E-03_JPRB,3.7976E-03_JPRB,2.9986E-03_JPRB, &
85     &   2.1890E-03_JPRB,1.4061E-03_JPRB,5.3005E-04_JPRB,7.4587E-05_JPRB/)
86      FRACREFBO(:, 2) = (/ &
87     &   1.5558E-01_JPRB,1.4932E-01_JPRB,1.4104E-01_JPRB,1.3124E-01_JPRB,1.1792E-01_JPRB,1.0159E-01_JPRB, &
88     &   8.3142E-02_JPRB,6.2403E-02_JPRB,4.2170E-02_JPRB,4.5935E-03_JPRB,3.7976E-03_JPRB,2.9986E-03_JPRB, &
89     &   2.1890E-03_JPRB,1.4061E-03_JPRB,5.3005E-04_JPRB,7.4587E-05_JPRB/)
90      FRACREFBO(:, 3) = (/ &
91     &   1.5558E-01_JPRB,1.4933E-01_JPRB,1.4103E-01_JPRB,1.3124E-01_JPRB,1.1792E-01_JPRB,1.0159E-01_JPRB, &
92     &   8.3142E-02_JPRB,6.2403E-02_JPRB,4.2170E-02_JPRB,4.5935E-03_JPRB,3.7976E-03_JPRB,2.9986E-03_JPRB, &
93     &   2.1890E-03_JPRB,1.4061E-03_JPRB,5.3005E-04_JPRB,7.4587E-05_JPRB/)
94      FRACREFBO(:, 4) = (/ &
95     &   1.5569E-01_JPRB,1.4926E-01_JPRB,1.4102E-01_JPRB,1.3122E-01_JPRB,1.1791E-01_JPRB,1.0159E-01_JPRB, &
96     &   8.3141E-02_JPRB,6.2403E-02_JPRB,4.2170E-02_JPRB,4.5935E-03_JPRB,3.7976E-03_JPRB,2.9986E-03_JPRB, &
97     &   2.1890E-03_JPRB,1.4061E-03_JPRB,5.3005E-04_JPRB,7.4587E-05_JPRB/)
98      FRACREFBO(:, 5) = (/ &
99     &   1.5947E-01_JPRB,1.5132E-01_JPRB,1.4195E-01_JPRB,1.3061E-01_JPRB,1.1680E-01_JPRB,1.0054E-01_JPRB, &
100     &   8.1785E-02_JPRB,6.1212E-02_JPRB,4.1276E-02_JPRB,4.4424E-03_JPRB,3.6628E-03_JPRB,2.8943E-03_JPRB, &
101     &   2.1134E-03_JPRB,1.3457E-03_JPRB,5.1024E-04_JPRB,7.3998E-05_JPRB/)
102
103!     ------------------------------------------------------------------
104
105!     The array KAO contains absorption coefs for each of the 16 g-intervals
106!     for a range of pressure levels > ~100mb, temperatures, and ratios
107!     of water vapor to CO2.  The first index in the array, JS, runs
108!     from 1 to 9 and corresponds to different water vapor to CO2 ratios,
109!     as expressed through the binary species parameter eta, defined as
110!     eta = h2o/(h20 + (rat) * co2), where rat is the ratio of the integrated
111!     line strength in the band of co2 to that of h2o.  For instance,
112!     JS=1 refers to dry air (eta = 0), JS = 9 corresponds to eta = 1.0.
113!     The 2nd index in the array, JT, which runs from 1 to 5, corresponds
114!     to different temperatures.  More specifically, JT = 3 means that the
115!     data are for the reference temperature TREF for this pressure
116!     level, JT = 2 refers to the temperature TREF-15,
117!     JT = 1 is for TREF-30, JT = 4 is for TREF+15, and JT = 5
118!     is for TREF+30.  The third index, JP, runs from 1 to 13 and refers
119!     to the reference pressure level (e.g. JP = 1 is for a
120!     pressure of 1053.63 mb).  The fourth index, IG, goes from 1 to 16,
121!     and tells us which g-interval the absorption coefficients are for.
122
123
124
125!     The array KBO contains absorption coefs for each of the 16 g-intervals
126!     for a range of pressure levels  < ~100mb, temperatures, and ratios
127!     of O3 to CO2.  The first index in the array, JS, runs from 1 to 6,
128!     and corresponds to different O3 to CO2 ratios, as expressed through
129!     the binary species parameter eta, defined as eta = O3/(O3+RAT*H2O),
130!     where RAT is the ratio of the integrated line strength in the band
131!     of CO2 to that of O3.  For instance, JS=1 refers to no O3 (eta = 0)
132!     and JS = 5 corresponds to eta = 1.0.  The second index, JT, which
133!     runs from 1 to 5, corresponds to different temperatures.  More
134!     specifically, JT = 3 means that the data are for the corresponding
135!     reference temperature TREF for this  pressure level, JT = 2 refers
136!     to the TREF-15, JT = 1 is for TREF-30, JT = 4 is for TREF+15, and
137!     JT = 5 is for TREF+30.  The third index, JP, runs from 13 to 59 and
138!     refers to the corresponding pressure level in PREF (e.g. JP = 13 is
139!     for a pressure of 95.5835 mb).  The fourth index, IG, goes from 1 to
140!     16, and tells us which g-interval the absorption coefficients are for.
141
142
143
144!     The array FORREFO contains the coefficient of the water vapor
145!     foreign-continuum (including the energy term).  The first
146!     index refers to reference temperature (296,260,224,260) and
147!     pressure (970,475,219,3 mbar) levels.  The second index
148!     runs over the g-channel (1 to 16).
149
150      FORREFO(1,:) = (/ &
151     &3.3839E-04_JPRB,2.4739E-04_JPRB,2.2846E-04_JPRB,2.3376E-04_JPRB,2.2622E-04_JPRB,2.3188E-04_JPRB, &
152     &2.2990E-04_JPRB,2.2532E-04_JPRB,2.1233E-04_JPRB,2.0593E-04_JPRB,2.0716E-04_JPRB,2.0809E-04_JPRB, &
153     &2.0889E-04_JPRB,2.0932E-04_JPRB,2.0944E-04_JPRB,2.0945E-04_JPRB/)
154      FORREFO(2,:) = (/ &
155     &3.4391E-04_JPRB,2.6022E-04_JPRB,2.3449E-04_JPRB,2.4544E-04_JPRB,2.3831E-04_JPRB,2.3014E-04_JPRB, &
156     &2.3729E-04_JPRB,2.2726E-04_JPRB,2.1892E-04_JPRB,1.9223E-04_JPRB,2.1291E-04_JPRB,2.1406E-04_JPRB, &
157     &2.1491E-04_JPRB,2.1548E-04_JPRB,2.1562E-04_JPRB,2.1567E-04_JPRB/)
158      FORREFO(3,:) = (/ &
159     &3.4219E-04_JPRB,2.7334E-04_JPRB,2.3727E-04_JPRB,2.4515E-04_JPRB,2.5272E-04_JPRB,2.4212E-04_JPRB, &
160     &2.3824E-04_JPRB,2.3615E-04_JPRB,2.2724E-04_JPRB,2.2381E-04_JPRB,1.9634E-04_JPRB,2.1625E-04_JPRB, &
161     &2.1963E-04_JPRB,2.2032E-04_JPRB,2.2057E-04_JPRB,2.2058E-04_JPRB/)
162      FORREFO(4,:) = (/ &
163     &3.1684E-04_JPRB,2.4823E-04_JPRB,2.4890E-04_JPRB,2.4577E-04_JPRB,2.4106E-04_JPRB,2.4353E-04_JPRB, &
164     &2.4038E-04_JPRB,2.3932E-04_JPRB,2.3604E-04_JPRB,2.3773E-04_JPRB,2.4243E-04_JPRB,2.2597E-04_JPRB, &
165     &2.2879E-04_JPRB,2.2440E-04_JPRB,2.1104E-04_JPRB,2.1460E-04_JPRB/)
166
167!     The array SELFREFO contains the coefficient of the water vapor
168!     self-continuum (including the energy term).  The first index
169!     refers to temperature in 7.2 degree increments.  For instance,
170!     JT = 1 refers to a temperature of 245.6, JT = 2 refers to 252.8,
171!     etc.  The second index runs over the g-channel (1 to 16).
172
173      SELFREFO(:, 1) = (/ &
174     & 2.62922E-01_JPRB, 2.29106E-01_JPRB, 1.99640E-01_JPRB, 1.73964E-01_JPRB, 1.51589E-01_JPRB, &
175     & 1.32093E-01_JPRB, 1.15104E-01_JPRB, 1.00300E-01_JPRB, 8.74000E-02_JPRB, 7.61592E-02_JPRB/)
176      SELFREFO(:, 2) = (/ &
177     & 2.45448E-01_JPRB, 2.13212E-01_JPRB, 1.85210E-01_JPRB, 1.60886E-01_JPRB, 1.39756E-01_JPRB, &
178     & 1.21401E-01_JPRB, 1.05457E-01_JPRB, 9.16070E-02_JPRB, 7.95759E-02_JPRB, 6.91249E-02_JPRB/)
179      SELFREFO(:, 3) = (/ &
180     & 2.41595E-01_JPRB, 2.09697E-01_JPRB, 1.82010E-01_JPRB, 1.57979E-01_JPRB, 1.37121E-01_JPRB, &
181     & 1.19016E-01_JPRB, 1.03302E-01_JPRB, 8.96630E-02_JPRB, 7.78246E-02_JPRB, 6.75492E-02_JPRB/)
182      SELFREFO(:, 4) = (/ &
183     & 2.44818E-01_JPRB, 2.12172E-01_JPRB, 1.83880E-01_JPRB, 1.59360E-01_JPRB, 1.38110E-01_JPRB, &
184     & 1.19694E-01_JPRB, 1.03733E-01_JPRB, 8.99010E-02_JPRB, 7.79131E-02_JPRB, 6.75238E-02_JPRB/)
185      SELFREFO(:, 5) = (/ &
186     & 2.43458E-01_JPRB, 2.10983E-01_JPRB, 1.82840E-01_JPRB, 1.58451E-01_JPRB, 1.37315E-01_JPRB, &
187     & 1.18998E-01_JPRB, 1.03125E-01_JPRB, 8.93690E-02_JPRB, 7.74480E-02_JPRB, 6.71171E-02_JPRB/)
188      SELFREFO(:, 6) = (/ &
189     & 2.40186E-01_JPRB, 2.08745E-01_JPRB, 1.81420E-01_JPRB, 1.57672E-01_JPRB, 1.37032E-01_JPRB, &
190     & 1.19095E-01_JPRB, 1.03505E-01_JPRB, 8.99560E-02_JPRB, 7.81806E-02_JPRB, 6.79467E-02_JPRB/)
191      SELFREFO(:, 7) = (/ &
192     & 2.42752E-01_JPRB, 2.10579E-01_JPRB, 1.82670E-01_JPRB, 1.58460E-01_JPRB, 1.37459E-01_JPRB, &
193     & 1.19240E-01_JPRB, 1.03437E-01_JPRB, 8.97280E-02_JPRB, 7.78359E-02_JPRB, 6.75200E-02_JPRB/)
194      SELFREFO(:, 8) = (/ &
195     & 2.39620E-01_JPRB, 2.08166E-01_JPRB, 1.80840E-01_JPRB, 1.57101E-01_JPRB, 1.36479E-01_JPRB, &
196     & 1.18563E-01_JPRB, 1.03000E-01_JPRB, 8.94790E-02_JPRB, 7.77332E-02_JPRB, 6.75292E-02_JPRB/)
197      SELFREFO(:, 9) = (/ &
198     & 2.38856E-01_JPRB, 2.07166E-01_JPRB, 1.79680E-01_JPRB, 1.55841E-01_JPRB, 1.35165E-01_JPRB, &
199     & 1.17232E-01_JPRB, 1.01678E-01_JPRB, 8.81880E-02_JPRB, 7.64877E-02_JPRB, 6.63397E-02_JPRB/)
200      SELFREFO(:,10) = (/ &
201     & 2.29821E-01_JPRB, 2.00586E-01_JPRB, 1.75070E-01_JPRB, 1.52800E-01_JPRB, 1.33363E-01_JPRB, &
202     & 1.16398E-01_JPRB, 1.01591E-01_JPRB, 8.86680E-02_JPRB, 7.73887E-02_JPRB, 6.75443E-02_JPRB/)
203      SELFREFO(:,11) = (/ &
204     & 2.39945E-01_JPRB, 2.08186E-01_JPRB, 1.80630E-01_JPRB, 1.56722E-01_JPRB, 1.35978E-01_JPRB, &
205     & 1.17980E-01_JPRB, 1.02364E-01_JPRB, 8.88150E-02_JPRB, 7.70594E-02_JPRB, 6.68598E-02_JPRB/)
206      SELFREFO(:,12) = (/ &
207     & 2.40271E-01_JPRB, 2.08465E-01_JPRB, 1.80870E-01_JPRB, 1.56927E-01_JPRB, 1.36154E-01_JPRB, &
208     & 1.18131E-01_JPRB, 1.02494E-01_JPRB, 8.89260E-02_JPRB, 7.71545E-02_JPRB, 6.69412E-02_JPRB/)
209      SELFREFO(:,13) = (/ &
210     & 2.40503E-01_JPRB, 2.08670E-01_JPRB, 1.81050E-01_JPRB, 1.57086E-01_JPRB, 1.36294E-01_JPRB, &
211     & 1.18254E-01_JPRB, 1.02602E-01_JPRB, 8.90210E-02_JPRB, 7.72380E-02_JPRB, 6.70147E-02_JPRB/)
212      SELFREFO(:,14) = (/ &
213     & 2.40670E-01_JPRB, 2.08811E-01_JPRB, 1.81170E-01_JPRB, 1.57188E-01_JPRB, 1.36380E-01_JPRB, &
214     & 1.18327E-01_JPRB, 1.02663E-01_JPRB, 8.90730E-02_JPRB, 7.72819E-02_JPRB, 6.70517E-02_JPRB/)
215      SELFREFO(:,15) = (/ &
216     & 2.40711E-01_JPRB, 2.08846E-01_JPRB, 1.81200E-01_JPRB, 1.57213E-01_JPRB, 1.36402E-01_JPRB, &
217     & 1.18346E-01_JPRB, 1.02679E-01_JPRB, 8.90870E-02_JPRB, 7.72939E-02_JPRB, 6.70621E-02_JPRB/)
218      SELFREFO(:,16) = (/ &
219     & 2.40727E-01_JPRB, 2.08859E-01_JPRB, 1.81210E-01_JPRB, 1.57221E-01_JPRB, 1.36408E-01_JPRB, &
220     & 1.18350E-01_JPRB, 1.02682E-01_JPRB, 8.90890E-02_JPRB, 7.72952E-02_JPRB, 6.70627E-02_JPRB/)
221
222
223IF (LHOOK) CALL DR_HOOK('RRTM_KGB4',1,ZHOOK_HANDLE)
224RETURN
225
2261001 CONTINUE
227CALL ABOR1("RRTM_KGB4:ERROR READING FILE RADRRTM")
228
229END SUBROUTINE RRTM_KGB4
Note: See TracBrowser for help on using the repository browser.