1 | SUBROUTINE optcv_1pt3(zqaer_1pt,rcdb,xfrb,ioptv,IPRINT) |
---|
2 | |
---|
3 | use dimphy |
---|
4 | USE TGMDAT_MOD, ONLY: RHCH4,FH2,FHAZE,FHVIS,FHIR,TAUFAC, |
---|
5 | & RCLOUD,FARGON |
---|
6 | IMPLICIT NONE |
---|
7 | #include "dimensions.h" |
---|
8 | #include "microtab.h" |
---|
9 | #include "clesphys.h" |
---|
10 | |
---|
11 | integer nlayer, nlevel, nspeci, nspc1i, nspecv, nspc1v,nterm |
---|
12 | real z,press, den, temp, ch4, xn2, h2, ar, xmu, gas1, |
---|
13 | & colden, c2h2, c2h6, hcn, radius, xnumb, reali, |
---|
14 | & ximgi, realv, ximgv, rcldi, xicldi, rcldv, xicldv, rcldi2, |
---|
15 | & xicldi2, rcldv2, xicldv2 |
---|
16 | real bwni, wnoi, dwni, wlni,prod |
---|
17 | |
---|
18 | integer k, j,inq,nt |
---|
19 | |
---|
20 | real tbar, pbar, bmu, coef1, effg, taeros, taeroscat, cbar, |
---|
21 | & qext, qsct, qabs, qbar, xmono, xrule, deltaz, |
---|
22 | & cnbar, qextc, qsctc, qabsc, qbarc, taugas, pnn, |
---|
23 | & pcc, pcn, phn, kgas, u, ig, tau2, tlimit, |
---|
24 | & solarf, pexpon, aterm, bterm, bwnv, wnov, dwnv, |
---|
25 | & wlnv, v, rayon, vrat, dr, dv, taerosm1, deltazm1, |
---|
26 | & taeroscatm1, tauray |
---|
27 | |
---|
28 | PARAMETER(NLAYER=llm,NLEVEL=NLAYER+1) |
---|
29 | PARAMETER (NSPECI=46,NSPC1I=47,NSPECV=24,NSPC1V=25) |
---|
30 | |
---|
31 | c Arguments: |
---|
32 | c --------- |
---|
33 | integer IPRINT,ioptv |
---|
34 | C ioptv: premier appel, on ne calcule qu'une fois les QM et QF |
---|
35 | * nrad dans microtab.h |
---|
36 | real zqaer_1pt(NLAYER,2*nrad) |
---|
37 | #include "optcv_1pt.h" |
---|
38 | c --------- |
---|
39 | |
---|
40 | COMMON /ATM/ Z(NLEVEL),PRESS(NLEVEL),DEN(NLEVEL),TEMP(NLEVEL) |
---|
41 | |
---|
42 | COMMON /GASS/ CH4(NLEVEL),XN2(NLEVEL),H2(NLEVEL),AR(NLEVEL) |
---|
43 | & ,XMU(NLEVEL),GAS1(NLAYER),COLDEN(NLAYER) |
---|
44 | |
---|
45 | COMMON /VISGAS/SOLARF(NSPECV),NTERM(NSPECV),PEXPON(NSPECV), |
---|
46 | & ATERM(4,NSPECV),BTERM(4,NSPECV) |
---|
47 | |
---|
48 | COMMON /AERSOL/ RADIUS(NLAYER), XNUMB(NLAYER) |
---|
49 | & , REALI(NSPECI), XIMGI(NSPECI), REALV(NSPECV), XIMGV(NSPECV) |
---|
50 | |
---|
51 | COMMON /CLOUD/ |
---|
52 | & RCLDI(NSPECI), XICLDI(NSPECI) |
---|
53 | & , RCLDV(NSPECV), XICLDV(NSPECV) |
---|
54 | & , RCLDI2(NSPECI), XICLDI2(NSPECI) |
---|
55 | & , RCLDV2(NSPECV), XICLDV2(NSPECV) |
---|
56 | |
---|
57 | COMMON /SPECTV/ BWNV(NSPC1V),WNOV(NSPECV) |
---|
58 | & ,DWNV(NSPECV),WLNV(NSPECV) |
---|
59 | |
---|
60 | * nrad dans microtab.h |
---|
61 | COMMON /part/ v(nrad),rayon(nrad),vrat,dr(nrad),dv(nrad) |
---|
62 | |
---|
63 | REAL QF1(nrad,NSPECV),QF2(nrad,NSPECV) |
---|
64 | REAL QF3(nrad,NSPECV),QF4(nrad,NSPECV) |
---|
65 | REAL QM1(nrad,NSPECV),QM2(nrad,NSPECV) |
---|
66 | REAL QM3(nrad,NSPECV),QM4(nrad,NSPECV) |
---|
67 | |
---|
68 | c---- NUAGES |
---|
69 | real TNUEXT,TNUSCAT |
---|
70 | real rcdb(NLAYER), xfrb(NLAYER,4) |
---|
71 | |
---|
72 | save qf1,qf2,qf3,qf4,qm1,qm2,qm3,qm4 |
---|
73 | |
---|
74 | |
---|
75 | C* |
---|
76 | C THIS SUBROUTINE SETS THE OPTICAL CONSTANTS IN THE VISIBLE |
---|
77 | C IT CALCUALTES FOR EACH LAYER, FOR EACH SPECRAL INTERVAL IN THE VIS |
---|
78 | C LAYER: WBAR, DTAU, COSBAR |
---|
79 | C LEVEL: TAU |
---|
80 | C |
---|
81 | C ZERO THE COLUMN OPTICAL DEPTHS OF EACH TYPE |
---|
82 | C ??FLAG? THE OPTICAL DEPTH OF THE TOP OF THE MODEL |
---|
83 | C MAY NOT BE ZERO. |
---|
84 | |
---|
85 | c******* DEBUT DES BOUCLES ************************ |
---|
86 | DO 100 K=1,NSPECV !b! BOUCLE SUR LAMBDA |
---|
87 | |
---|
88 | TAURV_1pt(K)=0. |
---|
89 | TAUHV_1pt(K)=0. ! INTEGRATED TAU.......INITIALIZATION. |
---|
90 | TAUCV_1pt(K)=0. ! Rayleigh, Haze, Cloud, Gas |
---|
91 | TAUGV_1pt(K)=0. ! sca, abs, abs , abs |
---|
92 | |
---|
93 | DO 100 J=1,NLAYER !a! BOUCLE SUR L"ALTITUDE |
---|
94 | |
---|
95 | C #1: HAZE |
---|
96 | c--------------------------- |
---|
97 | |
---|
98 | c CALL THE MIE CODE TO GIVE THE AEROSOL PROPERTIES |
---|
99 | c USE XFRAC FOR FRACTAL AEROSOLS PROPERTIES AT LAMBDA < 2. um |
---|
100 | |
---|
101 | |
---|
102 | |
---|
103 | |
---|
104 | c /\ |
---|
105 | c / \ |
---|
106 | c / \ |
---|
107 | c / _O \ |
---|
108 | c / |/ \ |
---|
109 | c / / \ \ |
---|
110 | c / |\ \/\ \ |
---|
111 | c / || / \ \ |
---|
112 | c ---------------- |
---|
113 | c | WARNING | |
---|
114 | c | SLOW DOWN | |
---|
115 | c ---------------- |
---|
116 | |
---|
117 | |
---|
118 | |
---|
119 | |
---|
120 | c*********** EN TRAVAUX *************************** |
---|
121 | |
---|
122 | TAEROS=0. |
---|
123 | TAEROSCAT=0. |
---|
124 | CBAR=0. |
---|
125 | |
---|
126 | c print*,"rayon=",rayon |
---|
127 | c print*,"RF=",RF |
---|
128 | |
---|
129 | DO inq=1,nrad !BOUCLE SUR LES TAILLE D"AEROSOLS |
---|
130 | |
---|
131 | |
---|
132 | IF (rayon(inq).lt.RF(inq)) THEN ! aerosols spheriques |
---|
133 | |
---|
134 | |
---|
135 | if(ioptv.eq.0.and.J.eq.1) then |
---|
136 | c CALL XMIE(rayon(inq)*1.e6,REALV(K),XIMGV(K), |
---|
137 | c & QEXT,QSCT,QABS,QBAR,WNOV(K)) |
---|
138 | |
---|
139 | CALL CMIE(1.E-2/WNOV(K),REALV(K),XIMGV(K),rayon(inq), |
---|
140 | & QEXT,QSCT,QABS,QBAR) |
---|
141 | |
---|
142 | c print*,'inq=',inq,' QM1=',QM1(inq,K),' QEXT=',QEXT |
---|
143 | |
---|
144 | QM1(inq,K)=QEXT |
---|
145 | QM2(inq,K)=QSCT |
---|
146 | QM3(inq,K)=QABS |
---|
147 | QM4(inq,K)=QBAR |
---|
148 | endif |
---|
149 | |
---|
150 | TAEROS=QM1(inq,K)*zqaer_1pt(NLAYER+1-J,inq)*1.e-4+TAEROS |
---|
151 | TAEROSCAT=QM2(inq,K)*zqaer_1pt(NLAYER+1-J,inq)*1.e-4+TAEROSCAT |
---|
152 | CBAR=CBAR+QM4(inq,K)*QM2(inq,K)*zqaer_1pt(NLAYER+1-J,inq)*1.e-4 |
---|
153 | |
---|
154 | ELSE ! aerosols fractals |
---|
155 | |
---|
156 | XMONO=(rayon(inq)/RF(inq))**3. |
---|
157 | XRULE=1. |
---|
158 | |
---|
159 | if(XMONO.gt.16384./1.5) then |
---|
160 | XRULE=(XMONO/16384.) |
---|
161 | XMONO=16384. |
---|
162 | endif |
---|
163 | |
---|
164 | if(ioptv.eq.0.and.J.eq.1) then |
---|
165 | |
---|
166 | c CALL OPTFRAC(XMONO,10000./WNOV(K) |
---|
167 | c & ,QEXT,QSCT,QABS,QBAR) |
---|
168 | |
---|
169 | CALL CFFFV11(1.e-2/WNOV(K),REALV(K),XIMGV(K),RF(inq),2. |
---|
170 | & ,XMONO,QSCT,QEXT,QABS,QBAR) |
---|
171 | |
---|
172 | |
---|
173 | QF1(inq,K)=QEXT*XRULE |
---|
174 | QF2(inq,K)=QSCT*XRULE |
---|
175 | QF3(inq,K)=QABS*XRULE |
---|
176 | QF4(inq,K)=QBAR |
---|
177 | |
---|
178 | c print*,'inq=',inq,' QF1=',QF1(inq,K),' QEXT=',QEXT,' XRULE=',XRULE |
---|
179 | |
---|
180 | endif |
---|
181 | |
---|
182 | TAEROS=QF1(inq,K)*zqaer_1pt(NLAYER+1-J,inq)+TAEROS |
---|
183 | TAEROSCAT=QF2(inq,K)*zqaer_1pt(NLAYER+1-J,inq)+TAEROSCAT |
---|
184 | CBAR=CBAR+QF4(inq,K)*QF2(inq,K)*zqaer_1pt(NLAYER+1-J,inq) |
---|
185 | |
---|
186 | ENDIF |
---|
187 | |
---|
188 | ENDDO ! nrad |
---|
189 | |
---|
190 | |
---|
191 | if (TAEROSCAT.ne.0.) CBAR=CBAR/TAEROSCAT |
---|
192 | |
---|
193 | DELTAZ=Z(J)-Z(J+1) |
---|
194 | |
---|
195 | c -------------------------------------------------------------------- |
---|
196 | c profil brume Pascal: fit T (sauf tropopause) et albedo |
---|
197 | c ------------------- |
---|
198 | if( cutoff.eq.1) then |
---|
199 | IF(PRESS(J).gt.9.e-3) THEN |
---|
200 | TAEROS=TAEROSM1*DELTAZ/DELTAZM1*0.85 |
---|
201 | TAEROSCAT=TAEROSCATM1*DELTAZ/DELTAZM1*0.85 |
---|
202 | c TAEROS=0. |
---|
203 | c TAEROSCAT=0. |
---|
204 | ENDIF |
---|
205 | |
---|
206 | IF(PRESS(J).gt.1.e-1) THEN |
---|
207 | TAEROS=TAEROSM1*DELTAZ/DELTAZM1*1.15 |
---|
208 | TAEROSCAT=TAEROSCATM1*DELTAZ/DELTAZM1*1.15 |
---|
209 | c TAEROS=0. |
---|
210 | c TAEROSCAT=0. |
---|
211 | ENDIF |
---|
212 | endif !cutoff=1 |
---|
213 | |
---|
214 | c profil brume pour fit T (y compris tropopause), mais ne fit plus albedo... |
---|
215 | c ----------------------- |
---|
216 | if( cutoff.eq.2) then |
---|
217 | IF(PRESS(J).gt.1.e-1) THEN |
---|
218 | TAEROS=0. |
---|
219 | TAEROSCAT=0. |
---|
220 | ENDIF |
---|
221 | endif !cutoff=2 |
---|
222 | c -------------------------------------------------------------------- |
---|
223 | |
---|
224 | TAEROSM1=TAEROS |
---|
225 | TAEROSCATM1=TAEROSCAT |
---|
226 | DELTAZM1=DELTAZ |
---|
227 | |
---|
228 | |
---|
229 | IF (TAEROSCAT.le.0.) CBAR=0. |
---|
230 | |
---|
231 | c print*, 'HERE, CIRS AEROSOLS' |
---|
232 | c call cirs_haze(PRESS(J),WNOV(K),TAEROS,TAEROSCAT,CBAR) |
---|
233 | |
---|
234 | 1699 FORMAT(a3,2I3,3(ES15.7,1X)) |
---|
235 | |
---|
236 | c*********** EN TRAVAUX *************************** |
---|
237 | |
---|
238 | C #2: RAYLEIGH |
---|
239 | c------------------------------- |
---|
240 | |
---|
241 | C RAYLEIGH SCATTERING STRAIGHT FROM HANSEN AND TRAVIS...SEE NOTES |
---|
242 | C RATIOED BY THE LAYER COLUMN NUMBER TO THE TOTAL |
---|
243 | C COLUMN NUMBER ON EARTH. CM-2 |
---|
244 | C THIS IS THE SCATTERING BY THE ATMOSPHERE |
---|
245 | |
---|
246 | TAURAY=(COLDEN(J)*28.9/(XMU(J)*1013.25))* |
---|
247 | &(.008569/WLNV(K)**4)*(1.+.0113/WLNV(K)**2+.00013/WLNV(K)**4) |
---|
248 | |
---|
249 | |
---|
250 | C #3: CLOUD |
---|
251 | c---------------------------- |
---|
252 | C NEXT COMPUTE TAU CLOUD |
---|
253 | c |
---|
254 | c Menu special : |
---|
255 | c On utilise ici une look-up table afin de calculer |
---|
256 | c les proprietes optique des nuages. |
---|
257 | c Le principe est le suivant : |
---|
258 | c La look-up table contient les proprietes optique d'une goutte |
---|
259 | c de methane pur de 3 um. |
---|
260 | c On approxime les proprietes optiques pour une goutte de rayon r a |
---|
261 | c de la table. |
---|
262 | c |
---|
263 | TNUEXT=0. |
---|
264 | TNUSCAT=0. |
---|
265 | CNBAR=0. |
---|
266 | IF (clouds.eq.1) THEN |
---|
267 | |
---|
268 | CALL getoptcld(1.E-2/WNOV(K),rcdb(nlayer+1-J), |
---|
269 | & QEXTC,QSCTC,QABSC,QBARC) |
---|
270 | TNUEXT=0. |
---|
271 | TNUSCAT=0. |
---|
272 | CNBAR=0. |
---|
273 | IF (rcdb(nlayer+1-J).gt.1.1e-10) THEN |
---|
274 | TNUEXT =QEXTC/xnuf*SUM(zqaer_1pt(NLAYER+1-J,nrad+1:2*nrad)) |
---|
275 | TNUSCAT=QSCTC/xnuf*SUM(zqaer_1pt(NLAYER+1-J,nrad+1:2*nrad)) |
---|
276 | CNBAR =QBARC |
---|
277 | ENDIF |
---|
278 | IF(TNUSCAT.GE.0.8*TNUEXT) TNUSCAT=0.8*TNUEXT |
---|
279 | ENDIF ! Cond. CLD |
---|
280 | |
---|
281 | TAUCV_1pt(K)=TAUCV_1pt(K)+TNUEXT |
---|
282 | TAUCVD_1pt(J,K)=TAUCV_1pt(K) |
---|
283 | |
---|
284 | TAURV_1pt(K)=TAURV_1pt(K)+TAURAY |
---|
285 | TAUGVD_1pt(J,K)=TAURV_1pt(K) |
---|
286 | |
---|
287 | TAUHV_1pt(K)=TAUHV_1pt(K)+TAEROS ! INTEGRATED Quant. |
---|
288 | TAUHVD_1pt(J,K)=TAUHV_1pt(K) |
---|
289 | |
---|
290 | |
---|
291 | |
---|
292 | C #4: TAUGAS |
---|
293 | C---------------------------- |
---|
294 | |
---|
295 | C LOOP OVER THE NTERMS |
---|
296 | C THIS IS THE ABSORPTION BY THE ATMOSPHERE (METHANE) |
---|
297 | |
---|
298 | |
---|
299 | DO 909 NT=1,NTERM(K) |
---|
300 | TAUGAS=COLDEN(J)*GAS1(J)*BTERM(NT,K)* |
---|
301 | & ( (PRESS(J+1) + PRESS(J))*.5 )**PEXPON(K) |
---|
302 | |
---|
303 | |
---|
304 | * COSBV ET COSBVP |
---|
305 | *----------------- |
---|
306 | |
---|
307 | IF(TAEROSCAT+TNUSCAT+TAURAY .ne. 0.) THEN |
---|
308 | COSBV_1pt(J,K,NT)=(CBAR*TAEROSCAT + CNBAR*TNUSCAT) |
---|
309 | & /(TAEROSCAT+TNUSCAT+TAURAY) !CBAR_RAY=0. |
---|
310 | ELSE |
---|
311 | COSBV_1pt(J,K,NT)=0. |
---|
312 | ENDIF |
---|
313 | |
---|
314 | IF(TAEROSCAT+TAURAY .ne. 0.) THEN |
---|
315 | COSBVP_1pt(J,K,NT)=(CBAR*TAEROSCAT) |
---|
316 | & /(TAEROSCAT+TAURAY) !CBAR_RAY=0. |
---|
317 | ELSE |
---|
318 | COSBVP_1pt(J,K,NT)=0. |
---|
319 | ENDIF |
---|
320 | |
---|
321 | * DTAUV ET DTAUVP |
---|
322 | *----------------- |
---|
323 | |
---|
324 | DTAUV_1pt(J,K,NT) =TAUGAS+TAEROS+TAURAY+TNUEXT !TAU_ABS_METH |
---|
325 | DTAUVP_1pt(J,K,NT)=TAUGAS+TAEROS+TAURAY !TAU_ABS_METH |
---|
326 | |
---|
327 | TAUGV_1pt(K)=TAUGV_1pt(K)+TAUGAS*ATERM(NT,K) !INTEG. |
---|
328 | |
---|
329 | * WBARV ET WBARVP |
---|
330 | *----------------- |
---|
331 | |
---|
332 | IF(TAUGAS+TAEROS+TAURAY+TNUEXT .ne. 0.) THEN |
---|
333 | WBARV_1pt(J,K,NT)=(TAEROSCAT+TAURAY*0.9999999 + TNUSCAT) |
---|
334 | & /(TAUGAS+TAEROS+TAURAY+TNUEXT) |
---|
335 | ELSE |
---|
336 | WBARV_1pt(J,K,NT)=0. |
---|
337 | ENDIF |
---|
338 | |
---|
339 | IF(TAUGAS+TAEROS+TAURAY .ne. 0.) THEN |
---|
340 | WBARVP_1pt(J,K,NT)=(TAEROSCAT+TAURAY*0.9999999 ) |
---|
341 | & /(TAUGAS+TAEROS+TAURAY) |
---|
342 | ELSE |
---|
343 | WBARVP_1pt(J,K,NT)=0. |
---|
344 | ENDIF |
---|
345 | |
---|
346 | 909 CONTINUE |
---|
347 | |
---|
348 | TAUGVD_1pt(J,K)=TAUGVD_1pt(J,K)+TAUGV_1pt(K) |
---|
349 | |
---|
350 | 100 CONTINUE |
---|
351 | |
---|
352 | ioptv=1 |
---|
353 | |
---|
354 | c HERE END OF THE LOOPS ******* |
---|
355 | c****************************** |
---|
356 | |
---|
357 | C TOTAL EXTINCTION OPTICAL DEPTHS |
---|
358 | DO 119 K=1,NSPECV |
---|
359 | C LOOP OVER NTERMS |
---|
360 | DO 119 NT=1,NTERM(K) |
---|
361 | TAUV_1pt(1,K,NT)=0.0 |
---|
362 | TAUVP_1pt(1,K,NT)=0.0 |
---|
363 | DO 119 J=1,NLAYER |
---|
364 | TAUV_1pt(J+1,K,NT)=TAUV_1pt(J,K,NT)+DTAUV_1pt(J,K,NT) |
---|
365 | TAUVP_1pt(J+1,K,NT)=TAUVP_1pt(J,K,NT)+DTAUVP_1pt(J,K,NT) |
---|
366 | 119 CONTINUE |
---|
367 | |
---|
368 | |
---|
369 | c print*,'SETUP' |
---|
370 | c do i=1,NSPECV |
---|
371 | c print*,WLNV(i) |
---|
372 | c do j=1,NLAYER+1 |
---|
373 | c print*,Z(j),TAUV(1,j,i,1),WBARV(1,j,i,1),COSBV(1,j,i,1) |
---|
374 | c enddo |
---|
375 | c enddo |
---|
376 | c |
---|
377 | c IF (IPRINT .GT. 1) THEN |
---|
378 | c NT=1 |
---|
379 | c IF (2 .GT. 1) THEN |
---|
380 | c WRITE (6,120) |
---|
381 | c 120 FORMAT(///' OPTICAL CONSTANTS IN THE VISIBLE (@EQUATOR) ') |
---|
382 | c DO 200 K=1,NSPECV |
---|
383 | c WRITE (6,190) |
---|
384 | c WRITE (6,210)K,WLNV(K),WNOV(K),BWNV(K) |
---|
385 | c & ,BWNV(K)+DWNV(K),DWNV(K) |
---|
386 | c WRITE (6,230)REALV(K),XIMGV(K) |
---|
387 | c DO 195 J=1,NLAYER,NLAYER |
---|
388 | c WRITE (6,220)XNUMB(J), WBARV_1pt(J,K,NT),COSBV_1pt(J,K,NT) |
---|
389 | c & ,DTAUV_1pt(J,K,NT),TAUV_1pt(J,K,NT) |
---|
390 | c 195 CONTINUE |
---|
391 | c WRITE (6,240) TAUV_1pt(NLEVEL,K,NT) |
---|
392 | c 200 CONTINUE |
---|
393 | c END IF |
---|
394 | |
---|
395 | c 210 FORMAT(1X,I3,F10.3,F10.2,F10.2,'-',F8.2,F10.3) |
---|
396 | c 190 FORMAT(1X//' SNUM MICRONS WAVENU INTERVAL DELTA-WN') |
---|
397 | c 230 FORMAT(1X,'NREAL(LAYER)= ',1PE10.3,' NIMG(LAYER)= ',E10.3/ |
---|
398 | c &' #AEROSOLS WBAR COSBAR DTAU TAU' |
---|
399 | c & ,9X,'RAY GAS AEROSOL') |
---|
400 | c 220 FORMAT(8(1X,F9.3)) |
---|
401 | c 240 FORMAT(41X,F9.3) |
---|
402 | |
---|
403 | RETURN |
---|
404 | END |
---|