LMDZ
rrtm_taumol1.F90
Go to the documentation of this file.
1 !******************************************************************************
2 ! *
3 ! Optical depths developed for the *
4 ! *
5 ! RAPID RADIATIVE TRANSFER MODEL (RRTM) *
6 ! *
7 ! ATMOSPHERIC AND ENVIRONMENTAL RESEARCH, INC. *
8 ! 840 MEMORIAL DRIVE *
9 ! CAMBRIDGE, MA 02139 *
10 ! *
11 ! ELI J. MLAWER *
12 ! STEVEN J. TAUBMAN *
13 ! SHEPARD A. CLOUGH *
14 ! *
15 ! email: mlawer@aer.com *
16 ! *
17 ! The authors wish to acknowledge the contributions of the *
18 ! following people: Patrick D. Brown, Michael J. Iacono, *
19 ! Ronald E. Farren, Luke Chen, Robert Bergstrom. *
20 ! *
21 !******************************************************************************
22 ! Modified by: *
23 ! JJ Morcrette 980714 ECMWF for use on ECMWF's Fujitsu VPP770 *
24 ! Reformatted for F90 by JJMorcrette, ECMWF *
25 ! - replacing COMMONs by MODULEs *
26 ! - changing labelled to unlabelled DO loops *
27 ! - creating set-up routines for all block data statements *
28 ! - reorganizing the parameter statements *
29 ! - passing KLEV as argument *
30 ! - suppressing some equivalencing *
31 ! *
32 ! D Salmond 9907 ECMWF Speed-up modifications *
33 ! D Salmond 000515 ECMWF Speed-up modifications *
34 !******************************************************************************
35 ! TAUMOL *
36 ! *
37 ! This file contains the subroutines TAUGBn (where n goes from *
38 ! 1 to 16). TAUGBn calculates the optical depths and Planck fractions *
39 ! per g-value and layer for band n. *
40 ! *
41 ! Output: optical depths (unitless) *
42 ! fractions needed to compute Planck functions at every layer *
43 ! and g-value *
44 ! *
45 ! COMMON /TAUGCOM/ TAUG(MXLAY,MG) *
46 ! COMMON /PLANKG/ FRACS(MXLAY,MG) *
47 ! *
48 ! Input *
49 ! *
50 ! COMMON /FEATURES/ NG(NBANDS),NSPA(NBANDS),NSPB(NBANDS) *
51 ! COMMON /PRECISE/ ONEMINUS *
52 ! COMMON /PROFILE/ NLAYERS,PAVEL(MXLAY),TAVEL(MXLAY), *
53 ! & PZ(0:MXLAY),TZ(0:MXLAY),TBOUND *
54 ! COMMON /PROFDATA/ LAYTROP,LAYSWTCH,LAYLOW, *
55 ! & COLH2O(MXLAY),COLCO2(MXLAY), *
56 ! & COLO3(MXLAY),COLN2O(MXLAY),COLCH4(MXLAY), *
57 ! & COLO2(MXLAY),CO2MULT(MXLAY) *
58 ! COMMON /INTFAC/ FAC00(MXLAY),FAC01(MXLAY), *
59 ! & FAC10(MXLAY),FAC11(MXLAY) *
60 ! COMMON /INTIND/ JP(MXLAY),JT(MXLAY),JT1(MXLAY) *
61 ! COMMON /SELF/ SELFFAC(MXLAY), SELFFRAC(MXLAY), INDSELF(MXLAY) *
62 ! *
63 ! Description: *
64 ! NG(IBAND) - number of g-values in band IBAND *
65 ! NSPA(IBAND) - for the lower atmosphere, the number of reference *
66 ! atmospheres that are stored for band IBAND per *
67 ! pressure level and temperature. Each of these *
68 ! atmospheres has different relative amounts of the *
69 ! key species for the band (i.e. different binary *
70 ! species parameters). *
71 ! NSPB(IBAND) - same for upper atmosphere *
72 ! ONEMINUS - since problems are caused in some cases by interpolation *
73 ! parameters equal to or greater than 1, for these cases *
74 ! these parameters are set to this value, slightly < 1. *
75 ! PAVEL - layer pressures (mb) *
76 ! TAVEL - layer temperatures (degrees K) *
77 ! PZ - level pressures (mb) *
78 ! TZ - level temperatures (degrees K) *
79 ! LAYTROP - layer at which switch is made from one combination of *
80 ! key species to another *
81 ! COLH2O, COLCO2, COLO3, COLN2O, COLCH4 - column amounts of water *
82 ! vapor,carbon dioxide, ozone, nitrous ozide, methane, *
83 ! respectively (molecules/cm**2) *
84 ! CO2MULT - for bands in which carbon dioxide is implemented as a *
85 ! trace species, this is the factor used to multiply the *
86 ! band's average CO2 absorption coefficient to get the added *
87 ! contribution to the optical depth relative to 355 ppm. *
88 ! FACij(LAY) - for layer LAY, these are factors that are needed to *
89 ! compute the interpolation factors that multiply the *
90 ! appropriate reference k-values. A value of 0 (1) for *
91 ! i,j indicates that the corresponding factor multiplies *
92 ! reference k-value for the lower (higher) of the two *
93 ! appropriate temperatures, and altitudes, respectively. *
94 ! JP - the index of the lower (in altitude) of the two appropriate *
95 ! reference pressure levels needed for interpolation *
96 ! JT, JT1 - the indices of the lower of the two appropriate reference *
97 ! temperatures needed for interpolation (for pressure *
98 ! levels JP and JP+1, respectively) *
99 ! SELFFAC - scale factor needed to water vapor self-continuum, equals *
100 ! (water vapor density)/(atmospheric density at 296K and *
101 ! 1013 mb) *
102 ! SELFFRAC - factor needed for temperature interpolation of reference *
103 ! water vapor self-continuum data *
104 ! INDSELF - index of the lower of the two appropriate reference *
105 ! temperatures needed for the self-continuum interpolation *
106 ! *
107 ! Data input *
108 ! COMMON /Kn/ KA(NSPA(n),5,13,MG), KB(NSPB(n),5,13:59,MG), SELFREF(10,MG) *
109 ! (note: n is the band number) *
110 ! *
111 ! Description: *
112 ! KA - k-values for low reference atmospheres (no water vapor *
113 ! self-continuum) (units: cm**2/molecule) *
114 ! KB - k-values for high reference atmospheres (all sources) *
115 ! (units: cm**2/molecule) *
116 ! SELFREF - k-values for water vapor self-continuum for reference *
117 ! atmospheres (used below LAYTROP) *
118 ! (units: cm**2/molecule) *
119 ! *
120 ! DIMENSION ABSA(65*NSPA(n),MG), ABSB(235*NSPB(n),MG) *
121 ! EQUIVALENCE (KA,ABSA),(KB,ABSB) *
122 ! *
123 !******************************************************************************
124 
125 
126 SUBROUTINE rrtm_taumol1 (KLEV,TAU,&
127  &tauaerl,fac00,fac01,fac10,fac11,forfac,jp,jt,jt1,&
128  &colh2o,laytrop,selffac,selffrac,indself,pfrac)
130 ! Written by Eli J. Mlawer, Atmospheric & Environmental Research.
131 ! Revised by Michael J. Iacono, Atmospheric & Environmental Research.
132 
133 ! BAND 1: 10-250 cm-1 (low - H2O; high - H2O)
134 
135 ! Modifications
136 !
137 ! D Salmond 2000-05-15 speed-up
138 ! JJMorcrette 2000-05-17 speed-up
139 
140 
141 #include "tsmbkind.h"
142 
143 USE parrrtm , ONLY : jplay ,jpband ,jpgpt ,jpxsec
144 USE yoerrtwn , ONLY : ng ,nspa ,nspb
145 USE yoerrta1 , ONLY : ng1 ,absa ,absb ,fracrefa, fracrefb,&
146  &forref ,ka ,kb ,selfref
147 
148 !#include "yoeratm.h"
149 
150 ! REAL TAUAER(JPLAY)
151 
152 IMPLICIT NONE
153 
154 ! Output
155 real_b :: tau(jpgpt,jplay)
156 
157 ! DUMMY INTEGER SCALARS
158 integer_m :: klev
159 
160 !- from AER
161 real_b :: tauaerl(jplay,jpband)
162 
163 !- from INTFAC
164 real_b :: fac00(jplay)
165 real_b :: fac01(jplay)
166 real_b :: fac10(jplay)
167 real_b :: fac11(jplay)
168 real_b :: forfac(jplay)
169 
170 !- from INTIND
171 integer_m :: jp(jplay)
172 integer_m :: jt(jplay)
173 integer_m :: jt1(jplay)
174 
175 !- from PRECISE
176 real_b :: oneminus
177 
178 !- from PROFDATA
179 real_b :: colh2o(jplay)
180 integer_m :: laytrop
181 
182 !- from SELF
183 real_b :: selffac(jplay)
184 real_b :: selffrac(jplay)
185 integer_m :: indself(jplay)
186 
187 !- from SP
188 real_b :: pfrac(jpgpt,jplay)
189 
190 integer_m :: ind0(jplay),ind1(jplay),inds(jplay)
191 
192 ! LOCAL INTEGER SCALARS
193 integer_m :: ig, lay
194 
195 ! EQUIVALENCE (TAUAERL(1,1),TAUAER)
196 
197 ! Compute the optical depth by interpolating in ln(pressure) and
198 ! temperature. Below LAYTROP, the water vapor self-continuum
199 ! is interpolated (in temperature) separately.
200 
201 DO lay = 1, laytrop
202  ind0(lay) = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(1) + 1
203  ind1(lay) = (jp(lay)*5+(jt1(lay)-1))*nspa(1) + 1
204  inds(lay) = indself(lay)
205 ENDDO
206 
207 DO ig = 1, ng1
208  DO lay = 1, laytrop
209 !-- DS_000515
210  tau(ig,lay) = colh2o(lay) *&
211  &(fac00(lay) * absa(ind0(lay) ,ig) +&
212  & fac10(lay) * absa(ind0(lay)+1,ig) +&
213  & fac01(lay) * absa(ind1(lay) ,ig) +&
214  & fac11(lay) * absa(ind1(lay)+1,ig) +&
215  &selffac(lay) * (selfref(inds(lay),ig) + &
216  &selffrac(lay) *&
217  &(selfref(inds(lay)+1,ig) - selfref(inds(lay),ig)))&
218  &+ forfac(lay) * forref(ig) ) &
219  &+ tauaerl(lay,1)
220  pfrac(ig,lay) = fracrefa(ig)
221  ENDDO
222 ENDDO
223 
224 DO lay = laytrop+1, klev
225  ind0(lay) = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(1) + 1
226  ind1(lay) = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(1) + 1
227 ENDDO
228 
229 !-- JJM000517
230 DO ig = 1, ng1
231  DO lay = laytrop+1, klev
232 !-- JJM000517
233  tau(ig,lay) = colh2o(lay) *&
234  &(fac00(lay) * absb(ind0(lay) ,ig) +&
235  & fac10(lay) * absb(ind0(lay)+1,ig) +&
236  & fac01(lay) * absb(ind1(lay) ,ig) +&
237  & fac11(lay) * absb(ind1(lay)+1,ig)&
238  &+ forfac(lay) * forref(ig) ) &
239  &+ tauaerl(lay,1)
240  pfrac(ig,lay) = fracrefb(ig)
241  ENDDO
242 ENDDO
243 
244 RETURN
245 END SUBROUTINE rrtm_taumol1
real(kind=jprb), dimension(65, ng1) absa
Definition: yoerrta1.F90:17
integer, save klev
Definition: dimphy.F90:7
real(kind=jprb), dimension(235, ng1) absb
Definition: yoerrta1.F90:18
real(kind=jprb), dimension(ng1) fracrefb
Definition: yoerrta1.F90:16
integer(kind=jpim), parameter jpgpt
Definition: parrrtm.F90:21
integer(kind=jpim), parameter jpband
Definition: parrrtm.F90:18
integer(kind=jpim), dimension(16) nspb
Definition: yoerrtwn.F90:13
integer(kind=jpim), dimension(16) ng
Definition: yoerrtwn.F90:11
integer(kind=jpim), parameter ng1
Definition: yoerrta1.F90:14
integer(kind=jpim), dimension(16) nspa
Definition: yoerrtwn.F90:12
real(kind=jprb), dimension(ng1) fracrefa
Definition: yoerrta1.F90:16
real(kind=jprb), dimension(ng1) forref
Definition: yoerrta1.F90:19
integer(kind=jpim), parameter jplay
Definition: parrrtm.F90:15
subroutine rrtm_taumol1(KLEV, P_TAU, P_TAUAERL, P_FAC00, P_FAC01, P_FAC10, P_FAC11, P_FORFAC, K_JP, K_JT, K_JT1, P_COLH2O, K_LAYTROP, P_SELFFAC, P_SELFFRAC, K_INDSELF, PFRAC)
real(kind=jprb), dimension(5, 13, ng1) ka
Definition: yoerrta1.F90:17
real(kind=jprb), dimension(5, 13:59, ng1) kb
Definition: yoerrta1.F90:18
real(kind=jprb), dimension(10, ng1) selfref
Definition: yoerrta1.F90:19
integer(kind=jpim), parameter jpxsec
Definition: parrrtm.F90:19