source: LMDZ6/trunk/libf/phylmd/ecrad.v1.5.1/rrtm_kgb16.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: 12.0 KB
Line 
1SUBROUTINE RRTM_KGB16
2
3!     Originally by Eli J. Mlawer, Atmospheric & Environmental Research.
4!     BAND 16:  2600-3000 cm-1 (low - H2O,CH4; high - nothing)
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
17
18USE YOERRTO16, ONLY : KAO,KBO ,KAO_D,KBO_D,SELFREFO,FORREFO ,FRACREFAO,FRACREFBO
19USE YOMMP0    , ONLY : NPROC, MYPROC
20
21
22!     ------------------------------------------------------------------
23
24IMPLICIT NONE
25REAL(KIND=JPRB) :: ZHOOK_HANDLE
26
27#include "abor1.intfb.h"
28
29IF (LHOOK) CALL DR_HOOK('RRTM_KGB16',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)
36  CLOSE(NULRAD,ERR=1000)
37ENDIF
38IF( NPROC>1 )THEN
39  CALL MPL_BROADCAST (KAO,MTAGRAD,1,CDSTRING='RRTM_KGB16:')
40  CALL MPL_BROADCAST (KBO,MTAGRAD,1,CDSTRING='RRTM_KGB16:')
41ENDIF
42
43! Planck fraction mapping level: P = 387.6100 mbar, T = 250.17 K
44      FRACREFAO(:, 1) = (/ &
45     &  1.1593E-01_JPRB,2.3390E-01_JPRB,1.9120E-01_JPRB,1.3121E-01_JPRB,1.0590E-01_JPRB,8.4852E-02_JPRB, &
46     &  6.4168E-02_JPRB,4.2537E-02_JPRB,2.3220E-02_JPRB,2.1767E-03_JPRB,1.8203E-03_JPRB,1.3724E-03_JPRB, &
47     &  9.5452E-04_JPRB,5.5015E-04_JPRB,1.9348E-04_JPRB,2.7344E-05_JPRB/)
48      FRACREFAO(:, 2) = (/ &
49     &  2.8101E-01_JPRB,1.9773E-01_JPRB,1.4749E-01_JPRB,1.1399E-01_JPRB,8.8190E-02_JPRB,7.0531E-02_JPRB, &
50     &  4.6356E-02_JPRB,3.0774E-02_JPRB,1.7332E-02_JPRB,2.0054E-03_JPRB,1.5950E-03_JPRB,1.2760E-03_JPRB, &
51     &  9.5034E-04_JPRB,5.4992E-04_JPRB,1.9349E-04_JPRB,2.7309E-05_JPRB/)
52      FRACREFAO(:, 3) = (/ &
53     &  2.9054E-01_JPRB,2.1263E-01_JPRB,1.4133E-01_JPRB,1.1083E-01_JPRB,8.5107E-02_JPRB,6.5247E-02_JPRB, &
54     &  4.4542E-02_JPRB,2.7205E-02_JPRB,1.6495E-02_JPRB,1.8453E-03_JPRB,1.5222E-03_JPRB,1.1884E-03_JPRB, &
55     &  8.1094E-04_JPRB,4.9173E-04_JPRB,1.9344E-04_JPRB,2.7286E-05_JPRB/)
56      FRACREFAO(:, 4) = (/ &
57     &  2.9641E-01_JPRB,2.1738E-01_JPRB,1.4228E-01_JPRB,1.0830E-01_JPRB,8.2837E-02_JPRB,6.1359E-02_JPRB, &
58     &  4.4683E-02_JPRB,2.5027E-02_JPRB,1.6057E-02_JPRB,1.7558E-03_JPRB,1.4193E-03_JPRB,1.0970E-03_JPRB, &
59     &  7.8281E-04_JPRB,4.3260E-04_JPRB,1.4837E-04_JPRB,2.2958E-05_JPRB/)
60      FRACREFAO(:, 5) = (/ &
61     &  2.9553E-01_JPRB,2.2139E-01_JPRB,1.4816E-01_JPRB,1.0601E-01_JPRB,8.0048E-02_JPRB,6.0082E-02_JPRB, &
62     &  4.3952E-02_JPRB,2.3788E-02_JPRB,1.5734E-02_JPRB,1.6586E-03_JPRB,1.3434E-03_JPRB,1.0281E-03_JPRB, &
63     &  7.0256E-04_JPRB,4.2577E-04_JPRB,1.2803E-04_JPRB,1.3315E-05_JPRB/)
64      FRACREFAO(:, 6) = (/ &
65     &  2.9313E-01_JPRB,2.2476E-01_JPRB,1.5470E-01_JPRB,1.0322E-01_JPRB,7.8904E-02_JPRB,5.8175E-02_JPRB, &
66     &  4.3097E-02_JPRB,2.3618E-02_JPRB,1.5385E-02_JPRB,1.5942E-03_JPRB,1.2702E-03_JPRB,9.5566E-04_JPRB, &
67     &  6.5421E-04_JPRB,4.0165E-04_JPRB,1.2805E-04_JPRB,1.3355E-05_JPRB/)
68      FRACREFAO(:, 7) = (/ &
69     &  2.9069E-01_JPRB,2.2823E-01_JPRB,1.5995E-01_JPRB,1.0170E-01_JPRB,7.7287E-02_JPRB,5.6780E-02_JPRB, &
70     &  4.1752E-02_JPRB,2.3899E-02_JPRB,1.4937E-02_JPRB,1.4916E-03_JPRB,1.1909E-03_JPRB,9.1307E-04_JPRB, &
71     &  6.3518E-04_JPRB,3.9866E-04_JPRB,1.2805E-04_JPRB,1.3298E-05_JPRB/)
72      FRACREFAO(:, 8) = (/ &
73     &  2.8446E-01_JPRB,2.2651E-01_JPRB,1.7133E-01_JPRB,1.0299E-01_JPRB,7.4231E-02_JPRB,5.6031E-02_JPRB, &
74     &  4.1368E-02_JPRB,2.4318E-02_JPRB,1.4135E-02_JPRB,1.4216E-03_JPRB,1.1465E-03_JPRB,8.9800E-04_JPRB, &
75     &  6.3553E-04_JPRB,3.9536E-04_JPRB,1.2749E-04_JPRB,1.3298E-05_JPRB/)
76      FRACREFAO(:, 9) = (/ &
77     &  2.0568E-01_JPRB,2.5049E-01_JPRB,2.0568E-01_JPRB,1.1781E-01_JPRB,7.5579E-02_JPRB,5.8136E-02_JPRB, &
78     &  4.2397E-02_JPRB,2.6544E-02_JPRB,1.3067E-02_JPRB,1.4061E-03_JPRB,1.1455E-03_JPRB,8.9408E-04_JPRB, &
79     &  6.3652E-04_JPRB,3.9450E-04_JPRB,1.2841E-04_JPRB,1.3315E-05_JPRB/)
80
81! Planck fraction mapping level : P=95.58350 mb, T = 215.70 K
82      FRACREFBO(:) = (/ &
83     &  1.8111E-01_JPRB,2.2612E-01_JPRB,1.6226E-01_JPRB,1.1872E-01_JPRB,9.9048E-02_JPRB,8.0390E-02_JPRB, &
84     &  6.1648E-02_JPRB,4.1704E-02_JPRB,2.2976E-02_JPRB,1.9263E-03_JPRB,1.4694E-03_JPRB,1.1498E-03_JPRB, &
85     &  7.9906E-04_JPRB,4.8310E-04_JPRB,1.6188E-04_JPRB,2.2651E-05_JPRB/)
86
87
88!     ------------------------------------------------------------------
89
90!     The array KAO contains absorption coefs at the 16 chosen g-values
91!     for a range of pressure levels> ~100mb, temperatures, and binary
92!     species parameters (see taumol.f for definition).  The first
93!     index in the array, JS, runs from 1 to 9, and corresponds to
94!     different values of the binary species parameter.  For instance,
95!     JS=1 refers to dry air, JS = 2 corresponds to the paramter value 1/8,
96!     JS = 3 corresponds to the parameter value 2/8, etc.  The second index
97!     in the array, JT, which runs from 1 to 5, corresponds to different
98!     temperatures.  More specifically, JT = 3 means that the data are for
99!     the reference temperature TREF for this  pressure level, JT = 2 refers
100!     to TREF-15, JT = 1 is for TREF-30, JT = 4 is for TREF+15, and JT = 5
101!     is for TREF+30.  The third index, JP, runs from 1 to 13 and refers
102!     to the JPth reference pressure level (see taumol.f for these levels
103!     in mb).  The fourth index, IG, goes from 1 to 16, and indicates
104!     which g-interval the absorption coefficients are for.
105
106
107!     The array KBO contains absorption coefs at the 16 chosen g-values
108!     for a range of pressure levels < ~100mb and temperatures. The first
109!     index in the array, JT, which runs from 1 to 5, corresponds to
110!     different temperatures.  More specifically, JT = 3 means that the
111!     data are for the reference temperature TREF for this pressure
112!     level, JT = 2 refers to the temperature TREF-15, JT = 1 is for
113!     TREF-30, JT = 4 is for TREF+15, and JT = 5 is for TREF+30. 
114!     The second index, JP, runs from 13 to 59 and refers to the JPth
115!     reference pressure level (see taumol.f for the value of these
116!     pressure levels in mb).  The third index, IG, goes from 1 to 16,
117!     and tells us which g-interval the absorption coefficients are for.
118
119
120!     The array FORREFO contains the coefficient of the water vapor
121!     foreign-continuum (including the energy term).  The first
122!     index refers to reference temperature (296,260,224,260) and
123!     pressure (970,475,219,3 mbar) levels.  The second index
124!     runs over the g-channel (1 to 16).
125
126      FORREFO(1,:) = (/ &
127     &5.1629E-06_JPRB,7.7578E-06_JPRB,1.9043E-05_JPRB,1.4802E-04_JPRB,2.2980E-04_JPRB,2.8057E-04_JPRB, &
128     &3.2824E-04_JPRB,3.4913E-04_JPRB,3.6515E-04_JPRB,3.8271E-04_JPRB,3.7499E-04_JPRB,3.6966E-04_JPRB, &
129     &3.7424E-04_JPRB,3.8884E-04_JPRB,3.7117E-04_JPRB,4.3710E-04_JPRB/)
130      FORREFO(2,:) = (/ &
131     &5.0804E-06_JPRB,1.3466E-05_JPRB,7.2606E-05_JPRB,1.6940E-04_JPRB,2.1022E-04_JPRB,2.5900E-04_JPRB, &
132     &2.9106E-04_JPRB,3.2261E-04_JPRB,3.2066E-04_JPRB,3.5421E-04_JPRB,3.7128E-04_JPRB,3.8144E-04_JPRB, &
133     &3.7854E-04_JPRB,3.8347E-04_JPRB,3.8921E-04_JPRB,3.7339E-04_JPRB/)
134      FORREFO(3,:) = (/ &
135     &5.4797E-05_JPRB,1.0026E-04_JPRB,1.2422E-04_JPRB,1.6386E-04_JPRB,1.8378E-04_JPRB,1.9616E-04_JPRB, &
136     &2.0711E-04_JPRB,2.2492E-04_JPRB,2.5240E-04_JPRB,2.6187E-04_JPRB,2.6058E-04_JPRB,2.4892E-04_JPRB, &
137     &2.6526E-04_JPRB,3.2105E-04_JPRB,3.6903E-04_JPRB,3.7213E-04_JPRB/)
138      FORREFO(4,:) = (/ &
139     &4.2782E-05_JPRB,1.4775E-04_JPRB,1.4588E-04_JPRB,1.6964E-04_JPRB,1.6667E-04_JPRB,1.7192E-04_JPRB, &
140     &1.9057E-04_JPRB,2.0180E-04_JPRB,2.1177E-04_JPRB,2.2326E-04_JPRB,2.3801E-04_JPRB,2.9308E-04_JPRB, &
141     &3.1130E-04_JPRB,3.1829E-04_JPRB,3.5035E-04_JPRB,3.7782E-04_JPRB/)
142
143
144!     The array SELFREFO contains the coefficient of the water vapor
145!     self-continuum (including the energy term).  The first index
146!     refers to temperature in 7.2 degree increments.  For instance,
147!     JT = 1 refers to a temperature of 245.6, JT = 2 refers to 252.8,
148!     etc.  The second index runs over the g-channel (1 to 16).
149
150      SELFREFO(:, 1) = (/ &
151     & 1.27793E-03_JPRB, 1.05944E-03_JPRB, 8.78300E-04_JPRB, 7.28133E-04_JPRB, 6.03641E-04_JPRB, &
152     & 5.00434E-04_JPRB, 4.14873E-04_JPRB, 3.43940E-04_JPRB, 2.85135E-04_JPRB, 2.36384E-04_JPRB/)
153      SELFREFO(:, 2) = (/ &
154     & 1.42785E-03_JPRB, 1.17602E-03_JPRB, 9.68600E-04_JPRB, 7.97765E-04_JPRB, 6.57060E-04_JPRB, &
155     & 5.41172E-04_JPRB, 4.45724E-04_JPRB, 3.67110E-04_JPRB, 3.02361E-04_JPRB, 2.49033E-04_JPRB/)
156      SELFREFO(:, 3) = (/ &
157     & 2.94095E-03_JPRB, 2.27102E-03_JPRB, 1.75370E-03_JPRB, 1.35422E-03_JPRB, 1.04574E-03_JPRB, &
158     & 8.07525E-04_JPRB, 6.23577E-04_JPRB, 4.81530E-04_JPRB, 3.71841E-04_JPRB, 2.87138E-04_JPRB/)
159      SELFREFO(:, 4) = (/ &
160     & 3.94894E-03_JPRB, 3.48184E-03_JPRB, 3.07000E-03_JPRB, 2.70687E-03_JPRB, 2.38669E-03_JPRB, &
161     & 2.10439E-03_JPRB, 1.85547E-03_JPRB, 1.63600E-03_JPRB, 1.44249E-03_JPRB, 1.27187E-03_JPRB/)
162      SELFREFO(:, 5) = (/ &
163     & 4.19971E-03_JPRB, 3.86333E-03_JPRB, 3.55390E-03_JPRB, 3.26925E-03_JPRB, 3.00740E-03_JPRB, &
164     & 2.76652E-03_JPRB, 2.54494E-03_JPRB, 2.34110E-03_JPRB, 2.15359E-03_JPRB, 1.98110E-03_JPRB/)
165      SELFREFO(:, 6) = (/ &
166     & 4.95922E-03_JPRB, 4.57134E-03_JPRB, 4.21380E-03_JPRB, 3.88422E-03_JPRB, 3.58042E-03_JPRB, &
167     & 3.30038E-03_JPRB, 3.04225E-03_JPRB, 2.80430E-03_JPRB, 2.58496E-03_JPRB, 2.38278E-03_JPRB/)
168      SELFREFO(:, 7) = (/ &
169     & 5.27379E-03_JPRB, 4.91005E-03_JPRB, 4.57140E-03_JPRB, 4.25611E-03_JPRB, 3.96256E-03_JPRB, &
170     & 3.68925E-03_JPRB, 3.43480E-03_JPRB, 3.19790E-03_JPRB, 2.97734E-03_JPRB, 2.77199E-03_JPRB/)
171      SELFREFO(:, 8) = (/ &
172     & 5.75341E-03_JPRB, 5.31533E-03_JPRB, 4.91060E-03_JPRB, 4.53669E-03_JPRB, 4.19126E-03_JPRB, &
173     & 3.87212E-03_JPRB, 3.57729E-03_JPRB, 3.30490E-03_JPRB, 3.05325E-03_JPRB, 2.82077E-03_JPRB/)
174      SELFREFO(:, 9) = (/ &
175     & 5.49849E-03_JPRB, 5.14295E-03_JPRB, 4.81040E-03_JPRB, 4.49935E-03_JPRB, 4.20842E-03_JPRB, &
176     & 3.93629E-03_JPRB, 3.68177E-03_JPRB, 3.44370E-03_JPRB, 3.22102E-03_JPRB, 3.01275E-03_JPRB/)
177      SELFREFO(:,10) = (/ &
178     & 6.04962E-03_JPRB, 5.60945E-03_JPRB, 5.20130E-03_JPRB, 4.82285E-03_JPRB, 4.47194E-03_JPRB, &
179     & 4.14656E-03_JPRB, 3.84485E-03_JPRB, 3.56510E-03_JPRB, 3.30570E-03_JPRB, 3.06518E-03_JPRB/)
180      SELFREFO(:,11) = (/ &
181     & 6.40108E-03_JPRB, 5.87551E-03_JPRB, 5.39310E-03_JPRB, 4.95029E-03_JPRB, 4.54385E-03_JPRB, &
182     & 4.17077E-03_JPRB, 3.82833E-03_JPRB, 3.51400E-03_JPRB, 3.22548E-03_JPRB, 2.96065E-03_JPRB/)
183      SELFREFO(:,12) = (/ &
184     & 6.77938E-03_JPRB, 6.15713E-03_JPRB, 5.59200E-03_JPRB, 5.07874E-03_JPRB, 4.61259E-03_JPRB, &
185     & 4.18922E-03_JPRB, 3.80472E-03_JPRB, 3.45550E-03_JPRB, 3.13834E-03_JPRB, 2.85029E-03_JPRB/)
186      SELFREFO(:,13) = (/ &
187     & 6.90020E-03_JPRB, 6.26766E-03_JPRB, 5.69310E-03_JPRB, 5.17121E-03_JPRB, 4.69717E-03_JPRB, &
188     & 4.26658E-03_JPRB, 3.87546E-03_JPRB, 3.52020E-03_JPRB, 3.19750E-03_JPRB, 2.90439E-03_JPRB/)
189      SELFREFO(:,14) = (/ &
190     & 6.92759E-03_JPRB, 6.32882E-03_JPRB, 5.78180E-03_JPRB, 5.28206E-03_JPRB, 4.82552E-03_JPRB, &
191     & 4.40843E-03_JPRB, 4.02740E-03_JPRB, 3.67930E-03_JPRB, 3.36129E-03_JPRB, 3.07076E-03_JPRB/)
192      SELFREFO(:,15) = (/ &
193     & 7.54539E-03_JPRB, 6.81161E-03_JPRB, 6.14920E-03_JPRB, 5.55120E-03_JPRB, 5.01136E-03_JPRB, &
194     & 4.52402E-03_JPRB, 4.08407E-03_JPRB, 3.68690E-03_JPRB, 3.32836E-03_JPRB, 3.00468E-03_JPRB/)
195      SELFREFO(:,16) = (/ &
196     & 7.62039E-03_JPRB, 7.10834E-03_JPRB, 6.63070E-03_JPRB, 6.18515E-03_JPRB, 5.76955E-03_JPRB, &
197     & 5.38186E-03_JPRB, 5.02023E-03_JPRB, 4.68290E-03_JPRB, 4.36823E-03_JPRB, 4.07471E-03_JPRB/)
198
199
200IF (LHOOK) CALL DR_HOOK('RRTM_KGB16',1,ZHOOK_HANDLE)
201RETURN
202
2031000 CONTINUE
204CALL ABOR1("RRTM_KGB16:ERROR CLOSING FILE RADRRTM")
2051001 CONTINUE
206CALL ABOR1("RRTM_KGB16:ERROR READING FILE RADRRTM")
207
208END SUBROUTINE RRTM_KGB16
Note: See TracBrowser for help on using the repository browser.