1 | subroutine lwu (kdlon,kflev |
---|
2 | & ,dp,plev,tlay,aerosol |
---|
3 | & ,QIRsQREF3d,omegaIR3d,gIR3d |
---|
4 | & ,aer_t,co2_u,co2_up |
---|
5 | & ,tautotal,omegtotal,gtotal) |
---|
6 | |
---|
7 | c---------------------------------------------------------------------- |
---|
8 | c LWU computes - co2: longwave effective absorber amounts including |
---|
9 | c pressure and temperature effects |
---|
10 | c - aerosols: amounts for every band |
---|
11 | c transmission for bandes 1 and 2 of co2 |
---|
12 | c---------------------------------------------------------------------- |
---|
13 | |
---|
14 | c----------------------------------------------------------------------- |
---|
15 | c ATTENTION AUX UNITES: |
---|
16 | c le facteur 10*g fait passer des kg m-2 aux g cm-2 |
---|
17 | c----------------------------------------------------------------------- |
---|
18 | c! modif diffusion |
---|
19 | c! on ne change rien a la bande CO2 : les quantites d'absorbant CO2 |
---|
20 | c! sont multipliees par 1.66 |
---|
21 | c! pview= 1/cos(teta0)=1.66 |
---|
22 | c |
---|
23 | c Modif J.-B. Madeleine: Computing optical properties of dust and |
---|
24 | c water-ice crystals in each gridbox. Optical parameters of |
---|
25 | c water-ice clouds are convolved to crystal sizes predicted by |
---|
26 | c the microphysical scheme. |
---|
27 | c |
---|
28 | c MODIF : FF : removing the monster bug on water ice clouds 11/2010 |
---|
29 | c |
---|
30 | c MODIF : TN : corrected bug if very big water ice clouds 04/2012 |
---|
31 | c----------------------------------------------------------------------- |
---|
32 | |
---|
33 | implicit none |
---|
34 | |
---|
35 | #include "dimensions.h" |
---|
36 | #include "dimphys.h" |
---|
37 | #include "dimradmars.h" |
---|
38 | #include "comcstfi.h" |
---|
39 | |
---|
40 | #include "yomaer.h" |
---|
41 | #include "yomlw.h" |
---|
42 | |
---|
43 | #include "callkeys.h" |
---|
44 | |
---|
45 | c---------------------------------------------------------------------- |
---|
46 | c 0.1 arguments |
---|
47 | c --------- |
---|
48 | c inputs: |
---|
49 | c ------- |
---|
50 | integer kdlon ! part of ngrid |
---|
51 | integer kflev ! part of nalyer |
---|
52 | |
---|
53 | real dp (ndlo2,kflev) ! layer pressure thickness (Pa) |
---|
54 | real plev (ndlo2,kflev+1) ! level pressure (Pa) |
---|
55 | real tlay (ndlo2,kflev) ! layer temperature (K) |
---|
56 | real aerosol (ndlo2,kflev,naerkind) ! aerosol extinction optical depth |
---|
57 | c at reference wavelength "longrefvis" set |
---|
58 | c in dimradmars.h , in each layer, for one of |
---|
59 | c the "naerkind" kind of aerosol optical properties. |
---|
60 | REAL QIRsQREF3d(ndlo2,kflev,nir,naerkind) ! 3d ext. coef. |
---|
61 | REAL omegaIR3d(ndlo2,kflev,nir,naerkind) ! 3d ssa |
---|
62 | REAL gIR3d(ndlo2,kflev,nir,naerkind) ! 3d assym. param. |
---|
63 | |
---|
64 | c outputs: |
---|
65 | c -------- |
---|
66 | real aer_t (ndlo2,nuco2,kflev+1) ! transmission (aer) |
---|
67 | real co2_u (ndlo2,nuco2,kflev+1) ! absorber amounts (co2) |
---|
68 | real co2_up (ndlo2,nuco2,kflev+1) ! idem scaled by the pressure (co2) |
---|
69 | |
---|
70 | real tautotal(ndlo2,kflev,nir) ! \ Total single scattering |
---|
71 | real omegtotal(ndlo2,kflev,nir) ! > properties (Addition of the |
---|
72 | real gtotal(ndlo2,kflev,nir) ! / NAERKIND aerosols properties) |
---|
73 | |
---|
74 | c---------------------------------------------------------------------- |
---|
75 | c 0.2 local arrays |
---|
76 | c ------------ |
---|
77 | |
---|
78 | integer jl,jk,jkl,ja,n |
---|
79 | |
---|
80 | real aer_a (ndlon,nir,nflev+1) ! absorber amounts (aer) ABSORPTION |
---|
81 | real co2c ! co2 concentration (pa/pa) |
---|
82 | real pview ! cosecant of viewing angle |
---|
83 | real pref ! reference pressure (1013 mb = 101325 Pa) |
---|
84 | real tx,tx2 |
---|
85 | real phi (ndlon,nuco2) |
---|
86 | real psi (ndlon,nuco2) |
---|
87 | real plev2 (ndlon,nflev+1) |
---|
88 | real zzz |
---|
89 | |
---|
90 | real ray,coefsize,coefsizew,coefsizeg |
---|
91 | |
---|
92 | c************************************************************************ |
---|
93 | c---------------------------------------------------------------------- |
---|
94 | c 0.3 Initialisation |
---|
95 | c ------------- |
---|
96 | |
---|
97 | pview = 1.66 |
---|
98 | co2c = 0.95 |
---|
99 | pref = 101325. |
---|
100 | |
---|
101 | do jk=1,nlaylte+1 |
---|
102 | do jl=1,kdlon |
---|
103 | plev2(jl,jk)=plev(jl,jk)*plev(jl,jk) |
---|
104 | enddo |
---|
105 | enddo |
---|
106 | |
---|
107 | c---------------------------------------------------------------------- |
---|
108 | c Computing TOTAL single scattering parameters by adding properties of |
---|
109 | c all the NAERKIND kind of aerosols in each IR band |
---|
110 | |
---|
111 | call zerophys(ndlon*kflev*nir,tautotal) |
---|
112 | call zerophys(ndlon*kflev*nir,omegtotal) |
---|
113 | call zerophys(ndlon*kflev*nir,gtotal) |
---|
114 | |
---|
115 | do n=1,naerkind |
---|
116 | do ja=1,nir |
---|
117 | do jk=1,nlaylte |
---|
118 | do jl = 1,kdlon |
---|
119 | tautotal(jl,jk,ja)=tautotal(jl,jk,ja) + |
---|
120 | & QIRsQREF3d(jl,jk,ja,n)*aerosol(jl,jk,n) |
---|
121 | omegtotal(jl,jk,ja) = omegtotal(jl,jk,ja) + |
---|
122 | & QIRsQREF3d(jl,jk,ja,n)*aerosol(jl,jk,n)* |
---|
123 | & omegaIR3d(jl,jk,ja,n) |
---|
124 | gtotal(jl,jk,ja) = gtotal(jl,jk,ja) + |
---|
125 | & QIRsQREF3d(jl,jk,ja,n)*aerosol(jl,jk,n)* |
---|
126 | & omegaIR3d(jl,jk,ja,n)*gIR3d(jl,jk,ja,n) |
---|
127 | enddo |
---|
128 | enddo |
---|
129 | enddo |
---|
130 | enddo |
---|
131 | do ja=1,nir |
---|
132 | do jk=1,nlaylte |
---|
133 | do jl = 1,kdlon |
---|
134 | gtotal(jl,jk,ja)=gtotal(jl,jk,ja)/omegtotal(jl,jk,ja) |
---|
135 | omegtotal(jl,jk,ja)=omegtotal(jl,jk,ja)/tautotal(jl,jk,ja) |
---|
136 | enddo |
---|
137 | enddo |
---|
138 | enddo |
---|
139 | |
---|
140 | c---------------------------------------------------------------------- |
---|
141 | c 1.0 cumulative (aerosol) amounts (for every band) |
---|
142 | c ---------------------------- |
---|
143 | |
---|
144 | jk=nlaylte+1 |
---|
145 | do ja=1,nir |
---|
146 | do jl = 1 , kdlon |
---|
147 | aer_a(jl,ja,jk)=0. |
---|
148 | enddo |
---|
149 | enddo |
---|
150 | |
---|
151 | do jk=1,nlaylte |
---|
152 | jkl=nlaylte+1-jk |
---|
153 | do ja=1,nir |
---|
154 | do jl=1,kdlon |
---|
155 | aer_a(jl,ja,jkl)=aer_a(jl,ja,jkl+1)+ |
---|
156 | & tautotal(jl,jkl,ja)*(1.-omegtotal(jl,jkl,ja)) |
---|
157 | enddo |
---|
158 | enddo |
---|
159 | enddo |
---|
160 | |
---|
161 | c---------------------------------------------------------------------- |
---|
162 | c 1.0 bands 1 and 2 of co2 |
---|
163 | c -------------------- |
---|
164 | |
---|
165 | jk=nlaylte+1 |
---|
166 | do ja=1,nuco2 |
---|
167 | do jl = 1 , kdlon |
---|
168 | co2_u(jl,ja,jk)=0. |
---|
169 | co2_up(jl,ja,jk)=0. |
---|
170 | aer_t(jl,ja,jk)=1. |
---|
171 | enddo |
---|
172 | enddo |
---|
173 | |
---|
174 | do jk=1,nlaylte |
---|
175 | jkl=nlaylte+1-jk |
---|
176 | do ja=1,nuco2 |
---|
177 | do jl=1,kdlon |
---|
178 | |
---|
179 | c introduces temperature effects on absorber(co2) amounts |
---|
180 | c ------------------------------------------------------- |
---|
181 | tx = sign(min(abs(tlay(jl,jkl)-tref),70.) |
---|
182 | . ,tlay(jl,jkl)-tref) |
---|
183 | tx2=tx*tx |
---|
184 | phi(jl,ja)=at(1,ja)*tx+bt(1,ja)*tx2 |
---|
185 | psi(jl,ja)=at(2,ja)*tx+bt(2,ja)*tx2 |
---|
186 | phi(jl,ja)=exp(phi(jl,ja)/cst_voigt(2,ja)) |
---|
187 | psi(jl,ja)=exp(2.*psi(jl,ja)) |
---|
188 | |
---|
189 | c cumulative absorber(co2) amounts |
---|
190 | c -------------------------------- |
---|
191 | co2_u(jl,ja,jkl)=co2_u(jl,ja,jkl+1) |
---|
192 | . + pview/(10*g)*phi(jl,ja)*dp(jl,jkl)*co2c |
---|
193 | |
---|
194 | co2_up(jl,ja,jkl)=co2_up(jl,ja,jkl+1) |
---|
195 | . + pview/(10*g*2*pref)*psi(jl,ja) |
---|
196 | . * (plev2(jl,jkl)-plev2(jl,jkl+1))*co2c |
---|
197 | |
---|
198 | |
---|
199 | c (aerosol) transmission |
---|
200 | c ---------------------- |
---|
201 | c on calcule directement les transmissions pour les aerosols. |
---|
202 | c on multiplie le Qext par 1-omega dans la bande du CO2. |
---|
203 | c et pourquoi pas d'abord? hourdin@lmd.ens.fr |
---|
204 | |
---|
205 | c TN 04/12 : if very big water ice clouds, aer_t is strictly rounded |
---|
206 | c to zero in lower levels, which is a source of NaN |
---|
207 | !aer_t(jl,ja,jkl)=exp(-pview*aer_a(jl,ja,jkl)) |
---|
208 | aer_t(jl,ja,jkl)=max(exp(-pview*aer_a(jl,ja,jkl)),1e-30) |
---|
209 | |
---|
210 | |
---|
211 | enddo |
---|
212 | enddo |
---|
213 | enddo |
---|
214 | |
---|
215 | c---------------------------------------------------------------------- |
---|
216 | return |
---|
217 | end |
---|