1 | ! |
---|
2 | ! $Id$ |
---|
3 | ! |
---|
4 | SUBROUTINE SW_AEROAR4(PSCT, PRMU0, PFRAC, & |
---|
5 | PPMB, PDP, & |
---|
6 | PPSOL, PALBD, PALBP,& |
---|
7 | PTAVE, PWV, PQS, POZON, PAER,& |
---|
8 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
9 | PHEAT, PHEAT0,& |
---|
10 | PALBPLA,PTOPSW,PSOLSW,PTOPSW0,PSOLSW0,& |
---|
11 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
12 | tauaero, pizaero, cgaero,& |
---|
13 | PTAUA, POMEGAA,& |
---|
14 | PTOPSWADAERO,PSOLSWADAERO,& |
---|
15 | PTOPSWAD0AERO,PSOLSWAD0AERO,& |
---|
16 | PTOPSWAIAERO,PSOLSWAIAERO,& |
---|
17 | PTOPSWAERO,PTOPSW0AERO,& |
---|
18 | PSOLSWAERO,PSOLSW0AERO,& |
---|
19 | PTOPSWCFAERO,PSOLSWCFAERO,& |
---|
20 | ok_ade, ok_aie ) |
---|
21 | |
---|
22 | USE dimphy |
---|
23 | USE phys_output_mod, ONLY : swaero_diag |
---|
24 | IMPLICIT NONE |
---|
25 | |
---|
26 | #include "YOMCST.h" |
---|
27 | #include "clesphys.h" |
---|
28 | #include "iniprint.h" |
---|
29 | ! |
---|
30 | ! ------------------------------------------------------------------ |
---|
31 | ! |
---|
32 | ! PURPOSE. |
---|
33 | ! -------- |
---|
34 | ! |
---|
35 | ! THIS ROUTINE COMPUTES THE SHORTWAVE RADIATION FLUXES IN TWO |
---|
36 | ! SPECTRAL INTERVALS FOLLOWING FOUQUART AND BONNEL (1980). |
---|
37 | ! |
---|
38 | ! METHOD. |
---|
39 | ! ------- |
---|
40 | ! |
---|
41 | ! 1. COMPUTES ABSORBER AMOUNTS (SWU) |
---|
42 | ! 2. COMPUTES FLUXES IN 1ST SPECTRAL INTERVAL (SW1S) |
---|
43 | ! 3. COMPUTES FLUXES IN 2ND SPECTRAL INTERVAL (SW2S) |
---|
44 | ! |
---|
45 | ! REFERENCE. |
---|
46 | ! ---------- |
---|
47 | ! |
---|
48 | ! SEE RADIATION'S PART OF THE ECMWF RESEARCH DEPARTMENT |
---|
49 | ! DOCUMENTATION, AND FOUQUART AND BONNEL (1980) |
---|
50 | ! |
---|
51 | ! AUTHOR. |
---|
52 | ! ------- |
---|
53 | ! JEAN-JACQUES MORCRETTE *ECMWF* |
---|
54 | ! |
---|
55 | ! MODIFICATIONS. |
---|
56 | ! -------------- |
---|
57 | ! ORIGINAL : 89-07-14 |
---|
58 | ! 1995-01-01 J.-J. MORCRETTE Direct/Diffuse Albedo |
---|
59 | ! 2003-11-27 J. QUAAS Introduce aerosol forcings (based on BOUCHER) |
---|
60 | ! 2009-04 A. COZIC - C.DEANDREIS Indroduce NAT/BC/POM/DUST/SS aerosol forcing |
---|
61 | ! 2012-09 O. BOUCHER - reorganise aerosol cases with ok_ade and ok_aie |
---|
62 | ! ------------------------------------------------------------------ |
---|
63 | ! |
---|
64 | !* ARGUMENTS: |
---|
65 | ! |
---|
66 | REAL(KIND=8) PSCT ! constante solaire (valeur conseillee: 1370) |
---|
67 | |
---|
68 | REAL(KIND=8) PPSOL(KDLON) ! SURFACE PRESSURE (PA) |
---|
69 | REAL(KIND=8) PDP(KDLON,KFLEV) ! LAYER THICKNESS (PA) |
---|
70 | REAL(KIND=8) PPMB(KDLON,KFLEV+1) ! HALF-LEVEL PRESSURE (MB) |
---|
71 | |
---|
72 | REAL(KIND=8) PRMU0(KDLON) ! COSINE OF ZENITHAL ANGLE |
---|
73 | REAL(KIND=8) PFRAC(KDLON) ! fraction de la journee |
---|
74 | |
---|
75 | REAL(KIND=8) PTAVE(KDLON,KFLEV) ! LAYER TEMPERATURE (K) |
---|
76 | REAL(KIND=8) PWV(KDLON,KFLEV) ! SPECIFI! HUMIDITY (KG/KG) |
---|
77 | REAL(KIND=8) PQS(KDLON,KFLEV) ! SATURATED WATER VAPOUR (KG/KG) |
---|
78 | REAL(KIND=8) POZON(KDLON,KFLEV) ! OZONE CONCENTRATION (KG/KG) |
---|
79 | REAL(KIND=8) PAER(KDLON,KFLEV,5) ! AEROSOLS' OPTICAL THICKNESS |
---|
80 | |
---|
81 | REAL(KIND=8) PALBD(KDLON,2) ! albedo du sol (lumiere diffuse) |
---|
82 | REAL(KIND=8) PALBP(KDLON,2) ! albedo du sol (lumiere parallele) |
---|
83 | |
---|
84 | REAL(KIND=8) PCLDSW(KDLON,KFLEV) ! CLOUD FRACTION |
---|
85 | REAL(KIND=8) PTAU(KDLON,2,KFLEV) ! CLOUD OPTICAL THICKNESS (pre-industrial value) |
---|
86 | REAL(KIND=8) PCG(KDLON,2,KFLEV) ! ASYMETRY FACTOR |
---|
87 | REAL(KIND=8) POMEGA(KDLON,2,KFLEV) ! SINGLE SCATTERING ALBEDO |
---|
88 | |
---|
89 | REAL(KIND=8) PHEAT(KDLON,KFLEV) ! SHORTWAVE HEATING (K/DAY) |
---|
90 | REAL(KIND=8) PHEAT0(KDLON,KFLEV)! SHORTWAVE HEATING (K/DAY) clear-sky |
---|
91 | REAL(KIND=8) PALBPLA(KDLON) ! PLANETARY ALBEDO |
---|
92 | REAL(KIND=8) PTOPSW(KDLON) ! SHORTWAVE FLUX AT T.O.A. |
---|
93 | REAL(KIND=8) PSOLSW(KDLON) ! SHORTWAVE FLUX AT SURFACE |
---|
94 | REAL(KIND=8) PTOPSW0(KDLON) ! SHORTWAVE FLUX AT T.O.A. (CLEAR-SKY) |
---|
95 | REAL(KIND=8) PSOLSW0(KDLON) ! SHORTWAVE FLUX AT SURFACE (CLEAR-SKY) |
---|
96 | ! |
---|
97 | !* LOCAL VARIABLES: |
---|
98 | ! |
---|
99 | real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
---|
100 | |
---|
101 | REAL(KIND=8) ZOZ(KDLON,KFLEV) |
---|
102 | ! column-density of ozone in layer, in kilo-Dobsons |
---|
103 | |
---|
104 | REAL(KIND=8) ZAKI(KDLON,2) |
---|
105 | REAL(KIND=8) ZCLD(KDLON,KFLEV) |
---|
106 | REAL(KIND=8) ZCLEAR(KDLON) |
---|
107 | REAL(KIND=8) ZDSIG(KDLON,KFLEV) |
---|
108 | REAL(KIND=8) ZFACT(KDLON) |
---|
109 | REAL(KIND=8) ZFD(KDLON,KFLEV+1) |
---|
110 | REAL(KIND=8) ZFDOWN(KDLON,KFLEV+1) |
---|
111 | REAL(KIND=8) ZFU(KDLON,KFLEV+1) |
---|
112 | REAL(KIND=8) ZFUP(KDLON,KFLEV+1) |
---|
113 | REAL(KIND=8) ZRMU(KDLON) |
---|
114 | REAL(KIND=8) ZSEC(KDLON) |
---|
115 | REAL(KIND=8) ZUD(KDLON,5,KFLEV+1) |
---|
116 | REAL(KIND=8) ZCLDSW0(KDLON,KFLEV) |
---|
117 | |
---|
118 | REAL(KIND=8) ZFSUP(KDLON,KFLEV+1) |
---|
119 | REAL(KIND=8) ZFSDN(KDLON,KFLEV+1) |
---|
120 | REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1) |
---|
121 | REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1) |
---|
122 | |
---|
123 | INTEGER inu, jl, jk, i, k, kpl1 |
---|
124 | |
---|
125 | INTEGER swpas ! Every swpas steps, sw is calculated |
---|
126 | PARAMETER(swpas=1) |
---|
127 | |
---|
128 | INTEGER, SAVE :: itapsw = 0 |
---|
129 | !$OMP THREADPRIVATE(itapsw) |
---|
130 | LOGICAL, SAVE :: appel1er = .TRUE. |
---|
131 | !$OMP THREADPRIVATE(appel1er) |
---|
132 | LOGICAL, SAVE :: initialized = .FALSE. |
---|
133 | !$OMP THREADPRIVATE(initialized) |
---|
134 | |
---|
135 | !jq-Introduced for aerosol forcings |
---|
136 | REAL(KIND=8), SAVE :: flag_aer |
---|
137 | !$OMP THREADPRIVATE(flag_aer) |
---|
138 | |
---|
139 | LOGICAL ok_ade, ok_aie ! use aerosol forcings or not? |
---|
140 | REAL(KIND=8) tauaero(kdlon,kflev,9,2) ! aerosol optical properties |
---|
141 | REAL(KIND=8) pizaero(kdlon,kflev,9,2) ! (see aeropt.F) |
---|
142 | REAL(KIND=8) cgaero(kdlon,kflev,9,2) ! -"- |
---|
143 | REAL(KIND=8) PTAUA(KDLON,2,KFLEV) ! CLOUD OPTICAL THICKNESS (present-day value) |
---|
144 | REAL(KIND=8) POMEGAA(KDLON,2,KFLEV) ! SINGLE SCATTERING ALBEDO |
---|
145 | REAL(KIND=8) PTOPSWADAERO(KDLON) ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR) |
---|
146 | REAL(KIND=8) PSOLSWADAERO(KDLON) ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR) |
---|
147 | REAL(KIND=8) PTOPSWAD0AERO(KDLON) ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL DIR) |
---|
148 | REAL(KIND=8) PSOLSWAD0AERO(KDLON) ! SHORTWAVE FLUX AT SURFACE(+AEROSOL DIR) |
---|
149 | REAL(KIND=8) PTOPSWAIAERO(KDLON) ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL IND) |
---|
150 | REAL(KIND=8) PSOLSWAIAERO(KDLON) ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND) |
---|
151 | REAL(KIND=8) PTOPSWAERO(KDLON,9) ! SW TOA AS DRF nat & ant |
---|
152 | REAL(KIND=8) PTOPSW0AERO(KDLON,9) ! SW SRF AS DRF nat & ant |
---|
153 | REAL(KIND=8) PSOLSWAERO(KDLON,9) ! SW TOA CS DRF nat & ant |
---|
154 | REAL(KIND=8) PSOLSW0AERO(KDLON,9) ! SW SRF CS DRF nat & ant |
---|
155 | REAL(KIND=8) PTOPSWCFAERO(KDLON,3) ! SW TOA AS cloudRF nat & ant |
---|
156 | REAL(KIND=8) PSOLSWCFAERO(KDLON,3) ! SW SRF AS cloudRF nat & ant |
---|
157 | |
---|
158 | !jq - Fluxes including aerosol effects |
---|
159 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSUPAD_AERO(:,:) |
---|
160 | !$OMP THREADPRIVATE(ZFSUPAD_AERO) |
---|
161 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSDNAD_AERO(:,:) |
---|
162 | !$OMP THREADPRIVATE(ZFSDNAD_AERO) |
---|
163 | !jq - Fluxes including aerosol effects |
---|
164 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSUPAD0_AERO(:,:) |
---|
165 | !$OMP THREADPRIVATE(ZFSUPAD0_AERO) |
---|
166 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSDNAD0_AERO(:,:) |
---|
167 | !$OMP THREADPRIVATE(ZFSDNAD0_AERO) |
---|
168 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSUPAI_AERO(:,:) |
---|
169 | !$OMP THREADPRIVATE(ZFSUPAI_AERO) |
---|
170 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSDNAI_AERO(:,:) |
---|
171 | !$OMP THREADPRIVATE(ZFSDNAI_AERO) |
---|
172 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSUP_AERO(:,:,:) |
---|
173 | !$OMP THREADPRIVATE(ZFSUP_AERO) |
---|
174 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSDN_AERO(:,:,:) |
---|
175 | !$OMP THREADPRIVATE(ZFSDN_AERO) |
---|
176 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSUP0_AERO(:,:,:) |
---|
177 | !$OMP THREADPRIVATE(ZFSUP0_AERO) |
---|
178 | REAL(KIND=8),ALLOCATABLE,SAVE :: ZFSDN0_AERO(:,:,:) |
---|
179 | !$OMP THREADPRIVATE(ZFSDN0_AERO) |
---|
180 | |
---|
181 | ! Key to define the aerosol effect acting on climate |
---|
182 | ! OB: AEROSOLFEEDBACK_ACTIVE is now a LOGICAL |
---|
183 | ! TRUE: fluxes use natural and/or anthropogenic aerosols according to ok_ade and ok_aie, DEFAULT |
---|
184 | ! FALSE: fluxes use no aerosols (case 1) |
---|
185 | |
---|
186 | LOGICAL,SAVE :: AEROSOLFEEDBACK_ACTIVE = .TRUE. |
---|
187 | !$OMP THREADPRIVATE(AEROSOLFEEDBACK_ACTIVE) |
---|
188 | |
---|
189 | CHARACTER (LEN=20) :: modname='sw_aeroAR4' |
---|
190 | CHARACTER (LEN=80) :: abort_message |
---|
191 | |
---|
192 | IF(.NOT.initialized) THEN |
---|
193 | flag_aer=0. |
---|
194 | initialized=.TRUE. |
---|
195 | ALLOCATE(ZFSUPAD_AERO(KDLON,KFLEV+1)) |
---|
196 | ALLOCATE(ZFSDNAD_AERO(KDLON,KFLEV+1)) |
---|
197 | ALLOCATE(ZFSUPAD0_AERO(KDLON,KFLEV+1)) |
---|
198 | ALLOCATE(ZFSDNAD0_AERO(KDLON,KFLEV+1)) |
---|
199 | ALLOCATE(ZFSUPAI_AERO(KDLON,KFLEV+1)) |
---|
200 | ALLOCATE(ZFSDNAI_AERO(KDLON,KFLEV+1)) |
---|
201 | !-OB decrease size of these arrays to what is needed |
---|
202 | ! | direct effect |
---|
203 | !ind effect | no aerosol natural total |
---|
204 | !natural (PTAU) | 1 3 2 --ZFSUP/ZFSDN |
---|
205 | !total (PTAUA) | 5 4 --ZFSUP/ZFSDN |
---|
206 | !no cloud | 1 3 2 --ZFSUP0/ZFSDN0 |
---|
207 | ! |
---|
208 | ALLOCATE(ZFSUP_AERO (KDLON,KFLEV+1,5)) |
---|
209 | ALLOCATE(ZFSDN_AERO (KDLON,KFLEV+1,5)) |
---|
210 | ALLOCATE(ZFSUP0_AERO(KDLON,KFLEV+1,3)) |
---|
211 | ALLOCATE(ZFSDN0_AERO(KDLON,KFLEV+1,3)) |
---|
212 | ! end OB modif |
---|
213 | ZFSUPAD_AERO(:,:)=0. |
---|
214 | ZFSDNAD_AERO(:,:)=0. |
---|
215 | ZFSUPAD0_AERO(:,:)=0. |
---|
216 | ZFSDNAD0_AERO(:,:)=0. |
---|
217 | ZFSUPAI_AERO(:,:)=0. |
---|
218 | ZFSDNAI_AERO(:,:)=0. |
---|
219 | ZFSUP_AERO (:,:,:)=0. |
---|
220 | ZFSDN_AERO (:,:,:)=0. |
---|
221 | ZFSUP0_AERO(:,:,:)=0. |
---|
222 | ZFSDN0_AERO(:,:,:)=0. |
---|
223 | ENDIF |
---|
224 | |
---|
225 | IF (appel1er) THEN |
---|
226 | WRITE(lunout,*)'SW calling frequency : ', swpas |
---|
227 | WRITE(lunout,*) " In general, it should be 1" |
---|
228 | appel1er = .FALSE. |
---|
229 | ENDIF |
---|
230 | ! ------------------------------------------------------------------ |
---|
231 | IF (MOD(itapsw,swpas).EQ.0) THEN |
---|
232 | |
---|
233 | DO JK = 1 , KFLEV |
---|
234 | DO JL = 1, KDLON |
---|
235 | ZCLDSW0(JL,JK) = 0.0 |
---|
236 | ZOZ(JL,JK) = POZON(JL,JK)*46.6968/RG & |
---|
237 | *PDP(JL,JK)*(101325.0/PPSOL(JL)) |
---|
238 | ENDDO |
---|
239 | ENDDO |
---|
240 | |
---|
241 | ! clear sky with no aerosols at all is computed IF ACTIVEFEEDBACK_ACTIVE is false or for extended diag |
---|
242 | IF ( swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE ) THEN |
---|
243 | |
---|
244 | ! clear-sky: zero aerosol effect |
---|
245 | flag_aer=0.0 |
---|
246 | CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,& |
---|
247 | PRMU0,PFRAC,PTAVE,PWV,& |
---|
248 | ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD) |
---|
249 | INU = 1 |
---|
250 | CALL SW1S_LMDAR4(INU,PAER, flag_aer, & |
---|
251 | tauaero(:,:,1,:), pizaero(:,:,1,:), cgaero(:,:,1,:),& |
---|
252 | PALBD, PALBP, PCG, ZCLD, ZCLEAR, ZCLDSW0,& |
---|
253 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
254 | ZFD, ZFU) |
---|
255 | INU = 2 |
---|
256 | CALL SW2S_LMDAR4(INU, PAER, flag_aer, & |
---|
257 | tauaero(:,:,1,:), pizaero(:,:,1,:), cgaero(:,:,1,:),& |
---|
258 | ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, ZCLDSW0,& |
---|
259 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
260 | PWV, PQS,& |
---|
261 | ZFDOWN, ZFUP) |
---|
262 | DO JK = 1 , KFLEV+1 |
---|
263 | DO JL = 1, KDLON |
---|
264 | ZFSUP0_AERO(JL,JK,1) = (ZFUP(JL,JK) + ZFU(JL,JK)) * ZFACT(JL) |
---|
265 | ZFSDN0_AERO(JL,JK,1) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL) |
---|
266 | ENDDO |
---|
267 | ENDDO |
---|
268 | ENDIF ! swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE |
---|
269 | |
---|
270 | ! cloudy sky with no aerosols at all is either computed IF no indirect effect is asked for, or for extended diag |
---|
271 | IF ( swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE ) THEN |
---|
272 | ! cloudy-sky: zero aerosol effect |
---|
273 | flag_aer=0.0 |
---|
274 | CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& |
---|
275 | PRMU0,PFRAC,PTAVE,PWV,& |
---|
276 | ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD) |
---|
277 | INU = 1 |
---|
278 | CALL SW1S_LMDAR4(INU, PAER, flag_aer, & |
---|
279 | tauaero(:,:,1,:), pizaero(:,:,1,:), cgaero(:,:,1,:),& |
---|
280 | PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
281 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
282 | ZFD, ZFU) |
---|
283 | INU = 2 |
---|
284 | CALL SW2S_LMDAR4(INU, PAER, flag_aer, & |
---|
285 | tauaero(:,:,1,:), pizaero(:,:,1,:), cgaero(:,:,1,:),& |
---|
286 | ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
287 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
288 | PWV, PQS,& |
---|
289 | ZFDOWN, ZFUP) |
---|
290 | |
---|
291 | DO JK = 1 , KFLEV+1 |
---|
292 | DO JL = 1, KDLON |
---|
293 | ZFSUP_AERO(JL,JK,1) = (ZFUP(JL,JK) + ZFU(JL,JK)) * ZFACT(JL) |
---|
294 | ZFSDN_AERO(JL,JK,1) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL) |
---|
295 | ENDDO |
---|
296 | ENDDO |
---|
297 | ENDIF ! swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE |
---|
298 | |
---|
299 | IF (ok_ade) THEN |
---|
300 | |
---|
301 | ! clear sky direct effect of total aerosol |
---|
302 | ! CAS AER (2) |
---|
303 | flag_aer=1.0 |
---|
304 | CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,& |
---|
305 | PRMU0,PFRAC,PTAVE,PWV,& |
---|
306 | ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD) |
---|
307 | INU = 1 |
---|
308 | CALL SW1S_LMDAR4(INU, PAER, flag_aer,& |
---|
309 | tauaero(:,:,2,:), pizaero(:,:,2,:), cgaero(:,:,2,:),& |
---|
310 | PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
311 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
312 | ZFD, ZFU) |
---|
313 | INU = 2 |
---|
314 | CALL SW2S_LMDAR4(INU, PAER, flag_aer,& |
---|
315 | tauaero(:,:,2,:), pizaero(:,:,2,:), cgaero(:,:,2,:),& |
---|
316 | ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
317 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
318 | PWV, PQS,& |
---|
319 | ZFDOWN, ZFUP) |
---|
320 | |
---|
321 | DO JK = 1 , KFLEV+1 |
---|
322 | DO JL = 1, KDLON |
---|
323 | ZFSUP0_AERO(JL,JK,2) = (ZFUP(JL,JK) + ZFU(JL,JK)) * ZFACT(JL) |
---|
324 | ZFSDN0_AERO(JL,JK,2) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL) |
---|
325 | ENDDO |
---|
326 | ENDDO |
---|
327 | |
---|
328 | IF ( swaero_diag ) THEN |
---|
329 | ! clear sky direct effect natural aerosol |
---|
330 | ! CAS AER (3) |
---|
331 | flag_aer=1.0 |
---|
332 | CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,& |
---|
333 | PRMU0,PFRAC,PTAVE,PWV,& |
---|
334 | ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD) |
---|
335 | INU = 1 |
---|
336 | CALL SW1S_LMDAR4(INU, PAER, flag_aer,& |
---|
337 | tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),& |
---|
338 | PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
339 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
340 | ZFD, ZFU) |
---|
341 | INU = 2 |
---|
342 | CALL SW2S_LMDAR4(INU, PAER, flag_aer,& |
---|
343 | tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),& |
---|
344 | ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
345 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
346 | PWV, PQS,& |
---|
347 | ZFDOWN, ZFUP) |
---|
348 | |
---|
349 | DO JK = 1 , KFLEV+1 |
---|
350 | DO JL = 1, KDLON |
---|
351 | ZFSUP0_AERO(JL,JK,3) = (ZFUP(JL,JK) + ZFU(JL,JK)) * ZFACT(JL) |
---|
352 | ZFSDN0_AERO(JL,JK,3) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL) |
---|
353 | ENDDO |
---|
354 | ENDDO |
---|
355 | ENDIF !swaero_diag |
---|
356 | |
---|
357 | ! cloudy-sky with natural aerosols for indirect effect |
---|
358 | ! but total aerosols for direct effect |
---|
359 | ! PTAU |
---|
360 | ! CAS AER (2) |
---|
361 | flag_aer=1.0 |
---|
362 | CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& |
---|
363 | PRMU0,PFRAC,PTAVE,PWV,& |
---|
364 | ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD) |
---|
365 | INU = 1 |
---|
366 | CALL SW1S_LMDAR4(INU, PAER, flag_aer,& |
---|
367 | tauaero(:,:,2,:), pizaero(:,:,2,:), cgaero(:,:,2,:),& |
---|
368 | PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
369 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
370 | ZFD, ZFU) |
---|
371 | INU = 2 |
---|
372 | CALL SW2S_LMDAR4(INU, PAER, flag_aer,& |
---|
373 | tauaero(:,:,2,:), pizaero(:,:,2,:), cgaero(:,:,2,:),& |
---|
374 | ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
375 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
376 | PWV, PQS,& |
---|
377 | ZFDOWN, ZFUP) |
---|
378 | |
---|
379 | DO JK = 1 , KFLEV+1 |
---|
380 | DO JL = 1, KDLON |
---|
381 | ZFSUP_AERO(JL,JK,2) = (ZFUP(JL,JK) + ZFU(JL,JK)) * ZFACT(JL) |
---|
382 | ZFSDN_AERO(JL,JK,2) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL) |
---|
383 | ENDDO |
---|
384 | ENDDO |
---|
385 | ! ENDIF |
---|
386 | |
---|
387 | ENDIF !-end ok_ade |
---|
388 | |
---|
389 | IF ( ok_ade .or. (.not.ok_ade .and. ok_aie) ) THEN |
---|
390 | |
---|
391 | ! cloudy-sky with natural aerosols for indirect effect |
---|
392 | ! and natural aerosols for direct effect |
---|
393 | ! PTAU |
---|
394 | ! CAS AER (3) |
---|
395 | IF ( swaero_diag ) THEN |
---|
396 | ! cloudy-sky direct effect natural aerosol |
---|
397 | flag_aer=1.0 |
---|
398 | CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& |
---|
399 | PRMU0,PFRAC,PTAVE,PWV,& |
---|
400 | ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD) |
---|
401 | INU = 1 |
---|
402 | CALL SW1S_LMDAR4(INU, PAER, flag_aer,& |
---|
403 | tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),& |
---|
404 | PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
405 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
406 | ZFD, ZFU) |
---|
407 | INU = 2 |
---|
408 | CALL SW2S_LMDAR4(INU, PAER, flag_aer,& |
---|
409 | tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),& |
---|
410 | ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
411 | ZDSIG, POMEGA, ZOZ, ZRMU, ZSEC, PTAU, ZUD,& |
---|
412 | PWV, PQS,& |
---|
413 | ZFDOWN, ZFUP) |
---|
414 | |
---|
415 | DO JK = 1 , KFLEV+1 |
---|
416 | DO JL = 1, KDLON |
---|
417 | ZFSUP_AERO(JL,JK,3) = (ZFUP(JL,JK) + ZFU(JL,JK)) * ZFACT(JL) |
---|
418 | ZFSDN_AERO(JL,JK,3) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL) |
---|
419 | ENDDO |
---|
420 | ENDDO |
---|
421 | ENDIF !swaero_diag |
---|
422 | |
---|
423 | ENDIF !--true/false or false/true |
---|
424 | |
---|
425 | IF (ok_ade .and. ok_aie) THEN |
---|
426 | |
---|
427 | ! cloudy-sky with total aerosols for indirect effect |
---|
428 | ! and total aerosols for direct effect |
---|
429 | ! PTAUA |
---|
430 | ! CAS AER (2) |
---|
431 | flag_aer=1.0 |
---|
432 | CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& |
---|
433 | PRMU0,PFRAC,PTAVE,PWV,& |
---|
434 | ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD) |
---|
435 | INU = 1 |
---|
436 | CALL SW1S_LMDAR4(INU, PAER, flag_aer,& |
---|
437 | tauaero(:,:,2,:), pizaero(:,:,2,:), cgaero(:,:,2,:),& |
---|
438 | PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
439 | ZDSIG, POMEGAA, ZOZ, ZRMU, ZSEC, PTAUA, ZUD,& |
---|
440 | ZFD, ZFU) |
---|
441 | INU = 2 |
---|
442 | CALL SW2S_LMDAR4(INU, PAER, flag_aer,& |
---|
443 | tauaero(:,:,2,:), pizaero(:,:,2,:), cgaero(:,:,2,:),& |
---|
444 | ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
445 | ZDSIG, POMEGAA, ZOZ, ZRMU, ZSEC, PTAUA, ZUD,& |
---|
446 | PWV, PQS,& |
---|
447 | ZFDOWN, ZFUP) |
---|
448 | |
---|
449 | DO JK = 1 , KFLEV+1 |
---|
450 | DO JL = 1, KDLON |
---|
451 | ZFSUP_AERO(JL,JK,4) = (ZFUP(JL,JK) + ZFU(JL,JK)) * ZFACT(JL) |
---|
452 | ZFSDN_AERO(JL,JK,4) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL) |
---|
453 | ENDDO |
---|
454 | ENDDO |
---|
455 | |
---|
456 | ENDIF ! ok_ade .and. ok_aie |
---|
457 | |
---|
458 | IF (ok_aie) THEN |
---|
459 | ! cloudy-sky with total aerosols for indirect effect |
---|
460 | ! and natural aerosols for direct effect |
---|
461 | ! PTAUA |
---|
462 | ! CAS AER (3) |
---|
463 | flag_aer=1.0 |
---|
464 | CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& |
---|
465 | PRMU0,PFRAC,PTAVE,PWV,& |
---|
466 | ZAKI,ZCLD,ZCLEAR,ZDSIG,ZFACT,ZRMU,ZSEC,ZUD) |
---|
467 | INU = 1 |
---|
468 | CALL SW1S_LMDAR4(INU, PAER, flag_aer,& |
---|
469 | tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),& |
---|
470 | PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
471 | ZDSIG, POMEGAA, ZOZ, ZRMU, ZSEC, PTAUA, ZUD,& |
---|
472 | ZFD, ZFU) |
---|
473 | INU = 2 |
---|
474 | CALL SW2S_LMDAR4(INU, PAER, flag_aer,& |
---|
475 | tauaero(:,:,3,:), pizaero(:,:,3,:), cgaero(:,:,3,:),& |
---|
476 | ZAKI, PALBD, PALBP, PCG, ZCLD, ZCLEAR, PCLDSW,& |
---|
477 | ZDSIG, POMEGAA, ZOZ, ZRMU, ZSEC, PTAUA, ZUD,& |
---|
478 | PWV, PQS,& |
---|
479 | ZFDOWN, ZFUP) |
---|
480 | |
---|
481 | DO JK = 1 , KFLEV+1 |
---|
482 | DO JL = 1, KDLON |
---|
483 | ZFSUP_AERO(JL,JK,5) = (ZFUP(JL,JK) + ZFU(JL,JK)) * ZFACT(JL) |
---|
484 | ZFSDN_AERO(JL,JK,5) = (ZFDOWN(JL,JK) + ZFD(JL,JK)) * ZFACT(JL) |
---|
485 | ENDDO |
---|
486 | ENDDO |
---|
487 | |
---|
488 | ENDIF ! ok_aie |
---|
489 | |
---|
490 | itapsw = 0 |
---|
491 | ENDIF |
---|
492 | itapsw = itapsw + 1 |
---|
493 | |
---|
494 | IF ( AEROSOLFEEDBACK_ACTIVE ) THEN |
---|
495 | IF ( ok_ade .and. ok_aie ) THEN |
---|
496 | ZFSUP(:,:) = ZFSUP_AERO(:,:,4) |
---|
497 | ZFSDN(:,:) = ZFSDN_AERO(:,:,4) |
---|
498 | ZFSUP0(:,:) = ZFSUP0_AERO(:,:,2) |
---|
499 | ZFSDN0(:,:) = ZFSDN0_AERO(:,:,2) |
---|
500 | ENDIF |
---|
501 | |
---|
502 | IF ( ok_ade .and. (.not. ok_aie) ) THEN |
---|
503 | ZFSUP(:,:) = ZFSUP_AERO(:,:,2) |
---|
504 | ZFSDN(:,:) = ZFSDN_AERO(:,:,2) |
---|
505 | ZFSUP0(:,:) = ZFSUP0_AERO(:,:,2) |
---|
506 | ZFSDN0(:,:) = ZFSDN0_AERO(:,:,2) |
---|
507 | ENDIF |
---|
508 | |
---|
509 | IF ( (.not. ok_ade) .and. ok_aie ) THEN |
---|
510 | ZFSUP(:,:) = ZFSUP_AERO(:,:,5) |
---|
511 | ZFSDN(:,:) = ZFSDN_AERO(:,:,5) |
---|
512 | ZFSUP0(:,:) = ZFSUP0_AERO(:,:,3) |
---|
513 | ZFSDN0(:,:) = ZFSDN0_AERO(:,:,3) |
---|
514 | ENDIF |
---|
515 | |
---|
516 | IF ((.not. ok_ade) .and. (.not. ok_aie)) THEN |
---|
517 | ZFSUP(:,:) = ZFSUP_AERO(:,:,3) |
---|
518 | ZFSDN(:,:) = ZFSDN_AERO(:,:,3) |
---|
519 | ZFSUP0(:,:) = ZFSUP0_AERO(:,:,3) |
---|
520 | ZFSDN0(:,:) = ZFSDN0_AERO(:,:,3) |
---|
521 | ENDIF |
---|
522 | |
---|
523 | ! MS the following allows to compute the forcing diagostics without |
---|
524 | ! letting the aerosol forcing act on the meteorology |
---|
525 | ! SEE logic above |
---|
526 | ELSE |
---|
527 | ZFSUP(:,:) = ZFSUP_AERO(:,:,1) |
---|
528 | ZFSDN(:,:) = ZFSDN_AERO(:,:,1) |
---|
529 | ZFSUP0(:,:) = ZFSUP0_AERO(:,:,1) |
---|
530 | ZFSDN0(:,:) = ZFSDN0_AERO(:,:,1) |
---|
531 | ENDIF |
---|
532 | |
---|
533 | ! Now computes heating rates |
---|
534 | DO k = 1, KFLEV |
---|
535 | kpl1 = k+1 |
---|
536 | DO i = 1, KDLON |
---|
537 | PHEAT(i,k) = -(ZFSUP(i,kpl1)-ZFSUP(i,k))-(ZFSDN(i,k)-ZFSDN(i,kpl1)) |
---|
538 | PHEAT(i,k) = PHEAT(i,k) * RDAY*RG/RCPD / PDP(i,k) |
---|
539 | PHEAT0(i,k) = -(ZFSUP0(i,kpl1)-ZFSUP0(i,k))-(ZFSDN0(i,k)-ZFSDN0(i,kpl1)) |
---|
540 | PHEAT0(i,k) = PHEAT0(i,k) * RDAY*RG/RCPD / PDP(i,k) |
---|
541 | ENDDO |
---|
542 | ENDDO |
---|
543 | |
---|
544 | DO i = 1, KDLON |
---|
545 | ! effective SW surface albedo calculation |
---|
546 | PALBPLA(i) = ZFSUP(i,KFLEV+1)/(ZFSDN(i,KFLEV+1)+1.0e-20) |
---|
547 | |
---|
548 | ! clear sky net fluxes at TOA and SRF |
---|
549 | PSOLSW0(i) = ZFSDN0(i,1) - ZFSUP0(i,1) |
---|
550 | PTOPSW0(i) = ZFSDN0(i,KFLEV+1) - ZFSUP0(i,KFLEV+1) |
---|
551 | |
---|
552 | ! cloudy sky net fluxes at TOA and SRF |
---|
553 | PSOLSW(i) = ZFSDN(i,1) - ZFSUP(i,1) |
---|
554 | PTOPSW(i) = ZFSDN(i,KFLEV+1) - ZFSUP(i,KFLEV+1) |
---|
555 | |
---|
556 | ! net anthropogenic forcing direct and 1st indirect effect diagnostics |
---|
557 | ! requires a natural aerosol field read and used |
---|
558 | ! Difference of net fluxes from double call to radiation |
---|
559 | |
---|
560 | IF (ok_ade) THEN |
---|
561 | |
---|
562 | ! indices 1: natural; 2 anthropogenic |
---|
563 | |
---|
564 | ! TOA/SRF all sky natural forcing |
---|
565 | PSOLSWAERO(i,1) = (ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3))-(ZFSDN_AERO(i,1,1) - ZFSUP_AERO(i,1,1)) |
---|
566 | PTOPSWAERO(i,1) = (ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3))- (ZFSDN_AERO(i,KFLEV+1,1) - ZFSUP_AERO(i,KFLEV+1,1)) |
---|
567 | |
---|
568 | ! TOA/SRF clear sky natural forcing |
---|
569 | PSOLSW0AERO(i,1) = (ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3))-(ZFSDN0_AERO(i,1,1) - ZFSUP0_AERO(i,1,1)) |
---|
570 | PTOPSW0AERO(i,1) = (ZFSDN0_AERO(i,KFLEV+1,3) - ZFSUP0_AERO(i,KFLEV+1,3))-(ZFSDN0_AERO(i,KFLEV+1,1) - ZFSUP0_AERO(i,KFLEV+1,1)) |
---|
571 | |
---|
572 | IF (ok_aie) THEN |
---|
573 | |
---|
574 | ! TOA/SRF all sky anthropogenic forcing |
---|
575 | PSOLSWAERO(i,2) = (ZFSDN_AERO(i,1,4) - ZFSUP_AERO(i,1,4))-(ZFSDN_AERO(i,1,5) - ZFSUP_AERO(i,1,5)) |
---|
576 | PTOPSWAERO(i,2) = (ZFSDN_AERO(i,KFLEV+1,4) - ZFSUP_AERO(i,KFLEV+1,4))- (ZFSDN_AERO(i,KFLEV+1,5) - ZFSUP_AERO(i,KFLEV+1,5)) |
---|
577 | |
---|
578 | ELSE |
---|
579 | |
---|
580 | ! TOA/SRF all sky anthropogenic forcing |
---|
581 | PSOLSWAERO(i,2) = (ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2))-(ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3)) |
---|
582 | PTOPSWAERO(i,2) = (ZFSDN_AERO(i,KFLEV+1,2) - ZFSUP_AERO(i,KFLEV+1,2))- (ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3)) |
---|
583 | |
---|
584 | ENDIF |
---|
585 | |
---|
586 | ! TOA/SRF clear sky anthropogenic forcing |
---|
587 | PSOLSW0AERO(i,2) = (ZFSDN0_AERO(i,1,2) - ZFSUP0_AERO(i,1,2))-(ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3)) |
---|
588 | PTOPSW0AERO(i,2) = (ZFSDN0_AERO(i,KFLEV+1,2) - ZFSUP0_AERO(i,KFLEV+1,2))-(ZFSDN0_AERO(i,KFLEV+1,3) - ZFSUP0_AERO(i,KFLEV+1,3)) |
---|
589 | |
---|
590 | ! direct anthropogenic forcing , as in old LMDzT, however differences of net fluxes |
---|
591 | PSOLSWADAERO(i) = PSOLSWAERO(i,2) |
---|
592 | PTOPSWADAERO(i) = PTOPSWAERO(i,2) |
---|
593 | PSOLSWAD0AERO(i) = PSOLSW0AERO(i,2) |
---|
594 | PTOPSWAD0AERO(i) = PTOPSW0AERO(i,2) |
---|
595 | |
---|
596 | ! OB: these diagnostics may not always work but who need them |
---|
597 | ! Cloud forcing indices 1: natural; 2 anthropogenic; 3: zero aerosol direct effect |
---|
598 | ! Instantaneously computed cloudy sky direct aerosol effect, cloud forcing due to aerosols above clouds |
---|
599 | ! natural |
---|
600 | PSOLSWCFAERO(i,1) = PSOLSWAERO(i,1) - PSOLSW0AERO(i,1) |
---|
601 | PTOPSWCFAERO(i,1) = PTOPSWAERO(i,1) - PTOPSW0AERO(i,1) |
---|
602 | |
---|
603 | ! Instantaneously computed cloudy SKY DIRECT aerosol effect, cloud forcing due to aerosols above clouds |
---|
604 | ! anthropogenic |
---|
605 | PSOLSWCFAERO(i,2) = PSOLSWAERO(i,2) - PSOLSW0AERO(i,2) |
---|
606 | PTOPSWCFAERO(i,2) = PTOPSWAERO(i,2) - PTOPSW0AERO(i,2) |
---|
607 | |
---|
608 | ! Cloudforcing without aerosol |
---|
609 | ! zero |
---|
610 | PSOLSWCFAERO(i,3) = (ZFSDN_AERO(i,1,1) - ZFSUP_AERO(i,1,1))-(ZFSDN0_AERO(i,1,1) - ZFSUP0_AERO(i,1,1)) |
---|
611 | PTOPSWCFAERO(i,3) = (ZFSDN_AERO(i,KFLEV+1,1) - ZFSUP_AERO(i,KFLEV+1,1))- (ZFSDN0_AERO(i,KFLEV+1,1) - ZFSUP0_AERO(i,KFLEV+1,1)) |
---|
612 | |
---|
613 | ENDIF |
---|
614 | |
---|
615 | IF (ok_aie) THEN |
---|
616 | IF (ok_ade) THEN |
---|
617 | PSOLSWAIAERO(i) = (ZFSDN_AERO(i,1,4) - ZFSUP_AERO(i,1,4))-(ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2)) |
---|
618 | PTOPSWAIAERO(i) = (ZFSDN_AERO(i,KFLEV+1,4) - ZFSUP_AERO(i,KFLEV+1,4))-(ZFSDN_AERO(i,KFLEV+1,2) - ZFSUP_AERO(i,KFLEV+1,2)) |
---|
619 | ELSE |
---|
620 | PSOLSWAIAERO(i) = (ZFSDN_AERO(i,1,5) - ZFSUP_AERO(i,1,5))-(ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3)) |
---|
621 | PTOPSWAIAERO(i) = (ZFSDN_AERO(i,KFLEV+1,5) - ZFSUP_AERO(i,KFLEV+1,5))-(ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3)) |
---|
622 | ENDIF |
---|
623 | ENDIF |
---|
624 | |
---|
625 | ENDDO |
---|
626 | |
---|
627 | END SUBROUTINE SW_AEROAR4 |
---|