source: LMDZ6/trunk/libf/phylmd/ecrad/ifsrrtm/srtm_kgb16.F90 @ 5319

Last change on this file since 5319 was 4773, checked in by idelkadi, 11 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: 9.4 KB
Line 
1SUBROUTINE SRTM_KGB16(CDIRECTORY)
2
3!     Originally by J.Delamere, Atmospheric & Environmental Research.
4!     Revision: 2.4
5!     BAND 16:  2600-3000 cm-1 (low - H2O,CH4; high - nothing)
6!     Reformatted for F90 by JJMorcrette, ECMWF
7!     R. Elkhatib 12-10-2005 Split for faster and more robust compilation.
8!     G.Mozdzynski March 2011 read constants from files
9!     T. Wilhelmsson and K. Yessad (Oct 2013) Geometry and setup refactoring.
10!     F. Vana  05-Mar-2015  Support for single precision
11!     ------------------------------------------------------------------
12
13USE PARKIND1  , ONLY : JPRB
14USE YOMHOOK   , ONLY : LHOOK, DR_HOOK, JPHOOK
15USE YOMLUN    , ONLY : NULRAD, NULOUT
16USE YOMMP0    , ONLY : NPROC, MYPROC
17USE MPL_MODULE, ONLY : MPL_BROADCAST
18USE YOMTAG    , ONLY : MTAGRAD
19USE YOESRTA16 , ONLY : KA, KB, SELFREF, FORREF, SFLUXREF, RAYL, STRRAT1, LAYREFFR, &
20  &  KA_D, KB_D
21
22!     ------------------------------------------------------------------
23
24IMPLICIT NONE
25
26CHARACTER(LEN=*), INTENT(IN) :: CDIRECTORY
27
28CHARACTER(LEN = 512) :: CLF1
29REAL(KIND=JPHOOK) :: ZHOOK_HANDLE
30
31#include "abor1.intfb.h"
32
33IF (LHOOK) CALL DR_HOOK('SRTM_KGB16',0,ZHOOK_HANDLE)
34
35IF( MYPROC==1 )THEN
36  CLF1 = TRIM(CDIRECTORY) // "/RADSRTM"
37  WRITE(NULOUT,'(a,a)')'Reading RRTMG shortwave data file ', TRIM(CLF1)
38  OPEN(NULRAD,FILE=TRIM(CLF1),FORM="UNFORMATTED",ACTION="READ",ERR=1000,CONVERT='BIG_ENDIAN')
39 
40  READ(NULRAD,ERR=1001) KA_D,KB_D
41  KA = REAL(KA_D,JPRB)
42  KB = REAL(KB_D,JPRB)
43ENDIF
44IF( NPROC>1 )THEN
45  CALL MPL_BROADCAST (KA,MTAGRAD,1,CDSTRING='SRTM_KGB16:')
46  CALL MPL_BROADCAST (KB,MTAGRAD,1,CDSTRING='SRTM_KGB16:')
47ENDIF
48
49SFLUXREF = (/ &
50 & 1.92269_JPRB    , 1.72844_JPRB    , 1.64326_JPRB    , 1.58451_JPRB     &
51 & , 1.44031_JPRB    , 1.25108_JPRB    , 1.02724_JPRB    , 0.776759_JPRB    &
52 & , 0.534444_JPRB   , 5.87755E-02_JPRB, 4.86706E-02_JPRB, 3.87989E-02_JPRB &
53 & , 2.84532E-02_JPRB, 1.82431E-02_JPRB, 6.92320E-03_JPRB, 9.70770E-04_JPRB /) 
54
55!     Rayleigh extinction coefficient at v = 2925 cm-1.
56RAYL = 2.91E-10_JPRB
57
58STRRAT1 = 252.131_JPRB
59
60LAYREFFR = 18
61
62!     ------------------------------------------------------------------
63
64!     The array KA contains absorption coefs at the 16 chosen g-values
65!     for a range of pressure levels> ~100mb, temperatures, and binary
66!     species parameters (see taumol.f for definition).  The first
67!     index in the array, JS, runs from 1 to 9, and corresponds to
68!     different values of the binary species parameter.  For instance,
69!     JS=1 refers to dry air, JS = 2 corresponds to the paramter value 1/8,
70!     JS = 3 corresponds to the parameter value 2/8, etc.  The second index
71!     in the array, JT, which runs from 1 to 5, corresponds to different
72!     temperatures.  More specifically, JT = 3 means that the data are for
73!     the reference temperature TREF for this  pressure level, JT = 2 refers
74!     to TREF-15, JT = 1 is for TREF-30, JT = 4 is for TREF+15, and JT = 5
75!     is for TREF+30.  The third index, JP, runs from 1 to 13 and refers
76!     to the JPth reference pressure level (see taumol.f for these levels
77!     in mb).  The fourth index, IG, goes from 1 to 16, and indicates
78!     which g-interval the absorption coefficients are for.
79!     -----------------------------------------------------------------
80
81!     -----------------------------------------------------------------
82!     The array KB contains absorption coefs at the 16 chosen g-values
83!     for a range of pressure levels < ~100mb and temperatures. The first
84!     index in the array, JT, which runs from 1 to 5, corresponds to
85!     different temperatures.  More specifically, JT = 3 means that the
86!     data are for the reference temperature TREF for this pressure
87!     level, JT = 2 refers to the temperature TREF-15, JT = 1 is for
88!     TREF-30, JT = 4 is for TREF+15, and JT = 5 is for TREF+30. 
89!     The second index, JP, runs from 13 to 59 and refers to the JPth
90!     reference pressure level (see taumol.f for the value of these
91!     pressure levels in mb).  The third index, IG, goes from 1 to 16,
92!     and tells us which g-interval the absorption coefficients are for.
93!     -----------------------------------------------------------------
94
95FORREF(:, 1) = (/ 0.525585E-05_JPRB, 0.527618E-05_JPRB, 0.746929E-04_JPRB /)
96FORREF(:, 2) = (/ 0.794660E-05_JPRB, 0.136902E-04_JPRB, 0.849878E-04_JPRB /)
97FORREF(:, 3) = (/ 0.197099E-04_JPRB, 0.733094E-04_JPRB, 0.121687E-03_JPRB /)
98FORREF(:, 4) = (/ 0.148274E-03_JPRB, 0.169776E-03_JPRB, 0.164848E-03_JPRB /)
99FORREF(:, 5) = (/ 0.230296E-03_JPRB, 0.210384E-03_JPRB, 0.182028E-03_JPRB /)
100FORREF(:, 6) = (/ 0.280575E-03_JPRB, 0.259217E-03_JPRB, 0.196080E-03_JPRB /)
101FORREF(:, 7) = (/ 0.329034E-03_JPRB, 0.291575E-03_JPRB, 0.207044E-03_JPRB /)
102FORREF(:, 8) = (/ 0.349989E-03_JPRB, 0.323471E-03_JPRB, 0.225712E-03_JPRB /)
103FORREF(:, 9) = (/ 0.366097E-03_JPRB, 0.321519E-03_JPRB, 0.253150E-03_JPRB /)
104FORREF(:,10) = (/ 0.383589E-03_JPRB, 0.355314E-03_JPRB, 0.262555E-03_JPRB /)
105FORREF(:,11) = (/ 0.375933E-03_JPRB, 0.372443E-03_JPRB, 0.261313E-03_JPRB /)
106FORREF(:,12) = (/ 0.370652E-03_JPRB, 0.382366E-03_JPRB, 0.250070E-03_JPRB /)
107FORREF(:,13) = (/ 0.375092E-03_JPRB, 0.379542E-03_JPRB, 0.265794E-03_JPRB /)
108FORREF(:,14) = (/ 0.389705E-03_JPRB, 0.384274E-03_JPRB, 0.322135E-03_JPRB /)
109FORREF(:,15) = (/ 0.372084E-03_JPRB, 0.390422E-03_JPRB, 0.370035E-03_JPRB /)
110FORREF(:,16) = (/ 0.437802E-03_JPRB, 0.373406E-03_JPRB, 0.373222E-03_JPRB /)
111
112!     -----------------------------------------------------------------
113!     The array SELFREF contains the coefficient of the water vapor
114!     self-continuum (including the energy term).  The first index
115!     refers to temperature in 7.2 degree increments.  For instance,
116!     JT = 1 refers to a temperature of 245.6, JT = 2 refers to 252.8,
117!     etc.  The second index runs over the g-channel (1 to 16).
118
119SELFREF(:, 1) = (/ &
120 & 0.126758E-02_JPRB, 0.105253E-02_JPRB, 0.873963E-03_JPRB, 0.725690E-03_JPRB, 0.602573E-03_JPRB, &
121 & 0.500344E-03_JPRB, 0.415458E-03_JPRB, 0.344973E-03_JPRB, 0.286447E-03_JPRB, 0.237849E-03_JPRB /) 
122SELFREF(:, 2) = (/ &
123 & 0.144006E-02_JPRB, 0.118514E-02_JPRB, 0.975351E-03_JPRB, 0.802697E-03_JPRB, 0.660606E-03_JPRB, &
124 & 0.543667E-03_JPRB, 0.447429E-03_JPRB, 0.368226E-03_JPRB, 0.303044E-03_JPRB, 0.249400E-03_JPRB /) 
125SELFREF(:, 3) = (/ &
126 & 0.294018E-02_JPRB, 0.227428E-02_JPRB, 0.175920E-02_JPRB, 0.136077E-02_JPRB, 0.105258E-02_JPRB, &
127 & 0.814189E-03_JPRB, 0.629789E-03_JPRB, 0.487153E-03_JPRB, 0.376821E-03_JPRB, 0.291478E-03_JPRB /) 
128SELFREF(:, 4) = (/ &
129 & 0.395290E-02_JPRB, 0.348405E-02_JPRB, 0.307081E-02_JPRB, 0.270658E-02_JPRB, 0.238556E-02_JPRB, &
130 & 0.210261E-02_JPRB, 0.185322E-02_JPRB, 0.163341E-02_JPRB, 0.143967E-02_JPRB, 0.126891E-02_JPRB /) 
131SELFREF(:, 5) = (/ &
132 & 0.419122E-02_JPRB, 0.385638E-02_JPRB, 0.354829E-02_JPRB, 0.326481E-02_JPRB, 0.300398E-02_JPRB, &
133 & 0.276399E-02_JPRB, 0.254317E-02_JPRB, 0.234000E-02_JPRB, 0.215305E-02_JPRB, 0.198104E-02_JPRB /) 
134SELFREF(:, 6) = (/ &
135 & 0.495659E-02_JPRB, 0.456777E-02_JPRB, 0.420945E-02_JPRB, 0.387924E-02_JPRB, 0.357494E-02_JPRB, &
136 & 0.329450E-02_JPRB, 0.303606E-02_JPRB, 0.279790E-02_JPRB, 0.257842E-02_JPRB, 0.237615E-02_JPRB /) 
137SELFREF(:, 7) = (/ &
138 & 0.526981E-02_JPRB, 0.490687E-02_JPRB, 0.456893E-02_JPRB, 0.425426E-02_JPRB, 0.396126E-02_JPRB, &
139 & 0.368844E-02_JPRB, 0.343441E-02_JPRB, 0.319788E-02_JPRB, 0.297764E-02_JPRB, 0.277256E-02_JPRB /) 
140SELFREF(:, 8) = (/ &
141 & 0.575426E-02_JPRB, 0.531597E-02_JPRB, 0.491106E-02_JPRB, 0.453699E-02_JPRB, 0.419141E-02_JPRB, &
142 & 0.387216E-02_JPRB, 0.357722E-02_JPRB, 0.330475E-02_JPRB, 0.305303E-02_JPRB, 0.282048E-02_JPRB /) 
143SELFREF(:, 9) = (/ &
144 & 0.549881E-02_JPRB, 0.514328E-02_JPRB, 0.481074E-02_JPRB, 0.449970E-02_JPRB, 0.420877E-02_JPRB, &
145 & 0.393665E-02_JPRB, 0.368213E-02_JPRB, 0.344406E-02_JPRB, 0.322138E-02_JPRB, 0.301310E-02_JPRB /) 
146SELFREF(:,10) = (/ &
147 & 0.605357E-02_JPRB, 0.561246E-02_JPRB, 0.520349E-02_JPRB, 0.482432E-02_JPRB, 0.447278E-02_JPRB, &
148 & 0.414686E-02_JPRB, 0.384469E-02_JPRB, 0.356453E-02_JPRB, 0.330479E-02_JPRB, 0.306398E-02_JPRB /) 
149SELFREF(:,11) = (/ &
150 & 0.640504E-02_JPRB, 0.587858E-02_JPRB, 0.539540E-02_JPRB, 0.495194E-02_JPRB, 0.454492E-02_JPRB, &
151 & 0.417136E-02_JPRB, 0.382850E-02_JPRB, 0.351382E-02_JPRB, 0.322501E-02_JPRB, 0.295993E-02_JPRB /) 
152SELFREF(:,12) = (/ &
153 & 0.677803E-02_JPRB, 0.615625E-02_JPRB, 0.559152E-02_JPRB, 0.507859E-02_JPRB, 0.461271E-02_JPRB, &
154 & 0.418957E-02_JPRB, 0.380524E-02_JPRB, 0.345617E-02_JPRB, 0.313913E-02_JPRB, 0.285116E-02_JPRB /) 
155SELFREF(:,13) = (/ &
156 & 0.690347E-02_JPRB, 0.627003E-02_JPRB, 0.569472E-02_JPRB, 0.517219E-02_JPRB, 0.469761E-02_JPRB, &
157 & 0.426658E-02_JPRB, 0.387509E-02_JPRB, 0.351953E-02_JPRB, 0.319659E-02_JPRB, 0.290328E-02_JPRB /) 
158SELFREF(:,14) = (/ &
159 & 0.692680E-02_JPRB, 0.632795E-02_JPRB, 0.578087E-02_JPRB, 0.528109E-02_JPRB, 0.482452E-02_JPRB, &
160 & 0.440742E-02_JPRB, 0.402638E-02_JPRB, 0.367828E-02_JPRB, 0.336028E-02_JPRB, 0.306977E-02_JPRB /) 
161SELFREF(:,15) = (/ &
162 & 0.754894E-02_JPRB, 0.681481E-02_JPRB, 0.615207E-02_JPRB, 0.555378E-02_JPRB, 0.501367E-02_JPRB, &
163 & 0.452609E-02_JPRB, 0.408593E-02_JPRB, 0.368857E-02_JPRB, 0.332986E-02_JPRB, 0.300603E-02_JPRB /) 
164SELFREF(:,16) = (/ &
165 & 0.760689E-02_JPRB, 0.709755E-02_JPRB, 0.662232E-02_JPRB, 0.617891E-02_JPRB, 0.576519E-02_JPRB, &
166 & 0.537917E-02_JPRB, 0.501899E-02_JPRB, 0.468293E-02_JPRB, 0.436938E-02_JPRB, 0.407682E-02_JPRB /) 
167
168IF (LHOOK) CALL DR_HOOK('SRTM_KGB16',1,ZHOOK_HANDLE)
169RETURN
170
1711000 CONTINUE
172CALL ABOR1("SRTM_KGB16:ERROR OPENING FILE RADSRTM")
1731001 CONTINUE
174CALL ABOR1("SRTM_KGB16:ERROR READING FILE RADSRTM")
175
176END SUBROUTINE SRTM_KGB16
Note: See TracBrowser for help on using the repository browser.