1 | ! |
---|
2 | ! $Id: radlwsw_m.F90 3609 2019-11-29 08:25:41Z lguez $ |
---|
3 | ! |
---|
4 | module radlwsw_m |
---|
5 | |
---|
6 | IMPLICIT NONE |
---|
7 | |
---|
8 | contains |
---|
9 | |
---|
10 | SUBROUTINE radlwsw( & |
---|
11 | dist, rmu0, fract, & |
---|
12 | !albedo SB >>> |
---|
13 | ! paprs, pplay,tsol,alb1, alb2, & |
---|
14 | paprs, pplay,tsol,SFRWL,alb_dir, alb_dif, & |
---|
15 | !albedo SB <<< |
---|
16 | t,q,wo,& |
---|
17 | cldfra, cldemi, cldtaupd,& |
---|
18 | ok_ade, ok_aie, ok_volcan, flag_volc_surfstrat, flag_aerosol,& |
---|
19 | flag_aerosol_strat, flag_aer_feedback, & |
---|
20 | tau_aero, piz_aero, cg_aero,& |
---|
21 | tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm,& ! rajoute par OB pour RRTM |
---|
22 | tau_aero_lw_rrtm, & ! rajoute par C. Kleinschmitt pour RRTM |
---|
23 | cldtaupi, new_aod, & |
---|
24 | qsat, flwc, fiwc, & |
---|
25 | ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & |
---|
26 | heat,heat0,cool,cool0,albpla,& |
---|
27 | heat_volc, cool_volc,& |
---|
28 | topsw,toplw,solsw,sollw,& |
---|
29 | sollwdown,& |
---|
30 | topsw0,toplw0,solsw0,sollw0,& |
---|
31 | lwdnc0, lwdn0, lwdn, lwupc0, lwup0, lwup,& |
---|
32 | swdnc0, swdn0, swdn, swupc0, swup0, swup,& |
---|
33 | topswad_aero, solswad_aero,& |
---|
34 | topswai_aero, solswai_aero, & |
---|
35 | topswad0_aero, solswad0_aero,& |
---|
36 | topsw_aero, topsw0_aero,& |
---|
37 | solsw_aero, solsw0_aero, & |
---|
38 | topswcf_aero, solswcf_aero,& |
---|
39 | !-C. Kleinschmitt for LW diagnostics |
---|
40 | toplwad_aero, sollwad_aero,& |
---|
41 | toplwai_aero, sollwai_aero, & |
---|
42 | toplwad0_aero, sollwad0_aero,& |
---|
43 | !-end |
---|
44 | ZLWFT0_i, ZFLDN0, ZFLUP0,& |
---|
45 | ZSWFT0_i, ZFSDN0, ZFSUP0) |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | USE DIMPHY |
---|
50 | USE assert_m, ONLY : assert |
---|
51 | USE infotrac_phy, ONLY : type_trac |
---|
52 | USE write_field_phy |
---|
53 | #ifdef REPROBUS |
---|
54 | USE CHEM_REP, ONLY : solaireTIME, ok_SUNTIME, ndimozon |
---|
55 | #endif |
---|
56 | #ifdef CPP_RRTM |
---|
57 | ! modules necessaires au rayonnement |
---|
58 | ! ----------------------------------------- |
---|
59 | ! USE YOMCST , ONLY : RG ,RD ,RTT ,RPI |
---|
60 | ! USE YOERAD , ONLY : NSW ,LRRTM ,LINHOM , LCCNL,LCCNO, |
---|
61 | ! USE YOERAD , ONLY : NSW ,LRRTM ,LCCNL ,LCCNO ,& |
---|
62 | ! NSW mis dans .def MPL 20140211 |
---|
63 | ! NLW ajoute par OB |
---|
64 | USE YOERAD , ONLY : NLW, LRRTM ,LCCNL ,LCCNO ,& |
---|
65 | NRADIP , NRADLP , NICEOPT, NLIQOPT ,RCCNLND , RCCNSEA |
---|
66 | USE YOELW , ONLY : NSIL ,NTRA ,NUA ,TSTAND ,XP |
---|
67 | USE YOESW , ONLY : RYFWCA ,RYFWCB ,RYFWCC ,RYFWCD,& |
---|
68 | RYFWCE ,RYFWCF ,REBCUA ,REBCUB ,REBCUC,& |
---|
69 | REBCUD ,REBCUE ,REBCUF ,REBCUI ,REBCUJ,& |
---|
70 | REBCUG ,REBCUH ,RHSAVI ,RFULIO ,RFLAA0,& |
---|
71 | RFLAA1 ,RFLBB0 ,RFLBB1 ,RFLBB2 ,RFLBB3,& |
---|
72 | RFLCC0 ,RFLCC1 ,RFLCC2 ,RFLCC3 ,RFLDD0,& |
---|
73 | RFLDD1 ,RFLDD2 ,RFLDD3 ,RFUETA ,RASWCA,& |
---|
74 | RASWCB ,RASWCC ,RASWCD ,RASWCE ,RASWCF |
---|
75 | ! & RASWCB ,RASWCC ,RASWCD ,RASWCE ,RASWCF, RLINLI |
---|
76 | USE YOERDU , ONLY : NUAER ,NTRAER ,REPLOG ,REPSC ,REPSCW ,DIFF |
---|
77 | ! USE YOETHF , ONLY : RTICE |
---|
78 | USE YOERRTWN , ONLY : DELWAVE ,TOTPLNK |
---|
79 | USE YOMPHY3 , ONLY : RII0 |
---|
80 | #endif |
---|
81 | USE aero_mod |
---|
82 | |
---|
83 | !====================================================================== |
---|
84 | ! Auteur(s): Z.X. Li (LMD/CNRS) date: 19960719 |
---|
85 | ! Objet: interface entre le modele et les rayonnements |
---|
86 | ! Arguments: |
---|
87 | ! dist-----input-R- distance astronomique terre-soleil |
---|
88 | ! rmu0-----input-R- cosinus de l'angle zenithal |
---|
89 | ! fract----input-R- duree d'ensoleillement normalisee |
---|
90 | ! co2_ppm--input-R- concentration du gaz carbonique (en ppm) |
---|
91 | ! paprs----input-R- pression a inter-couche (Pa) |
---|
92 | ! pplay----input-R- pression au milieu de couche (Pa) |
---|
93 | ! tsol-----input-R- temperature du sol (en K) |
---|
94 | ! alb1-----input-R- albedo du sol(entre 0 et 1) dans l'interval visible |
---|
95 | ! alb2-----input-R- albedo du sol(entre 0 et 1) dans l'interval proche infra-rouge |
---|
96 | ! t--------input-R- temperature (K) |
---|
97 | ! q--------input-R- vapeur d'eau (en kg/kg) |
---|
98 | ! cldfra---input-R- fraction nuageuse (entre 0 et 1) |
---|
99 | ! cldtaupd---input-R- epaisseur optique des nuages dans le visible (present-day value) |
---|
100 | ! cldemi---input-R- emissivite des nuages dans l'IR (entre 0 et 1) |
---|
101 | ! ok_ade---input-L- apply the Aerosol Direct Effect or not? |
---|
102 | ! ok_aie---input-L- apply the Aerosol Indirect Effect or not? |
---|
103 | ! ok_volcan-input-L- activate volcanic diags (SW heat & LW cool rate, SW & LW flux) |
---|
104 | ! flag_volc_surfstrat-input-I- activate volcanic surf cooling or strato heating (or nothing) |
---|
105 | ! flag_aerosol-input-I- aerosol flag from 0 to 6 |
---|
106 | ! flag_aerosol_strat-input-I- use stratospheric aerosols flag (0, 1, 2) |
---|
107 | ! flag_aer_feedback-input-I- activate aerosol radiative feedback (T, F) |
---|
108 | ! tau_ae, piz_ae, cg_ae-input-R- aerosol optical properties (calculated in aeropt.F) |
---|
109 | ! cldtaupi-input-R- epaisseur optique des nuages dans le visible |
---|
110 | ! calculated for pre-industrial (pi) aerosol concentrations, i.e. with smaller |
---|
111 | ! droplet concentration, thus larger droplets, thus generally cdltaupi cldtaupd |
---|
112 | ! it is needed for the diagnostics of the aerosol indirect radiative forcing |
---|
113 | ! |
---|
114 | ! heat-----output-R- echauffement atmospherique (visible) (K/jour) |
---|
115 | ! cool-----output-R- refroidissement dans l'IR (K/jour) |
---|
116 | ! albpla---output-R- albedo planetaire (entre 0 et 1) |
---|
117 | ! topsw----output-R- flux solaire net au sommet de l'atm. |
---|
118 | ! toplw----output-R- ray. IR montant au sommet de l'atmosphere |
---|
119 | ! solsw----output-R- flux solaire net a la surface |
---|
120 | ! sollw----output-R- ray. IR montant a la surface |
---|
121 | ! solswad---output-R- ray. solaire net absorbe a la surface (aerosol dir) |
---|
122 | ! topswad---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol dir) |
---|
123 | ! solswai---output-R- ray. solaire net absorbe a la surface (aerosol ind) |
---|
124 | ! topswai---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol ind) |
---|
125 | ! |
---|
126 | ! heat_volc-----output-R- echauffement atmospherique du au forcage volcanique (visible) (K/s) |
---|
127 | ! cool_volc-----output-R- refroidissement dans l'IR du au forcage volcanique (K/s) |
---|
128 | ! |
---|
129 | ! ATTENTION: swai and swad have to be interpreted in the following manner: |
---|
130 | ! --------- |
---|
131 | ! ok_ade=F & ok_aie=F -both are zero |
---|
132 | ! ok_ade=T & ok_aie=F -aerosol direct forcing is F_{AD} = topsw-topswad |
---|
133 | ! indirect is zero |
---|
134 | ! ok_ade=F & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
135 | ! direct is zero |
---|
136 | ! ok_ade=T & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
137 | ! aerosol direct forcing is F_{AD} = topswai-topswad |
---|
138 | ! |
---|
139 | ! --------- RRTM: output RECMWFL |
---|
140 | ! ZEMTD (KPROMA,KLEV+1) ; TOTAL DOWNWARD LONGWAVE EMISSIVITY |
---|
141 | ! ZEMTU (KPROMA,KLEV+1) ; TOTAL UPWARD LONGWAVE EMISSIVITY |
---|
142 | ! ZTRSO (KPROMA,KLEV+1) ; TOTAL SHORTWAVE TRANSMISSIVITY |
---|
143 | ! ZTH (KPROMA,KLEV+1) ; HALF LEVEL TEMPERATURE |
---|
144 | ! ZCTRSO(KPROMA,2) ; CLEAR-SKY SHORTWAVE TRANSMISSIVITY |
---|
145 | ! ZCEMTR(KPROMA,2) ; CLEAR-SKY NET LONGWAVE EMISSIVITY |
---|
146 | ! ZTRSOD(KPROMA) ; TOTAL-SKY SURFACE SW TRANSMISSITY |
---|
147 | ! ZLWFC (KPROMA,2) ; CLEAR-SKY LONGWAVE FLUXES |
---|
148 | ! ZLWFT (KPROMA,KLEV+1) ; TOTAL-SKY LONGWAVE FLUXES |
---|
149 | ! ZLWFT0(KPROMA,KLEV+1) ; CLEAR-SKY LONGWAVE FLUXES ! added by MPL 090109 |
---|
150 | ! ZSWFC (KPROMA,2) ; CLEAR-SKY SHORTWAVE FLUXES |
---|
151 | ! ZSWFT (KPROMA,KLEV+1) ; TOTAL-SKY SHORTWAVE FLUXES |
---|
152 | ! ZSWFT0(KPROMA,KLEV+1) ; CLEAR-SKY SHORTWAVE FLUXES ! added by MPL 090109 |
---|
153 | ! ZFLUX (KLON,2,KLEV+1) ; TOTAL LW FLUXES 1=up, 2=DWN ! added by MPL 080411 |
---|
154 | ! ZFLUC (KLON,2,KLEV+1) ; CLEAR SKY LW FLUXES ! added by MPL 080411 |
---|
155 | ! ZFSDWN(klon,KLEV+1) ; TOTAL SW DWN FLUXES ! added by MPL 080411 |
---|
156 | ! ZFCDWN(klon,KLEV+1) ; CLEAR SKY SW DWN FLUXES ! added by MPL 080411 |
---|
157 | ! ZFCCDWN(klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) SW DWN FLUXES ! added by OB 211117 |
---|
158 | ! ZFSUP (klon,KLEV+1) ; TOTAL SW UP FLUXES ! added by MPL 080411 |
---|
159 | ! ZFCUP (klon,KLEV+1) ; CLEAR SKY SW UP FLUXES ! added by MPL 080411 |
---|
160 | ! ZFCCUP (klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) SW UP FLUXES ! added by OB 211117 |
---|
161 | ! ZFLCCDWN(klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) LW DWN FLUXES ! added by OB 211117 |
---|
162 | ! ZFLCCUP (klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) LW UP FLUXES ! added by OB 211117 |
---|
163 | |
---|
164 | !====================================================================== |
---|
165 | |
---|
166 | ! ==================================================================== |
---|
167 | ! Adapte au modele de chimie INCA par Celine Deandreis & Anne Cozic -- 2009 |
---|
168 | ! 1 = ZERO |
---|
169 | ! 2 = AER total |
---|
170 | ! 3 = NAT |
---|
171 | ! 4 = BC |
---|
172 | ! 5 = SO4 |
---|
173 | ! 6 = POM |
---|
174 | ! 7 = DUST |
---|
175 | ! 8 = SS |
---|
176 | ! 9 = NO3 |
---|
177 | ! |
---|
178 | ! ==================================================================== |
---|
179 | include "YOETHF.h" |
---|
180 | include "YOMCST.h" |
---|
181 | include "clesphys.h" |
---|
182 | |
---|
183 | ! Input arguments |
---|
184 | REAL, INTENT(in) :: dist |
---|
185 | REAL, INTENT(in) :: rmu0(KLON), fract(KLON) |
---|
186 | REAL, INTENT(in) :: paprs(KLON,KLEV+1), pplay(KLON,KLEV) |
---|
187 | !albedo SB >>> |
---|
188 | ! REAL, INTENT(in) :: alb1(KLON), alb2(KLON), tsol(KLON) |
---|
189 | REAL, INTENT(in) :: tsol(KLON) |
---|
190 | REAL, INTENT(in) :: alb_dir(KLON,NSW),alb_dif(KLON,NSW) |
---|
191 | real, intent(in) :: SFRWL(6) |
---|
192 | !albedo SB <<< |
---|
193 | REAL, INTENT(in) :: t(KLON,KLEV), q(KLON,KLEV) |
---|
194 | |
---|
195 | REAL, INTENT(in):: wo(:, :, :) ! dimension(KLON,KLEV, 1 or 2) |
---|
196 | ! column-density of ozone in a layer, in kilo-Dobsons |
---|
197 | ! "wo(:, :, 1)" is for the average day-night field, |
---|
198 | ! "wo(:, :, 2)" is for daylight time. |
---|
199 | |
---|
200 | LOGICAL, INTENT(in) :: ok_ade, ok_aie ! switches whether to use aerosol direct (indirect) effects or not |
---|
201 | LOGICAL, INTENT(in) :: ok_volcan ! produce volcanic diags (SW/LW heat flux and rate) |
---|
202 | LOGICAL :: lldebug |
---|
203 | INTEGER, INTENT(in) :: flag_volc_surfstrat ! allow to impose volcanic cooling rate at surf or heating in strato |
---|
204 | INTEGER, INTENT(in) :: flag_aerosol ! takes value 0 (no aerosol) or 1 to 6 (aerosols) |
---|
205 | INTEGER, INTENT(in) :: flag_aerosol_strat ! use stratospheric aerosols |
---|
206 | LOGICAL, INTENT(in) :: flag_aer_feedback ! activate aerosol radiative feedback |
---|
207 | REAL, INTENT(in) :: cldfra(KLON,KLEV), cldemi(KLON,KLEV), cldtaupd(KLON,KLEV) |
---|
208 | REAL, INTENT(in) :: tau_aero(KLON,KLEV,naero_grp,2) ! aerosol optical properties (see aeropt.F) |
---|
209 | REAL, INTENT(in) :: piz_aero(KLON,KLEV,naero_grp,2) ! aerosol optical properties (see aeropt.F) |
---|
210 | REAL, INTENT(in) :: cg_aero(KLON,KLEV,naero_grp,2) ! aerosol optical properties (see aeropt.F) |
---|
211 | !--OB |
---|
212 | REAL, INTENT(in) :: tau_aero_sw_rrtm(KLON,KLEV,2,NSW) ! aerosol optical properties RRTM |
---|
213 | REAL, INTENT(in) :: piz_aero_sw_rrtm(KLON,KLEV,2,NSW) ! aerosol optical properties RRTM |
---|
214 | REAL, INTENT(in) :: cg_aero_sw_rrtm(KLON,KLEV,2,NSW) ! aerosol optical properties RRTM |
---|
215 | !--OB fin |
---|
216 | |
---|
217 | !--C. Kleinschmitt |
---|
218 | #ifdef CPP_RRTM |
---|
219 | REAL, INTENT(in) :: tau_aero_lw_rrtm(KLON,KLEV,2,NLW) ! LW aerosol optical properties RRTM |
---|
220 | #else |
---|
221 | REAL, INTENT(in) :: tau_aero_lw_rrtm(KLON,KLEV,2,nbands_lw_rrtm) |
---|
222 | #endif |
---|
223 | !--C. Kleinschmitt end |
---|
224 | |
---|
225 | REAL, INTENT(in) :: cldtaupi(KLON,KLEV) ! cloud optical thickness for pre-industrial aerosol concentrations |
---|
226 | 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 |
---|
227 | REAL, INTENT(in) :: qsat(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
228 | REAL, INTENT(in) :: flwc(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
229 | REAL, INTENT(in) :: fiwc(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
230 | REAL, INTENT(in) :: ref_liq(klon,klev) ! cloud droplet radius present-day from newmicro |
---|
231 | REAL, INTENT(in) :: ref_ice(klon,klev) ! ice crystal radius present-day from newmicro |
---|
232 | REAL, INTENT(in) :: ref_liq_pi(klon,klev) ! cloud droplet radius pre-industrial from newmicro |
---|
233 | REAL, INTENT(in) :: ref_ice_pi(klon,klev) ! ice crystal radius pre-industrial from newmicro |
---|
234 | |
---|
235 | ! Output arguments |
---|
236 | REAL, INTENT(out) :: heat(KLON,KLEV), cool(KLON,KLEV) |
---|
237 | REAL, INTENT(out) :: heat0(KLON,KLEV), cool0(KLON,KLEV) |
---|
238 | REAL, INTENT(out) :: heat_volc(KLON,KLEV), cool_volc(KLON,KLEV) !NL |
---|
239 | REAL, INTENT(out) :: topsw(KLON), toplw(KLON) |
---|
240 | REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON) |
---|
241 | REAL, INTENT(out) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON) |
---|
242 | REAL, INTENT(out) :: sollwdown(KLON) |
---|
243 | REAL, INTENT(out) :: swdn(KLON,kflev+1),swdn0(KLON,kflev+1), swdnc0(KLON,kflev+1) |
---|
244 | REAL, INTENT(out) :: swup(KLON,kflev+1),swup0(KLON,kflev+1), swupc0(KLON,kflev+1) |
---|
245 | REAL, INTENT(out) :: lwdn(KLON,kflev+1),lwdn0(KLON,kflev+1), lwdnc0(KLON,kflev+1) |
---|
246 | REAL, INTENT(out) :: lwup(KLON,kflev+1),lwup0(KLON,kflev+1), lwupc0(KLON,kflev+1) |
---|
247 | REAL, INTENT(out) :: topswad_aero(KLON), solswad_aero(KLON) ! output: aerosol direct forcing at TOA and surface |
---|
248 | REAL, INTENT(out) :: topswai_aero(KLON), solswai_aero(KLON) ! output: aerosol indirect forcing atTOA and surface |
---|
249 | REAL, INTENT(out) :: toplwad_aero(KLON), sollwad_aero(KLON) ! output: LW aerosol direct forcing at TOA and surface |
---|
250 | REAL, INTENT(out) :: toplwai_aero(KLON), sollwai_aero(KLON) ! output: LW aerosol indirect forcing atTOA and surface |
---|
251 | REAL, DIMENSION(klon), INTENT(out) :: topswad0_aero |
---|
252 | REAL, DIMENSION(klon), INTENT(out) :: solswad0_aero |
---|
253 | REAL, DIMENSION(klon), INTENT(out) :: toplwad0_aero |
---|
254 | REAL, DIMENSION(klon), INTENT(out) :: sollwad0_aero |
---|
255 | REAL, DIMENSION(kdlon,9), INTENT(out) :: topsw_aero |
---|
256 | REAL, DIMENSION(kdlon,9), INTENT(out) :: topsw0_aero |
---|
257 | REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw_aero |
---|
258 | REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw0_aero |
---|
259 | REAL, DIMENSION(kdlon,3), INTENT(out) :: topswcf_aero |
---|
260 | REAL, DIMENSION(kdlon,3), INTENT(out) :: solswcf_aero |
---|
261 | REAL, DIMENSION(kdlon,kflev+1), INTENT(out) :: ZSWFT0_i |
---|
262 | REAL, DIMENSION(kdlon,kflev+1), INTENT(out) :: ZLWFT0_i |
---|
263 | |
---|
264 | ! Local variables |
---|
265 | REAL(KIND=8) ZFSUP(KDLON,KFLEV+1) |
---|
266 | REAL(KIND=8) ZFSDN(KDLON,KFLEV+1) |
---|
267 | REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1) |
---|
268 | REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1) |
---|
269 | REAL(KIND=8) ZFSUPC0(KDLON,KFLEV+1) |
---|
270 | REAL(KIND=8) ZFSDNC0(KDLON,KFLEV+1) |
---|
271 | REAL(KIND=8) ZFLUP(KDLON,KFLEV+1) |
---|
272 | REAL(KIND=8) ZFLDN(KDLON,KFLEV+1) |
---|
273 | REAL(KIND=8) ZFLUP0(KDLON,KFLEV+1) |
---|
274 | REAL(KIND=8) ZFLDN0(KDLON,KFLEV+1) |
---|
275 | REAL(KIND=8) ZFLUPC0(KDLON,KFLEV+1) |
---|
276 | REAL(KIND=8) ZFLDNC0(KDLON,KFLEV+1) |
---|
277 | REAL(KIND=8) zx_alpha1, zx_alpha2 |
---|
278 | INTEGER k, kk, i, j, iof, nb_gr |
---|
279 | INTEGER ist,iend,ktdia,kmode |
---|
280 | REAL(KIND=8) PSCT |
---|
281 | REAL(KIND=8) PALBD(kdlon,2), PALBP(kdlon,2) |
---|
282 | ! MPL 06.01.09: pour RRTM, creation de PALBD_NEW et PALBP_NEW |
---|
283 | ! avec NSW en deuxieme dimension |
---|
284 | REAL(KIND=8) PALBD_NEW(kdlon,NSW), PALBP_NEW(kdlon,NSW) |
---|
285 | REAL(KIND=8) PEMIS(kdlon), PDT0(kdlon), PVIEW(kdlon) |
---|
286 | REAL(KIND=8) PPSOL(kdlon), PDP(kdlon,KLEV) |
---|
287 | REAL(KIND=8) PTL(kdlon,kflev+1), PPMB(kdlon,kflev+1) |
---|
288 | REAL(KIND=8) PTAVE(kdlon,kflev) |
---|
289 | REAL(KIND=8) PWV(kdlon,kflev), PQS(kdlon,kflev) |
---|
290 | |
---|
291 | real(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone |
---|
292 | ! "POZON(:, :, 1)" is for the average day-night field, |
---|
293 | ! "POZON(:, :, 2)" is for daylight time. |
---|
294 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
295 | REAL(KIND=8) PAER(kdlon,kflev,6) |
---|
296 | REAL(KIND=8) PCLDLD(kdlon,kflev) |
---|
297 | REAL(KIND=8) PCLDLU(kdlon,kflev) |
---|
298 | REAL(KIND=8) PCLDSW(kdlon,kflev) |
---|
299 | REAL(KIND=8) PTAU(kdlon,2,kflev) |
---|
300 | REAL(KIND=8) POMEGA(kdlon,2,kflev) |
---|
301 | REAL(KIND=8) PCG(kdlon,2,kflev) |
---|
302 | REAL(KIND=8) zfract(kdlon), zrmu0(kdlon), zdist |
---|
303 | REAL(KIND=8) zheat(kdlon,kflev), zcool(kdlon,kflev) |
---|
304 | REAL(KIND=8) zheat0(kdlon,kflev), zcool0(kdlon,kflev) |
---|
305 | REAL(KIND=8) zheat_volc(kdlon,kflev), zcool_volc(kdlon,kflev) !NL |
---|
306 | REAL(KIND=8) ztopsw(kdlon), ztoplw(kdlon) |
---|
307 | REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon) |
---|
308 | REAL(KIND=8) zsollwdown(kdlon) |
---|
309 | REAL(KIND=8) ztopsw0(kdlon), ztoplw0(kdlon) |
---|
310 | REAL(KIND=8) zsolsw0(kdlon), zsollw0(kdlon) |
---|
311 | REAL(KIND=8) zznormcp |
---|
312 | REAL(KIND=8) tauaero(kdlon,kflev,naero_grp,2) ! aer opt properties |
---|
313 | REAL(KIND=8) pizaero(kdlon,kflev,naero_grp,2) |
---|
314 | REAL(KIND=8) cgaero(kdlon,kflev,naero_grp,2) |
---|
315 | REAL(KIND=8) PTAUA(kdlon,2,kflev) ! present-day value of cloud opt thickness (PTAU is pre-industrial value), local use |
---|
316 | REAL(KIND=8) POMEGAA(kdlon,2,kflev) ! dito for single scatt albedo |
---|
317 | REAL(KIND=8) ztopswadaero(kdlon), zsolswadaero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
318 | REAL(KIND=8) ztopswad0aero(kdlon), zsolswad0aero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
319 | REAL(KIND=8) ztopswaiaero(kdlon), zsolswaiaero(kdlon) ! dito, indirect |
---|
320 | !--NL |
---|
321 | REAL(KIND=8) zswadaero(kdlon,kflev+1) ! SW Aerosol direct forcing |
---|
322 | REAL(KIND=8) zlwadaero(kdlon,kflev+1) ! LW Aerosol direct forcing |
---|
323 | !-- VolMIP |
---|
324 | REAL(KIND=8) volmip_solsw(kdlon) ! SW clear sky in the case of VOLMIP |
---|
325 | !-LW by CK |
---|
326 | REAL(KIND=8) ztoplwadaero(kdlon), zsollwadaero(kdlon) ! LW Aerosol direct forcing at TOAand surface |
---|
327 | REAL(KIND=8) ztoplwad0aero(kdlon), zsollwad0aero(kdlon) ! LW Aerosol direct forcing at TOAand surface |
---|
328 | REAL(KIND=8) ztoplwaiaero(kdlon), zsollwaiaero(kdlon) ! dito, indirect |
---|
329 | !-end |
---|
330 | REAL(KIND=8) ztopsw_aero(kdlon,9), ztopsw0_aero(kdlon,9) |
---|
331 | REAL(KIND=8) zsolsw_aero(kdlon,9), zsolsw0_aero(kdlon,9) |
---|
332 | REAL(KIND=8) ztopswcf_aero(kdlon,3), zsolswcf_aero(kdlon,3) |
---|
333 | ! real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 deje declare dans physiq.F MPL 20130618 |
---|
334 | !MPL input supplementaires pour RECMWFL |
---|
335 | ! flwc, fiwc = Liquid Water Content & Ice Water Content (kg/kg) |
---|
336 | REAL(KIND=8) GEMU(klon) |
---|
337 | !MPL input RECMWFL: |
---|
338 | ! Tableaux aux niveaux inverses pour respecter convention Arpege |
---|
339 | REAL(KIND=8) ref_liq_i(klon,klev) ! cloud droplet radius present-day from newmicro (inverted) |
---|
340 | REAL(KIND=8) ref_ice_i(klon,klev) ! ice crystal radius present-day from newmicro (inverted) |
---|
341 | !--OB |
---|
342 | REAL(KIND=8) ref_liq_pi_i(klon,klev) ! cloud droplet radius pre-industrial from newmicro (inverted) |
---|
343 | REAL(KIND=8) ref_ice_pi_i(klon,klev) ! ice crystal radius pre-industrial from newmicro (inverted) |
---|
344 | !--end OB |
---|
345 | REAL(KIND=8) paprs_i(klon,klev+1) |
---|
346 | REAL(KIND=8) pplay_i(klon,klev) |
---|
347 | REAL(KIND=8) cldfra_i(klon,klev) |
---|
348 | REAL(KIND=8) POZON_i(kdlon,kflev, size(wo, 3)) ! mass fraction of ozone |
---|
349 | ! "POZON(:, :, 1)" is for the average day-night field, |
---|
350 | ! "POZON(:, :, 2)" is for daylight time. |
---|
351 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
352 | REAL(KIND=8) PAER_i(kdlon,kflev,6) |
---|
353 | REAL(KIND=8) PDP_i(klon,klev) |
---|
354 | REAL(KIND=8) t_i(klon,klev),q_i(klon,klev),qsat_i(klon,klev) |
---|
355 | REAL(KIND=8) flwc_i(klon,klev),fiwc_i(klon,klev) |
---|
356 | !MPL output RECMWFL: |
---|
357 | REAL(KIND=8) ZEMTD (klon,klev+1),ZEMTD_i (klon,klev+1) |
---|
358 | REAL(KIND=8) ZEMTU (klon,klev+1),ZEMTU_i (klon,klev+1) |
---|
359 | REAL(KIND=8) ZTRSO (klon,klev+1),ZTRSO_i (klon,klev+1) |
---|
360 | REAL(KIND=8) ZTH (klon,klev+1),ZTH_i (klon,klev+1) |
---|
361 | REAL(KIND=8) ZCTRSO(klon,2) |
---|
362 | REAL(KIND=8) ZCEMTR(klon,2) |
---|
363 | REAL(KIND=8) ZTRSOD(klon) |
---|
364 | REAL(KIND=8) ZLWFC (klon,2) |
---|
365 | REAL(KIND=8) ZLWFT (klon,klev+1),ZLWFT_i (klon,klev+1) |
---|
366 | REAL(KIND=8) ZSWFC (klon,2) |
---|
367 | REAL(KIND=8) ZSWFT (klon,klev+1),ZSWFT_i (klon,klev+1) |
---|
368 | REAL(KIND=8) ZFLUCDWN_i(klon,klev+1),ZFLUCUP_i(klon,klev+1) |
---|
369 | REAL(KIND=8) PPIZA_TOT(klon,klev,NSW) |
---|
370 | REAL(KIND=8) PCGA_TOT(klon,klev,NSW) |
---|
371 | REAL(KIND=8) PTAU_TOT(klon,klev,NSW) |
---|
372 | REAL(KIND=8) PPIZA_NAT(klon,klev,NSW) |
---|
373 | REAL(KIND=8) PCGA_NAT(klon,klev,NSW) |
---|
374 | REAL(KIND=8) PTAU_NAT(klon,klev,NSW) |
---|
375 | #ifdef CPP_RRTM |
---|
376 | REAL(KIND=8) PTAU_LW_TOT(klon,klev,NLW) |
---|
377 | REAL(KIND=8) PTAU_LW_NAT(klon,klev,NLW) |
---|
378 | #endif |
---|
379 | REAL(KIND=8) PSFSWDIR(klon,NSW) |
---|
380 | REAL(KIND=8) PSFSWDIF(klon,NSW) |
---|
381 | REAL(KIND=8) PFSDNN(klon) |
---|
382 | REAL(KIND=8) PFSDNV(klon) |
---|
383 | !MPL On ne redefinit pas les tableaux ZFLUX,ZFLUC, |
---|
384 | !MPL ZFSDWN,ZFCDWN,ZFSUP,ZFCUP car ils existent deja |
---|
385 | !MPL sous les noms de ZFLDN,ZFLDN0,ZFLUP,ZFLUP0, |
---|
386 | !MPL ZFSDN,ZFSDN0,ZFSUP,ZFSUP0 |
---|
387 | REAL(KIND=8) ZFLUX_i (klon,2,klev+1) |
---|
388 | REAL(KIND=8) ZFLUC_i (klon,2,klev+1) |
---|
389 | REAL(KIND=8) ZFSDWN_i (klon,klev+1) |
---|
390 | REAL(KIND=8) ZFCDWN_i (klon,klev+1) |
---|
391 | REAL(KIND=8) ZFCCDWN_i (klon,klev+1) |
---|
392 | REAL(KIND=8) ZFSUP_i (klon,klev+1) |
---|
393 | REAL(KIND=8) ZFCUP_i (klon,klev+1) |
---|
394 | REAL(KIND=8) ZFCCUP_i (klon,klev+1) |
---|
395 | REAL(KIND=8) ZFLCCDWN_i (klon,klev+1) |
---|
396 | REAL(KIND=8) ZFLCCUP_i (klon,klev+1) |
---|
397 | ! 3 lignes suivantes a activer pour CCMVAL (MPL 20100412) |
---|
398 | ! REAL(KIND=8) RSUN(3,2) |
---|
399 | ! REAL(KIND=8) SUN(3) |
---|
400 | ! REAL(KIND=8) SUN_FRACT(2) |
---|
401 | real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
---|
402 | CHARACTER (LEN=80) :: abort_message |
---|
403 | CHARACTER (LEN=80) :: modname='radlwsw_m' |
---|
404 | |
---|
405 | call assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") |
---|
406 | ! initialisation |
---|
407 | ist=1 |
---|
408 | iend=klon |
---|
409 | ktdia=1 |
---|
410 | kmode=ist |
---|
411 | tauaero(:,:,:,:)=0. |
---|
412 | pizaero(:,:,:,:)=0. |
---|
413 | cgaero(:,:,:,:)=0. |
---|
414 | lldebug=.FALSE. |
---|
415 | |
---|
416 | ! |
---|
417 | !------------------------------------------- |
---|
418 | nb_gr = KLON / kdlon |
---|
419 | IF (nb_gr*kdlon .NE. KLON) THEN |
---|
420 | PRINT*, "kdlon mauvais:", KLON, kdlon, nb_gr |
---|
421 | call abort_physic("radlwsw", "", 1) |
---|
422 | ENDIF |
---|
423 | IF (kflev .NE. KLEV) THEN |
---|
424 | PRINT*, "kflev differe de KLEV, kflev, KLEV" |
---|
425 | call abort_physic("radlwsw", "", 1) |
---|
426 | ENDIF |
---|
427 | !------------------------------------------- |
---|
428 | DO k = 1, KLEV |
---|
429 | DO i = 1, KLON |
---|
430 | heat(i,k)=0. |
---|
431 | cool(i,k)=0. |
---|
432 | heat_volc(i,k)=0. !NL |
---|
433 | cool_volc(i,k)=0. !NL |
---|
434 | heat0(i,k)=0. |
---|
435 | cool0(i,k)=0. |
---|
436 | ENDDO |
---|
437 | ENDDO |
---|
438 | ! |
---|
439 | zdist = dist |
---|
440 | ! |
---|
441 | PSCT = solaire/zdist/zdist |
---|
442 | |
---|
443 | IF (type_trac == 'repr') THEN |
---|
444 | #ifdef REPROBUS |
---|
445 | if(ok_SUNTIME) PSCT = solaireTIME/zdist/zdist |
---|
446 | print*,'Constante solaire: ',PSCT*zdist*zdist |
---|
447 | #endif |
---|
448 | END IF |
---|
449 | |
---|
450 | DO j = 1, nb_gr |
---|
451 | iof = kdlon*(j-1) |
---|
452 | DO i = 1, kdlon |
---|
453 | zfract(i) = fract(iof+i) |
---|
454 | ! zfract(i) = 1. !!!!!! essai MPL 19052010 |
---|
455 | zrmu0(i) = rmu0(iof+i) |
---|
456 | |
---|
457 | |
---|
458 | !albedo SB >>> |
---|
459 | ! |
---|
460 | IF (iflag_rrtm==0) THEN |
---|
461 | ! |
---|
462 | PALBD(i,1)=alb_dif(iof+i,1) |
---|
463 | PALBD(i,2)=alb_dif(iof+i,2) |
---|
464 | PALBP(i,1)=alb_dir(iof+i,1) |
---|
465 | PALBP(i,2)=alb_dir(iof+i,2) |
---|
466 | ! |
---|
467 | ELSEIF (iflag_rrtm==1) THEn |
---|
468 | ! |
---|
469 | DO kk=1,NSW |
---|
470 | PALBD_NEW(i,kk)=alb_dif(iof+i,kk) |
---|
471 | PALBP_NEW(i,kk)=alb_dir(iof+i,kk) |
---|
472 | ENDDO |
---|
473 | ! |
---|
474 | ENDIF |
---|
475 | !albedo SB <<< |
---|
476 | |
---|
477 | |
---|
478 | PEMIS(i) = 1.0 !!!!! A REVOIR (MPL) |
---|
479 | PVIEW(i) = 1.66 |
---|
480 | PPSOL(i) = paprs(iof+i,1) |
---|
481 | zx_alpha1 = (paprs(iof+i,1)-pplay(iof+i,2))/(pplay(iof+i,1)-pplay(iof+i,2)) |
---|
482 | zx_alpha2 = 1.0 - zx_alpha1 |
---|
483 | PTL(i,1) = t(iof+i,1) * zx_alpha1 + t(iof+i,2) * zx_alpha2 |
---|
484 | PTL(i,KLEV+1) = t(iof+i,KLEV) |
---|
485 | PDT0(i) = tsol(iof+i) - PTL(i,1) |
---|
486 | ENDDO |
---|
487 | DO k = 2, kflev |
---|
488 | DO i = 1, kdlon |
---|
489 | PTL(i,k) = (t(iof+i,k)+t(iof+i,k-1))*0.5 |
---|
490 | ENDDO |
---|
491 | ENDDO |
---|
492 | DO k = 1, kflev |
---|
493 | DO i = 1, kdlon |
---|
494 | PDP(i,k) = paprs(iof+i,k)-paprs(iof+i,k+1) |
---|
495 | PTAVE(i,k) = t(iof+i,k) |
---|
496 | PWV(i,k) = MAX (q(iof+i,k), 1.0e-12) |
---|
497 | PQS(i,k) = PWV(i,k) |
---|
498 | ! Confert from column density of ozone in a cell, in kDU, to a mass fraction |
---|
499 | POZON(i,k, :) = wo(iof+i, k, :) * RG * dobson_u * 1e3 & |
---|
500 | / (paprs(iof+i, k) - paprs(iof+i, k+1)) |
---|
501 | ! A activer pour CCMVAL on prend l'ozone impose (MPL 07042010) |
---|
502 | ! POZON(i,k,:) = wo(i,k,:) |
---|
503 | ! print *,'RADLWSW: POZON',k, POZON(i,k,1) |
---|
504 | PCLDLD(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
505 | PCLDLU(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
506 | PCLDSW(i,k) = cldfra(iof+i,k) |
---|
507 | PTAU(i,1,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
508 | PTAU(i,2,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
509 | POMEGA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAU(i,1,k)) |
---|
510 | POMEGA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAU(i,2,k)) |
---|
511 | PCG(i,1,k) = 0.865 |
---|
512 | PCG(i,2,k) = 0.910 |
---|
513 | !- |
---|
514 | ! Introduced for aerosol indirect forcings. |
---|
515 | ! The following values use the cloud optical thickness calculated from |
---|
516 | ! present-day aerosol concentrations whereas the quantities without the |
---|
517 | ! "A" at the end are for pre-industial (natural-only) aerosol concentrations |
---|
518 | ! |
---|
519 | PTAUA(i,1,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
520 | PTAUA(i,2,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
521 | POMEGAA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAUA(i,1,k)) |
---|
522 | POMEGAA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAUA(i,2,k)) |
---|
523 | ENDDO |
---|
524 | ENDDO |
---|
525 | |
---|
526 | IF (type_trac == 'repr') THEN |
---|
527 | #ifdef REPROBUS |
---|
528 | ndimozon = size(wo, 3) |
---|
529 | CALL RAD_INTERACTIF(POZON,iof) |
---|
530 | #endif |
---|
531 | END IF |
---|
532 | |
---|
533 | ! |
---|
534 | DO k = 1, kflev+1 |
---|
535 | DO i = 1, kdlon |
---|
536 | PPMB(i,k) = paprs(iof+i,k)/100.0 |
---|
537 | ENDDO |
---|
538 | ENDDO |
---|
539 | ! |
---|
540 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
541 | DO kk = 1, 6 |
---|
542 | DO k = 1, kflev |
---|
543 | DO i = 1, kdlon |
---|
544 | PAER(i,k,kk) = 1.0E-15 !!!!! A REVOIR (MPL) |
---|
545 | ENDDO |
---|
546 | ENDDO |
---|
547 | ENDDO |
---|
548 | DO k = 1, kflev |
---|
549 | DO i = 1, kdlon |
---|
550 | tauaero(i,k,:,1)=tau_aero(iof+i,k,:,1) |
---|
551 | pizaero(i,k,:,1)=piz_aero(iof+i,k,:,1) |
---|
552 | cgaero(i,k,:,1) =cg_aero(iof+i,k,:,1) |
---|
553 | tauaero(i,k,:,2)=tau_aero(iof+i,k,:,2) |
---|
554 | pizaero(i,k,:,2)=piz_aero(iof+i,k,:,2) |
---|
555 | cgaero(i,k,:,2) =cg_aero(iof+i,k,:,2) |
---|
556 | ENDDO |
---|
557 | ENDDO |
---|
558 | |
---|
559 | ! |
---|
560 | !===== iflag_rrtm ================================================ |
---|
561 | ! |
---|
562 | IF (iflag_rrtm == 0) THEN !!!! remettre 0 juste pour tester l'ancien rayt via rrtm |
---|
563 | !--- Mise a zero des tableaux output du rayonnement LW-AR4 ---------- |
---|
564 | DO k = 1, kflev+1 |
---|
565 | DO i = 1, kdlon |
---|
566 | ! print *,'RADLWSW: boucle mise a zero i k',i,k |
---|
567 | ZFLUP(i,k)=0. |
---|
568 | ZFLDN(i,k)=0. |
---|
569 | ZFLUP0(i,k)=0. |
---|
570 | ZFLDN0(i,k)=0. |
---|
571 | ZLWFT0_i(i,k)=0. |
---|
572 | ZFLUCUP_i(i,k)=0. |
---|
573 | ZFLUCDWN_i(i,k)=0. |
---|
574 | ENDDO |
---|
575 | ENDDO |
---|
576 | DO k = 1, kflev |
---|
577 | DO i = 1, kdlon |
---|
578 | zcool(i,k)=0. |
---|
579 | zcool_volc(i,k)=0. !NL |
---|
580 | zcool0(i,k)=0. |
---|
581 | ENDDO |
---|
582 | ENDDO |
---|
583 | DO i = 1, kdlon |
---|
584 | ztoplw(i)=0. |
---|
585 | zsollw(i)=0. |
---|
586 | ztoplw0(i)=0. |
---|
587 | zsollw0(i)=0. |
---|
588 | zsollwdown(i)=0. |
---|
589 | ENDDO |
---|
590 | ! Old radiation scheme, used for AR4 runs |
---|
591 | ! average day-night ozone for longwave |
---|
592 | CALL LW_LMDAR4(& |
---|
593 | PPMB, PDP,& |
---|
594 | PPSOL,PDT0,PEMIS,& |
---|
595 | PTL, PTAVE, PWV, POZON(:, :, 1), PAER,& |
---|
596 | PCLDLD,PCLDLU,& |
---|
597 | PVIEW,& |
---|
598 | zcool, zcool0,& |
---|
599 | ztoplw,zsollw,ztoplw0,zsollw0,& |
---|
600 | zsollwdown,& |
---|
601 | ZFLUP, ZFLDN, ZFLUP0,ZFLDN0) |
---|
602 | !----- Mise a zero des tableaux output du rayonnement SW-AR4 |
---|
603 | DO k = 1, kflev+1 |
---|
604 | DO i = 1, kdlon |
---|
605 | ZFSUP(i,k)=0. |
---|
606 | ZFSDN(i,k)=0. |
---|
607 | ZFSUP0(i,k)=0. |
---|
608 | ZFSDN0(i,k)=0. |
---|
609 | ZFSUPC0(i,k)=0. |
---|
610 | ZFSDNC0(i,k)=0. |
---|
611 | ZFLUPC0(i,k)=0. |
---|
612 | ZFLDNC0(i,k)=0. |
---|
613 | ZSWFT0_i(i,k)=0. |
---|
614 | ZFCUP_i(i,k)=0. |
---|
615 | ZFCDWN_i(i,k)=0. |
---|
616 | ZFCCUP_i(i,k)=0. |
---|
617 | ZFCCDWN_i(i,k)=0. |
---|
618 | ZFLCCUP_i(i,k)=0. |
---|
619 | ZFLCCDWN_i(i,k)=0. |
---|
620 | zswadaero(i,k)=0. !--NL |
---|
621 | ENDDO |
---|
622 | ENDDO |
---|
623 | DO k = 1, kflev |
---|
624 | DO i = 1, kdlon |
---|
625 | zheat(i,k)=0. |
---|
626 | zheat_volc(i,k)=0. |
---|
627 | zheat0(i,k)=0. |
---|
628 | ENDDO |
---|
629 | ENDDO |
---|
630 | DO i = 1, kdlon |
---|
631 | zalbpla(i)=0. |
---|
632 | ztopsw(i)=0. |
---|
633 | zsolsw(i)=0. |
---|
634 | ztopsw0(i)=0. |
---|
635 | zsolsw0(i)=0. |
---|
636 | ztopswadaero(i)=0. |
---|
637 | zsolswadaero(i)=0. |
---|
638 | ztopswaiaero(i)=0. |
---|
639 | zsolswaiaero(i)=0. |
---|
640 | ENDDO |
---|
641 | ! print *,'Avant SW_LMDAR4: PSCT zrmu0 zfract',PSCT, zrmu0, zfract |
---|
642 | ! daylight ozone, if we have it, for short wave |
---|
643 | IF (.NOT. new_aod) THEN |
---|
644 | ! use old version |
---|
645 | CALL SW_LMDAR4(PSCT, zrmu0, zfract,& |
---|
646 | PPMB, PDP, & |
---|
647 | PPSOL, PALBD, PALBP,& |
---|
648 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
649 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
650 | zheat, zheat0,& |
---|
651 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
652 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
653 | tauaero(:,:,5,:), pizaero(:,:,5,:), cgaero(:,:,5,:),& |
---|
654 | PTAUA, POMEGAA,& |
---|
655 | ztopswadaero,zsolswadaero,& |
---|
656 | ztopswaiaero,zsolswaiaero,& |
---|
657 | ok_ade, ok_aie) |
---|
658 | |
---|
659 | ELSE ! new_aod=T |
---|
660 | CALL SW_AEROAR4(PSCT, zrmu0, zfract,& |
---|
661 | PPMB, PDP,& |
---|
662 | PPSOL, PALBD, PALBP,& |
---|
663 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
664 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
665 | zheat, zheat0,& |
---|
666 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
667 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
668 | tauaero, pizaero, cgaero, & |
---|
669 | PTAUA, POMEGAA,& |
---|
670 | ztopswadaero,zsolswadaero,& |
---|
671 | ztopswad0aero,zsolswad0aero,& |
---|
672 | ztopswaiaero,zsolswaiaero, & |
---|
673 | ztopsw_aero,ztopsw0_aero,& |
---|
674 | zsolsw_aero,zsolsw0_aero,& |
---|
675 | ztopswcf_aero,zsolswcf_aero, & |
---|
676 | ok_ade, ok_aie, flag_aerosol,flag_aerosol_strat) |
---|
677 | ENDIF |
---|
678 | |
---|
679 | ZSWFT0_i(:,:) = ZFSDN0(:,:)-ZFSUP0(:,:) |
---|
680 | ZLWFT0_i(:,:) =-ZFLDN0(:,:)-ZFLUP0(:,:) |
---|
681 | |
---|
682 | DO i=1,kdlon |
---|
683 | DO k=1,kflev+1 |
---|
684 | ! print *,'iof i k klon klev=',iof,i,k,klon,klev |
---|
685 | lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) |
---|
686 | lwdn ( iof+i,k) = ZFLDN ( i,k) |
---|
687 | lwup0 ( iof+i,k) = ZFLUP0 ( i,k) |
---|
688 | lwup ( iof+i,k) = ZFLUP ( i,k) |
---|
689 | swdn0 ( iof+i,k) = ZFSDN0 ( i,k) |
---|
690 | swdn ( iof+i,k) = ZFSDN ( i,k) |
---|
691 | swup0 ( iof+i,k) = ZFSUP0 ( i,k) |
---|
692 | swup ( iof+i,k) = ZFSUP ( i,k) |
---|
693 | ENDDO |
---|
694 | ENDDO |
---|
695 | ! print*,'SW_AR4 ZFSDN0 1 , klev:',ZFSDN0(1:klon,1),ZFSDN0(1:klon,klev) |
---|
696 | ! print*,'SW_AR4 swdn0 1 , klev:',swdn0(1:klon,1),swdn0(1:klon,klev) |
---|
697 | ! print*,'SW_AR4 ZFSUP0 1 , klev:',ZFSUP0(1:klon,1),ZFSUP0(1:klon,klev) |
---|
698 | ! print*,'SW_AR4 swup0 1 , klev:',swup0(1:klon,1),swup0(1:klon,klev) |
---|
699 | ! print*,'SW_AR4 ZFSDN 1 , klev:',ZFSDN(1:klon,1) ,ZFSDN(1:klon,klev) |
---|
700 | ! print*,'SW_AR4 ZFSUP 1 , klev:',ZFSUP(1:klon,1) ,ZFSUP(1:klon,klev) |
---|
701 | ELSE |
---|
702 | #ifdef CPP_RRTM |
---|
703 | ! if (prt_level.gt.10)write(lunout,*)'CPP_RRTM=.T.' |
---|
704 | !===== iflag_rrtm=1, on passe dans SW via RECMWFL =============== |
---|
705 | |
---|
706 | DO k = 1, kflev+1 |
---|
707 | DO i = 1, kdlon |
---|
708 | ZEMTD_i(i,k)=0. |
---|
709 | ZEMTU_i(i,k)=0. |
---|
710 | ZTRSO_i(i,k)=0. |
---|
711 | ZTH_i(i,k)=0. |
---|
712 | ZLWFT_i(i,k)=0. |
---|
713 | ZSWFT_i(i,k)=0. |
---|
714 | ZFLUX_i(i,1,k)=0. |
---|
715 | ZFLUX_i(i,2,k)=0. |
---|
716 | ZFLUC_i(i,1,k)=0. |
---|
717 | ZFLUC_i(i,2,k)=0. |
---|
718 | ZFSDWN_i(i,k)=0. |
---|
719 | ZFCDWN_i(i,k)=0. |
---|
720 | ZFCCDWN_i(i,k)=0. |
---|
721 | ZFSUP_i(i,k)=0. |
---|
722 | ZFCUP_i(i,k)=0. |
---|
723 | ZFCCUP_i(i,k)=0. |
---|
724 | ZFLCCDWN_i(i,k)=0. |
---|
725 | ZFLCCUP_i(i,k)=0. |
---|
726 | ENDDO |
---|
727 | ENDDO |
---|
728 | ! |
---|
729 | !--OB |
---|
730 | !--aerosol TOT - anthropogenic+natural - index 2 |
---|
731 | !--aerosol NAT - natural only - index 1 |
---|
732 | ! |
---|
733 | DO i = 1, kdlon |
---|
734 | DO k = 1, kflev |
---|
735 | DO kk=1, NSW |
---|
736 | ! |
---|
737 | PTAU_TOT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,2,kk) |
---|
738 | PPIZA_TOT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,2,kk) |
---|
739 | PCGA_TOT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,2,kk) |
---|
740 | ! |
---|
741 | PTAU_NAT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,1,kk) |
---|
742 | PPIZA_NAT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,1,kk) |
---|
743 | PCGA_NAT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,1,kk) |
---|
744 | ! |
---|
745 | ENDDO |
---|
746 | ENDDO |
---|
747 | ENDDO |
---|
748 | !-end OB |
---|
749 | ! |
---|
750 | !--C. Kleinschmitt |
---|
751 | !--aerosol TOT - anthropogenic+natural - index 2 |
---|
752 | !--aerosol NAT - natural only - index 1 |
---|
753 | ! |
---|
754 | DO i = 1, kdlon |
---|
755 | DO k = 1, kflev |
---|
756 | DO kk=1, NLW |
---|
757 | ! |
---|
758 | PTAU_LW_TOT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,2,kk) |
---|
759 | PTAU_LW_NAT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,1,kk) |
---|
760 | ! |
---|
761 | ENDDO |
---|
762 | ENDDO |
---|
763 | ENDDO |
---|
764 | !-end C. Kleinschmitt |
---|
765 | ! |
---|
766 | DO i = 1, kdlon |
---|
767 | ZCTRSO(i,1)=0. |
---|
768 | ZCTRSO(i,2)=0. |
---|
769 | ZCEMTR(i,1)=0. |
---|
770 | ZCEMTR(i,2)=0. |
---|
771 | ZTRSOD(i)=0. |
---|
772 | ZLWFC(i,1)=0. |
---|
773 | ZLWFC(i,2)=0. |
---|
774 | ZSWFC(i,1)=0. |
---|
775 | ZSWFC(i,2)=0. |
---|
776 | PFSDNN(i)=0. |
---|
777 | PFSDNV(i)=0. |
---|
778 | DO kk = 1, NSW |
---|
779 | PSFSWDIR(i,kk)=0. |
---|
780 | PSFSWDIF(i,kk)=0. |
---|
781 | ENDDO |
---|
782 | ENDDO |
---|
783 | !----- Fin des mises a zero des tableaux output de RECMWF ------------------- |
---|
784 | ! GEMU(1:klon)=sin(rlatd(1:klon)) |
---|
785 | ! On met les donnees dans l'ordre des niveaux arpege |
---|
786 | paprs_i(:,1)=paprs(:,klev+1) |
---|
787 | do k=1,klev |
---|
788 | paprs_i(1:klon,k+1) =paprs(1:klon,klev+1-k) |
---|
789 | pplay_i(1:klon,k) =pplay(1:klon,klev+1-k) |
---|
790 | cldfra_i(1:klon,k) =cldfra(1:klon,klev+1-k) |
---|
791 | PDP_i(1:klon,k) =PDP(1:klon,klev+1-k) |
---|
792 | t_i(1:klon,k) =t(1:klon,klev+1-k) |
---|
793 | q_i(1:klon,k) =q(1:klon,klev+1-k) |
---|
794 | qsat_i(1:klon,k) =qsat(1:klon,klev+1-k) |
---|
795 | flwc_i(1:klon,k) =flwc(1:klon,klev+1-k) |
---|
796 | fiwc_i(1:klon,k) =fiwc(1:klon,klev+1-k) |
---|
797 | ref_liq_i(1:klon,k) =ref_liq(1:klon,klev+1-k) |
---|
798 | ref_ice_i(1:klon,k) =ref_ice(1:klon,klev+1-k) |
---|
799 | !-OB |
---|
800 | ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k) |
---|
801 | ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k) |
---|
802 | enddo |
---|
803 | do k=1,kflev |
---|
804 | POZON_i(1:klon,k,:)=POZON(1:klon,kflev+1-k,:) |
---|
805 | !!! POZON_i(1:klon,k)=POZON(1:klon,k) !!! on laisse 1=sol et klev=top |
---|
806 | ! print *,'Juste avant RECMWFL: k tsol temp',k,tsol,t(1,k) |
---|
807 | !!!!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
808 | do i=1,6 |
---|
809 | PAER_i(1:klon,k,i)=PAER(1:klon,kflev+1-k,i) |
---|
810 | enddo |
---|
811 | enddo |
---|
812 | ! print *,'RADLWSW: avant RECMWFL, RI0,rmu0=',solaire,rmu0 |
---|
813 | |
---|
814 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
815 | ! La version ARPEGE1D utilise differentes valeurs de la constante |
---|
816 | ! solaire suivant le rayonnement utilise. |
---|
817 | ! A controler ... |
---|
818 | ! SOLAR FLUX AT THE TOP (/YOMPHY3/) |
---|
819 | ! introduce season correction |
---|
820 | !-------------------------------------- |
---|
821 | ! RII0 = RIP0 |
---|
822 | ! IF(LRAYFM) |
---|
823 | ! RII0 = RIP0M ! =rip0m if Morcrette non-each time step call. |
---|
824 | ! IF(LRAYFM15) |
---|
825 | ! RII0 = RIP0M15 ! =rip0m if Morcrette non-each time step call. |
---|
826 | RII0=solaire/zdist/zdist |
---|
827 | !print*,'+++ radlwsw: solaire ,RII0',solaire,RII0 |
---|
828 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
829 | ! Ancien appel a RECMWF (celui du cy25) |
---|
830 | ! CALL RECMWF (ist , iend, klon , ktdia , klev , kmode , |
---|
831 | ! s PALBD , PALBP , paprs_i , pplay_i , RCO2 , cldfra_i, |
---|
832 | ! s POZON_i , PAER_i , PDP_i , PEMIS , GEMU , rmu0, |
---|
833 | ! s q_i , qsat_i , fiwc_i , flwc_i , zmasq , t_i ,tsol, |
---|
834 | ! s ZEMTD_i , ZEMTU_i , ZTRSO_i , |
---|
835 | ! s ZTH_i , ZCTRSO , ZCEMTR , ZTRSOD , |
---|
836 | ! s ZLWFC , ZLWFT_i , ZSWFC , ZSWFT_i , |
---|
837 | ! s ZFLUX_i , ZFLUC_i , ZFSDWN_i, ZFSUP_i , ZFCDWN_i,ZFCUP_i) |
---|
838 | ! s 'RECMWF ') |
---|
839 | ! |
---|
840 | if(lldebug) then |
---|
841 | CALL writefield_phy('paprs_i',paprs_i,klev+1) |
---|
842 | CALL writefield_phy('pplay_i',pplay_i,klev) |
---|
843 | CALL writefield_phy('cldfra_i',cldfra_i,klev) |
---|
844 | CALL writefield_phy('pozon_i',POZON_i,klev) |
---|
845 | CALL writefield_phy('paer_i',PAER_i,klev) |
---|
846 | CALL writefield_phy('pdp_i',PDP_i,klev) |
---|
847 | CALL writefield_phy('q_i',q_i,klev) |
---|
848 | CALL writefield_phy('qsat_i',qsat_i,klev) |
---|
849 | CALL writefield_phy('fiwc_i',fiwc_i,klev) |
---|
850 | CALL writefield_phy('flwc_i',flwc_i,klev) |
---|
851 | CALL writefield_phy('t_i',t_i,klev) |
---|
852 | CALL writefield_phy('palbd_new',PALBD_NEW,NSW) |
---|
853 | CALL writefield_phy('palbp_new',PALBP_NEW,NSW) |
---|
854 | endif |
---|
855 | |
---|
856 | ! Nouvel appel a RECMWF (celui du cy32t0) |
---|
857 | CALL RECMWF_AERO (ist , iend, klon , ktdia , klev , kmode ,& |
---|
858 | PALBD_NEW,PALBP_NEW, paprs_i , pplay_i , RCO2 , cldfra_i,& |
---|
859 | POZON_i , PAER_i , PDP_i , PEMIS , rmu0 ,& |
---|
860 | q_i , qsat_i , fiwc_i , flwc_i , zmasq , t_i ,tsol,& |
---|
861 | ref_liq_i, ref_ice_i, & |
---|
862 | ref_liq_pi_i, ref_ice_pi_i, & ! rajoute par OB pour diagnostiquer effet indirect |
---|
863 | ZEMTD_i , ZEMTU_i , ZTRSO_i ,& |
---|
864 | ZTH_i , ZCTRSO , ZCEMTR , ZTRSOD ,& |
---|
865 | ZLWFC , ZLWFT_i , ZSWFC , ZSWFT_i ,& |
---|
866 | PSFSWDIR , PSFSWDIF, PFSDNN , PFSDNV ,& |
---|
867 | PPIZA_TOT, PCGA_TOT,PTAU_TOT,& |
---|
868 | PPIZA_NAT, PCGA_NAT,PTAU_NAT, & ! rajoute par OB pour diagnostiquer effet direct |
---|
869 | PTAU_LW_TOT, PTAU_LW_NAT, & ! rajoute par C. Kleinschmitt |
---|
870 | ZFLUX_i , ZFLUC_i ,& |
---|
871 | ZFSDWN_i , ZFSUP_i , ZFCDWN_i, ZFCUP_i, ZFCCDWN_i, ZFCCUP_i, ZFLCCDWN_i, ZFLCCUP_i, & |
---|
872 | ZTOPSWADAERO,ZSOLSWADAERO,& ! rajoute par OB pour diagnostics |
---|
873 | ZTOPSWAD0AERO,ZSOLSWAD0AERO,& |
---|
874 | ZTOPSWAIAERO,ZSOLSWAIAERO, & |
---|
875 | ZTOPSWCF_AERO,ZSOLSWCF_AERO, & |
---|
876 | ZSWADAERO, & !--NL |
---|
877 | ZTOPLWADAERO,ZSOLLWADAERO,& ! rajoute par C. Kleinscmitt pour LW diagnostics |
---|
878 | ZTOPLWAD0AERO,ZSOLLWAD0AERO,& |
---|
879 | ZTOPLWAIAERO,ZSOLLWAIAERO, & |
---|
880 | ZLWADAERO, & !--NL |
---|
881 | volmip_solsw, flag_volc_surfstrat, & !--VOLMIP |
---|
882 | ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat, & |
---|
883 | flag_aer_feedback) ! flags aerosols |
---|
884 | |
---|
885 | ! print *,'RADLWSW: apres RECMWF' |
---|
886 | if(lldebug) then |
---|
887 | CALL writefield_phy('zemtd_i',ZEMTD_i,klev+1) |
---|
888 | CALL writefield_phy('zemtu_i',ZEMTU_i,klev+1) |
---|
889 | CALL writefield_phy('ztrso_i',ZTRSO_i,klev+1) |
---|
890 | CALL writefield_phy('zth_i',ZTH_i,klev+1) |
---|
891 | CALL writefield_phy('zctrso',ZCTRSO,2) |
---|
892 | CALL writefield_phy('zcemtr',ZCEMTR,2) |
---|
893 | CALL writefield_phy('ztrsod',ZTRSOD,1) |
---|
894 | CALL writefield_phy('zlwfc',ZLWFC,2) |
---|
895 | CALL writefield_phy('zlwft_i',ZLWFT_i,klev+1) |
---|
896 | CALL writefield_phy('zswfc',ZSWFC,2) |
---|
897 | CALL writefield_phy('zswft_i',ZSWFT_i,klev+1) |
---|
898 | CALL writefield_phy('psfswdir',PSFSWDIR,6) |
---|
899 | CALL writefield_phy('psfswdif',PSFSWDIF,6) |
---|
900 | CALL writefield_phy('pfsdnn',PFSDNN,1) |
---|
901 | CALL writefield_phy('pfsdnv',PFSDNV,1) |
---|
902 | CALL writefield_phy('ppiza_dst',PPIZA_TOT,klev) |
---|
903 | CALL writefield_phy('pcga_dst',PCGA_TOT,klev) |
---|
904 | CALL writefield_phy('ptaurel_dst',PTAU_TOT,klev) |
---|
905 | CALL writefield_phy('zflux_i',ZFLUX_i,klev+1) |
---|
906 | CALL writefield_phy('zfluc_i',ZFLUC_i,klev+1) |
---|
907 | CALL writefield_phy('zfsdwn_i',ZFSDWN_i,klev+1) |
---|
908 | CALL writefield_phy('zfsup_i',ZFSUP_i,klev+1) |
---|
909 | CALL writefield_phy('zfcdwn_i',ZFCDWN_i,klev+1) |
---|
910 | CALL writefield_phy('zfcup_i',ZFCUP_i,klev+1) |
---|
911 | endif |
---|
912 | ! --------- output RECMWFL |
---|
913 | ! ZEMTD (KPROMA,KLEV+1) ; TOTAL DOWNWARD LONGWAVE EMISSIVITY |
---|
914 | ! ZEMTU (KPROMA,KLEV+1) ; TOTAL UPWARD LONGWAVE EMISSIVITY |
---|
915 | ! ZTRSO (KPROMA,KLEV+1) ; TOTAL SHORTWAVE TRANSMISSIVITY |
---|
916 | ! ZTH (KPROMA,KLEV+1) ; HALF LEVEL TEMPERATURE |
---|
917 | ! ZCTRSO (KPROMA,2) ; CLEAR-SKY SHORTWAVE TRANSMISSIVITY |
---|
918 | ! ZCEMTR (KPROMA,2) ; CLEAR-SKY NET LONGWAVE EMISSIVITY |
---|
919 | ! ZTRSOD (KPROMA) ; TOTAL-SKY SURFACE SW TRANSMISSITY |
---|
920 | ! ZLWFC (KPROMA,2) ; CLEAR-SKY LONGWAVE FLUXES |
---|
921 | ! ZLWFT (KPROMA,KLEV+1) ; TOTAL-SKY LONGWAVE FLUXES |
---|
922 | ! ZSWFC (KPROMA,2) ; CLEAR-SKY SHORTWAVE FLUXES |
---|
923 | ! ZSWFT (KPROMA,KLEV+1) ; TOTAL-SKY SHORTWAVE FLUXES |
---|
924 | ! PPIZA_TOT (KPROMA,KLEV,NSW); Single scattering albedo of total aerosols |
---|
925 | ! PCGA_TOT (KPROMA,KLEV,NSW); Assymetry factor for total aerosols |
---|
926 | ! PTAU_TOT (KPROMA,KLEV,NSW); Optical depth of total aerosols |
---|
927 | ! PPIZA_NAT (KPROMA,KLEV,NSW); Single scattering albedo of natural aerosols |
---|
928 | ! PCGA_NAT (KPROMA,KLEV,NSW); Assymetry factor for natural aerosols |
---|
929 | ! PTAU_NAT (KPROMA,KLEV,NSW); Optical depth of natiral aerosols |
---|
930 | ! PTAU_LW_TOT (KPROMA,KLEV,NLW); LW Optical depth of total aerosols |
---|
931 | ! PTAU_LW_NAT (KPROMA,KLEV,NLW); LW Optical depth of natural aerosols |
---|
932 | ! PSFSWDIR (KPROMA,NSW) ; |
---|
933 | ! PSFSWDIF (KPROMA,NSW) ; |
---|
934 | ! PFSDNN (KPROMA) ; |
---|
935 | ! PFSDNV (KPROMA) ; |
---|
936 | ! --------- |
---|
937 | ! --------- |
---|
938 | ! On retablit l'ordre des niveaux lmd pour les tableaux de sortie |
---|
939 | ! D autre part, on multiplie les resultats SW par fract pour etre coherent |
---|
940 | ! avec l ancien rayonnement AR4. Si nuit, fract=0 donc pas de |
---|
941 | ! rayonnement SW. (MPL 260609) |
---|
942 | DO k=0,klev |
---|
943 | DO i=1,klon |
---|
944 | ZEMTD(i,k+1) = ZEMTD_i(i,k+1) |
---|
945 | ZEMTU(i,k+1) = ZEMTU_i(i,k+1) |
---|
946 | ZTRSO(i,k+1) = ZTRSO_i(i,k+1) |
---|
947 | ZTH(i,k+1) = ZTH_i(i,k+1) |
---|
948 | ! ZLWFT(i,k+1) = ZLWFT_i(i,klev+1-k) |
---|
949 | ! ZSWFT(i,k+1) = ZSWFT_i(i,klev+1-k) |
---|
950 | ZFLUP(i,k+1) = ZFLUX_i(i,1,k+1) |
---|
951 | ZFLDN(i,k+1) = ZFLUX_i(i,2,k+1) |
---|
952 | ZFLUP0(i,k+1) = ZFLUC_i(i,1,k+1) |
---|
953 | ZFLDN0(i,k+1) = ZFLUC_i(i,2,k+1) |
---|
954 | ZFSDN(i,k+1) = ZFSDWN_i(i,k+1)*fract(i) |
---|
955 | ZFSDN0(i,k+1) = ZFCDWN_i(i,k+1)*fract(i) |
---|
956 | ZFSDNC0(i,k+1)= ZFCCDWN_i(i,k+1)*fract(i) |
---|
957 | ZFSUP (i,k+1) = ZFSUP_i(i,k+1)*fract(i) |
---|
958 | ZFSUP0(i,k+1) = ZFCUP_i(i,k+1)*fract(i) |
---|
959 | ZFSUPC0(i,k+1)= ZFCCUP_i(i,k+1)*fract(i) |
---|
960 | ZFLDNC0(i,k+1)= ZFLCCDWN_i(i,k+1) |
---|
961 | ZFLUPC0(i,k+1)= ZFLCCUP_i(i,k+1) |
---|
962 | IF(ok_volcan) THEN |
---|
963 | ZSWADAERO(i,k+1)=ZSWADAERO(i,k+1)*fract(i) !--NL |
---|
964 | ENDIF |
---|
965 | |
---|
966 | ! Nouveau calcul car visiblement ZSWFT et ZSWFC sont nuls dans RRTM cy32 |
---|
967 | ! en sortie de radlsw.F90 - MPL 7.01.09 |
---|
968 | ZSWFT(i,k+1) = (ZFSDWN_i(i,k+1)-ZFSUP_i(i,k+1))*fract(i) |
---|
969 | ZSWFT0_i(i,k+1) = (ZFCDWN_i(i,k+1)-ZFCUP_i(i,k+1))*fract(i) |
---|
970 | ! WRITE(*,'("FSDN FSUP FCDN FCUP: ",4E12.5)') ZFSDWN_i(i,k+1),& |
---|
971 | ! ZFSUP_i(i,k+1),ZFCDWN_i(i,k+1),ZFCUP_i(i,k+1) |
---|
972 | ZLWFT(i,k+1) =-ZFLUX_i(i,2,k+1)-ZFLUX_i(i,1,k+1) |
---|
973 | ZLWFT0_i(i,k+1)=-ZFLUC_i(i,2,k+1)-ZFLUC_i(i,1,k+1) |
---|
974 | ! print *,'FLUX2 FLUX1 FLUC2 FLUC1',ZFLUX_i(i,2,k+1),& |
---|
975 | ! & ZFLUX_i(i,1,k+1),ZFLUC_i(i,2,k+1),ZFLUC_i(i,1,k+1) |
---|
976 | ENDDO |
---|
977 | ENDDO |
---|
978 | |
---|
979 | !--ajout OB |
---|
980 | ZTOPSWADAERO(:) =ZTOPSWADAERO(:) *fract(:) |
---|
981 | ZSOLSWADAERO(:) =ZSOLSWADAERO(:) *fract(:) |
---|
982 | ZTOPSWAD0AERO(:)=ZTOPSWAD0AERO(:)*fract(:) |
---|
983 | ZSOLSWAD0AERO(:)=ZSOLSWAD0AERO(:)*fract(:) |
---|
984 | ZTOPSWAIAERO(:) =ZTOPSWAIAERO(:) *fract(:) |
---|
985 | ZSOLSWAIAERO(:) =ZSOLSWAIAERO(:) *fract(:) |
---|
986 | ZTOPSWCF_AERO(:,1)=ZTOPSWCF_AERO(:,1)*fract(:) |
---|
987 | ZTOPSWCF_AERO(:,2)=ZTOPSWCF_AERO(:,2)*fract(:) |
---|
988 | ZTOPSWCF_AERO(:,3)=ZTOPSWCF_AERO(:,3)*fract(:) |
---|
989 | ZSOLSWCF_AERO(:,1)=ZSOLSWCF_AERO(:,1)*fract(:) |
---|
990 | ZSOLSWCF_AERO(:,2)=ZSOLSWCF_AERO(:,2)*fract(:) |
---|
991 | ZSOLSWCF_AERO(:,3)=ZSOLSWCF_AERO(:,3)*fract(:) |
---|
992 | |
---|
993 | ! print*,'SW_RRTM ZFSDN0 1 , klev:',ZFSDN0(1:klon,1),ZFSDN0(1:klon,klev) |
---|
994 | ! print*,'SW_RRTM ZFSUP0 1 , klev:',ZFSUP0(1:klon,1),ZFSUP0(1:klon,klev) |
---|
995 | ! print*,'SW_RRTM ZFSDN 1 , klev:',ZFSDN(1:klon,1),ZFSDN(1:klon,klev) |
---|
996 | ! print*,'SW_RRTM ZFSUP 1 , klev:',ZFSUP(1:klon,1),ZFSUP(1:klon,klev) |
---|
997 | ! print*,'OK1' |
---|
998 | ! --------- |
---|
999 | ! --------- |
---|
1000 | ! On renseigne les champs LMDz, pour avoir la meme chose qu'en sortie de |
---|
1001 | ! LW_LMDAR4 et SW_LMDAR4 |
---|
1002 | DO i = 1, kdlon |
---|
1003 | zsolsw(i) = ZSWFT(i,1) |
---|
1004 | zsolsw0(i) = ZSWFT0_i(i,1) |
---|
1005 | ! zsolsw0(i) = ZFSDN0(i,1) -ZFSUP0(i,1) |
---|
1006 | ztopsw(i) = ZSWFT(i,klev+1) |
---|
1007 | ztopsw0(i) = ZSWFT0_i(i,klev+1) |
---|
1008 | ! ztopsw0(i) = ZFSDN0(i,klev+1)-ZFSUP0(i,klev+1) |
---|
1009 | ! |
---|
1010 | ! zsollw(i) = ZFLDN(i,1) -ZFLUP(i,1) |
---|
1011 | ! zsollw0(i) = ZFLDN0(i,1) -ZFLUP0(i,1) |
---|
1012 | ! ztoplw(i) = ZFLDN(i,klev+1) -ZFLUP(i,klev+1) |
---|
1013 | ! ztoplw0(i) = ZFLDN0(i,klev+1)-ZFLUP0(i,klev+1) |
---|
1014 | zsollw(i) = ZLWFT(i,1) |
---|
1015 | zsollw0(i) = ZLWFT0_i(i,1) |
---|
1016 | ztoplw(i) = ZLWFT(i,klev+1)*(-1) |
---|
1017 | ztoplw0(i) = ZLWFT0_i(i,klev+1)*(-1) |
---|
1018 | ! |
---|
1019 | IF (fract(i) == 0.) THEN |
---|
1020 | !!!!! A REVOIR MPL (20090630) ca n a pas de sens quand fract=0 |
---|
1021 | ! pas plus que dans le sw_AR4 |
---|
1022 | zalbpla(i) = 1.0e+39 |
---|
1023 | ELSE |
---|
1024 | zalbpla(i) = ZFSUP(i,klev+1)/ZFSDN(i,klev+1) |
---|
1025 | ENDIF |
---|
1026 | !!! 5 juin 2015 |
---|
1027 | !!! Correction MP bug RRTM |
---|
1028 | zsollwdown(i)= -1.*ZFLDN(i,1) |
---|
1029 | ENDDO |
---|
1030 | ! print*,'OK2' |
---|
1031 | |
---|
1032 | !!--add VOLMIP (surf cool or strat heat activate) |
---|
1033 | IF (flag_volc_surfstrat > 0) THEN |
---|
1034 | DO i = 1, kdlon |
---|
1035 | zsolsw(i) = volmip_solsw(i)*fract(i) |
---|
1036 | ENDDO |
---|
1037 | ENDIF |
---|
1038 | |
---|
1039 | ! extrait de SW_AR4 |
---|
1040 | ! DO k = 1, KFLEV |
---|
1041 | ! kpl1 = k+1 |
---|
1042 | ! DO i = 1, KDLON |
---|
1043 | ! PHEAT(i,k) = -(ZFSUP(i,kpl1)-ZFSUP(i,k)) -(ZFSDN(i,k)-ZFSDN(i,kpl1)) |
---|
1044 | ! PHEAT(i,k) = PHEAT(i,k) * RDAY*RG/RCPD / PDP(i,k) |
---|
1045 | ! ZLWFT(klon,k),ZSWFT |
---|
1046 | |
---|
1047 | do k=1,kflev |
---|
1048 | do i=1,kdlon |
---|
1049 | zheat(i,k)=(ZSWFT(i,k+1)-ZSWFT(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
1050 | zheat0(i,k)=(ZSWFT0_i(i,k+1)-ZSWFT0_i(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
1051 | zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
1052 | zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
1053 | IF(ok_volcan) THEN |
---|
1054 | zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL |
---|
1055 | zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL |
---|
1056 | ENDIF |
---|
1057 | ! print *,'heat cool heat0 cool0 ',zheat(i,k),zcool(i,k),zheat0(i,k),zcool0(i,k) |
---|
1058 | ! ZFLUCUP_i(i,k)=ZFLUC_i(i,1,k) |
---|
1059 | ! ZFLUCDWN_i(i,k)=ZFLUC_i(i,2,k) |
---|
1060 | enddo |
---|
1061 | enddo |
---|
1062 | #else |
---|
1063 | abort_message="You should compile with -rrtm if running with iflag_rrtm=1" |
---|
1064 | call abort_physic(modname, abort_message, 1) |
---|
1065 | #endif |
---|
1066 | ENDIF ! iflag_rrtm |
---|
1067 | !====================================================================== |
---|
1068 | |
---|
1069 | DO i = 1, kdlon |
---|
1070 | topsw(iof+i) = ztopsw(i) |
---|
1071 | toplw(iof+i) = ztoplw(i) |
---|
1072 | solsw(iof+i) = zsolsw(i) |
---|
1073 | sollw(iof+i) = zsollw(i) |
---|
1074 | sollwdown(iof+i) = zsollwdown(i) |
---|
1075 | DO k = 1, kflev+1 |
---|
1076 | lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) |
---|
1077 | lwdn ( iof+i,k) = ZFLDN ( i,k) |
---|
1078 | lwup0 ( iof+i,k) = ZFLUP0 ( i,k) |
---|
1079 | lwup ( iof+i,k) = ZFLUP ( i,k) |
---|
1080 | ENDDO |
---|
1081 | topsw0(iof+i) = ztopsw0(i) |
---|
1082 | toplw0(iof+i) = ztoplw0(i) |
---|
1083 | solsw0(iof+i) = zsolsw0(i) |
---|
1084 | sollw0(iof+i) = zsollw0(i) |
---|
1085 | albpla(iof+i) = zalbpla(i) |
---|
1086 | |
---|
1087 | DO k = 1, kflev+1 |
---|
1088 | swdnc0( iof+i,k) = ZFSDNC0( i,k) |
---|
1089 | swdn0 ( iof+i,k) = ZFSDN0 ( i,k) |
---|
1090 | swdn ( iof+i,k) = ZFSDN ( i,k) |
---|
1091 | swupc0( iof+i,k) = ZFSUPC0( i,k) |
---|
1092 | swup0 ( iof+i,k) = ZFSUP0 ( i,k) |
---|
1093 | swup ( iof+i,k) = ZFSUP ( i,k) |
---|
1094 | lwdnc0( iof+i,k) = ZFLDNC0( i,k) |
---|
1095 | lwupc0( iof+i,k) = ZFLUPC0( i,k) |
---|
1096 | ENDDO |
---|
1097 | ENDDO |
---|
1098 | !-transform the aerosol forcings, if they have |
---|
1099 | ! to be calculated |
---|
1100 | IF (ok_ade) THEN |
---|
1101 | DO i = 1, kdlon |
---|
1102 | topswad_aero(iof+i) = ztopswadaero(i) |
---|
1103 | topswad0_aero(iof+i) = ztopswad0aero(i) |
---|
1104 | solswad_aero(iof+i) = zsolswadaero(i) |
---|
1105 | solswad0_aero(iof+i) = zsolswad0aero(i) |
---|
1106 | ! MS the following lines seem to be wrong, why is iof on right hand side??? |
---|
1107 | ! topsw_aero(iof+i,:) = ztopsw_aero(iof+i,:) |
---|
1108 | ! topsw0_aero(iof+i,:) = ztopsw0_aero(iof+i,:) |
---|
1109 | ! solsw_aero(iof+i,:) = zsolsw_aero(iof+i,:) |
---|
1110 | ! solsw0_aero(iof+i,:) = zsolsw0_aero(iof+i,:) |
---|
1111 | topsw_aero(iof+i,:) = ztopsw_aero(i,:) |
---|
1112 | topsw0_aero(iof+i,:) = ztopsw0_aero(i,:) |
---|
1113 | solsw_aero(iof+i,:) = zsolsw_aero(i,:) |
---|
1114 | solsw0_aero(iof+i,:) = zsolsw0_aero(i,:) |
---|
1115 | topswcf_aero(iof+i,:) = ztopswcf_aero(i,:) |
---|
1116 | solswcf_aero(iof+i,:) = zsolswcf_aero(i,:) |
---|
1117 | !-LW |
---|
1118 | toplwad_aero(iof+i) = ztoplwadaero(i) |
---|
1119 | toplwad0_aero(iof+i) = ztoplwad0aero(i) |
---|
1120 | sollwad_aero(iof+i) = zsollwadaero(i) |
---|
1121 | sollwad0_aero(iof+i) = zsollwad0aero(i) |
---|
1122 | ENDDO |
---|
1123 | ELSE |
---|
1124 | DO i = 1, kdlon |
---|
1125 | topswad_aero(iof+i) = 0.0 |
---|
1126 | solswad_aero(iof+i) = 0.0 |
---|
1127 | topswad0_aero(iof+i) = 0.0 |
---|
1128 | solswad0_aero(iof+i) = 0.0 |
---|
1129 | topsw_aero(iof+i,:) = 0. |
---|
1130 | topsw0_aero(iof+i,:) =0. |
---|
1131 | solsw_aero(iof+i,:) = 0. |
---|
1132 | solsw0_aero(iof+i,:) = 0. |
---|
1133 | !-LW |
---|
1134 | toplwad_aero(iof+i) = 0.0 |
---|
1135 | sollwad_aero(iof+i) = 0.0 |
---|
1136 | toplwad0_aero(iof+i) = 0.0 |
---|
1137 | sollwad0_aero(iof+i) = 0.0 |
---|
1138 | ENDDO |
---|
1139 | ENDIF |
---|
1140 | IF (ok_aie) THEN |
---|
1141 | DO i = 1, kdlon |
---|
1142 | topswai_aero(iof+i) = ztopswaiaero(i) |
---|
1143 | solswai_aero(iof+i) = zsolswaiaero(i) |
---|
1144 | !-LW |
---|
1145 | toplwai_aero(iof+i) = ztoplwaiaero(i) |
---|
1146 | sollwai_aero(iof+i) = zsollwaiaero(i) |
---|
1147 | ENDDO |
---|
1148 | ELSE |
---|
1149 | DO i = 1, kdlon |
---|
1150 | topswai_aero(iof+i) = 0.0 |
---|
1151 | solswai_aero(iof+i) = 0.0 |
---|
1152 | !-LW |
---|
1153 | toplwai_aero(iof+i) = 0.0 |
---|
1154 | sollwai_aero(iof+i) = 0.0 |
---|
1155 | ENDDO |
---|
1156 | ENDIF |
---|
1157 | DO k = 1, kflev |
---|
1158 | DO i = 1, kdlon |
---|
1159 | ! scale factor to take into account the difference between |
---|
1160 | ! dry air and watter vapour scpecifi! heat capacity |
---|
1161 | zznormcp=1.0+RVTMP2*PWV(i,k) |
---|
1162 | heat(iof+i,k) = zheat(i,k)/zznormcp |
---|
1163 | cool(iof+i,k) = zcool(i,k)/zznormcp |
---|
1164 | heat0(iof+i,k) = zheat0(i,k)/zznormcp |
---|
1165 | cool0(iof+i,k) = zcool0(i,k)/zznormcp |
---|
1166 | IF(ok_volcan) THEN !NL |
---|
1167 | heat_volc(iof+i,k) = zheat_volc(i,k)/zznormcp |
---|
1168 | cool_volc(iof+i,k) = zcool_volc(i,k)/zznormcp |
---|
1169 | ENDIF |
---|
1170 | ENDDO |
---|
1171 | ENDDO |
---|
1172 | |
---|
1173 | ENDDO ! j = 1, nb_gr |
---|
1174 | |
---|
1175 | END SUBROUTINE radlwsw |
---|
1176 | |
---|
1177 | end module radlwsw_m |
---|