1 | module radlwsw_m |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | |
---|
5 | contains |
---|
6 | |
---|
7 | SUBROUTINE radlwsw( & |
---|
8 | dist, rmu0, fract, & |
---|
9 | paprs, pplay,tsol,alb1, alb2, & |
---|
10 | t,q,wo,& |
---|
11 | cldfra, cldemi, cldtaupd,& |
---|
12 | ok_ade, ok_aie, flag_aerosol,& |
---|
13 | flag_aerosol_strat,& |
---|
14 | tau_aero, piz_aero, cg_aero,& |
---|
15 | cldtaupi, new_aod, & |
---|
16 | qsat, flwc, fiwc, & |
---|
17 | heat,heat0,cool,cool0,radsol,albpla,& |
---|
18 | topsw,toplw,solsw,sollw,& |
---|
19 | sollwdown,& |
---|
20 | topsw0,toplw0,solsw0,sollw0,& |
---|
21 | lwdn0, lwdn, lwup0, lwup,& |
---|
22 | swdn0, swdn, swup0, swup,& |
---|
23 | topswad_aero, solswad_aero,& |
---|
24 | topswai_aero, solswai_aero, & |
---|
25 | topswad0_aero, solswad0_aero,& |
---|
26 | topsw_aero, topsw0_aero,& |
---|
27 | solsw_aero, solsw0_aero, & |
---|
28 | topswcf_aero, solswcf_aero) |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | USE DIMPHY |
---|
33 | USE assert_m, ONLY : assert |
---|
34 | USE infotrac, ONLY : type_trac |
---|
35 | #ifdef REPROBUS |
---|
36 | USE CHEM_REP, ONLY : solaireTIME, ok_SUNTIME, ndimozon |
---|
37 | #endif |
---|
38 | ! L. Fita |
---|
39 | USE radiation_AR4_mod |
---|
40 | |
---|
41 | !====================================================================== |
---|
42 | ! Auteur(s): Z.X. Li (LMD/CNRS) date: 19960719 |
---|
43 | ! Objet: interface entre le modele et les rayonnements |
---|
44 | ! Arguments: |
---|
45 | ! dist-----input-R- distance astronomique terre-soleil |
---|
46 | ! rmu0-----input-R- cosinus de l'angle zenithal |
---|
47 | ! fract----input-R- duree d'ensoleillement normalisee |
---|
48 | ! co2_ppm--input-R- concentration du gaz carbonique (en ppm) |
---|
49 | ! paprs----input-R- pression a inter-couche (Pa) |
---|
50 | ! pplay----input-R- pression au milieu de couche (Pa) |
---|
51 | ! tsol-----input-R- temperature du sol (en K) |
---|
52 | ! alb1-----input-R- albedo du sol(entre 0 et 1) dans l'interval visible |
---|
53 | ! alb2-----input-R- albedo du sol(entre 0 et 1) dans l'interval proche infra-rouge |
---|
54 | ! t--------input-R- temperature (K) |
---|
55 | ! q--------input-R- vapeur d'eau (en kg/kg) |
---|
56 | ! cldfra---input-R- fraction nuageuse (entre 0 et 1) |
---|
57 | ! cldtaupd---input-R- epaisseur optique des nuages dans le visible (present-day value) |
---|
58 | ! cldemi---input-R- emissivite des nuages dans l'IR (entre 0 et 1) |
---|
59 | ! ok_ade---input-L- apply the Aerosol Direct Effect or not? |
---|
60 | ! ok_aie---input-L- apply the Aerosol Indirect Effect or not? |
---|
61 | ! flag_aerosol-input-I- aerosol flag from 0 to 6 |
---|
62 | ! flag_aerosol_strat-input-I- use stratospheric aerosols flag (T/F) |
---|
63 | ! tau_ae, piz_ae, cg_ae-input-R- aerosol optical properties (calculated in aeropt.F) |
---|
64 | ! cldtaupi-input-R- epaisseur optique des nuages dans le visible |
---|
65 | ! calculated for pre-industrial (pi) aerosol concentrations, i.e. with smaller |
---|
66 | ! droplet concentration, thus larger droplets, thus generally cdltaupi cldtaupd |
---|
67 | ! it is needed for the diagnostics of the aerosol indirect radiative forcing |
---|
68 | ! |
---|
69 | ! heat-----output-R- echauffement atmospherique (visible) (K/jour) |
---|
70 | ! cool-----output-R- refroidissement dans l'IR (K/jour) |
---|
71 | ! radsol---output-R- bilan radiatif net au sol (W/m**2) (+ vers le bas) |
---|
72 | ! albpla---output-R- albedo planetaire (entre 0 et 1) |
---|
73 | ! topsw----output-R- flux solaire net au sommet de l'atm. |
---|
74 | ! toplw----output-R- ray. IR montant au sommet de l'atmosphere |
---|
75 | ! solsw----output-R- flux solaire net a la surface |
---|
76 | ! sollw----output-R- ray. IR montant a la surface |
---|
77 | ! solswad---output-R- ray. solaire net absorbe a la surface (aerosol dir) |
---|
78 | ! topswad---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol dir) |
---|
79 | ! solswai---output-R- ray. solaire net absorbe a la surface (aerosol ind) |
---|
80 | ! topswai---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol ind) |
---|
81 | ! |
---|
82 | ! ATTENTION: swai and swad have to be interpreted in the following manner: |
---|
83 | ! --------- |
---|
84 | ! ok_ade=F & ok_aie=F -both are zero |
---|
85 | ! ok_ade=T & ok_aie=F -aerosol direct forcing is F_{AD} = topsw-topswad |
---|
86 | ! indirect is zero |
---|
87 | ! ok_ade=F & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
88 | ! direct is zero |
---|
89 | ! ok_ade=T & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
90 | ! aerosol direct forcing is F_{AD} = topswai-topswad |
---|
91 | ! |
---|
92 | |
---|
93 | !====================================================================== |
---|
94 | |
---|
95 | ! ==================================================================== |
---|
96 | ! Adapte au modele de chimie INCA par Celine Deandreis & Anne Cozic -- 2009 |
---|
97 | ! 1 = ZERO |
---|
98 | ! 2 = AER total |
---|
99 | ! 3 = NAT |
---|
100 | ! 4 = BC |
---|
101 | ! 5 = SO4 |
---|
102 | ! 6 = POM |
---|
103 | ! 7 = DUST |
---|
104 | ! 8 = SS |
---|
105 | ! 9 = NO3 |
---|
106 | ! |
---|
107 | ! ==================================================================== |
---|
108 | include "YOETHF.h" |
---|
109 | include "YOMCST.h" |
---|
110 | include "clesphys.h" |
---|
111 | include "iniprint.h" |
---|
112 | |
---|
113 | ! Input arguments |
---|
114 | REAL, INTENT(in) :: dist |
---|
115 | REAL, INTENT(in) :: rmu0(KLON), fract(KLON) |
---|
116 | REAL, INTENT(in) :: paprs(KLON,KLEV+1), pplay(KLON,KLEV) |
---|
117 | REAL, INTENT(in) :: alb1(KLON), alb2(KLON), tsol(KLON) |
---|
118 | REAL, INTENT(in) :: t(KLON,KLEV), q(KLON,KLEV) |
---|
119 | |
---|
120 | REAL, INTENT(in):: wo(:, :, :) ! dimension(KLON,KLEV, 1 or 2) |
---|
121 | ! column-density of ozone in a layer, in kilo-Dobsons |
---|
122 | ! "wo(:, :, 1)" is for the average day-night field, |
---|
123 | ! "wo(:, :, 2)" is for daylight time. |
---|
124 | |
---|
125 | LOGICAL, INTENT(in) :: ok_ade, ok_aie ! switches whether to use aerosol direct (indirect) effects or not |
---|
126 | INTEGER, INTENT(in) :: flag_aerosol ! takes value 0 (no aerosol) or 1 to 6 (aerosols) |
---|
127 | LOGICAL, INTENT(in) :: flag_aerosol_strat ! use stratospheric aerosols |
---|
128 | REAL, INTENT(in) :: cldfra(KLON,KLEV), cldemi(KLON,KLEV), cldtaupd(KLON,KLEV) |
---|
129 | REAL, INTENT(in) :: tau_aero(KLON,KLEV,9,2) ! aerosol optical properties (see aeropt.F) |
---|
130 | REAL, INTENT(in) :: piz_aero(KLON,KLEV,9,2) ! aerosol optical properties (see aeropt.F) |
---|
131 | REAL, INTENT(in) :: cg_aero(KLON,KLEV,9,2) ! aerosol optical properties (see aeropt.F) |
---|
132 | REAL, INTENT(in) :: cldtaupi(KLON,KLEV) ! cloud optical thickness for pre-industrial aerosol concentrations |
---|
133 | LOGICAL, INTENT(in) :: new_aod ! flag pour retrouver les resultats exacts de l'AR4 dans le cas ou l'on ne travaille qu'avec les sulfates |
---|
134 | REAL, INTENT(in) :: qsat(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
135 | REAL, INTENT(in) :: flwc(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
136 | REAL, INTENT(in) :: fiwc(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
137 | |
---|
138 | ! Output arguments |
---|
139 | REAL, INTENT(out) :: heat(KLON,KLEV), cool(KLON,KLEV) |
---|
140 | REAL, INTENT(out) :: heat0(KLON,KLEV), cool0(KLON,KLEV) |
---|
141 | REAL, INTENT(out) :: radsol(KLON), topsw(KLON), toplw(KLON) |
---|
142 | REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON) |
---|
143 | REAL, INTENT(out) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON) |
---|
144 | REAL, INTENT(out) :: sollwdown(KLON) |
---|
145 | REAL, INTENT(out) :: swdn(KLON,kflev+1),swdn0(KLON,kflev+1) |
---|
146 | REAL, INTENT(out) :: swup(KLON,kflev+1),swup0(KLON,kflev+1) |
---|
147 | REAL, INTENT(out) :: lwdn(KLON,kflev+1),lwdn0(KLON,kflev+1) |
---|
148 | REAL, INTENT(out) :: lwup(KLON,kflev+1),lwup0(KLON,kflev+1) |
---|
149 | REAL, INTENT(out) :: topswad_aero(KLON), solswad_aero(KLON) ! output: aerosol direct forcing at TOA and surface |
---|
150 | REAL, INTENT(out) :: topswai_aero(KLON), solswai_aero(KLON) ! output: aerosol indirect forcing atTOA and surface |
---|
151 | REAL, DIMENSION(klon), INTENT(out) :: topswad0_aero |
---|
152 | REAL, DIMENSION(klon), INTENT(out) :: solswad0_aero |
---|
153 | REAL, DIMENSION(kdlon,9), INTENT(out) :: topsw_aero |
---|
154 | REAL, DIMENSION(kdlon,9), INTENT(out) :: topsw0_aero |
---|
155 | REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw_aero |
---|
156 | REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw0_aero |
---|
157 | REAL, DIMENSION(kdlon,3), INTENT(out) :: topswcf_aero |
---|
158 | REAL, DIMENSION(kdlon,3), INTENT(out) :: solswcf_aero |
---|
159 | |
---|
160 | ! Local variables |
---|
161 | REAL(KIND=8) ZFSUP(KDLON,KFLEV+1) |
---|
162 | REAL(KIND=8) ZFSDN(KDLON,KFLEV+1) |
---|
163 | REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1) |
---|
164 | REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1) |
---|
165 | REAL(KIND=8) ZFLUP(KDLON,KFLEV+1) |
---|
166 | REAL(KIND=8) ZFLDN(KDLON,KFLEV+1) |
---|
167 | REAL(KIND=8) ZFLUP0(KDLON,KFLEV+1) |
---|
168 | REAL(KIND=8) ZFLDN0(KDLON,KFLEV+1) |
---|
169 | REAL(KIND=8) zx_alpha1, zx_alpha2 |
---|
170 | INTEGER k, kk, i, j, iof, nb_gr |
---|
171 | REAL(KIND=8) PSCT |
---|
172 | REAL(KIND=8) PALBD(kdlon,2), PALBP(kdlon,2) |
---|
173 | REAL(KIND=8) PEMIS(kdlon), PDT0(kdlon), PVIEW(kdlon) |
---|
174 | REAL(KIND=8) PPSOL(kdlon), PDP(kdlon,KLEV) |
---|
175 | REAL(KIND=8) PTL(kdlon,kflev+1), PPMB(kdlon,kflev+1) |
---|
176 | REAL(KIND=8) PTAVE(kdlon,kflev) |
---|
177 | REAL(KIND=8) PWV(kdlon,kflev), PQS(kdlon,kflev) |
---|
178 | |
---|
179 | real(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone |
---|
180 | ! "POZON(:, :, 1)" is for the average day-night field, |
---|
181 | ! "POZON(:, :, 2)" is for daylight time. |
---|
182 | |
---|
183 | REAL(KIND=8) PAER(kdlon,kflev,5) |
---|
184 | REAL(KIND=8) PCLDLD(kdlon,kflev) |
---|
185 | REAL(KIND=8) PCLDLU(kdlon,kflev) |
---|
186 | REAL(KIND=8) PCLDSW(kdlon,kflev) |
---|
187 | REAL(KIND=8) PTAU(kdlon,2,kflev) |
---|
188 | REAL(KIND=8) POMEGA(kdlon,2,kflev) |
---|
189 | REAL(KIND=8) PCG(kdlon,2,kflev) |
---|
190 | REAL(KIND=8) zfract(kdlon), zrmu0(kdlon), zdist |
---|
191 | REAL(KIND=8) zheat(kdlon,kflev), zcool(kdlon,kflev) |
---|
192 | REAL(KIND=8) zheat0(kdlon,kflev), zcool0(kdlon,kflev) |
---|
193 | REAL(KIND=8) ztopsw(kdlon), ztoplw(kdlon) |
---|
194 | REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon) |
---|
195 | REAL(KIND=8) zsollwdown(kdlon) |
---|
196 | REAL(KIND=8) ztopsw0(kdlon), ztoplw0(kdlon) |
---|
197 | REAL(KIND=8) zsolsw0(kdlon), zsollw0(kdlon) |
---|
198 | REAL(KIND=8) zznormcp |
---|
199 | REAL(KIND=8) tauaero(kdlon,kflev,9,2) ! aer opt properties |
---|
200 | REAL(KIND=8) pizaero(kdlon,kflev,9,2) |
---|
201 | REAL(KIND=8) cgaero(kdlon,kflev,9,2) |
---|
202 | REAL(KIND=8) PTAUA(kdlon,2,kflev) ! present-day value of cloud opt thickness (PTAU is pre-industrial value), local use |
---|
203 | REAL(KIND=8) POMEGAA(kdlon,2,kflev) ! dito for single scatt albedo |
---|
204 | REAL(KIND=8) ztopswadaero(kdlon), zsolswadaero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
205 | REAL(KIND=8) ztopswad0aero(kdlon), zsolswad0aero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
206 | REAL(KIND=8) ztopswaiaero(kdlon), zsolswaiaero(kdlon) ! dito, indirect |
---|
207 | REAL(KIND=8) ztopsw_aero(kdlon,9), ztopsw0_aero(kdlon,9) |
---|
208 | REAL(KIND=8) zsolsw_aero(kdlon,9), zsolsw0_aero(kdlon,9) |
---|
209 | REAL(KIND=8) ztopswcf_aero(kdlon,3), zsolswcf_aero(kdlon,3) |
---|
210 | real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
---|
211 | |
---|
212 | call assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") |
---|
213 | ! initialisation |
---|
214 | tauaero(:,:,:,:)=0. |
---|
215 | pizaero(:,:,:,:)=0. |
---|
216 | cgaero(:,:,:,:)=0. |
---|
217 | |
---|
218 | ! |
---|
219 | !------------------------------------------- |
---|
220 | nb_gr = KLON / kdlon |
---|
221 | IF (nb_gr*kdlon .NE. KLON) THEN |
---|
222 | PRINT*, "kdlon mauvais:", KLON, kdlon, nb_gr |
---|
223 | CALL abort |
---|
224 | ENDIF |
---|
225 | IF (kflev .NE. KLEV) THEN |
---|
226 | PRINT*, "kflev differe de KLEV, kflev, KLEV" |
---|
227 | CALL abort |
---|
228 | ENDIF |
---|
229 | !------------------------------------------- |
---|
230 | DO k = 1, KLEV |
---|
231 | DO i = 1, KLON |
---|
232 | heat(i,k)=0. |
---|
233 | cool(i,k)=0. |
---|
234 | heat0(i,k)=0. |
---|
235 | cool0(i,k)=0. |
---|
236 | ENDDO |
---|
237 | ENDDO |
---|
238 | ! |
---|
239 | zdist = dist |
---|
240 | ! |
---|
241 | PSCT = solaire/zdist/zdist |
---|
242 | |
---|
243 | IF (type_trac == 'repr') THEN |
---|
244 | #ifdef REPROBUS |
---|
245 | if(ok_SUNTIME) PSCT = solaireTIME/zdist/zdist |
---|
246 | print*,'Constante solaire: ',PSCT*zdist*zdist |
---|
247 | #endif |
---|
248 | END IF |
---|
249 | |
---|
250 | DO j = 1, nb_gr |
---|
251 | iof = kdlon*(j-1) |
---|
252 | DO i = 1, kdlon |
---|
253 | zfract(i) = fract(iof+i) |
---|
254 | zrmu0(i) = rmu0(iof+i) |
---|
255 | PALBD(i,1) = alb1(iof+i) |
---|
256 | PALBD(i,2) = alb2(iof+i) |
---|
257 | PALBP(i,1) = alb1(iof+i) |
---|
258 | PALBP(i,2) = alb2(iof+i) |
---|
259 | PEMIS(i) = 1.0 |
---|
260 | PVIEW(i) = 1.66 |
---|
261 | PPSOL(i) = paprs(iof+i,1) |
---|
262 | zx_alpha1 = (paprs(iof+i,1)-pplay(iof+i,2))/(pplay(iof+i,1)-pplay(iof+i,2)) |
---|
263 | zx_alpha2 = 1.0 - zx_alpha1 |
---|
264 | PTL(i,1) = t(iof+i,1) * zx_alpha1 + t(iof+i,2) * zx_alpha2 |
---|
265 | PTL(i,KLEV+1) = t(iof+i,KLEV) |
---|
266 | PDT0(i) = tsol(iof+i) - PTL(i,1) |
---|
267 | ENDDO |
---|
268 | DO k = 2, kflev |
---|
269 | DO i = 1, kdlon |
---|
270 | PTL(i,k) = (t(iof+i,k)+t(iof+i,k-1))*0.5 |
---|
271 | ENDDO |
---|
272 | ENDDO |
---|
273 | DO k = 1, kflev |
---|
274 | DO i = 1, kdlon |
---|
275 | PDP(i,k) = paprs(iof+i,k)-paprs(iof+i,k+1) |
---|
276 | PTAVE(i,k) = t(iof+i,k) |
---|
277 | PWV(i,k) = MAX (q(iof+i,k), 1.0e-12) |
---|
278 | PQS(i,k) = PWV(i,k) |
---|
279 | POZON(i,k, :) = wo(iof+i, k, :) * RG * dobson_u * 1e3 & |
---|
280 | / (paprs(iof+i, k) - paprs(iof+i, k+1)) |
---|
281 | PCLDLD(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
282 | PCLDLU(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
283 | PCLDSW(i,k) = cldfra(iof+i,k) |
---|
284 | PTAU(i,1,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
285 | PTAU(i,2,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
286 | POMEGA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAU(i,1,k)) |
---|
287 | POMEGA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAU(i,2,k)) |
---|
288 | PCG(i,1,k) = 0.865 |
---|
289 | PCG(i,2,k) = 0.910 |
---|
290 | !- |
---|
291 | ! Introduced for aerosol indirect forcings. |
---|
292 | ! The following values use the cloud optical thickness calculated from |
---|
293 | ! present-day aerosol concentrations whereas the quantities without the |
---|
294 | ! "A" at the end are for pre-industial (natural-only) aerosol concentrations |
---|
295 | ! |
---|
296 | PTAUA(i,1,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
297 | PTAUA(i,2,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
298 | POMEGAA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAUA(i,1,k)) |
---|
299 | POMEGAA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAUA(i,2,k)) |
---|
300 | ENDDO |
---|
301 | ENDDO |
---|
302 | |
---|
303 | IF (type_trac == 'repr') THEN |
---|
304 | #ifdef REPROBUS |
---|
305 | ndimozon = size(wo, 3) |
---|
306 | CALL RAD_INTERACTIF(POZON,iof) |
---|
307 | #endif |
---|
308 | END IF |
---|
309 | |
---|
310 | ! |
---|
311 | DO k = 1, kflev+1 |
---|
312 | DO i = 1, kdlon |
---|
313 | PPMB(i,k) = paprs(iof+i,k)/100.0 |
---|
314 | ENDDO |
---|
315 | ENDDO |
---|
316 | ! |
---|
317 | DO kk = 1, 5 |
---|
318 | DO k = 1, kflev |
---|
319 | DO i = 1, kdlon |
---|
320 | PAER(i,k,kk) = 1.0E-15 |
---|
321 | ENDDO |
---|
322 | ENDDO |
---|
323 | ENDDO |
---|
324 | DO k = 1, kflev |
---|
325 | DO i = 1, kdlon |
---|
326 | tauaero(i,k,:,1)=tau_aero(iof+i,k,:,1) |
---|
327 | pizaero(i,k,:,1)=piz_aero(iof+i,k,:,1) |
---|
328 | cgaero(i,k,:,1) =cg_aero(iof+i,k,:,1) |
---|
329 | tauaero(i,k,:,2)=tau_aero(iof+i,k,:,2) |
---|
330 | pizaero(i,k,:,2)=piz_aero(iof+i,k,:,2) |
---|
331 | cgaero(i,k,:,2) =cg_aero(iof+i,k,:,2) |
---|
332 | ENDDO |
---|
333 | ENDDO |
---|
334 | |
---|
335 | ! |
---|
336 | !===== iflag_rrtm ================================================ |
---|
337 | ! |
---|
338 | IF (iflag_rrtm == 0) THEN |
---|
339 | ! Old radiation scheme, used for AR4 runs |
---|
340 | ! average day-night ozone for longwave |
---|
341 | CALL LW_LMDAR4(& |
---|
342 | PPMB, PDP,& |
---|
343 | PPSOL,PDT0,PEMIS,& |
---|
344 | PTL, PTAVE, PWV, POZON(:, :, 1), PAER,& |
---|
345 | PCLDLD,PCLDLU,& |
---|
346 | PVIEW,& |
---|
347 | zcool, zcool0,& |
---|
348 | ztoplw,zsollw,ztoplw0,zsollw0,& |
---|
349 | zsollwdown,& |
---|
350 | ZFLUP, ZFLDN, ZFLUP0,ZFLDN0) |
---|
351 | |
---|
352 | ! daylight ozone, if we have it, for short wave |
---|
353 | IF (.NOT. new_aod) THEN |
---|
354 | ! use old version |
---|
355 | CALL SW_LMDAR4(PSCT, zrmu0, zfract,& |
---|
356 | PPMB, PDP, & |
---|
357 | PPSOL, PALBD, PALBP,& |
---|
358 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
359 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
360 | zheat, zheat0,& |
---|
361 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
362 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
363 | tauaero(:,:,5,:), pizaero(:,:,5,:), cgaero(:,:,5,:),& |
---|
364 | PTAUA, POMEGAA,& |
---|
365 | ztopswadaero,zsolswadaero,& |
---|
366 | ztopswaiaero,zsolswaiaero,& |
---|
367 | ok_ade, ok_aie) |
---|
368 | |
---|
369 | ELSE ! new_aod=T |
---|
370 | CALL SW_AEROAR4(PSCT, zrmu0, zfract,& |
---|
371 | PPMB, PDP,& |
---|
372 | PPSOL, PALBD, PALBP,& |
---|
373 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
374 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
375 | zheat, zheat0,& |
---|
376 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
377 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
378 | tauaero, pizaero, cgaero, & |
---|
379 | PTAUA, POMEGAA,& |
---|
380 | ztopswadaero,zsolswadaero,& |
---|
381 | ztopswad0aero,zsolswad0aero,& |
---|
382 | ztopswaiaero,zsolswaiaero, & |
---|
383 | ztopsw_aero,ztopsw0_aero,& |
---|
384 | zsolsw_aero,zsolsw0_aero,& |
---|
385 | ztopswcf_aero,zsolswcf_aero, & |
---|
386 | ok_ade, ok_aie, flag_aerosol,flag_aerosol_strat) |
---|
387 | ENDIF |
---|
388 | |
---|
389 | ELSE |
---|
390 | !===== iflag_rrtm=1, on passe dans SW via RECMWFL =============== |
---|
391 | WRITE(lunout,*) "Option iflag_rrtm=T ne fonctionne pas encore !!!" |
---|
392 | CALL abort_gcm('radlwsw','iflag_rrtm=T not valid',1) |
---|
393 | |
---|
394 | ENDIF ! iflag_rrtm |
---|
395 | !====================================================================== |
---|
396 | |
---|
397 | DO i = 1, kdlon |
---|
398 | radsol(iof+i) = zsolsw(i) + zsollw(i) |
---|
399 | topsw(iof+i) = ztopsw(i) |
---|
400 | toplw(iof+i) = ztoplw(i) |
---|
401 | solsw(iof+i) = zsolsw(i) |
---|
402 | sollw(iof+i) = zsollw(i) |
---|
403 | sollwdown(iof+i) = zsollwdown(i) |
---|
404 | DO k = 1, kflev+1 |
---|
405 | lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) |
---|
406 | lwdn ( iof+i,k) = ZFLDN ( i,k) |
---|
407 | lwup0 ( iof+i,k) = ZFLUP0 ( i,k) |
---|
408 | lwup ( iof+i,k) = ZFLUP ( i,k) |
---|
409 | ENDDO |
---|
410 | topsw0(iof+i) = ztopsw0(i) |
---|
411 | toplw0(iof+i) = ztoplw0(i) |
---|
412 | solsw0(iof+i) = zsolsw0(i) |
---|
413 | sollw0(iof+i) = zsollw0(i) |
---|
414 | albpla(iof+i) = zalbpla(i) |
---|
415 | |
---|
416 | DO k = 1, kflev+1 |
---|
417 | swdn0 ( iof+i,k) = ZFSDN0 ( i,k) |
---|
418 | swdn ( iof+i,k) = ZFSDN ( i,k) |
---|
419 | swup0 ( iof+i,k) = ZFSUP0 ( i,k) |
---|
420 | swup ( iof+i,k) = ZFSUP ( i,k) |
---|
421 | ENDDO |
---|
422 | ENDDO |
---|
423 | !-transform the aerosol forcings, if they have |
---|
424 | ! to be calculated |
---|
425 | IF (ok_ade) THEN |
---|
426 | DO i = 1, kdlon |
---|
427 | topswad_aero(iof+i) = ztopswadaero(i) |
---|
428 | topswad0_aero(iof+i) = ztopswad0aero(i) |
---|
429 | solswad_aero(iof+i) = zsolswadaero(i) |
---|
430 | solswad0_aero(iof+i) = zsolswad0aero(i) |
---|
431 | ! MS the following lines seem to be wrong, why is iof on right hand side??? |
---|
432 | ! topsw_aero(iof+i,:) = ztopsw_aero(iof+i,:) |
---|
433 | ! topsw0_aero(iof+i,:) = ztopsw0_aero(iof+i,:) |
---|
434 | ! solsw_aero(iof+i,:) = zsolsw_aero(iof+i,:) |
---|
435 | ! solsw0_aero(iof+i,:) = zsolsw0_aero(iof+i,:) |
---|
436 | topsw_aero(iof+i,:) = ztopsw_aero(i,:) |
---|
437 | topsw0_aero(iof+i,:) = ztopsw0_aero(i,:) |
---|
438 | solsw_aero(iof+i,:) = zsolsw_aero(i,:) |
---|
439 | solsw0_aero(iof+i,:) = zsolsw0_aero(i,:) |
---|
440 | topswcf_aero(iof+i,:) = ztopswcf_aero(i,:) |
---|
441 | solswcf_aero(iof+i,:) = zsolswcf_aero(i,:) |
---|
442 | ENDDO |
---|
443 | ELSE |
---|
444 | DO i = 1, kdlon |
---|
445 | topswad_aero(iof+i) = 0.0 |
---|
446 | solswad_aero(iof+i) = 0.0 |
---|
447 | topswad0_aero(iof+i) = 0.0 |
---|
448 | solswad0_aero(iof+i) = 0.0 |
---|
449 | topsw_aero(iof+i,:) = 0. |
---|
450 | topsw0_aero(iof+i,:) =0. |
---|
451 | solsw_aero(iof+i,:) = 0. |
---|
452 | solsw0_aero(iof+i,:) = 0. |
---|
453 | ENDDO |
---|
454 | ENDIF |
---|
455 | IF (ok_aie) THEN |
---|
456 | DO i = 1, kdlon |
---|
457 | topswai_aero(iof+i) = ztopswaiaero(i) |
---|
458 | solswai_aero(iof+i) = zsolswaiaero(i) |
---|
459 | ENDDO |
---|
460 | ELSE |
---|
461 | DO i = 1, kdlon |
---|
462 | topswai_aero(iof+i) = 0.0 |
---|
463 | solswai_aero(iof+i) = 0.0 |
---|
464 | ENDDO |
---|
465 | ENDIF |
---|
466 | DO k = 1, kflev |
---|
467 | DO i = 1, kdlon |
---|
468 | ! scale factor to take into account the difference between |
---|
469 | ! dry air and watter vapour scpecifi! heat capacity |
---|
470 | zznormcp=1.0+RVTMP2*PWV(i,k) |
---|
471 | heat(iof+i,k) = zheat(i,k)/zznormcp |
---|
472 | cool(iof+i,k) = zcool(i,k)/zznormcp |
---|
473 | heat0(iof+i,k) = zheat0(i,k)/zznormcp |
---|
474 | cool0(iof+i,k) = zcool0(i,k)/zznormcp |
---|
475 | ENDDO |
---|
476 | ENDDO |
---|
477 | |
---|
478 | ENDDO ! j = 1, nb_gr |
---|
479 | |
---|
480 | END SUBROUTINE radlwsw |
---|
481 | |
---|
482 | end module radlwsw_m |
---|