1 | SUBROUTINE SW1S & |
---|
2 | & ( KIDIA , KFDIA , KLON , KLEV , KAER , KNU,& |
---|
3 | & PAER , PALBD , PALBP, PCG , PCLD , PCLEAR,& |
---|
4 | & PDSIG , POMEGA, POZ , PRMU , PSEC , PTAU , PUD,& |
---|
5 | & PFD , PFU , PCD , PCU , PSUDU1,PDIFF , PDIRF, & |
---|
6 | !++MODIFCODE |
---|
7 | & LRDUST,PPIZA_DST,PCGA_DST,PTAUREL_DST & |
---|
8 | !--MODIFCODE |
---|
9 | &) |
---|
10 | |
---|
11 | !**** *SW1S* - SHORTWAVE RADIATION, FIRST SPECTRAL INTERVAL |
---|
12 | |
---|
13 | ! PURPOSE. |
---|
14 | ! -------- |
---|
15 | |
---|
16 | ! THIS ROUTINE COMPUTES THE SHORTWAVE RADIATION FLUXES IN TWO |
---|
17 | ! SPECTRAL INTERVALS FOLLOWING FOUQUART AND BONNEL (1980). |
---|
18 | |
---|
19 | !** INTERFACE. |
---|
20 | ! ---------- |
---|
21 | |
---|
22 | ! *SW1S* IS CALLED FROM *SW*. |
---|
23 | |
---|
24 | ! IMPLICIT ARGUMENTS : |
---|
25 | ! -------------------- |
---|
26 | |
---|
27 | ! ==== INPUTS === |
---|
28 | ! ==== OUTPUTS === |
---|
29 | |
---|
30 | ! METHOD. |
---|
31 | ! ------- |
---|
32 | |
---|
33 | ! 1. COMPUTES QUANTITIES FOR THE CLEAR-SKY FRACTION OF THE |
---|
34 | ! COLUMN |
---|
35 | ! 2. COMPUTES UPWARD AND DOWNWARD FLUXES CORRESPONDING TO |
---|
36 | ! CONTINUUM SCATTERING |
---|
37 | ! 3. MULTIPLY BY OZONE TRANSMISSION FUNCTION |
---|
38 | |
---|
39 | ! EXTERNALS. |
---|
40 | ! ---------- |
---|
41 | |
---|
42 | ! *SWCLR*, *SWR*, *SWTT*, *SWUVO3* |
---|
43 | |
---|
44 | ! REFERENCE. |
---|
45 | ! ---------- |
---|
46 | |
---|
47 | ! SEE RADIATION'S PART OF THE ECMWF RESEARCH DEPARTMENT |
---|
48 | ! DOCUMENTATION, AND FOUQUART AND BONNEL (1980) |
---|
49 | |
---|
50 | ! AUTHOR. |
---|
51 | ! ------- |
---|
52 | ! JEAN-JACQUES MORCRETTE *ECMWF* |
---|
53 | |
---|
54 | ! MODIFICATIONS. |
---|
55 | ! -------------- |
---|
56 | ! ORIGINAL : 89-07-14 |
---|
57 | ! 94-11-15 J.-J. MORCRETTE DIRECT/DIFFUSE ALBEDO |
---|
58 | ! 96-01-15 J.-J. MORCRETTE SW in nsw SPECTRAL INTERVALS |
---|
59 | ! 990128 JJMorcrette sunshine duration |
---|
60 | ! 99-05-25 JJMorcrette Revised aerosols |
---|
61 | ! 00-12-18 JJMorcrette 6 spectral intervals |
---|
62 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
63 | ! Y.Seity 04-11-19 : add two arguments for AROME externalized surface |
---|
64 | ! Y.Seity 05-10-10 : add 3 optional arg. for dust SW properties |
---|
65 | ! Y.Seity 06-09-09 : add modset from O.Thouron (MesoNH) under NOVLP tests |
---|
66 | ! ------------------------------------------------------------------ |
---|
67 | |
---|
68 | USE PARKIND1 ,ONLY : JPIM ,JPRB |
---|
69 | USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
---|
70 | |
---|
71 | USE YOESW , ONLY : RRAY ,RSUN |
---|
72 | !USE YOERAD , ONLY : NSW |
---|
73 | ! NSW mis dans .def MPL 20140211 |
---|
74 | USE write_field_phy |
---|
75 | ! Temporary fix waiting for cleaner interface (or not) |
---|
76 | USE clesphys_mod_h, ONLY: NSW |
---|
77 | |
---|
78 | IMPLICIT NONE |
---|
79 | |
---|
80 | !!include "clesphys.h" |
---|
81 | |
---|
82 | INTEGER(KIND=JPIM),INTENT(IN) :: KLON |
---|
83 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
84 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA |
---|
85 | INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA |
---|
86 | INTEGER(KIND=JPIM),INTENT(IN) :: KAER |
---|
87 | INTEGER(KIND=JPIM),INTENT(IN) :: KNU |
---|
88 | REAL(KIND=JPRB) ,INTENT(IN) :: PAER(KLON,6,KLEV) |
---|
89 | REAL(KIND=JPRB) ,INTENT(IN) :: PALBD(KLON,NSW) |
---|
90 | REAL(KIND=JPRB) ,INTENT(IN) :: PALBP(KLON,NSW) |
---|
91 | REAL(KIND=JPRB) ,INTENT(IN) :: PCG(KLON,NSW,KLEV) |
---|
92 | REAL(KIND=JPRB) ,INTENT(IN) :: PCLD(KLON,KLEV) |
---|
93 | REAL(KIND=JPRB) ,INTENT(IN) :: PCLEAR(KLON) |
---|
94 | REAL(KIND=JPRB) ,INTENT(IN) :: PDSIG(KLON,KLEV) |
---|
95 | REAL(KIND=JPRB) ,INTENT(IN) :: POMEGA(KLON,NSW,KLEV) |
---|
96 | REAL(KIND=JPRB) ,INTENT(IN) :: POZ(KLON,KLEV) |
---|
97 | REAL(KIND=JPRB) ,INTENT(IN) :: PRMU(KLON) |
---|
98 | REAL(KIND=JPRB) ,INTENT(IN) :: PSEC(KLON) |
---|
99 | REAL(KIND=JPRB) ,INTENT(IN) :: PTAU(KLON,NSW,KLEV) |
---|
100 | REAL(KIND=JPRB) ,INTENT(IN) :: PUD(KLON,5,KLEV+1) |
---|
101 | !++MODIFCODE |
---|
102 | LOGICAL ,INTENT(IN) :: LRDUST ! flag for DUST |
---|
103 | REAL(KIND=JPRB) ,INTENT(IN) :: PPIZA_DST(KLON,KLEV) |
---|
104 | REAL(KIND=JPRB) ,INTENT(IN) :: PCGA_DST(KLON,KLEV) |
---|
105 | REAL(KIND=JPRB) ,INTENT(IN) :: PTAUREL_DST(KLON,KLEV) |
---|
106 | !--MODIFCODE |
---|
107 | REAL(KIND=JPRB) ,INTENT(OUT) :: PFD(KLON,KLEV+1) |
---|
108 | REAL(KIND=JPRB) ,INTENT(OUT) :: PFU(KLON,KLEV+1) |
---|
109 | REAL(KIND=JPRB) ,INTENT(OUT) :: PCD(KLON,KLEV+1) |
---|
110 | REAL(KIND=JPRB) ,INTENT(OUT) :: PCU(KLON,KLEV+1) |
---|
111 | REAL(KIND=JPRB) ,INTENT(OUT) :: PSUDU1(KLON) |
---|
112 | REAL(KIND=JPRB) ,INTENT(OUT) :: PDIFF(KLON,KLEV) |
---|
113 | REAL(KIND=JPRB) ,INTENT(OUT) :: PDIRF(KLON,KLEV) |
---|
114 | ! ------------------------------------------------------------------ |
---|
115 | |
---|
116 | !* 0.1 ARGUMENTS |
---|
117 | ! --------- |
---|
118 | |
---|
119 | ! ------------------------------------------------------------------ |
---|
120 | |
---|
121 | ! ------------ |
---|
122 | |
---|
123 | INTEGER(KIND=JPIM) :: IIND(6) |
---|
124 | |
---|
125 | REAL(KIND=JPRB) :: ZCGAZ(KLON,KLEV)& |
---|
126 | & , ZDIFF(KLON) , ZDIRF(KLON) & |
---|
127 | & , ZDIFT(KLON) , ZDIRT(KLON) & |
---|
128 | & , ZPIZAZ(KLON,KLEV)& |
---|
129 | & , ZRAYL(KLON), ZRAY1(KLON,KLEV+1), ZRAY2(KLON,KLEV+1)& |
---|
130 | & , ZREFZ(KLON,2,KLEV+1)& |
---|
131 | & , ZRJ(KLON,6,KLEV+1), ZRJ0(KLON,6,KLEV+1)& |
---|
132 | & , ZRK(KLON,6,KLEV+1), ZRK0(KLON,6,KLEV+1)& |
---|
133 | & , ZRMUE(KLON,KLEV+1), ZRMU0(KLON,KLEV+1)& |
---|
134 | & , ZR(KLON,6)& |
---|
135 | & , ZTAUAZ(KLON,KLEV)& |
---|
136 | & , ZTRA1(KLON,KLEV+1), ZTRA2(KLON,KLEV+1)& |
---|
137 | & , ZTRCLD(KLON) , ZTRCLR(KLON)& |
---|
138 | & , ZW(KLON,6) , ZO(KLON,2) ,ZT(KLON,2) |
---|
139 | |
---|
140 | INTEGER(KIND=JPIM) :: IKL, IKM1, JAJ, JK, JL , JJ |
---|
141 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
142 | LOGICAL :: LLDEBUG |
---|
143 | |
---|
144 | #include "swclr.intfb.h" |
---|
145 | #include "swr.intfb.h" |
---|
146 | #include "swtt1.intfb.h" |
---|
147 | #include "swuvo3.intfb.h" |
---|
148 | |
---|
149 | ! ------------------------------------------------------------------ |
---|
150 | |
---|
151 | !* 1. FIRST SPECTRAL INTERVAL (0.25-0.68 MICRON) |
---|
152 | ! ----------------------- ------------------ |
---|
153 | |
---|
154 | !* 1.1 OPTICAL THICKNESS FOR RAYLEIGH SCATTERING |
---|
155 | ! ----------------------------------------- |
---|
156 | |
---|
157 | IF (LHOOK) CALL DR_HOOK('SW1S',0,ZHOOK_HANDLE) |
---|
158 | LLDEBUG=.FALSE. |
---|
159 | DO JL = KIDIA,KFDIA |
---|
160 | ZRAYL(JL) = RRAY(KNU,1) + PRMU(JL) * (RRAY(KNU,2) + PRMU(JL)& |
---|
161 | & * (RRAY(KNU,3) + PRMU(JL) * (RRAY(KNU,4) + PRMU(JL)& |
---|
162 | & * (RRAY(KNU,5) + PRMU(JL) * RRAY(KNU,6) )))) |
---|
163 | ENDDO |
---|
164 | ! ------------------------------------------------------------------ |
---|
165 | |
---|
166 | !* 2. CONTINUUM SCATTERING CALCULATIONS |
---|
167 | ! --------------------------------- |
---|
168 | |
---|
169 | !* 2.1 CLEAR-SKY FRACTION OF THE COLUMN |
---|
170 | ! -------------------------------- |
---|
171 | |
---|
172 | !++MODIFCODE |
---|
173 | CALL SWCLR & |
---|
174 | &( KIDIA , KFDIA , KLON , KLEV , KAER , KNU & |
---|
175 | &, PAER , PALBP , PDSIG , ZRAYL, PSEC & |
---|
176 | &, ZCGAZ , ZPIZAZ, ZRAY1 , ZRAY2, ZREFZ, ZRJ0 & |
---|
177 | &, ZRK0 , ZRMU0 , ZTAUAZ, ZTRA1, ZTRA2, ZTRCLR & |
---|
178 | &, LRDUST , PPIZA_DST,PCGA_DST & |
---|
179 | &, PTAUREL_DST ) |
---|
180 | |
---|
181 | !--MODIFCODE |
---|
182 | |
---|
183 | !* 2.2 CLOUDY FRACTION OF THE COLUMN |
---|
184 | ! ----------------------------- |
---|
185 | |
---|
186 | CALL SWR & |
---|
187 | & ( KIDIA ,KFDIA ,KLON ,KLEV , KNU,& |
---|
188 | & PALBD ,PCG ,PCLD ,POMEGA, PSEC , PTAU,& |
---|
189 | & ZCGAZ ,ZPIZAZ,ZRAY1 ,ZRAY2 , ZREFZ, ZRJ ,ZRK , ZRMUE,& |
---|
190 | & ZTAUAZ,ZTRA1 ,ZTRA2 ,ZTRCLD & |
---|
191 | & ) |
---|
192 | |
---|
193 | ! DO JK = 1 , KLEV |
---|
194 | ! IKL = KLEV+1-JK |
---|
195 | ! DO JL = KIDIA,KFDIA |
---|
196 | ! print *,'Apres SWCLR,SWR RMU0 RMUE ',ZRMU0(JL,IKL),ZRMUE(JL,IKL) |
---|
197 | ! ENDDO |
---|
198 | ! ENDDO |
---|
199 | ! ------------------------------------------------------------------ |
---|
200 | |
---|
201 | !* 3. OZONE ABSORPTION |
---|
202 | ! ---------------- |
---|
203 | |
---|
204 | IF (NSW <= 4) THEN |
---|
205 | |
---|
206 | !* 3.1 TWO OR FOUR SPECTRAL INTERVALS |
---|
207 | ! ------------------------------ |
---|
208 | |
---|
209 | IIND(1)=1 |
---|
210 | IIND(2)=2 |
---|
211 | IIND(3)=3 |
---|
212 | IIND(4)=1 |
---|
213 | IIND(5)=2 |
---|
214 | IIND(6)=3 |
---|
215 | |
---|
216 | !* 3.1.1 DOWNWARD FLUXES |
---|
217 | ! --------------- |
---|
218 | |
---|
219 | JAJ = 2 |
---|
220 | |
---|
221 | DO JL = KIDIA,KFDIA |
---|
222 | ZW(JL,1)=0.0_JPRB |
---|
223 | ZW(JL,2)=0.0_JPRB |
---|
224 | ZW(JL,3)=0.0_JPRB |
---|
225 | ZW(JL,4)=0.0_JPRB |
---|
226 | ZW(JL,5)=0.0_JPRB |
---|
227 | ZW(JL,6)=0.0_JPRB |
---|
228 | PFD(JL,KLEV+1)=((1.0_JPRB-PCLEAR(JL))*ZRJ(JL,JAJ,KLEV+1)& |
---|
229 | & + PCLEAR(JL) *ZRJ0(JL,JAJ,KLEV+1)) * RSUN(KNU) |
---|
230 | PCD(JL,KLEV+1)= ZRJ0(JL,JAJ,KLEV+1) * RSUN(KNU) |
---|
231 | ENDDO |
---|
232 | DO JK = 1 , KLEV |
---|
233 | IKL = KLEV+1-JK |
---|
234 | DO JL = KIDIA,KFDIA |
---|
235 | ZW(JL,1)=ZW(JL,1)+PUD(JL,1,IKL)/ZRMUE(JL,IKL) |
---|
236 | ZW(JL,2)=ZW(JL,2)+PUD(JL,2,IKL)/ZRMUE(JL,IKL) |
---|
237 | ZW(JL,3)=ZW(JL,3)+POZ(JL, IKL)/ZRMUE(JL,IKL) |
---|
238 | ZW(JL,4)=ZW(JL,4)+PUD(JL,1,IKL)/ZRMU0(JL,IKL) |
---|
239 | ZW(JL,5)=ZW(JL,5)+PUD(JL,2,IKL)/ZRMU0(JL,IKL) |
---|
240 | ZW(JL,6)=ZW(JL,6)+POZ(JL, IKL)/ZRMU0(JL,IKL) |
---|
241 | ENDDO |
---|
242 | |
---|
243 | CALL SWTT1 ( KIDIA, KFDIA, KLON, KNU, 6,& |
---|
244 | & IIND,& |
---|
245 | & ZW,& |
---|
246 | & ZR ) |
---|
247 | |
---|
248 | DO JL = KIDIA,KFDIA |
---|
249 | ZDIFF(JL) = ZR(JL,1)*ZR(JL,2)*ZR(JL,3)*ZRJ(JL,JAJ,IKL) |
---|
250 | ZDIRF(JL) = ZR(JL,4)*ZR(JL,5)*ZR(JL,6)*ZRJ0(JL,JAJ,IKL) |
---|
251 | PDIFF(JL,IKL) = ZDIFF(JL) * RSUN(KNU)*(1.0_JPRB-PCLEAR(JL)) |
---|
252 | PDIRF(JL,IKL) = ZDIRF(JL) * RSUN(KNU)*PCLEAR(JL) |
---|
253 | PFD(JL,IKL) = ((1.0_JPRB-PCLEAR(JL)) * ZDIFF(JL)& |
---|
254 | & +PCLEAR(JL) * ZDIRF(JL)) * RSUN(KNU) |
---|
255 | PCD(JL,IKL) = ZDIRF(JL) * RSUN(KNU) |
---|
256 | ENDDO |
---|
257 | ENDDO |
---|
258 | |
---|
259 | DO JL=KIDIA,KFDIA |
---|
260 | ZDIFT(JL) = ZR(JL,1)*ZR(JL,2)*ZR(JL,3)*ZTRCLD(JL) |
---|
261 | ZDIRT(JL) = ZR(JL,4)*ZR(JL,5)*ZR(JL,6)*ZTRCLR(JL) |
---|
262 | PSUDU1(JL) = ((1.0_JPRB-PCLEAR(JL)) * ZDIFT(JL)& |
---|
263 | & +PCLEAR(JL) * ZDIRT(JL)) * RSUN(KNU) |
---|
264 | ENDDO |
---|
265 | |
---|
266 | !* 3.1.2 UPWARD FLUXES |
---|
267 | ! ------------- |
---|
268 | |
---|
269 | DO JL = KIDIA,KFDIA |
---|
270 | PFU(JL,1) = ((1.0_JPRB-PCLEAR(JL))*ZDIFF(JL)*PALBD(JL,KNU)& |
---|
271 | & + PCLEAR(JL) *ZDIRF(JL)*PALBP(JL,KNU))& |
---|
272 | & * RSUN(KNU) |
---|
273 | PCU(JL,1) = ZDIRF(JL) * PALBP(JL,KNU) * RSUN(KNU) |
---|
274 | ENDDO |
---|
275 | |
---|
276 | DO JK = 2 , KLEV+1 |
---|
277 | IKM1=JK-1 |
---|
278 | DO JL = KIDIA,KFDIA |
---|
279 | ZW(JL,1)=ZW(JL,1)+PUD(JL,1,IKM1)*1.66_JPRB |
---|
280 | ZW(JL,2)=ZW(JL,2)+PUD(JL,2,IKM1)*1.66_JPRB |
---|
281 | ZW(JL,3)=ZW(JL,3)+POZ(JL, IKM1)*1.66_JPRB |
---|
282 | ZW(JL,4)=ZW(JL,4)+PUD(JL,1,IKM1)*1.66_JPRB |
---|
283 | ZW(JL,5)=ZW(JL,5)+PUD(JL,2,IKM1)*1.66_JPRB |
---|
284 | ZW(JL,6)=ZW(JL,6)+POZ(JL, IKM1)*1.66_JPRB |
---|
285 | ENDDO |
---|
286 | |
---|
287 | CALL SWTT1 ( KIDIA, KFDIA, KLON, KNU, 6,& |
---|
288 | & IIND,& |
---|
289 | & ZW,& |
---|
290 | & ZR ) |
---|
291 | |
---|
292 | DO JL = KIDIA,KFDIA |
---|
293 | ZDIFF(JL) = ZR(JL,1)*ZR(JL,2)*ZR(JL,3)*ZRK(JL,JAJ,JK) |
---|
294 | ZDIRF(JL) = ZR(JL,4)*ZR(JL,5)*ZR(JL,6)*ZRK0(JL,JAJ,JK) |
---|
295 | PFU(JL,JK) = ((1.0_JPRB-PCLEAR(JL)) * ZDIFF(JL)& |
---|
296 | & +PCLEAR(JL) * ZDIRF(JL)) * RSUN(KNU) |
---|
297 | PCU(JL,JK) = ZDIRF(JL) * RSUN(KNU) |
---|
298 | ENDDO |
---|
299 | !WRITE(*,'("---> Dans SW1S:")') |
---|
300 | !WRITE(*,'("PFU",10E12.5)') (PFU(1,JJ),JJ=1,KLEV+1) |
---|
301 | !WRITE(*,'("PCLEAR",10E12.5)') (PCLEAR(1)) |
---|
302 | !WRITE(*,'("ZDIFF",10E12.5)') (ZDIFF(1)) |
---|
303 | !WRITE(*,'("ZDIRF",10E12.5)') (ZDIRF(1)) |
---|
304 | !WRITE(*,'("RSUN",10E12.5)') (RSUN(KNU)) |
---|
305 | ENDDO |
---|
306 | |
---|
307 | ELSEIF (NSW == 6) THEN |
---|
308 | !print *,'... dans SW1S: NSW=',NSW |
---|
309 | |
---|
310 | !* 3.2 SIX SPECTRAL INTERVALS |
---|
311 | ! ---------------------- |
---|
312 | |
---|
313 | IIND(1)=1 |
---|
314 | IIND(2)=2 |
---|
315 | IIND(3)=1 |
---|
316 | IIND(4)=2 |
---|
317 | |
---|
318 | !* 3.2,1 DOWNWARD FLUXES |
---|
319 | ! --------------- |
---|
320 | |
---|
321 | JAJ = 2 |
---|
322 | |
---|
323 | DO JL = KIDIA,KFDIA |
---|
324 | ZW(JL,1)=0.0_JPRB |
---|
325 | ZW(JL,2)=0.0_JPRB |
---|
326 | ZW(JL,3)=0.0_JPRB |
---|
327 | ZW(JL,4)=0.0_JPRB |
---|
328 | |
---|
329 | ZO(JL,1)=0.0_JPRB |
---|
330 | ZO(JL,2)=0.0_JPRB |
---|
331 | PFD(JL,KLEV+1)=((1.0_JPRB-PCLEAR(JL))*ZRJ(JL,JAJ,KLEV+1)& |
---|
332 | & + PCLEAR(JL) *ZRJ0(JL,JAJ,KLEV+1)) * RSUN(KNU) |
---|
333 | PCD(JL,KLEV+1)= ZRJ0(JL,JAJ,KLEV+1) * RSUN(KNU) |
---|
334 | ENDDO |
---|
335 | DO JK = 1 , KLEV |
---|
336 | IKL = KLEV+1-JK |
---|
337 | DO JL = KIDIA,KFDIA |
---|
338 | ZW(JL,1)=ZW(JL,1)+PUD(JL,1,IKL)/ZRMUE(JL,IKL) |
---|
339 | ZW(JL,2)=ZW(JL,2)+PUD(JL,2,IKL)/ZRMUE(JL,IKL) |
---|
340 | ZW(JL,3)=ZW(JL,3)+PUD(JL,1,IKL)/ZRMU0(JL,IKL) |
---|
341 | ZW(JL,4)=ZW(JL,4)+PUD(JL,2,IKL)/ZRMU0(JL,IKL) |
---|
342 | |
---|
343 | ZO(JL,1)=ZO(JL,1)+POZ(JL, IKL)/ZRMUE(JL,IKL) |
---|
344 | ZO(JL,2)=ZO(JL,2)+POZ(JL, IKL)/ZRMU0(JL,IKL) |
---|
345 | ENDDO |
---|
346 | |
---|
347 | ! WRITE(*,'("---> Dans SW1S avant SWTT1:")') |
---|
348 | CALL SWTT1 ( KIDIA, KFDIA, KLON, KNU, 4,& |
---|
349 | & IIND,& |
---|
350 | & ZW,& |
---|
351 | & ZR & |
---|
352 | & ) |
---|
353 | |
---|
354 | ! WRITE(*,'("---> Dans SW1S avant SWUVO3 flux dwn:")') |
---|
355 | CALL SWUVO3 ( KIDIA, KFDIA, KLON, KNU, 2,& |
---|
356 | & ZO,& |
---|
357 | & ZT & |
---|
358 | & ) |
---|
359 | |
---|
360 | DO JL = KIDIA,KFDIA |
---|
361 | ZDIFF(JL) = ZR(JL,1)*ZR(JL,2)*ZT(JL,1)*ZRJ(JL,JAJ,IKL) |
---|
362 | ZDIRF(JL) = ZR(JL,3)*ZR(JL,4)*ZT(JL,2)*ZRJ0(JL,JAJ,IKL) |
---|
363 | PDIFF(JL,IKL) = ZDIFF(JL) * RSUN(KNU)*(1.0_JPRB-PCLEAR(JL)) |
---|
364 | PDIRF(JL,IKL) = ZDIRF(JL) * RSUN(KNU)*PCLEAR(JL) |
---|
365 | PFD(JL,IKL) = ((1.0_JPRB-PCLEAR(JL)) * ZDIFF(JL)& |
---|
366 | & +PCLEAR(JL) * ZDIRF(JL)) * RSUN(KNU) |
---|
367 | PCD(JL,IKL) = ZDIRF(JL) * RSUN(KNU) |
---|
368 | ENDDO |
---|
369 | ENDDO |
---|
370 | |
---|
371 | IF(LLDEBUG) THEN |
---|
372 | call writefield_phy('sw1s_pud1',PUD(:,1,:),klev) |
---|
373 | call writefield_phy('sw1s_pud2',PUD(:,2,:),klev) |
---|
374 | call writefield_phy('sw1s_psec',PSEC,1) |
---|
375 | call writefield_phy('sw1s_zrmue',ZRMUE,klev+1) |
---|
376 | call writefield_phy('sw1s_zrmu0',ZRMU0,klev+1) |
---|
377 | call writefield_phy('sw1s_pdirf',PDIRF,klev) |
---|
378 | call writefield_phy('sw1s_pdiff',PDIFF,klev) |
---|
379 | call writefield_phy('sw1s_pfd',PFD,klev) |
---|
380 | ENDIF |
---|
381 | DO JL=KIDIA,KFDIA |
---|
382 | ZDIFT(JL) = ZR(JL,1)*ZR(JL,2)*ZT(JL,1)*ZTRCLD(JL) |
---|
383 | ZDIRT(JL) = ZR(JL,3)*ZR(JL,4)*ZT(JL,2)*ZTRCLR(JL) |
---|
384 | PSUDU1(JL) = ((1.0_JPRB-PCLEAR(JL)) * ZDIFT(JL)& |
---|
385 | & +PCLEAR(JL) * ZDIRT(JL)) * RSUN(KNU) |
---|
386 | ENDDO |
---|
387 | |
---|
388 | !* 3.2.2 UPWARD FLUXES |
---|
389 | ! ------------- |
---|
390 | |
---|
391 | DO JL = KIDIA,KFDIA |
---|
392 | PFU(JL,1) = ((1.0_JPRB-PCLEAR(JL))*ZDIFF(JL)*PALBD(JL,KNU)& |
---|
393 | & + PCLEAR(JL) *ZDIRF(JL)*PALBP(JL,KNU))& |
---|
394 | & * RSUN(KNU) |
---|
395 | PCU(JL,1) = ZDIRF(JL) * PALBP(JL,KNU) * RSUN(KNU) |
---|
396 | ENDDO |
---|
397 | |
---|
398 | DO JK = 2 , KLEV+1 |
---|
399 | IKM1=JK-1 |
---|
400 | DO JL = KIDIA,KFDIA |
---|
401 | ZW(JL,1)=ZW(JL,1)+PUD(JL,1,IKM1)*1.66_JPRB |
---|
402 | ZW(JL,2)=ZW(JL,2)+PUD(JL,2,IKM1)*1.66_JPRB |
---|
403 | ZW(JL,3)=ZW(JL,3)+PUD(JL,1,IKM1)*1.66_JPRB |
---|
404 | ZW(JL,4)=ZW(JL,4)+PUD(JL,2,IKM1)*1.66_JPRB |
---|
405 | |
---|
406 | ZO(JL,1)=ZO(JL,1)+POZ(JL, IKM1)*1.66_JPRB |
---|
407 | ZO(JL,2)=ZO(JL,2)+POZ(JL, IKM1)*1.66_JPRB |
---|
408 | ENDDO |
---|
409 | |
---|
410 | ! WRITE(*,'("---> Dans SW1S avant SWTT1:")') |
---|
411 | CALL SWTT1 ( KIDIA, KFDIA, KLON, KNU, 4,& |
---|
412 | & IIND,& |
---|
413 | & ZW,& |
---|
414 | & ZR & |
---|
415 | & ) |
---|
416 | |
---|
417 | ! WRITE(*,'("---> Dans SW1S avant SWUVO3 flux up:")') |
---|
418 | CALL SWUVO3 ( KIDIA, KFDIA, KLON, KNU, 2,& |
---|
419 | & ZO,& |
---|
420 | & ZT & |
---|
421 | & ) |
---|
422 | |
---|
423 | DO JL = KIDIA,KFDIA |
---|
424 | ZDIFF(JL) = ZR(JL,1)*ZR(JL,2)*ZT(JL,1)*ZRK(JL,JAJ,JK) |
---|
425 | ZDIRF(JL) = ZR(JL,3)*ZR(JL,4)*ZT(JL,2)*ZRK0(JL,JAJ,JK) |
---|
426 | PFU(JL,JK) = ((1.0_JPRB-PCLEAR(JL)) * ZDIFF(JL)& |
---|
427 | & +PCLEAR(JL) * ZDIRF(JL)) * RSUN(KNU) |
---|
428 | PCU(JL,JK) = ZDIRF(JL) * RSUN(KNU) |
---|
429 | !WRITE(*,'("---> Dans SW1S:")') |
---|
430 | !print *,'===JL= ',jl |
---|
431 | !WRITE(*,'("ZR1",10E12.5)') (ZR(JL,1)) |
---|
432 | !WRITE(*,'("ZR2",10E12.5)') (ZR(JL,2)) |
---|
433 | !WRITE(*,'("ZR3",10E12.5)') (ZR(JL,3)) |
---|
434 | !WRITE(*,'("ZR4",10E12.5)') (ZR(JL,4)) |
---|
435 | !WRITE(*,'("ZT1",10E12.5)') (ZT(JL,1)) |
---|
436 | !WRITE(*,'("ZT2",10E12.5)') (ZT(JL,2)) |
---|
437 | ENDDO |
---|
438 | ENDDO |
---|
439 | |
---|
440 | !WRITE(*,'("---> Dans SW1S:")') |
---|
441 | !WRITE(*,'("PFU",10E12.5)') (PFU(1,JJ),JJ=1,KLEV+1) |
---|
442 | !WRITE(*,'("ZR",10E12.5)') (ZR(1,JJ),JJ=1,4) |
---|
443 | !WRITE(*,'("PCLEAR",10E12.5)') (PCLEAR(1)) |
---|
444 | !WRITE(*,'("ZDIFF",10E12.5)') (ZDIFF(1)) |
---|
445 | !WRITE(*,'("ZDIRF",10E12.5)') (ZDIRF(1)) |
---|
446 | !WRITE(*,'("RSUN",10E12.5)') (RSUN(KNU)) |
---|
447 | ENDIF |
---|
448 | |
---|
449 | ! ------------------------------------------------------------------ |
---|
450 | |
---|
451 | IF (LHOOK) CALL DR_HOOK('SW1S',1,ZHOOK_HANDLE) |
---|
452 | END SUBROUTINE SW1S |
---|