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