1 | ! |
---|
2 | ! $Id: radlwsw_m.F90 5202 2024-09-20 10:32:04Z fhourdin $ |
---|
3 | ! |
---|
4 | module radlwsw_m |
---|
5 | |
---|
6 | IMPLICIT NONE |
---|
7 | |
---|
8 | contains |
---|
9 | |
---|
10 | SUBROUTINE radlwsw( & |
---|
11 | debut, 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 RRTM |
---|
22 | tau_aero_lw_rrtm, & ! rajoute par C.Kleinschmitt pour RRTM |
---|
23 | cldtaupi, m_allaer, & |
---|
24 | qsat, flwc, fiwc, & |
---|
25 | ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & |
---|
26 | namelist_ecrad_file, & |
---|
27 | heat,heat0,cool,cool0,albpla,& |
---|
28 | heat_volc, cool_volc,& |
---|
29 | topsw,toplw,solsw,solswfdiff,sollw,& |
---|
30 | sollwdown,& |
---|
31 | topsw0,toplw0,solsw0,sollw0,& |
---|
32 | lwdnc0, lwdn0, lwdn, lwupc0, lwup0, lwup,& |
---|
33 | swdnc0, swdn0, swdn, swupc0, swup0, swup,& |
---|
34 | topswad_aero, solswad_aero,& |
---|
35 | topswai_aero, solswai_aero, & |
---|
36 | topswad0_aero, solswad0_aero,& |
---|
37 | topsw_aero, topsw0_aero,& |
---|
38 | solsw_aero, solsw0_aero, & |
---|
39 | topswcf_aero, solswcf_aero,& |
---|
40 | !-C. Kleinschmitt for LW diagnostics |
---|
41 | toplwad_aero, sollwad_aero,& |
---|
42 | toplwai_aero, sollwai_aero, & |
---|
43 | toplwad0_aero, sollwad0_aero, & |
---|
44 | !-end |
---|
45 | ZLWFT0_i, ZFLDN0, ZFLUP0, & |
---|
46 | ZSWFT0_i, ZFSDN0, ZFSUP0, & |
---|
47 | cloud_cover_sw) |
---|
48 | |
---|
49 | ! Modules necessaires |
---|
50 | USE DIMPHY |
---|
51 | USE assert_m, ONLY : assert |
---|
52 | USE infotrac_phy, ONLY : type_trac |
---|
53 | USE write_field_phy |
---|
54 | |
---|
55 | #ifdef REPROBUS |
---|
56 | USE CHEM_REP, ONLY : solaireTIME, ok_SUNTIME, ndimozon |
---|
57 | #endif |
---|
58 | |
---|
59 | #ifdef CPP_RRTM |
---|
60 | ! modules necessaires au rayonnement |
---|
61 | ! ----------------------------------------- |
---|
62 | USE YOERAD , ONLY : NLW, LRRTM ,LCCNL ,LCCNO ,& |
---|
63 | NRADIP , NRADLP , NICEOPT, NLIQOPT ,RCCNLND , RCCNSEA |
---|
64 | USE YOELW , ONLY : NSIL ,NTRA ,NUA ,TSTAND ,XP |
---|
65 | USE YOESW , ONLY : RYFWCA ,RYFWCB ,RYFWCC ,RYFWCD,& |
---|
66 | RYFWCE ,RYFWCF ,REBCUA ,REBCUB ,REBCUC,& |
---|
67 | REBCUD ,REBCUE ,REBCUF ,REBCUI ,REBCUJ,& |
---|
68 | REBCUG ,REBCUH ,RHSAVI ,RFULIO ,RFLAA0,& |
---|
69 | RFLAA1 ,RFLBB0 ,RFLBB1 ,RFLBB2 ,RFLBB3,& |
---|
70 | RFLCC0 ,RFLCC1 ,RFLCC2 ,RFLCC3 ,RFLDD0,& |
---|
71 | RFLDD1 ,RFLDD2 ,RFLDD3 ,RFUETA ,RASWCA,& |
---|
72 | RASWCB ,RASWCC ,RASWCD ,RASWCE ,RASWCF |
---|
73 | USE YOERDU , ONLY : NUAER ,NTRAER ,REPLOG ,REPSC ,REPSCW ,DIFF |
---|
74 | USE YOERRTWN , ONLY : DELWAVE ,TOTPLNK |
---|
75 | USE YOMPHY3 , ONLY : RII0 |
---|
76 | #endif |
---|
77 | USE aero_mod |
---|
78 | |
---|
79 | ! AI 02.2021 |
---|
80 | ! Besoin pour ECRAD de pctsrf, zmasq, longitude, altitude |
---|
81 | #ifdef CPP_ECRAD |
---|
82 | USE geometry_mod, ONLY: latitude, longitude |
---|
83 | USE phys_state_var_mod, ONLY: pctsrf |
---|
84 | USE indice_sol_mod |
---|
85 | USE time_phylmdz_mod, only: current_time |
---|
86 | USE phys_cal_mod, only: day_cur |
---|
87 | USE interface_lmdz_ecrad |
---|
88 | #endif |
---|
89 | |
---|
90 | !====================================================================== |
---|
91 | ! Auteur(s): Z.X. Li (LMD/CNRS) date: 19960719 |
---|
92 | ! Objet: interface entre le modele et les rayonnements |
---|
93 | ! Arguments: |
---|
94 | ! INPUTS |
---|
95 | ! dist----- input-R- distance astronomique terre-soleil |
---|
96 | ! rmu0----- input-R- cosinus de l'angle zenithal |
---|
97 | ! fract---- input-R- duree d'ensoleillement normalisee |
---|
98 | ! co2_ppm-- input-R- concentration du gaz carbonique (en ppm) |
---|
99 | ! paprs---- input-R- pression a inter-couche (Pa) |
---|
100 | ! pplay---- input-R- pression au milieu de couche (Pa) |
---|
101 | ! tsol----- input-R- temperature du sol (en K) |
---|
102 | ! alb1----- input-R- albedo du sol(entre 0 et 1) dans l'interval visible |
---|
103 | ! alb2----- input-R- albedo du sol(entre 0 et 1) dans l'interval proche infra-rouge |
---|
104 | ! t-------- input-R- temperature (K) |
---|
105 | ! q-------- input-R- vapeur d'eau (en kg/kg) |
---|
106 | ! cldfra--- input-R- fraction nuageuse (entre 0 et 1) |
---|
107 | ! cldtaupd- input-R- epaisseur optique des nuages dans le visible (present-day value) |
---|
108 | ! cldemi--- input-R- emissivite des nuages dans l'IR (entre 0 et 1) |
---|
109 | ! ok_ade--- input-L- apply the Aerosol Direct Effect or not? |
---|
110 | ! ok_aie--- input-L- apply the Aerosol Indirect Effect or not? |
---|
111 | ! ok_volcan input-L- activate volcanic diags (SW heat & LW cool rate, SW & LW flux) |
---|
112 | ! flag_volc_surfstrat input-I- activate volcanic surf cooling or strato heating (or nothing) |
---|
113 | ! flag_aerosol input-I- aerosol flag from 0 to 6 |
---|
114 | ! flag_aerosol_strat input-I- use stratospheric aerosols flag (0, 1, 2) |
---|
115 | ! flag_aer_feedback input-I- activate aerosol radiative feedback (T, F) |
---|
116 | ! tau_ae, piz_ae, cg_ae input-R- aerosol optical properties (calculated in aeropt.F) |
---|
117 | ! cldtaupi input-R- epaisseur optique des nuages dans le visible |
---|
118 | ! calculated for pre-industrial (pi) aerosol concentrations, i.e. with smaller |
---|
119 | ! droplet concentration, thus larger droplets, thus generally cdltaupi cldtaupd |
---|
120 | ! it is needed for the diagnostics of the aerosol indirect radiative forcing |
---|
121 | ! |
---|
122 | ! OUTPUTS |
---|
123 | ! heat-----output-R- echauffement atmospherique (visible) (K/jour) |
---|
124 | ! cool-----output-R- refroidissement dans l'IR (K/jour) |
---|
125 | ! albpla---output-R- albedo planetaire (entre 0 et 1) |
---|
126 | ! topsw----output-R- flux solaire net au sommet de l'atm. |
---|
127 | ! toplw----output-R- ray. IR montant au sommet de l'atmosphere |
---|
128 | ! solsw----output-R- flux solaire net a la surface |
---|
129 | ! solswfdiff----output-R- fraction de rayonnement diffus pour le flux solaire descendant a la surface |
---|
130 | ! sollw----output-R- ray. IR montant a la surface |
---|
131 | ! solswad---output-R- ray. solaire net absorbe a la surface (aerosol dir) |
---|
132 | ! topswad---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol dir) |
---|
133 | ! solswai---output-R- ray. solaire net absorbe a la surface (aerosol ind) |
---|
134 | ! topswai---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol ind) |
---|
135 | ! |
---|
136 | ! heat_volc-----output-R- echauffement atmospherique du au forcage volcanique (visible) (K/s) |
---|
137 | ! cool_volc-----output-R- refroidissement dans l'IR du au forcage volcanique (K/s) |
---|
138 | ! |
---|
139 | ! ATTENTION: swai and swad have to be interpreted in the following manner: |
---|
140 | ! --------- |
---|
141 | ! ok_ade=F & ok_aie=F -both are zero |
---|
142 | ! ok_ade=T & ok_aie=F -aerosol direct forcing is F_{AD} = topsw-topswad |
---|
143 | ! indirect is zero |
---|
144 | ! ok_ade=F & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
145 | ! direct is zero |
---|
146 | ! ok_ade=T & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
147 | ! aerosol direct forcing is F_{AD} = topswai-topswad |
---|
148 | ! |
---|
149 | ! --------- RRTM: output RECMWFL |
---|
150 | ! ZEMTD (KPROMA,KLEV+1) ; TOTAL DOWNWARD LONGWAVE EMISSIVITY |
---|
151 | ! ZEMTU (KPROMA,KLEV+1) ; TOTAL UPWARD LONGWAVE EMISSIVITY |
---|
152 | ! ZTRSO (KPROMA,KLEV+1) ; TOTAL SHORTWAVE TRANSMISSIVITY |
---|
153 | ! ZTH (KPROMA,KLEV+1) ; HALF LEVEL TEMPERATURE |
---|
154 | ! ZCTRSO(KPROMA,2) ; CLEAR-SKY SHORTWAVE TRANSMISSIVITY |
---|
155 | ! ZCEMTR(KPROMA,2) ; CLEAR-SKY NET LONGWAVE EMISSIVITY |
---|
156 | ! ZTRSOD(KPROMA) ; TOTAL-SKY SURFACE SW TRANSMISSITY |
---|
157 | ! ZLWFC (KPROMA,2) ; CLEAR-SKY LONGWAVE FLUXES |
---|
158 | ! ZLWFT (KPROMA,KLEV+1) ; TOTAL-SKY LONGWAVE FLUXES |
---|
159 | ! ZLWFT0(KPROMA,KLEV+1) ; CLEAR-SKY LONGWAVE FLUXES ! added by MPL 090109 |
---|
160 | ! ZSWFC (KPROMA,2) ; CLEAR-SKY SHORTWAVE FLUXES |
---|
161 | ! ZSWFT (KPROMA,KLEV+1) ; TOTAL-SKY SHORTWAVE FLUXES |
---|
162 | ! ZSWFT0(KPROMA,KLEV+1) ; CLEAR-SKY SHORTWAVE FLUXES ! added by MPL 090109 |
---|
163 | ! ZFLUX (KLON,2,KLEV+1) ; TOTAL LW FLUXES 1=up, 2=DWN ! added by MPL 080411 |
---|
164 | ! ZFLUC (KLON,2,KLEV+1) ; CLEAR SKY LW FLUXES ! added by MPL 080411 |
---|
165 | ! ZFSDWN(klon,KLEV+1) ; TOTAL SW DWN FLUXES ! added by MPL 080411 |
---|
166 | ! ZFCDWN(klon,KLEV+1) ; CLEAR SKY SW DWN FLUXES ! added by MPL 080411 |
---|
167 | ! ZFCCDWN(klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) SW DWN FLUXES ! added by OB 211117 |
---|
168 | ! ZFSUP (klon,KLEV+1) ; TOTAL SW UP FLUXES ! added by MPL 080411 |
---|
169 | ! ZFCUP (klon,KLEV+1) ; CLEAR SKY SW UP FLUXES ! added by MPL 080411 |
---|
170 | ! ZFCCUP (klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) SW UP FLUXES ! added by OB 211117 |
---|
171 | ! ZFLCCDWN(klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) LW DWN FLUXES ! added by OB 211117 |
---|
172 | ! ZFLCCUP (klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) LW UP FLUXES ! added by OB 211117 |
---|
173 | |
---|
174 | !====================================================================== |
---|
175 | |
---|
176 | ! ==================================================================== |
---|
177 | ! Adapte au modele de chimie INCA par Celine Deandreis & Anne Cozic -- 2009 |
---|
178 | ! 1 = ZERO |
---|
179 | ! 2 = AER total |
---|
180 | ! 3 = NAT |
---|
181 | ! 4 = BC |
---|
182 | ! 5 = SO4 |
---|
183 | ! 6 = POM |
---|
184 | ! 7 = DUST |
---|
185 | ! 8 = SS |
---|
186 | ! 9 = NO3 |
---|
187 | ! |
---|
188 | ! ==================================================================== |
---|
189 | |
---|
190 | ! ============== |
---|
191 | ! DECLARATIONS |
---|
192 | ! ============== |
---|
193 | include "YOETHF.h" |
---|
194 | include "YOMCST.h" |
---|
195 | include "clesphys.h" |
---|
196 | |
---|
197 | ! Input arguments |
---|
198 | REAL, INTENT(in) :: dist |
---|
199 | REAL, INTENT(in) :: rmu0(KLON), fract(KLON) |
---|
200 | REAL, INTENT(in) :: paprs(KLON,KLEV+1), pplay(KLON,KLEV) |
---|
201 | !albedo SB >>> |
---|
202 | ! REAL, INTENT(in) :: alb1(KLON), alb2(KLON), tsol(KLON) |
---|
203 | REAL, INTENT(in) :: tsol(KLON) |
---|
204 | REAL, INTENT(in) :: alb_dir(KLON,NSW),alb_dif(KLON,NSW) |
---|
205 | REAL, INTENT(in) :: SFRWL(6) |
---|
206 | !albedo SB <<< |
---|
207 | REAL, INTENT(in) :: t(KLON,KLEV), q(KLON,KLEV) |
---|
208 | |
---|
209 | REAL, INTENT(in):: wo(:, :, :) ! dimension(KLON,KLEV, 1 or 2) |
---|
210 | ! column-density of ozone in a layer, in kilo-Dobsons |
---|
211 | ! "wo(:, :, 1)" is for the average day-night field, |
---|
212 | ! "wo(:, :, 2)" is for daylight time. |
---|
213 | |
---|
214 | LOGICAL, INTENT(in) :: ok_ade, ok_aie ! switches whether to use aerosol direct (indirect) effects or not |
---|
215 | LOGICAL, INTENT(in) :: ok_volcan ! produce volcanic diags (SW/LW heat flux and rate) |
---|
216 | INTEGER, INTENT(in) :: flag_volc_surfstrat ! allow to impose volcanic cooling rate at surf or heating in strato |
---|
217 | LOGICAL :: lldebug=.false. |
---|
218 | INTEGER, INTENT(in) :: flag_aerosol ! takes value 0 (no aerosol) or 1 to 6 (aerosols) |
---|
219 | INTEGER, INTENT(in) :: flag_aerosol_strat ! use stratospheric aerosols |
---|
220 | LOGICAL, INTENT(in) :: flag_aer_feedback ! activate aerosol radiative feedback |
---|
221 | REAL, INTENT(in) :: cldfra(KLON,KLEV), cldemi(KLON,KLEV), cldtaupd(KLON,KLEV) |
---|
222 | REAL, INTENT(in) :: tau_aero(KLON,KLEV,naero_grp,2) ! aerosol optical properties (see aeropt.F) |
---|
223 | REAL, INTENT(in) :: piz_aero(KLON,KLEV,naero_grp,2) ! aerosol optical properties (see aeropt.F) |
---|
224 | REAL, INTENT(in) :: cg_aero(KLON,KLEV,naero_grp,2) ! aerosol optical properties (see aeropt.F) |
---|
225 | !--OB |
---|
226 | REAL, INTENT(in) :: tau_aero_sw_rrtm(KLON,KLEV,2,NSW) ! aerosol optical properties RRTM |
---|
227 | REAL, INTENT(in) :: piz_aero_sw_rrtm(KLON,KLEV,2,NSW) ! aerosol optical properties RRTM |
---|
228 | REAL, INTENT(in) :: cg_aero_sw_rrtm(KLON,KLEV,2,NSW) ! aerosol optical properties RRTM |
---|
229 | ! AI |
---|
230 | !--OB fin |
---|
231 | |
---|
232 | !--C. Kleinschmitt |
---|
233 | #ifdef CPP_RRTM |
---|
234 | REAL, INTENT(in) :: tau_aero_lw_rrtm(KLON,KLEV,2,NLW) ! LW aerosol optical properties RRTM |
---|
235 | #else |
---|
236 | REAL, INTENT(in) :: tau_aero_lw_rrtm(KLON,KLEV,2,nbands_lw_rrtm) |
---|
237 | #endif |
---|
238 | !--C. Kleinschmitt end |
---|
239 | |
---|
240 | REAL, INTENT(in) :: cldtaupi(KLON,KLEV) ! cloud optical thickness for pre-industrial aerosol concentrations |
---|
241 | REAL, INTENT(in) :: qsat(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
242 | REAL, INTENT(in) :: flwc(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
243 | REAL, INTENT(in) :: fiwc(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
244 | REAL, INTENT(in) :: ref_liq(klon,klev) ! cloud droplet radius present-day from newmicro |
---|
245 | REAL, INTENT(in) :: ref_ice(klon,klev) ! ice crystal radius present-day from newmicro |
---|
246 | REAL, INTENT(in) :: ref_liq_pi(klon,klev) ! cloud droplet radius pre-industrial from newmicro |
---|
247 | REAL, INTENT(in) :: ref_ice_pi(klon,klev) ! ice crystal radius pre-industrial from newmicro |
---|
248 | REAL, INTENT(in) :: m_allaer(klon,klev,naero_tot) ! mass aero |
---|
249 | |
---|
250 | CHARACTER(len=512), INTENT(in) :: namelist_ecrad_file |
---|
251 | LOGICAL, INTENT(in) :: debut |
---|
252 | |
---|
253 | ! Output arguments |
---|
254 | REAL, INTENT(out) :: heat(KLON,KLEV), cool(KLON,KLEV) |
---|
255 | REAL, INTENT(out) :: heat0(KLON,KLEV), cool0(KLON,KLEV) |
---|
256 | REAL, INTENT(out) :: heat_volc(KLON,KLEV), cool_volc(KLON,KLEV) !NL |
---|
257 | REAL, INTENT(out) :: topsw(KLON), toplw(KLON) |
---|
258 | REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON), solswfdiff(KLON) |
---|
259 | REAL, INTENT(out) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON) |
---|
260 | REAL, INTENT(out) :: sollwdown(KLON) |
---|
261 | REAL, INTENT(out) :: swdn(KLON,kflev+1),swdn0(KLON,kflev+1), swdnc0(KLON,kflev+1) |
---|
262 | REAL, INTENT(out) :: swup(KLON,kflev+1),swup0(KLON,kflev+1), swupc0(KLON,kflev+1) |
---|
263 | REAL, INTENT(out) :: lwdn(KLON,kflev+1),lwdn0(KLON,kflev+1), lwdnc0(KLON,kflev+1) |
---|
264 | REAL, INTENT(out) :: lwup(KLON,kflev+1),lwup0(KLON,kflev+1), lwupc0(KLON,kflev+1) |
---|
265 | REAL, INTENT(out) :: topswad_aero(KLON), solswad_aero(KLON) ! output: aerosol direct forcing at TOA and surface |
---|
266 | REAL, INTENT(out) :: topswai_aero(KLON), solswai_aero(KLON) ! output: aerosol indirect forcing atTOA and surface |
---|
267 | REAL, INTENT(out) :: toplwad_aero(KLON), sollwad_aero(KLON) ! output: LW aerosol direct forcing at TOA and surface |
---|
268 | REAL, INTENT(out) :: toplwai_aero(KLON), sollwai_aero(KLON) ! output: LW aerosol indirect forcing atTOA and surface |
---|
269 | REAL, DIMENSION(klon), INTENT(out) :: topswad0_aero |
---|
270 | REAL, DIMENSION(klon), INTENT(out) :: solswad0_aero |
---|
271 | REAL, DIMENSION(klon), INTENT(out) :: toplwad0_aero |
---|
272 | REAL, DIMENSION(klon), INTENT(out) :: sollwad0_aero |
---|
273 | REAL, DIMENSION(kdlon,9), INTENT(out) :: topsw_aero |
---|
274 | REAL, DIMENSION(kdlon,9), INTENT(out) :: topsw0_aero |
---|
275 | REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw_aero |
---|
276 | REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw0_aero |
---|
277 | REAL, DIMENSION(kdlon,3), INTENT(out) :: topswcf_aero |
---|
278 | REAL, DIMENSION(kdlon,3), INTENT(out) :: solswcf_aero |
---|
279 | REAL, DIMENSION(kdlon,kflev+1), INTENT(out) :: ZSWFT0_i |
---|
280 | REAL, DIMENSION(kdlon,kflev+1), INTENT(out) :: ZLWFT0_i |
---|
281 | |
---|
282 | ! Local variables |
---|
283 | REAL(KIND=8) ZFSUP(KDLON,KFLEV+1) |
---|
284 | REAL(KIND=8) ZFSDN(KDLON,KFLEV+1) |
---|
285 | REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1) |
---|
286 | REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1) |
---|
287 | REAL(KIND=8) ZFSUPC0(KDLON,KFLEV+1) |
---|
288 | REAL(KIND=8) ZFSDNC0(KDLON,KFLEV+1) |
---|
289 | REAL(KIND=8) ZFLUP(KDLON,KFLEV+1) |
---|
290 | REAL(KIND=8) ZFLDN(KDLON,KFLEV+1) |
---|
291 | REAL(KIND=8) ZFLUP0(KDLON,KFLEV+1) |
---|
292 | REAL(KIND=8) ZFLDN0(KDLON,KFLEV+1) |
---|
293 | REAL(KIND=8) ZFLUPC0(KDLON,KFLEV+1) |
---|
294 | REAL(KIND=8) ZFLDNC0(KDLON,KFLEV+1) |
---|
295 | REAL(KIND=8) zx_alpha1, zx_alpha2 |
---|
296 | INTEGER k, kk, i, j, iof, nb_gr |
---|
297 | INTEGER ist,iend,ktdia,kmode |
---|
298 | REAL(KIND=8) PSCT |
---|
299 | REAL(KIND=8) PALBD(kdlon,2), PALBP(kdlon,2) |
---|
300 | ! MPL 06.01.09: pour RRTM, creation de PALBD_NEW et PALBP_NEW |
---|
301 | ! avec NSW en deuxieme dimension |
---|
302 | REAL(KIND=8) PALBD_NEW(kdlon,NSW), PALBP_NEW(kdlon,NSW) |
---|
303 | REAL(KIND=8) PEMIS(kdlon), PDT0(kdlon), PVIEW(kdlon) |
---|
304 | REAL(KIND=8) PPSOL(kdlon), PDP(kdlon,KLEV) |
---|
305 | REAL(KIND=8) PTL(kdlon,kflev+1), PPMB(kdlon,kflev+1) |
---|
306 | REAL(KIND=8) PTAVE(kdlon,kflev) |
---|
307 | REAL(KIND=8) PWV(kdlon,kflev), PQS(kdlon,kflev) |
---|
308 | |
---|
309 | REAL(KIND=8) cloud_cover_sw(klon) |
---|
310 | |
---|
311 | !!!!!!! Declarations specifiques pour ECRAD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
312 | ! AI 02.2021 |
---|
313 | #ifdef CPP_ECRAD |
---|
314 | ! ATTENTION les dimensions klon, kdlon ??? |
---|
315 | ! INPUTS |
---|
316 | REAL, DIMENSION(kdlon,kflev+1) :: ZSWFT0_ii, ZLWFT0_ii |
---|
317 | REAL(KIND=8) ZEMISW(klon), & ! LW emissivity inside the window region |
---|
318 | ZEMIS(klon) ! LW emissivity outside the window region |
---|
319 | REAL(KIND=8) ZGELAM(klon), & ! longitudes en rad |
---|
320 | ZGEMU(klon) ! sin(latitude) |
---|
321 | REAL(KIND=8) ZCO2, & ! CO2 mass mixing ratios on full levels |
---|
322 | ZCH4, & ! CH4 mass mixing ratios on full levels |
---|
323 | ZN2O, & ! N2O mass mixing ratios on full levels |
---|
324 | ZNO2, & ! NO2 mass mixing ratios on full levels |
---|
325 | ZCFC11, & ! CFC11 |
---|
326 | ZCFC12, & ! CFC12 |
---|
327 | ZHCFC22, & ! HCFC22 |
---|
328 | ZCCL4, & ! CCL4 |
---|
329 | ZO2 ! O2 |
---|
330 | |
---|
331 | REAL(KIND=8) ZQ_RAIN(klon,klev), & ! Rain cloud mass mixing ratio (kg/kg) ? |
---|
332 | ZQ_SNOW(klon,klev) ! Snow cloud mass mixing ratio (kg/kg) ? |
---|
333 | REAL(KIND=8) ZAEROSOL_OLD(KLON,6,KLEV), & ! |
---|
334 | ZAEROSOL(KLON,KLEV,naero_spc) ! |
---|
335 | ! OUTPUTS |
---|
336 | REAL(KIND=8) ZFLUX_DIR(klon), & ! Direct compt of surf flux into horizontal plane |
---|
337 | ZFLUX_DIR_CLEAR(klon), & ! CS Direct |
---|
338 | ZFLUX_DIR_INTO_SUN(klon), & ! |
---|
339 | ZFLUX_UV(klon), & ! UV flux |
---|
340 | ZFLUX_PAR(klon), & ! photosynthetically active radiation similarly |
---|
341 | ZFLUX_PAR_CLEAR(klon), & ! CS photosynthetically |
---|
342 | ZFLUX_SW_DN_TOA(klon), & ! DN SW flux at TOA |
---|
343 | ZEMIS_OUT(klon) ! effective broadband emissivity |
---|
344 | |
---|
345 | REAL(KIND=8) ZLWDERIVATIVE(klon,klev+1) ! LW derivatives |
---|
346 | REAL(KIND=8) ZSWDIFFUSEBAND(klon,NSW), & ! SW DN flux in diffuse albedo band |
---|
347 | ZSWDIRECTBAND(klon,NSW) ! SW DN flux in direct albedo band |
---|
348 | REAL(KIND=8) SOLARIRAD |
---|
349 | REAL(KIND=8) seuilmach |
---|
350 | ! AI 10 mars 22 : Pour les tests Offline |
---|
351 | logical :: lldebug_for_offline = .false. |
---|
352 | REAL(KIND=8) solaire_off(klon), & |
---|
353 | ZCO2_off(klon,klev), & |
---|
354 | ZCH4_off(klon,klev), & ! CH4 mass mixing ratios on full levels |
---|
355 | ZN2O_off(klon,klev), & ! N2O mass mixing ratios on full levels |
---|
356 | ZNO2_off(klon,klev), & ! NO2 mass mixing ratios on full levels |
---|
357 | ZCFC11_off(klon,klev), & ! CFC11 |
---|
358 | ZCFC12_off(klon,klev), & ! CFC12 |
---|
359 | ZHCFC22_off(klon,klev), & ! HCFC22 |
---|
360 | ZCCL4_off(klon,klev), & ! CCL4 |
---|
361 | ZO2_off(klon,klev) ! O2#endif |
---|
362 | #endif |
---|
363 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
364 | |
---|
365 | REAL(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone |
---|
366 | ! "POZON(:, :, 1)" is for the average day-night field, |
---|
367 | ! "POZON(:, :, 2)" is for daylight time. |
---|
368 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
369 | REAL(KIND=8) PAER(kdlon,kflev,6) |
---|
370 | REAL(KIND=8) PCLDLD(kdlon,kflev) |
---|
371 | REAL(KIND=8) PCLDLU(kdlon,kflev) |
---|
372 | REAL(KIND=8) PCLDSW(kdlon,kflev) |
---|
373 | REAL(KIND=8) PTAU(kdlon,2,kflev) |
---|
374 | REAL(KIND=8) POMEGA(kdlon,2,kflev) |
---|
375 | REAL(KIND=8) PCG(kdlon,2,kflev) |
---|
376 | REAL(KIND=8) zfract(kdlon), zrmu0(kdlon), zdist |
---|
377 | REAL(KIND=8) zheat(kdlon,kflev), zcool(kdlon,kflev) |
---|
378 | REAL(KIND=8) zheat0(kdlon,kflev), zcool0(kdlon,kflev) |
---|
379 | REAL(KIND=8) zheat_volc(kdlon,kflev), zcool_volc(kdlon,kflev) !NL |
---|
380 | REAL(KIND=8) ztopsw(kdlon), ztoplw(kdlon) |
---|
381 | REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon), zsolswfdiff(kdlon) |
---|
382 | REAL(KIND=8) zsollwdown(kdlon) |
---|
383 | REAL(KIND=8) ztopsw0(kdlon), ztoplw0(kdlon) |
---|
384 | REAL(KIND=8) zsolsw0(kdlon), zsollw0(kdlon) |
---|
385 | REAL(KIND=8) zznormcp |
---|
386 | REAL(KIND=8) tauaero(kdlon,kflev,naero_grp,2) ! aer opt properties |
---|
387 | REAL(KIND=8) pizaero(kdlon,kflev,naero_grp,2) |
---|
388 | REAL(KIND=8) cgaero(kdlon,kflev,naero_grp,2) |
---|
389 | REAL(KIND=8) PTAUA(kdlon,2,kflev) ! present-day value of cloud opt thickness (PTAU is pre-industrial value), local use |
---|
390 | REAL(KIND=8) POMEGAA(kdlon,2,kflev) ! dito for single scatt albedo |
---|
391 | REAL(KIND=8) ztopswadaero(kdlon), zsolswadaero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
392 | REAL(KIND=8) ztopswad0aero(kdlon), zsolswad0aero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
393 | REAL(KIND=8) ztopswaiaero(kdlon), zsolswaiaero(kdlon) ! dito, indirect |
---|
394 | !--NL |
---|
395 | REAL(KIND=8) zswadaero(kdlon,kflev+1) ! SW Aerosol direct forcing |
---|
396 | REAL(KIND=8) zlwadaero(kdlon,kflev+1) ! LW Aerosol direct forcing |
---|
397 | REAL(KIND=8) volmip_solsw(kdlon) ! SW clear sky in the case of VOLMIP |
---|
398 | !-LW by CK |
---|
399 | REAL(KIND=8) ztoplwadaero(kdlon), zsollwadaero(kdlon) ! LW Aerosol direct forcing at TOAand surface |
---|
400 | REAL(KIND=8) ztoplwad0aero(kdlon), zsollwad0aero(kdlon) ! LW Aerosol direct forcing at TOAand surface |
---|
401 | REAL(KIND=8) ztoplwaiaero(kdlon), zsollwaiaero(kdlon) ! dito, indirect |
---|
402 | !-end |
---|
403 | REAL(KIND=8) ztopsw_aero(kdlon,9), ztopsw0_aero(kdlon,9) |
---|
404 | REAL(KIND=8) zsolsw_aero(kdlon,9), zsolsw0_aero(kdlon,9) |
---|
405 | REAL(KIND=8) ztopswcf_aero(kdlon,3), zsolswcf_aero(kdlon,3) |
---|
406 | ! real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 deje declare dans physiq.F MPL 20130618 |
---|
407 | !MPL input supplementaires pour RECMWFL |
---|
408 | ! flwc, fiwc = Liquid Water Content & Ice Water Content (kg/kg) |
---|
409 | REAL(KIND=8) GEMU(klon) |
---|
410 | !MPL input RECMWFL: |
---|
411 | ! Tableaux aux niveaux inverses pour respecter convention Arpege |
---|
412 | REAL(KIND=8) ref_liq_i(klon,klev) ! cloud droplet radius present-day from newmicro (inverted) |
---|
413 | REAL(KIND=8) ref_ice_i(klon,klev) ! ice crystal radius present-day from newmicro (inverted) |
---|
414 | !--OB |
---|
415 | REAL(KIND=8) ref_liq_pi_i(klon,klev) ! cloud droplet radius pre-industrial from newmicro (inverted) |
---|
416 | REAL(KIND=8) ref_ice_pi_i(klon,klev) ! ice crystal radius pre-industrial from newmicro (inverted) |
---|
417 | !--end OB |
---|
418 | REAL(KIND=8) paprs_i(klon,klev+1) |
---|
419 | REAL(KIND=8) pplay_i(klon,klev) |
---|
420 | REAL(KIND=8) cldfra_i(klon,klev) |
---|
421 | REAL(KIND=8) POZON_i(kdlon,kflev, size(wo, 3)) ! mass fraction of ozone |
---|
422 | ! "POZON(:, :, 1)" is for the average day-night field, |
---|
423 | ! "POZON(:, :, 2)" is for daylight time. |
---|
424 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
425 | REAL(KIND=8) PAER_i(kdlon,kflev,6) |
---|
426 | REAL(KIND=8) PDP_i(klon,klev) |
---|
427 | REAL(KIND=8) t_i(klon,klev),q_i(klon,klev),qsat_i(klon,klev) |
---|
428 | REAL(KIND=8) flwc_i(klon,klev),fiwc_i(klon,klev) |
---|
429 | !MPL output RECMWFL: |
---|
430 | REAL(KIND=8) ZEMTD (klon,klev+1),ZEMTD_i (klon,klev+1) |
---|
431 | REAL(KIND=8) ZEMTU (klon,klev+1),ZEMTU_i (klon,klev+1) |
---|
432 | REAL(KIND=8) ZTRSO (klon,klev+1),ZTRSO_i (klon,klev+1) |
---|
433 | REAL(KIND=8) ZTH (klon,klev+1),ZTH_i (klon,klev+1) |
---|
434 | REAL(KIND=8) ZCTRSO(klon,2) |
---|
435 | REAL(KIND=8) ZCEMTR(klon,2) |
---|
436 | REAL(KIND=8) ZTRSOD(klon) |
---|
437 | REAL(KIND=8) ZLWFC (klon,2) |
---|
438 | REAL(KIND=8) ZLWFT (klon,klev+1),ZLWFT_i (klon,klev+1) |
---|
439 | REAL(KIND=8) ZSWFC (klon,2) |
---|
440 | REAL(KIND=8) ZSWFT (klon,klev+1),ZSWFT_i (klon,klev+1) |
---|
441 | REAL(KIND=8) ZFLUCDWN_i(klon,klev+1),ZFLUCUP_i(klon,klev+1) |
---|
442 | REAL(KIND=8) PPIZA_TOT(klon,klev,NSW) |
---|
443 | REAL(KIND=8) PCGA_TOT(klon,klev,NSW) |
---|
444 | REAL(KIND=8) PTAU_TOT(klon,klev,NSW) |
---|
445 | REAL(KIND=8) PPIZA_NAT(klon,klev,NSW) |
---|
446 | REAL(KIND=8) PCGA_NAT(klon,klev,NSW) |
---|
447 | REAL(KIND=8) PTAU_NAT(klon,klev,NSW) |
---|
448 | #ifdef CPP_RRTM |
---|
449 | REAL(KIND=8) PTAU_LW_TOT(klon,klev,NLW) |
---|
450 | REAL(KIND=8) PTAU_LW_NAT(klon,klev,NLW) |
---|
451 | #endif |
---|
452 | REAL(KIND=8) PSFSWDIR(klon,NSW) |
---|
453 | REAL(KIND=8) PSFSWDIF(klon,NSW) |
---|
454 | REAL(KIND=8) PFSDNN(klon) |
---|
455 | REAL(KIND=8) PFSDNV(klon) |
---|
456 | !MPL On ne redefinit pas les tableaux ZFLUX,ZFLUC, |
---|
457 | !MPL ZFSDWN,ZFCDWN,ZFSUP,ZFCUP car ils existent deja |
---|
458 | !MPL sous les noms de ZFLDN,ZFLDN0,ZFLUP,ZFLUP0, |
---|
459 | !MPL ZFSDN,ZFSDN0,ZFSUP,ZFSUP0 |
---|
460 | REAL(KIND=8) ZFLUX_i (klon,2,klev+1) |
---|
461 | REAL(KIND=8) ZFLUC_i (klon,2,klev+1) |
---|
462 | REAL(KIND=8) ZFSDWN_i (klon,klev+1) |
---|
463 | REAL(KIND=8) ZFCDWN_i (klon,klev+1) |
---|
464 | REAL(KIND=8) ZFCCDWN_i (klon,klev+1) |
---|
465 | REAL(KIND=8) ZFSUP_i (klon,klev+1) |
---|
466 | REAL(KIND=8) ZFCUP_i (klon,klev+1) |
---|
467 | REAL(KIND=8) ZFCCUP_i (klon,klev+1) |
---|
468 | REAL(KIND=8) ZFLCCDWN_i (klon,klev+1) |
---|
469 | REAL(KIND=8) ZFLCCUP_i (klon,klev+1) |
---|
470 | ! 3 lignes suivantes a activer pour CCMVAL (MPL 20100412) |
---|
471 | ! REAL(KIND=8) RSUN(3,2) |
---|
472 | ! REAL(KIND=8) SUN(3) |
---|
473 | ! REAL(KIND=8) SUN_FRACT(2) |
---|
474 | REAL, PARAMETER:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
---|
475 | CHARACTER (LEN=80) :: abort_message |
---|
476 | CHARACTER (LEN=80) :: modname='radlwsw_m' |
---|
477 | |
---|
478 | REAL zdir, zdif |
---|
479 | |
---|
480 | ! ========= INITIALISATIONS ============================================== |
---|
481 | IF (lldebug) THEN |
---|
482 | print*,'Entree dans radlwsw ' |
---|
483 | print*,'************* INITIALISATIONS *****************************' |
---|
484 | print*,'klon, kdlon, klev, kflev =',klon, kdlon, klev, kflev |
---|
485 | ENDIF |
---|
486 | |
---|
487 | CALL assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") |
---|
488 | |
---|
489 | ist=1 |
---|
490 | iend=klon |
---|
491 | ktdia=1 |
---|
492 | kmode=ist |
---|
493 | ! Aeros |
---|
494 | tauaero(:,:,:,:)=0. |
---|
495 | pizaero(:,:,:,:)=0. |
---|
496 | cgaero(:,:,:,:)=0. |
---|
497 | ! lldebug=.FALSE. |
---|
498 | |
---|
499 | ztopsw_aero(:,:) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 |
---|
500 | ztopsw0_aero(:,:) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 |
---|
501 | zsolsw_aero(:,:) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 |
---|
502 | zsolsw0_aero(:,:) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 |
---|
503 | |
---|
504 | ZTOPSWADAERO(:) = 0. !ym missing init |
---|
505 | ZSOLSWADAERO(:) = 0. !ym missing init |
---|
506 | ZTOPSWAD0AERO(:) = 0. !ym missing init |
---|
507 | ZSOLSWAD0AERO(:) = 0. !ym missing init |
---|
508 | ZTOPSWAIAERO(:) = 0. !ym missing init |
---|
509 | ZSOLSWAIAERO(:) = 0. !ym missing init |
---|
510 | ZTOPSWCF_AERO(:,:)= 0.!ym missing init |
---|
511 | ZSOLSWCF_AERO(:,:) =0. !ym missing init |
---|
512 | |
---|
513 | ! |
---|
514 | ! AI 02.2021 |
---|
515 | #ifdef CPP_ECRAD |
---|
516 | ZEMIS = 1.0 |
---|
517 | ZEMISW = 1.0 |
---|
518 | ZGELAM = longitude |
---|
519 | ZGEMU = sin(latitude) |
---|
520 | ZCO2 = RCO2 |
---|
521 | ZCH4 = RCH4 |
---|
522 | ZN2O = RN2O |
---|
523 | ZNO2 = 0.0 |
---|
524 | ZCFC11 = RCFC11 |
---|
525 | ZCFC12 = RCFC12 |
---|
526 | ZHCFC22 = 0.0 |
---|
527 | ZO2 = 0.0 |
---|
528 | ZCCL4 = 0.0 |
---|
529 | ZQ_RAIN = 0.0 |
---|
530 | ZQ_SNOW = 0.0 |
---|
531 | ZAEROSOL_OLD = 0.0 |
---|
532 | ZAEROSOL = 0.0 |
---|
533 | seuilmach=tiny(seuilmach) |
---|
534 | #endif |
---|
535 | |
---|
536 | !------------------------------------------- |
---|
537 | nb_gr = KLON / kdlon |
---|
538 | IF (nb_gr*kdlon .NE. KLON) THEN |
---|
539 | PRINT*, "kdlon mauvais:", KLON, kdlon, nb_gr |
---|
540 | call abort_physic("radlwsw", "", 1) |
---|
541 | ENDIF |
---|
542 | IF (kflev .NE. KLEV) THEN |
---|
543 | PRINT*, "kflev differe de KLEV, kflev, KLEV" |
---|
544 | call abort_physic("radlwsw", "", 1) |
---|
545 | ENDIF |
---|
546 | !------------------------------------------- |
---|
547 | DO k = 1, KLEV |
---|
548 | DO i = 1, KLON |
---|
549 | heat(i,k)=0. |
---|
550 | cool(i,k)=0. |
---|
551 | heat_volc(i,k)=0. !NL |
---|
552 | cool_volc(i,k)=0. !NL |
---|
553 | heat0(i,k)=0. |
---|
554 | cool0(i,k)=0. |
---|
555 | ENDDO |
---|
556 | ENDDO |
---|
557 | ! |
---|
558 | zdist = dist |
---|
559 | ! |
---|
560 | PSCT = solaire/zdist/zdist |
---|
561 | |
---|
562 | IF (type_trac == 'repr') THEN |
---|
563 | #ifdef REPROBUS |
---|
564 | IF (iflag_rrtm==0) THEN |
---|
565 | IF (ok_SUNTIME) PSCT = solaireTIME/zdist/zdist |
---|
566 | print*,'Constante solaire: ',PSCT*zdist*zdist |
---|
567 | ENDIF |
---|
568 | #endif |
---|
569 | ENDIF |
---|
570 | |
---|
571 | IF (lldebug) THEN |
---|
572 | print*,'************** Debut boucle de 1 a ', nb_gr |
---|
573 | ENDIF |
---|
574 | |
---|
575 | DO j = 1, nb_gr |
---|
576 | iof = kdlon*(j-1) |
---|
577 | DO i = 1, kdlon |
---|
578 | zfract(i) = fract(iof+i) |
---|
579 | zrmu0(i) = rmu0(iof+i) |
---|
580 | |
---|
581 | |
---|
582 | IF (iflag_rrtm==0) THEN |
---|
583 | ! Albedo |
---|
584 | PALBD(i,1)=alb_dif(iof+i,1) |
---|
585 | PALBD(i,2)=alb_dif(iof+i,2) |
---|
586 | PALBP(i,1)=alb_dir(iof+i,1) |
---|
587 | PALBP(i,2)=alb_dir(iof+i,2) |
---|
588 | ! AI 02.2021 cas iflag_rrtm=1 et 2 |
---|
589 | ELSEIF (iflag_rrtm==1.OR.iflag_rrtm==2) THEN |
---|
590 | DO kk=1,NSW |
---|
591 | PALBD_NEW(i,kk)=alb_dif(iof+i,kk) |
---|
592 | PALBP_NEW(i,kk)=alb_dir(iof+i,kk) |
---|
593 | ENDDO |
---|
594 | ! |
---|
595 | ENDIF |
---|
596 | !albedo SB <<< |
---|
597 | |
---|
598 | PEMIS(i) = 1.0 !!!!! A REVOIR (MPL) |
---|
599 | PVIEW(i) = 1.66 |
---|
600 | PPSOL(i) = paprs(iof+i,1) |
---|
601 | zx_alpha1 = (paprs(iof+i,1)-pplay(iof+i,2))/(pplay(iof+i,1)-pplay(iof+i,2)) |
---|
602 | zx_alpha2 = 1.0 - zx_alpha1 |
---|
603 | PTL(i,1) = t(iof+i,1) * zx_alpha1 + t(iof+i,2) * zx_alpha2 |
---|
604 | PTL(i,KLEV+1) = t(iof+i,KLEV) |
---|
605 | PDT0(i) = tsol(iof+i) - PTL(i,1) |
---|
606 | ENDDO |
---|
607 | DO k = 2, kflev |
---|
608 | DO i = 1, kdlon |
---|
609 | PTL(i,k) = (t(iof+i,k)+t(iof+i,k-1))*0.5 |
---|
610 | ENDDO |
---|
611 | ENDDO |
---|
612 | DO k = 1, kflev |
---|
613 | DO i = 1, kdlon |
---|
614 | PDP(i,k) = paprs(iof+i,k)-paprs(iof+i,k+1) |
---|
615 | PTAVE(i,k) = t(iof+i,k) |
---|
616 | PWV(i,k) = MAX (q(iof+i,k), 1.0e-12) |
---|
617 | PQS(i,k) = PWV(i,k) |
---|
618 | ! Confert from column density of ozone in a cell, in kDU, to a mass fraction |
---|
619 | POZON(i,k, :) = wo(iof+i, k, :) * RG * dobson_u * 1e3 & |
---|
620 | / (paprs(iof+i, k) - paprs(iof+i, k+1)) |
---|
621 | ! A activer pour CCMVAL on prend l'ozone impose (MPL 07042010) |
---|
622 | ! POZON(i,k,:) = wo(i,k,:) |
---|
623 | ! print *,'RADLWSW: POZON',k, POZON(i,k,1) |
---|
624 | PCLDLD(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
625 | PCLDLU(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
626 | PCLDSW(i,k) = cldfra(iof+i,k) |
---|
627 | PTAU(i,1,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
628 | PTAU(i,2,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
629 | POMEGA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAU(i,1,k)) |
---|
630 | POMEGA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAU(i,2,k)) |
---|
631 | PCG(i,1,k) = 0.865 |
---|
632 | PCG(i,2,k) = 0.910 |
---|
633 | !- |
---|
634 | ! Introduced for aerosol indirect forcings. |
---|
635 | ! The following values use the cloud optical thickness calculated from |
---|
636 | ! present-day aerosol concentrations whereas the quantities without the |
---|
637 | ! "A" at the end are for pre-industial (natural-only) aerosol concentrations |
---|
638 | ! |
---|
639 | PTAUA(i,1,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
640 | PTAUA(i,2,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
641 | POMEGAA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAUA(i,1,k)) |
---|
642 | POMEGAA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAUA(i,2,k)) |
---|
643 | ENDDO |
---|
644 | ENDDO |
---|
645 | |
---|
646 | IF (type_trac == 'repr') THEN |
---|
647 | #ifdef REPROBUS |
---|
648 | ndimozon = size(wo, 3) |
---|
649 | CALL RAD_INTERACTIF(POZON,iof) |
---|
650 | #endif |
---|
651 | ENDIF |
---|
652 | ! |
---|
653 | DO k = 1, kflev+1 |
---|
654 | DO i = 1, kdlon |
---|
655 | PPMB(i,k) = paprs(iof+i,k)/100.0 |
---|
656 | ENDDO |
---|
657 | ENDDO |
---|
658 | ! |
---|
659 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
660 | DO kk = 1, 6 |
---|
661 | DO k = 1, kflev |
---|
662 | DO i = 1, kdlon |
---|
663 | PAER(i,k,kk) = 1.0E-15 !!!!! A REVOIR (MPL) |
---|
664 | ENDDO |
---|
665 | ENDDO |
---|
666 | ENDDO |
---|
667 | DO k = 1, kflev |
---|
668 | DO i = 1, kdlon |
---|
669 | tauaero(i,k,:,1)=tau_aero(iof+i,k,:,1) |
---|
670 | pizaero(i,k,:,1)=piz_aero(iof+i,k,:,1) |
---|
671 | cgaero(i,k,:,1) =cg_aero(iof+i,k,:,1) |
---|
672 | tauaero(i,k,:,2)=tau_aero(iof+i,k,:,2) |
---|
673 | pizaero(i,k,:,2)=piz_aero(iof+i,k,:,2) |
---|
674 | cgaero(i,k,:,2) =cg_aero(iof+i,k,:,2) |
---|
675 | ENDDO |
---|
676 | ENDDO |
---|
677 | ! |
---|
678 | !===== iflag_rrtm ================================================ |
---|
679 | ! |
---|
680 | IF (iflag_rrtm == 0) THEN !!!! remettre 0 juste pour tester l'ancien rayt via rrtm |
---|
681 | ! |
---|
682 | !--- Mise a zero des tableaux output du rayonnement LW-AR4 ---------- |
---|
683 | DO k = 1, kflev+1 |
---|
684 | DO i = 1, kdlon |
---|
685 | ! print *,'RADLWSW: boucle mise a zero i k',i,k |
---|
686 | ZFLUP(i,k)=0. |
---|
687 | ZFLDN(i,k)=0. |
---|
688 | ZFLUP0(i,k)=0. |
---|
689 | ZFLDN0(i,k)=0. |
---|
690 | ZLWFT0_i(i,k)=0. |
---|
691 | ZFLUCUP_i(i,k)=0. |
---|
692 | ZFLUCDWN_i(i,k)=0. |
---|
693 | ENDDO |
---|
694 | ENDDO |
---|
695 | DO k = 1, kflev |
---|
696 | DO i = 1, kdlon |
---|
697 | zcool(i,k)=0. |
---|
698 | zcool_volc(i,k)=0. !NL |
---|
699 | zcool0(i,k)=0. |
---|
700 | ENDDO |
---|
701 | ENDDO |
---|
702 | DO i = 1, kdlon |
---|
703 | ztoplw(i)=0. |
---|
704 | zsollw(i)=0. |
---|
705 | ztoplw0(i)=0. |
---|
706 | zsollw0(i)=0. |
---|
707 | zsollwdown(i)=0. |
---|
708 | ztoplwad0aero(i) = 0. |
---|
709 | ztoplwadaero(i) = 0. |
---|
710 | ENDDO |
---|
711 | ! Old radiation scheme, used for AR4 runs |
---|
712 | ! average day-night ozone for longwave |
---|
713 | CALL LW_LMDAR4(& |
---|
714 | PPMB, PDP,& |
---|
715 | PPSOL,PDT0,PEMIS,& |
---|
716 | PTL, PTAVE, PWV, POZON(:, :, 1), PAER,& |
---|
717 | PCLDLD,PCLDLU,& |
---|
718 | PVIEW,& |
---|
719 | zcool, zcool0,& |
---|
720 | ztoplw,zsollw,ztoplw0,zsollw0,& |
---|
721 | zsollwdown,& |
---|
722 | ZFLUP, ZFLDN, ZFLUP0,ZFLDN0) |
---|
723 | !----- Mise a zero des tableaux output du rayonnement SW-AR4 |
---|
724 | DO k = 1, kflev+1 |
---|
725 | DO i = 1, kdlon |
---|
726 | ZFSUP(i,k)=0. |
---|
727 | ZFSDN(i,k)=0. |
---|
728 | ZFSUP0(i,k)=0. |
---|
729 | ZFSDN0(i,k)=0. |
---|
730 | ZFSUPC0(i,k)=0. |
---|
731 | ZFSDNC0(i,k)=0. |
---|
732 | ZFLUPC0(i,k)=0. |
---|
733 | ZFLDNC0(i,k)=0. |
---|
734 | ZSWFT0_i(i,k)=0. |
---|
735 | ZFCUP_i(i,k)=0. |
---|
736 | ZFCDWN_i(i,k)=0. |
---|
737 | ZFCCUP_i(i,k)=0. |
---|
738 | ZFCCDWN_i(i,k)=0. |
---|
739 | ZFLCCUP_i(i,k)=0. |
---|
740 | ZFLCCDWN_i(i,k)=0. |
---|
741 | zswadaero(i,k)=0. !--NL |
---|
742 | ENDDO |
---|
743 | ENDDO |
---|
744 | DO k = 1, kflev |
---|
745 | DO i = 1, kdlon |
---|
746 | zheat(i,k)=0. |
---|
747 | zheat_volc(i,k)=0. |
---|
748 | zheat0(i,k)=0. |
---|
749 | ENDDO |
---|
750 | ENDDO |
---|
751 | DO i = 1, kdlon |
---|
752 | zalbpla(i)=0. |
---|
753 | ztopsw(i)=0. |
---|
754 | zsolsw(i)=0. |
---|
755 | ztopsw0(i)=0. |
---|
756 | zsolsw0(i)=0. |
---|
757 | ztopswadaero(i)=0. |
---|
758 | zsolswadaero(i)=0. |
---|
759 | ztopswaiaero(i)=0. |
---|
760 | zsolswaiaero(i)=0. |
---|
761 | ENDDO |
---|
762 | |
---|
763 | !--fraction of diffuse radiation in surface SW downward radiation |
---|
764 | !--not computed with old radiation scheme |
---|
765 | zsolswfdiff(:) = -999.999 |
---|
766 | |
---|
767 | ! print *,'Avant SW_LMDAR4: PSCT zrmu0 zfract',PSCT, zrmu0, zfract |
---|
768 | ! daylight ozone, if we have it, for short wave |
---|
769 | CALL SW_AEROAR4(PSCT, zrmu0, zfract,& |
---|
770 | PPMB, PDP,& |
---|
771 | PPSOL, PALBD, PALBP,& |
---|
772 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
773 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
774 | zheat, zheat0,& |
---|
775 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
776 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
777 | tauaero, pizaero, cgaero, & |
---|
778 | PTAUA, POMEGAA,& |
---|
779 | ztopswadaero,zsolswadaero,& |
---|
780 | ztopswad0aero,zsolswad0aero,& |
---|
781 | ztopswaiaero,zsolswaiaero, & |
---|
782 | ztopsw_aero,ztopsw0_aero,& |
---|
783 | zsolsw_aero,zsolsw0_aero,& |
---|
784 | ztopswcf_aero,zsolswcf_aero, & |
---|
785 | ok_ade, ok_aie, flag_aerosol,flag_aerosol_strat) |
---|
786 | |
---|
787 | ZSWFT0_i(:,:) = ZFSDN0(:,:)-ZFSUP0(:,:) |
---|
788 | ZLWFT0_i(:,:) =-ZFLDN0(:,:)-ZFLUP0(:,:) |
---|
789 | |
---|
790 | DO i=1,kdlon |
---|
791 | DO k=1,kflev+1 |
---|
792 | lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) |
---|
793 | lwdn ( iof+i,k) = ZFLDN ( i,k) |
---|
794 | lwup0 ( iof+i,k) = ZFLUP0 ( i,k) |
---|
795 | lwup ( iof+i,k) = ZFLUP ( i,k) |
---|
796 | swdn0 ( iof+i,k) = ZFSDN0 ( i,k) |
---|
797 | swdn ( iof+i,k) = ZFSDN ( i,k) |
---|
798 | swup0 ( iof+i,k) = ZFSUP0 ( i,k) |
---|
799 | swup ( iof+i,k) = ZFSUP ( i,k) |
---|
800 | ENDDO |
---|
801 | ENDDO |
---|
802 | ! |
---|
803 | ELSE IF (iflag_rrtm == 1) then |
---|
804 | #ifdef CPP_RRTM |
---|
805 | ! if (prt_level.gt.10)write(lunout,*)'CPP_RRTM=.T.' |
---|
806 | !===== iflag_rrtm=1, on passe dans SW via RECMWFL =============== |
---|
807 | |
---|
808 | DO k = 1, kflev+1 |
---|
809 | DO i = 1, kdlon |
---|
810 | ZEMTD_i(i,k)=0. |
---|
811 | ZEMTU_i(i,k)=0. |
---|
812 | ZTRSO_i(i,k)=0. |
---|
813 | ZTH_i(i,k)=0. |
---|
814 | ZLWFT_i(i,k)=0. |
---|
815 | ZSWFT_i(i,k)=0. |
---|
816 | ZFLUX_i(i,1,k)=0. |
---|
817 | ZFLUX_i(i,2,k)=0. |
---|
818 | ZFLUC_i(i,1,k)=0. |
---|
819 | ZFLUC_i(i,2,k)=0. |
---|
820 | ZFSDWN_i(i,k)=0. |
---|
821 | ZFCDWN_i(i,k)=0. |
---|
822 | ZFCCDWN_i(i,k)=0. |
---|
823 | ZFSUP_i(i,k)=0. |
---|
824 | ZFCUP_i(i,k)=0. |
---|
825 | ZFCCUP_i(i,k)=0. |
---|
826 | ZFLCCDWN_i(i,k)=0. |
---|
827 | ZFLCCUP_i(i,k)=0. |
---|
828 | ENDDO |
---|
829 | ENDDO |
---|
830 | ! |
---|
831 | !--OB |
---|
832 | !--aerosol TOT - anthropogenic+natural - index 2 |
---|
833 | !--aerosol NAT - natural only - index 1 |
---|
834 | ! |
---|
835 | DO i = 1, kdlon |
---|
836 | DO k = 1, kflev |
---|
837 | DO kk=1, NSW |
---|
838 | ! |
---|
839 | PTAU_TOT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,2,kk) |
---|
840 | PPIZA_TOT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,2,kk) |
---|
841 | PCGA_TOT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,2,kk) |
---|
842 | ! |
---|
843 | PTAU_NAT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,1,kk) |
---|
844 | PPIZA_NAT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,1,kk) |
---|
845 | PCGA_NAT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,1,kk) |
---|
846 | ! |
---|
847 | ENDDO |
---|
848 | ENDDO |
---|
849 | ENDDO |
---|
850 | !-end OB |
---|
851 | ! |
---|
852 | !--C. Kleinschmitt |
---|
853 | !--aerosol TOT - anthropogenic+natural - index 2 |
---|
854 | !--aerosol NAT - natural only - index 1 |
---|
855 | ! |
---|
856 | DO i = 1, kdlon |
---|
857 | DO k = 1, kflev |
---|
858 | DO kk=1, NLW |
---|
859 | ! |
---|
860 | PTAU_LW_TOT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,2,kk) |
---|
861 | PTAU_LW_NAT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,1,kk) |
---|
862 | ! |
---|
863 | ENDDO |
---|
864 | ENDDO |
---|
865 | ENDDO |
---|
866 | !-end C. Kleinschmitt |
---|
867 | ! |
---|
868 | DO i = 1, kdlon |
---|
869 | ZCTRSO(i,1)=0. |
---|
870 | ZCTRSO(i,2)=0. |
---|
871 | ZCEMTR(i,1)=0. |
---|
872 | ZCEMTR(i,2)=0. |
---|
873 | ZTRSOD(i)=0. |
---|
874 | ZLWFC(i,1)=0. |
---|
875 | ZLWFC(i,2)=0. |
---|
876 | ZSWFC(i,1)=0. |
---|
877 | ZSWFC(i,2)=0. |
---|
878 | PFSDNN(i)=0. |
---|
879 | PFSDNV(i)=0. |
---|
880 | DO kk = 1, NSW |
---|
881 | PSFSWDIR(i,kk)=0. |
---|
882 | PSFSWDIF(i,kk)=0. |
---|
883 | ENDDO |
---|
884 | ENDDO |
---|
885 | !----- Fin des mises a zero des tableaux output de RECMWF ------------------- |
---|
886 | ! GEMU(1:klon)=sin(rlatd(1:klon)) |
---|
887 | ! On met les donnees dans l'ordre des niveaux arpege |
---|
888 | paprs_i(:,1)=paprs(:,klev+1) |
---|
889 | DO k=1,klev |
---|
890 | paprs_i(1:klon,k+1) =paprs(1:klon,klev+1-k) |
---|
891 | pplay_i(1:klon,k) =pplay(1:klon,klev+1-k) |
---|
892 | cldfra_i(1:klon,k) =cldfra(1:klon,klev+1-k) |
---|
893 | PDP_i(1:klon,k) =PDP(1:klon,klev+1-k) |
---|
894 | t_i(1:klon,k) =t(1:klon,klev+1-k) |
---|
895 | q_i(1:klon,k) =q(1:klon,klev+1-k) |
---|
896 | qsat_i(1:klon,k) =qsat(1:klon,klev+1-k) |
---|
897 | flwc_i(1:klon,k) =flwc(1:klon,klev+1-k) |
---|
898 | fiwc_i(1:klon,k) =fiwc(1:klon,klev+1-k) |
---|
899 | ref_liq_i(1:klon,k) =ref_liq(1:klon,klev+1-k) |
---|
900 | ref_ice_i(1:klon,k) =ref_ice(1:klon,klev+1-k) |
---|
901 | !-OB |
---|
902 | ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k) |
---|
903 | ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k) |
---|
904 | ENDDO |
---|
905 | DO k=1,kflev |
---|
906 | POZON_i(1:klon,k,:)=POZON(1:klon,kflev+1-k,:) |
---|
907 | !!! POZON_i(1:klon,k)=POZON(1:klon,k) !!! on laisse 1=sol et klev=top |
---|
908 | ! print *,'Juste avant RECMWFL: k tsol temp',k,tsol,t(1,k) |
---|
909 | !!!!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
910 | DO i=1,6 |
---|
911 | PAER_i(1:klon,k,i)=PAER(1:klon,kflev+1-k,i) |
---|
912 | ENDDO |
---|
913 | ENDDO |
---|
914 | |
---|
915 | ! print *,'RADLWSW: avant RECMWFL, RI0,rmu0=',solaire,rmu0 |
---|
916 | |
---|
917 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
918 | ! La version ARPEGE1D utilise differentes valeurs de la constante |
---|
919 | ! solaire suivant le rayonnement utilise. |
---|
920 | ! A controler ... |
---|
921 | ! SOLAR FLUX AT THE TOP (/YOMPHY3/) |
---|
922 | ! introduce season correction |
---|
923 | !-------------------------------------- |
---|
924 | ! RII0 = RIP0 |
---|
925 | ! IF(LRAYFM) |
---|
926 | ! RII0 = RIP0M ! =rip0m if Morcrette non-each time step call. |
---|
927 | ! IF(LRAYFM15) |
---|
928 | ! RII0 = RIP0M15 ! =rip0m if Morcrette non-each time step call. |
---|
929 | RII0=solaire/zdist/zdist |
---|
930 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
931 | ! Ancien appel a RECMWF (celui du cy25) |
---|
932 | ! CALL RECMWF (ist , iend, klon , ktdia , klev , kmode , |
---|
933 | ! s PALBD , PALBP , paprs_i , pplay_i , RCO2 , cldfra_i, |
---|
934 | ! s POZON_i , PAER_i , PDP_i , PEMIS , GEMU , rmu0, |
---|
935 | ! s q_i , qsat_i , fiwc_i , flwc_i , zmasq , t_i ,tsol, |
---|
936 | ! s ZEMTD_i , ZEMTU_i , ZTRSO_i , |
---|
937 | ! s ZTH_i , ZCTRSO , ZCEMTR , ZTRSOD , |
---|
938 | ! s ZLWFC , ZLWFT_i , ZSWFC , ZSWFT_i , |
---|
939 | ! s ZFLUX_i , ZFLUC_i , ZFSDWN_i, ZFSUP_i , ZFCDWN_i,ZFCUP_i) |
---|
940 | ! s 'RECMWF ') |
---|
941 | ! |
---|
942 | IF (lldebug) THEN |
---|
943 | CALL writefield_phy('paprs_i',paprs_i,klev+1) |
---|
944 | CALL writefield_phy('pplay_i',pplay_i,klev) |
---|
945 | CALL writefield_phy('cldfra_i',cldfra_i,klev) |
---|
946 | CALL writefield_phy('pozon_i',POZON_i,klev) |
---|
947 | CALL writefield_phy('paer_i',PAER_i,klev) |
---|
948 | CALL writefield_phy('pdp_i',PDP_i,klev) |
---|
949 | CALL writefield_phy('q_i',q_i,klev) |
---|
950 | CALL writefield_phy('qsat_i',qsat_i,klev) |
---|
951 | CALL writefield_phy('fiwc_i',fiwc_i,klev) |
---|
952 | CALL writefield_phy('flwc_i',flwc_i,klev) |
---|
953 | CALL writefield_phy('t_i',t_i,klev) |
---|
954 | CALL writefield_phy('palbd_new',PALBD_NEW,NSW) |
---|
955 | CALL writefield_phy('palbp_new',PALBP_NEW,NSW) |
---|
956 | ENDIF |
---|
957 | |
---|
958 | ! Nouvel appel a RECMWF (celui du cy32t0) |
---|
959 | CALL RECMWF_AERO (ist , iend, klon , ktdia , klev , kmode ,& |
---|
960 | PALBD_NEW,PALBP_NEW, paprs_i , pplay_i , RCO2 , cldfra_i,& |
---|
961 | POZON_i , PAER_i , PDP_i , PEMIS , rmu0 ,& |
---|
962 | q_i , qsat_i , fiwc_i , flwc_i , zmasq , t_i ,tsol,& |
---|
963 | ref_liq_i, ref_ice_i, & |
---|
964 | ref_liq_pi_i, ref_ice_pi_i, & ! rajoute par OB pour diagnostiquer effet indirect |
---|
965 | ZEMTD_i , ZEMTU_i , ZTRSO_i ,& |
---|
966 | ZTH_i , ZCTRSO , ZCEMTR , ZTRSOD ,& |
---|
967 | ZLWFC , ZLWFT_i , ZSWFC , ZSWFT_i ,& |
---|
968 | PSFSWDIR , PSFSWDIF, PFSDNN , PFSDNV ,& |
---|
969 | PPIZA_TOT, PCGA_TOT,PTAU_TOT,& |
---|
970 | PPIZA_NAT, PCGA_NAT,PTAU_NAT, & ! rajoute par OB pour diagnostiquer effet direct |
---|
971 | PTAU_LW_TOT, PTAU_LW_NAT, & ! rajoute par C. Kleinschmitt |
---|
972 | ZFLUX_i , ZFLUC_i ,& |
---|
973 | ZFSDWN_i , ZFSUP_i , ZFCDWN_i, ZFCUP_i, ZFCCDWN_i, ZFCCUP_i, ZFLCCDWN_i, ZFLCCUP_i, & |
---|
974 | ZTOPSWADAERO,ZSOLSWADAERO,& ! rajoute par OB pour diagnostics |
---|
975 | ZTOPSWAD0AERO,ZSOLSWAD0AERO,& |
---|
976 | ZTOPSWAIAERO,ZSOLSWAIAERO, & |
---|
977 | ZTOPSWCF_AERO,ZSOLSWCF_AERO, & |
---|
978 | ZSWADAERO, & !--NL |
---|
979 | ZTOPLWADAERO,ZSOLLWADAERO,& ! rajoute par C. Kleinscmitt pour LW diagnostics |
---|
980 | ZTOPLWAD0AERO,ZSOLLWAD0AERO,& |
---|
981 | ZTOPLWAIAERO,ZSOLLWAIAERO, & |
---|
982 | ZLWADAERO, & !--NL |
---|
983 | volmip_solsw, flag_volc_surfstrat, & !--VOLMIP |
---|
984 | ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat, flag_aer_feedback) ! flags aerosols |
---|
985 | |
---|
986 | !--OB diagnostics |
---|
987 | ! & PTOPSWAIAERO,PSOLSWAIAERO,& |
---|
988 | ! & PTOPSWCFAERO,PSOLSWCFAERO,& |
---|
989 | ! & PSWADAERO,& !--NL |
---|
990 | !!--LW diagnostics CK |
---|
991 | ! & PTOPLWADAERO,PSOLLWADAERO,& |
---|
992 | ! & PTOPLWAD0AERO,PSOLLWAD0AERO,& |
---|
993 | ! & PTOPLWAIAERO,PSOLLWAIAERO,& |
---|
994 | ! & PLWADAERO,& !--NL |
---|
995 | !!..end |
---|
996 | ! & ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat,& |
---|
997 | ! & flag_aer_feedback) |
---|
998 | |
---|
999 | |
---|
1000 | ! print *,'RADLWSW: apres RECMWF' |
---|
1001 | IF (lldebug) THEN |
---|
1002 | CALL writefield_phy('zemtd_i',ZEMTD_i,klev+1) |
---|
1003 | CALL writefield_phy('zemtu_i',ZEMTU_i,klev+1) |
---|
1004 | CALL writefield_phy('ztrso_i',ZTRSO_i,klev+1) |
---|
1005 | CALL writefield_phy('zth_i',ZTH_i,klev+1) |
---|
1006 | CALL writefield_phy('zctrso',ZCTRSO,2) |
---|
1007 | CALL writefield_phy('zcemtr',ZCEMTR,2) |
---|
1008 | CALL writefield_phy('ztrsod',ZTRSOD,1) |
---|
1009 | CALL writefield_phy('zlwfc',ZLWFC,2) |
---|
1010 | CALL writefield_phy('zlwft_i',ZLWFT_i,klev+1) |
---|
1011 | CALL writefield_phy('zswfc',ZSWFC,2) |
---|
1012 | CALL writefield_phy('zswft_i',ZSWFT_i,klev+1) |
---|
1013 | CALL writefield_phy('psfswdir',PSFSWDIR,6) |
---|
1014 | CALL writefield_phy('psfswdif',PSFSWDIF,6) |
---|
1015 | CALL writefield_phy('pfsdnn',PFSDNN,1) |
---|
1016 | CALL writefield_phy('pfsdnv',PFSDNV,1) |
---|
1017 | CALL writefield_phy('ppiza_dst',PPIZA_TOT,klev) |
---|
1018 | CALL writefield_phy('pcga_dst',PCGA_TOT,klev) |
---|
1019 | CALL writefield_phy('ptaurel_dst',PTAU_TOT,klev) |
---|
1020 | CALL writefield_phy('zflux_i',ZFLUX_i,klev+1) |
---|
1021 | CALL writefield_phy('zfluc_i',ZFLUC_i,klev+1) |
---|
1022 | CALL writefield_phy('zfsdwn_i',ZFSDWN_i,klev+1) |
---|
1023 | CALL writefield_phy('zfsup_i',ZFSUP_i,klev+1) |
---|
1024 | CALL writefield_phy('zfcdwn_i',ZFCDWN_i,klev+1) |
---|
1025 | CALL writefield_phy('zfcup_i',ZFCUP_i,klev+1) |
---|
1026 | ENDIF |
---|
1027 | |
---|
1028 | ! --------- |
---|
1029 | ! --------- |
---|
1030 | ! On retablit l'ordre des niveaux lmd pour les tableaux de sortie |
---|
1031 | ! D autre part, on multiplie les resultats SW par fract pour etre coherent |
---|
1032 | ! avec l ancien rayonnement AR4. Si nuit, fract=0 donc pas de |
---|
1033 | ! rayonnement SW. (MPL 260609) |
---|
1034 | DO k=0,klev |
---|
1035 | DO i=1,klon |
---|
1036 | ZEMTD(i,k+1) = ZEMTD_i(i,k+1) |
---|
1037 | ZEMTU(i,k+1) = ZEMTU_i(i,k+1) |
---|
1038 | ZTRSO(i,k+1) = ZTRSO_i(i,k+1) |
---|
1039 | ZTH(i,k+1) = ZTH_i(i,k+1) |
---|
1040 | ! ZLWFT(i,k+1) = ZLWFT_i(i,klev+1-k) |
---|
1041 | ! ZSWFT(i,k+1) = ZSWFT_i(i,klev+1-k) |
---|
1042 | ZFLUP(i,k+1) = ZFLUX_i(i,1,k+1) |
---|
1043 | ZFLDN(i,k+1) = ZFLUX_i(i,2,k+1) |
---|
1044 | ZFLUP0(i,k+1) = ZFLUC_i(i,1,k+1) |
---|
1045 | ZFLDN0(i,k+1) = ZFLUC_i(i,2,k+1) |
---|
1046 | ZFSDN(i,k+1) = ZFSDWN_i(i,k+1)*fract(i) |
---|
1047 | ZFSDN0(i,k+1) = ZFCDWN_i(i,k+1)*fract(i) |
---|
1048 | ZFSDNC0(i,k+1)= ZFCCDWN_i(i,k+1)*fract(i) |
---|
1049 | ZFSUP (i,k+1) = ZFSUP_i(i,k+1)*fract(i) |
---|
1050 | ZFSUP0(i,k+1) = ZFCUP_i(i,k+1)*fract(i) |
---|
1051 | ZFSUPC0(i,k+1)= ZFCCUP_i(i,k+1)*fract(i) |
---|
1052 | ZFLDNC0(i,k+1)= ZFLCCDWN_i(i,k+1) |
---|
1053 | ZFLUPC0(i,k+1)= ZFLCCUP_i(i,k+1) |
---|
1054 | IF (ok_volcan) THEN |
---|
1055 | ZSWADAERO(i,k+1)=ZSWADAERO(i,k+1)*fract(i) !--NL |
---|
1056 | ENDIF |
---|
1057 | |
---|
1058 | ! Nouveau calcul car visiblement ZSWFT et ZSWFC sont nuls dans RRTM cy32 |
---|
1059 | ! en sortie de radlsw.F90 - MPL 7.01.09 |
---|
1060 | ZSWFT(i,k+1) = (ZFSDWN_i(i,k+1)-ZFSUP_i(i,k+1))*fract(i) |
---|
1061 | ZSWFT0_i(i,k+1) = (ZFCDWN_i(i,k+1)-ZFCUP_i(i,k+1))*fract(i) |
---|
1062 | ! WRITE(*,'("FSDN FSUP FCDN FCUP: ",4E12.5)') ZFSDWN_i(i,k+1),& |
---|
1063 | ! ZFSUP_i(i,k+1),ZFCDWN_i(i,k+1),ZFCUP_i(i,k+1) |
---|
1064 | ZLWFT(i,k+1) =-ZFLUX_i(i,2,k+1)-ZFLUX_i(i,1,k+1) |
---|
1065 | ZLWFT0_i(i,k+1)=-ZFLUC_i(i,2,k+1)-ZFLUC_i(i,1,k+1) |
---|
1066 | ! print *,'FLUX2 FLUX1 FLUC2 FLUC1',ZFLUX_i(i,2,k+1),& |
---|
1067 | ! & ZFLUX_i(i,1,k+1),ZFLUC_i(i,2,k+1),ZFLUC_i(i,1,k+1) |
---|
1068 | ENDDO |
---|
1069 | ENDDO |
---|
1070 | |
---|
1071 | !--ajout OB |
---|
1072 | ZTOPSWADAERO(:) =ZTOPSWADAERO(:) *fract(:) |
---|
1073 | ZSOLSWADAERO(:) =ZSOLSWADAERO(:) *fract(:) |
---|
1074 | ZTOPSWAD0AERO(:)=ZTOPSWAD0AERO(:)*fract(:) |
---|
1075 | ZSOLSWAD0AERO(:)=ZSOLSWAD0AERO(:)*fract(:) |
---|
1076 | ZTOPSWAIAERO(:) =ZTOPSWAIAERO(:) *fract(:) |
---|
1077 | ZSOLSWAIAERO(:) =ZSOLSWAIAERO(:) *fract(:) |
---|
1078 | ZTOPSWCF_AERO(:,1)=ZTOPSWCF_AERO(:,1)*fract(:) |
---|
1079 | ZTOPSWCF_AERO(:,2)=ZTOPSWCF_AERO(:,2)*fract(:) |
---|
1080 | ZTOPSWCF_AERO(:,3)=ZTOPSWCF_AERO(:,3)*fract(:) |
---|
1081 | ZSOLSWCF_AERO(:,1)=ZSOLSWCF_AERO(:,1)*fract(:) |
---|
1082 | ZSOLSWCF_AERO(:,2)=ZSOLSWCF_AERO(:,2)*fract(:) |
---|
1083 | ZSOLSWCF_AERO(:,3)=ZSOLSWCF_AERO(:,3)*fract(:) |
---|
1084 | |
---|
1085 | ! --------- |
---|
1086 | ! --------- |
---|
1087 | ! On renseigne les champs LMDz, pour avoir la meme chose qu'en sortie de |
---|
1088 | ! LW_LMDAR4 et SW_LMDAR4 |
---|
1089 | |
---|
1090 | !--fraction of diffuse radiation in surface SW downward radiation |
---|
1091 | DO i = 1, kdlon |
---|
1092 | IF (fract(i).GT.0.0) THEN |
---|
1093 | zdir=SUM(PSFSWDIR(i,:)) |
---|
1094 | zdif=SUM(PSFSWDIF(i,:)) |
---|
1095 | zsolswfdiff(i) = zdif/(zdir+zdif) |
---|
1096 | ELSE !--night |
---|
1097 | zsolswfdiff(i) = 1.0 |
---|
1098 | ENDIF |
---|
1099 | ENDDO |
---|
1100 | ! |
---|
1101 | DO i = 1, kdlon |
---|
1102 | zsolsw(i) = ZSWFT(i,1) |
---|
1103 | zsolsw0(i) = ZSWFT0_i(i,1) |
---|
1104 | ! zsolsw0(i) = ZFSDN0(i,1) -ZFSUP0(i,1) |
---|
1105 | ztopsw(i) = ZSWFT(i,klev+1) |
---|
1106 | ztopsw0(i) = ZSWFT0_i(i,klev+1) |
---|
1107 | ! ztopsw0(i) = ZFSDN0(i,klev+1)-ZFSUP0(i,klev+1) |
---|
1108 | ! |
---|
1109 | ! zsollw(i) = ZFLDN(i,1) -ZFLUP(i,1) |
---|
1110 | ! zsollw0(i) = ZFLDN0(i,1) -ZFLUP0(i,1) |
---|
1111 | ! ztoplw(i) = ZFLDN(i,klev+1) -ZFLUP(i,klev+1) |
---|
1112 | ! ztoplw0(i) = ZFLDN0(i,klev+1)-ZFLUP0(i,klev+1) |
---|
1113 | zsollw(i) = ZLWFT(i,1) |
---|
1114 | zsollw0(i) = ZLWFT0_i(i,1) |
---|
1115 | ztoplw(i) = ZLWFT(i,klev+1)*(-1) |
---|
1116 | ztoplw0(i) = ZLWFT0_i(i,klev+1)*(-1) |
---|
1117 | ! |
---|
1118 | IF (fract(i) == 0.) THEN |
---|
1119 | !!!!! A REVOIR MPL (20090630) ca n a pas de sens quand fract=0 |
---|
1120 | ! pas plus que dans le sw_AR4 |
---|
1121 | zalbpla(i) = 1.0e+39 |
---|
1122 | ELSE |
---|
1123 | zalbpla(i) = ZFSUP(i,klev+1)/ZFSDN(i,klev+1) |
---|
1124 | ENDIF |
---|
1125 | !!! 5 juin 2015 |
---|
1126 | !!! Correction MP bug RRTM |
---|
1127 | zsollwdown(i)= -1.*ZFLDN(i,1) |
---|
1128 | ENDDO |
---|
1129 | ! print*,'OK2' |
---|
1130 | |
---|
1131 | !--add VOLMIP (surf cool or strat heat activate) |
---|
1132 | IF (flag_volc_surfstrat > 0) THEN |
---|
1133 | DO i = 1, kdlon |
---|
1134 | zsolsw(i) = volmip_solsw(i)*fract(i) |
---|
1135 | ENDDO |
---|
1136 | ENDIF |
---|
1137 | |
---|
1138 | ! extrait de SW_AR4 |
---|
1139 | ! DO k = 1, KFLEV |
---|
1140 | ! kpl1 = k+1 |
---|
1141 | ! DO i = 1, KDLON |
---|
1142 | ! PHEAT(i,k) = -(ZFSUP(i,kpl1)-ZFSUP(i,k)) -(ZFSDN(i,k)-ZFSDN(i,kpl1)) |
---|
1143 | ! PHEAT(i,k) = PHEAT(i,k) * RDAY*RG/RCPD / PDP(i,k) |
---|
1144 | ! ZLWFT(klon,k),ZSWFT |
---|
1145 | |
---|
1146 | DO k=1,kflev |
---|
1147 | DO i=1,kdlon |
---|
1148 | zheat(i,k)=(ZSWFT(i,k+1)-ZSWFT(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
1149 | zheat0(i,k)=(ZSWFT0_i(i,k+1)-ZSWFT0_i(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
1150 | zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
1151 | zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
1152 | IF (ok_volcan) THEN |
---|
1153 | zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL |
---|
1154 | zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL |
---|
1155 | ENDIF |
---|
1156 | ! print *,'heat cool heat0 cool0 ',zheat(i,k),zcool(i,k),zheat0(i,k),zcool0(i,k) |
---|
1157 | ! ZFLUCUP_i(i,k)=ZFLUC_i(i,1,k) |
---|
1158 | ! ZFLUCDWN_i(i,k)=ZFLUC_i(i,2,k) |
---|
1159 | ENDDO |
---|
1160 | ENDDO |
---|
1161 | #else |
---|
1162 | abort_message="You should compile with -rrtm if running with iflag_rrtm=1" |
---|
1163 | call abort_physic(modname, abort_message, 1) |
---|
1164 | #endif |
---|
1165 | !====================================================================== |
---|
1166 | ! AI fev 2021 |
---|
1167 | ELSE IF(iflag_rrtm == 2) THEN |
---|
1168 | print*,'Traitement cas iflag_rrtm = ',iflag_rrtm |
---|
1169 | ! print*,'Mise a zero des flux ' |
---|
1170 | #ifdef CPP_ECRAD |
---|
1171 | DO k = 1, kflev+1 |
---|
1172 | DO i = 1, kdlon |
---|
1173 | ZEMTD_i(i,k)=0. |
---|
1174 | ZEMTU_i(i,k)=0. |
---|
1175 | ZTRSO_i(i,k)=0. |
---|
1176 | ZTH_i(i,k)=0. |
---|
1177 | ZLWFT_i(i,k)=0. |
---|
1178 | ZSWFT_i(i,k)=0. |
---|
1179 | ZFLUX_i(i,1,k)=0. |
---|
1180 | ZFLUX_i(i,2,k)=0. |
---|
1181 | ZFLUC_i(i,1,k)=0. |
---|
1182 | ZFLUC_i(i,2,k)=0. |
---|
1183 | ZFSDWN_i(i,k)=0. |
---|
1184 | ZFCDWN_i(i,k)=0. |
---|
1185 | ZFCCDWN_i(i,k)=0. |
---|
1186 | ZFSUP_i(i,k)=0. |
---|
1187 | ZFCUP_i(i,k)=0. |
---|
1188 | ZFCCUP_i(i,k)=0. |
---|
1189 | ZFLCCDWN_i(i,k)=0. |
---|
1190 | ZFLCCUP_i(i,k)=0. |
---|
1191 | ENDDO |
---|
1192 | ENDDO |
---|
1193 | ! |
---|
1194 | ! AI ATTENTION Aerosols A REVOIR |
---|
1195 | DO i = 1, kdlon |
---|
1196 | DO k = 1, kflev |
---|
1197 | DO kk= 1, naero_spc |
---|
1198 | ! DO kk=1, NSW |
---|
1199 | ! |
---|
1200 | ! PTAU_TOT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,2,kk) |
---|
1201 | ! PPIZA_TOT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,2,kk) |
---|
1202 | ! PCGA_TOT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,2,kk) |
---|
1203 | ! |
---|
1204 | ! PTAU_NAT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,1,kk) |
---|
1205 | ! PPIZA_NAT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,1,kk) |
---|
1206 | ! PCGA_NAT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,1,kk) |
---|
1207 | ! ZAEROSOL(i,kflev+1-k,kk)=m_allaer(i,k,kk) |
---|
1208 | ZAEROSOL(i,kflev+1-k,kk)=m_allaer(i,k,kk) |
---|
1209 | ! |
---|
1210 | ENDDO |
---|
1211 | ENDDO |
---|
1212 | ENDDO |
---|
1213 | !-end OB |
---|
1214 | ! |
---|
1215 | ! DO i = 1, kdlon |
---|
1216 | ! DO k = 1, kflev |
---|
1217 | ! DO kk=1, NLW |
---|
1218 | ! |
---|
1219 | ! PTAU_LW_TOT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,2,kk) |
---|
1220 | ! PTAU_LW_NAT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,1,kk) |
---|
1221 | ! |
---|
1222 | ! ENDDO |
---|
1223 | ! ENDDO |
---|
1224 | ! ENDDO |
---|
1225 | !-end C. Kleinschmitt |
---|
1226 | ! |
---|
1227 | DO i = 1, kdlon |
---|
1228 | ZCTRSO(i,1)=0. |
---|
1229 | ZCTRSO(i,2)=0. |
---|
1230 | ZCEMTR(i,1)=0. |
---|
1231 | ZCEMTR(i,2)=0. |
---|
1232 | ZTRSOD(i)=0. |
---|
1233 | ZLWFC(i,1)=0. |
---|
1234 | ZLWFC(i,2)=0. |
---|
1235 | ZSWFC(i,1)=0. |
---|
1236 | ZSWFC(i,2)=0. |
---|
1237 | PFSDNN(i)=0. |
---|
1238 | PFSDNV(i)=0. |
---|
1239 | DO kk = 1, NSW |
---|
1240 | PSFSWDIR(i,kk)=0. |
---|
1241 | PSFSWDIF(i,kk)=0. |
---|
1242 | ENDDO |
---|
1243 | ENDDO |
---|
1244 | !----- Fin des mises a zero des tableaux output ------------------- |
---|
1245 | |
---|
1246 | ! On met les donnees dans l'ordre des niveaux ecrad |
---|
1247 | ! print*,'On inverse sur la verticale ' |
---|
1248 | paprs_i(:,1)=paprs(:,klev+1) |
---|
1249 | DO k=1,klev |
---|
1250 | paprs_i(1:klon,k+1) =paprs(1:klon,klev+1-k) |
---|
1251 | pplay_i(1:klon,k) =pplay(1:klon,klev+1-k) |
---|
1252 | cldfra_i(1:klon,k) =cldfra(1:klon,klev+1-k) |
---|
1253 | PDP_i(1:klon,k) =PDP(1:klon,klev+1-k) |
---|
1254 | t_i(1:klon,k) =t(1:klon,klev+1-k) |
---|
1255 | q_i(1:klon,k) =q(1:klon,klev+1-k) |
---|
1256 | qsat_i(1:klon,k) =qsat(1:klon,klev+1-k) |
---|
1257 | flwc_i(1:klon,k) =flwc(1:klon,klev+1-k) |
---|
1258 | fiwc_i(1:klon,k) =fiwc(1:klon,klev+1-k) |
---|
1259 | ref_liq_i(1:klon,k) =ref_liq(1:klon,klev+1-k)*1.0e-6 |
---|
1260 | ref_ice_i(1:klon,k) =ref_ice(1:klon,klev+1-k)*1.0e-6 |
---|
1261 | !-OB |
---|
1262 | ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k) |
---|
1263 | ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k) |
---|
1264 | ENDDO |
---|
1265 | DO k=1,kflev |
---|
1266 | POZON_i(1:klon,k,:)=POZON(1:klon,kflev+1-k,:) |
---|
1267 | ! ZO3_DP_i(1:klon,k)=ZO3_DP(1:klon,kflev+1-k) |
---|
1268 | ! DO i=1,6 |
---|
1269 | PAER_i(1:klon,k,:)=PAER(1:klon,kflev+1-k,:) |
---|
1270 | ! ENDDO |
---|
1271 | ENDDO |
---|
1272 | |
---|
1273 | ! AI 11.2021 |
---|
1274 | ! Calcul de ZTH_i (temp aux interfaces 1:klev+1) |
---|
1275 | ! IFS currently sets the half-level temperature at the surface to be |
---|
1276 | ! equal to the skin temperature. The radiation scheme takes as input |
---|
1277 | ! only the half-level temperatures and assumes the Planck function to |
---|
1278 | ! vary linearly in optical depth between half levels. In the lowest |
---|
1279 | ! atmospheric layer, where the atmospheric temperature can be much |
---|
1280 | ! cooler than the skin temperature, this can lead to significant |
---|
1281 | ! differences between the effective temperature of this lowest layer |
---|
1282 | ! and the true value in the model. |
---|
1283 | ! We may approximate the temperature profile in the lowest model level |
---|
1284 | ! as piecewise linear between the top of the layer T[k-1/2], the |
---|
1285 | ! centre of the layer T[k] and the base of the layer Tskin. The mean |
---|
1286 | ! temperature of the layer is then 0.25*T[k-1/2] + 0.5*T[k] + |
---|
1287 | ! 0.25*Tskin, which can be achieved by setting the atmospheric |
---|
1288 | ! temperature at the half-level corresponding to the surface as |
---|
1289 | ! follows: |
---|
1290 | ! AI ATTENTION fais dans interface radlw |
---|
1291 | !thermodynamics%temperature_hl(KIDIA:KFDIA,KLEV+1) & |
---|
1292 | ! & = PTEMPERATURE(KIDIA:KFDIA,KLEV) & |
---|
1293 | ! & + 0.5_JPRB * (PTEMPERATURE_H(KIDIA:KFDIA,KLEV+1) & |
---|
1294 | ! & -PTEMPERATURE_H(KIDIA:KFDIA,KLEV)) |
---|
1295 | |
---|
1296 | DO K=2,KLEV |
---|
1297 | DO i = 1, kdlon |
---|
1298 | ZTH_i(i,K)=& |
---|
1299 | & (t_i(i,K-1)*pplay_i(i,K-1)*(pplay_i(i,K)-paprs_i(i,K))& |
---|
1300 | & +t_i(i,K)*pplay_i(i,K)*(paprs_i(i,K)-pplay_i(i,K-1)))& |
---|
1301 | & *(1.0/(paprs_i(i,K)*(pplay_i(i,K)-pplay_i(i,K-1)))) |
---|
1302 | ENDDO |
---|
1303 | ENDDO |
---|
1304 | DO i = 1, kdlon |
---|
1305 | ! Sommet |
---|
1306 | ZTH_i(i,1)=t_i(i,1)-pplay_i(i,1)*(t_i(i,1)-ZTH_i(i,2))& |
---|
1307 | & /(pplay_i(i,1)-paprs_i(i,2)) |
---|
1308 | ! Vers le sol |
---|
1309 | ZTH_i(i,KLEV+1)=t_i(i,KLEV) + 0.5 * & |
---|
1310 | (tsol(i) - ZTH_i(i,KLEV)) |
---|
1311 | ENDDO |
---|
1312 | |
---|
1313 | |
---|
1314 | print *,'RADLWSW: avant RADIATION_SCHEME ' |
---|
1315 | |
---|
1316 | ! AI mars 2022 |
---|
1317 | SOLARIRAD = solaire/zdist/zdist |
---|
1318 | !! diagnos pour la comparaison a la version offline |
---|
1319 | !!! - Gas en VMR pour offline et MMR pour online |
---|
1320 | !!! - on utilise pour solarirrad une valeur constante |
---|
1321 | if (lldebug_for_offline) then |
---|
1322 | SOLARIRAD = 1366.0896 |
---|
1323 | ZCH4_off = CH4_ppb*1e-9 |
---|
1324 | ZN2O_off = N2O_ppb*1e-9 |
---|
1325 | ZNO2_off = 0.0 |
---|
1326 | ZCFC11_off = CFC11_ppt*1e-12 |
---|
1327 | ZCFC12_off = CFC12_ppt*1e-12 |
---|
1328 | ZHCFC22_off = 0.0 |
---|
1329 | ZCCL4_off = 0.0 |
---|
1330 | ZO2_off = 0.0 |
---|
1331 | ZCO2_off = co2_ppm*1e-6 |
---|
1332 | |
---|
1333 | CALL writefield_phy('rmu0',rmu0,1) |
---|
1334 | CALL writefield_phy('tsol',tsol,1) |
---|
1335 | CALL writefield_phy('emissiv_out',ZEMIS,1) |
---|
1336 | CALL writefield_phy('paprs_i',paprs_i,klev+1) |
---|
1337 | CALL writefield_phy('ZTH_i',ZTH_i,klev+1) |
---|
1338 | CALL writefield_phy('cldfra_i',cldfra_i,klev) |
---|
1339 | CALL writefield_phy('q_i',q_i,klev) |
---|
1340 | CALL writefield_phy('fiwc_i',fiwc_i,klev) |
---|
1341 | CALL writefield_phy('flwc_i',flwc_i,klev) |
---|
1342 | CALL writefield_phy('palbd_new',PALBD_NEW,NSW) |
---|
1343 | CALL writefield_phy('palbp_new',PALBP_NEW,NSW) |
---|
1344 | CALL writefield_phy('POZON',POZON_i(:,:,1),klev) |
---|
1345 | CALL writefield_phy('ZCO2',ZCO2_off,klev) |
---|
1346 | CALL writefield_phy('ZCH4',ZCH4_off,klev) |
---|
1347 | CALL writefield_phy('ZN2O',ZN2O_off,klev) |
---|
1348 | CALL writefield_phy('ZO2',ZO2_off,klev) |
---|
1349 | CALL writefield_phy('ZNO2',ZNO2_off,klev) |
---|
1350 | CALL writefield_phy('ZCFC11',ZCFC11_off,klev) |
---|
1351 | CALL writefield_phy('ZCFC12',ZCFC12_off,klev) |
---|
1352 | CALL writefield_phy('ZHCFC22',ZHCFC22_off,klev) |
---|
1353 | CALL writefield_phy('ZCCL4',ZCCL4_off,klev) |
---|
1354 | CALL writefield_phy('ref_liq_i',ref_liq_i,klev) |
---|
1355 | CALL writefield_phy('ref_ice_i',ref_ice_i,klev) |
---|
1356 | endif |
---|
1357 | ! lldebug_for_offline |
---|
1358 | |
---|
1359 | if (namelist_ecrad_file.eq.'namelist_ecrad') then |
---|
1360 | print*,' 1er apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', & |
---|
1361 | ok_3Deffect, namelist_ecrad_file |
---|
1362 | CALL RADIATION_SCHEME & |
---|
1363 | & (ist, iend, klon, klev, naero_spc, NSW, & |
---|
1364 | & namelist_ecrad_file, ok_3Deffect, & |
---|
1365 | & debut, ok_volcan, flag_aerosol_strat, & |
---|
1366 | & day_cur, current_time, & |
---|
1367 | ! Cste solaire/(d_Terre-Soleil)**2 |
---|
1368 | & SOLARIRAD, & |
---|
1369 | ! Cos(angle zin), temp sol |
---|
1370 | & rmu0, tsol, & |
---|
1371 | ! Albedo diffuse et directe |
---|
1372 | & PALBD_NEW,PALBP_NEW, & |
---|
1373 | ! Emessivite : PEMIS_WINDOW (???), & |
---|
1374 | & ZEMIS, ZEMISW, & |
---|
1375 | ! longitude(rad), sin(latitude), PMASQ_ ??? |
---|
1376 | & ZGELAM, ZGEMU, & |
---|
1377 | ! Temp et pres aux interf, vapeur eau, Satur spec humid |
---|
1378 | & paprs_i, ZTH_i, q_i, qsat_i, & |
---|
1379 | ! Gas |
---|
1380 | & ZCO2, ZCH4, ZN2O, ZNO2, ZCFC11, ZCFC12, ZHCFC22, & |
---|
1381 | & ZCCL4, POZON_i(:,:,1), ZO2, & |
---|
1382 | ! nuages : |
---|
1383 | & cldfra_i, flwc_i, fiwc_i, ZQ_SNOW, & |
---|
1384 | ! rayons effectifs des gouttelettes |
---|
1385 | & ref_liq_i, ref_ice_i, & |
---|
1386 | ! aerosols |
---|
1387 | & ZAEROSOL_OLD, ZAEROSOL, & |
---|
1388 | ! Outputs |
---|
1389 | ! Net flux : |
---|
1390 | & ZSWFT_i, ZLWFT_i, ZSWFT0_ii, ZLWFT0_ii, & |
---|
1391 | ! DWN flux : |
---|
1392 | & ZFSDWN_i, ZFLUX_i(:,2,:), ZFCDWN_i, ZFLUC_i(:,2,:), & |
---|
1393 | ! UP flux : |
---|
1394 | & ZFSUP_i, ZFLUX_i(:,1,:), ZFCUP_i, ZFLUC_i(:,1,:), & |
---|
1395 | ! Surf Direct flux : ATTENTION |
---|
1396 | & ZFLUX_DIR, ZFLUX_DIR_CLEAR, ZFLUX_DIR_INTO_SUN, & |
---|
1397 | ! UV and para flux |
---|
1398 | & ZFLUX_UV, ZFLUX_PAR, ZFLUX_PAR_CLEAR, & |
---|
1399 | ! & ZFLUX_SW_DN_TOA, |
---|
1400 | & ZEMIS_OUT, ZLWDERIVATIVE, & |
---|
1401 | & PSFSWDIF, PSFSWDIR, & |
---|
1402 | & cloud_cover_sw) |
---|
1403 | else |
---|
1404 | print*,' 2e apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', & |
---|
1405 | ok_3Deffect, namelist_ecrad_file |
---|
1406 | CALL RADIATION_SCHEME_S2 & |
---|
1407 | & (ist, iend, klon, klev, naero_grp, NSW, & |
---|
1408 | & namelist_ecrad_file, ok_3Deffect, & |
---|
1409 | & debut, ok_volcan, flag_aerosol_strat, & |
---|
1410 | & day_cur, current_time, & |
---|
1411 | ! Cste solaire/(d_Terre-Soleil)**2 |
---|
1412 | & SOLARIRAD, & |
---|
1413 | ! Cos(angle zin), temp sol |
---|
1414 | & rmu0, tsol, & |
---|
1415 | ! Albedo diffuse et directe |
---|
1416 | & PALBD_NEW,PALBP_NEW, & |
---|
1417 | ! Emessivite : PEMIS_WINDOW (???), & |
---|
1418 | & ZEMIS, ZEMISW, & |
---|
1419 | ! longitude(rad), sin(latitude), PMASQ_ ??? |
---|
1420 | & ZGELAM, ZGEMU, & |
---|
1421 | ! Temp et pres aux interf, vapeur eau, Satur spec humid |
---|
1422 | & paprs_i, ZTH_i, q_i, qsat_i, & |
---|
1423 | ! Gas |
---|
1424 | & ZCO2, ZCH4, ZN2O, ZNO2, ZCFC11, ZCFC12, ZHCFC22, & |
---|
1425 | & ZCCL4, POZON_i(:,:,1), ZO2, & |
---|
1426 | ! nuages : |
---|
1427 | & cldfra_i, flwc_i, fiwc_i, ZQ_SNOW, & |
---|
1428 | ! rayons effectifs des gouttelettes |
---|
1429 | & ref_liq_i, ref_ice_i, & |
---|
1430 | ! aerosols |
---|
1431 | & ZAEROSOL_OLD, ZAEROSOL, & |
---|
1432 | ! Outputs |
---|
1433 | ! Net flux : |
---|
1434 | & ZSWFT_i, ZLWFT_i, ZSWFT0_ii, ZLWFT0_ii, & |
---|
1435 | ! DWN flux : |
---|
1436 | & ZFSDWN_i, ZFLUX_i(:,2,:), ZFCDWN_i, ZFLUC_i(:,2,:), & |
---|
1437 | ! UP flux : |
---|
1438 | & ZFSUP_i, ZFLUX_i(:,1,:), ZFCUP_i, ZFLUC_i(:,1,:), & |
---|
1439 | ! Surf Direct flux : ATTENTION |
---|
1440 | & ZFLUX_DIR, ZFLUX_DIR_CLEAR, ZFLUX_DIR_INTO_SUN, & |
---|
1441 | ! UV and para flux |
---|
1442 | & ZFLUX_UV, ZFLUX_PAR, ZFLUX_PAR_CLEAR, & |
---|
1443 | ! & ZFLUX_SW_DN_TOA, |
---|
1444 | & ZEMIS_OUT, ZLWDERIVATIVE, & |
---|
1445 | & PSFSWDIF, PSFSWDIR, & |
---|
1446 | & cloud_cover_sw) |
---|
1447 | endif |
---|
1448 | |
---|
1449 | |
---|
1450 | print *,'========= RADLWSW: apres RADIATION_SCHEME ==================== ' |
---|
1451 | |
---|
1452 | if (lldebug_for_offline) then |
---|
1453 | CALL writefield_phy('FLUX_LW',ZLWFT_i,klev+1) |
---|
1454 | CALL writefield_phy('FLUX_LW_CLEAR',ZLWFT0_ii,klev+1) |
---|
1455 | CALL writefield_phy('FLUX_SW',ZSWFT_i,klev+1) |
---|
1456 | CALL writefield_phy('FLUX_SW_CLEAR',ZSWFT0_ii,klev+1) |
---|
1457 | CALL writefield_phy('FLUX_DN_SW',ZFSDWN_i,klev+1) |
---|
1458 | CALL writefield_phy('FLUX_DN_LW',ZFLUX_i(:,2,:),klev+1) |
---|
1459 | CALL writefield_phy('FLUX_DN_SW_CLEAR',ZFCDWN_i,klev+1) |
---|
1460 | CALL writefield_phy('FLUX_DN_LW_CLEAR',ZFLUC_i(:,2,:),klev+1) |
---|
1461 | CALL writefield_phy('PSFSWDIR',PSFSWDIR,6) |
---|
1462 | CALL writefield_phy('PSFSWDIF',PSFSWDIF,6) |
---|
1463 | CALL writefield_phy('FLUX_UP_LW',ZFLUX_i(:,1,:),klev+1) |
---|
1464 | CALL writefield_phy('FLUX_UP_LW_CLEAR',ZFLUC_i(:,1,:),klev+1) |
---|
1465 | CALL writefield_phy('FLUX_UP_SW',ZFSUP_i,klev+1) |
---|
1466 | CALL writefield_phy('FLUX_UP_SW_CLEAR',ZFCUP_i,klev+1) |
---|
1467 | endif |
---|
1468 | |
---|
1469 | ! --------- |
---|
1470 | ! On retablit l'ordre des niveaux lmd pour les tableaux de sortie |
---|
1471 | ! D autre part, on multiplie les resultats SW par fract pour etre coherent |
---|
1472 | ! avec l ancien rayonnement AR4. Si nuit, fract=0 donc pas de |
---|
1473 | ! rayonnement SW. (MPL 260609) |
---|
1474 | print*,'On retablit l ordre des niveaux verticaux pour LMDZ' |
---|
1475 | print*,'On multiplie les flux SW par fract et LW dwn par -1' |
---|
1476 | DO k=0,klev |
---|
1477 | DO i=1,klon |
---|
1478 | ZEMTD(i,k+1) = ZEMTD_i(i,klev+1-k) |
---|
1479 | ZEMTU(i,k+1) = ZEMTU_i(i,klev+1-k) |
---|
1480 | ZTRSO(i,k+1) = ZTRSO_i(i,klev+1-k) |
---|
1481 | ! ZTH(i,k+1) = ZTH_i(i,klev+1-k) |
---|
1482 | ! AI ATTENTION |
---|
1483 | ZLWFT(i,k+1) = ZLWFT_i(i,klev+1-k) |
---|
1484 | ZSWFT(i,k+1) = ZSWFT_i(i,klev+1-k)*fract(i) |
---|
1485 | ZSWFT0_i(i,k+1) = ZSWFT0_ii(i,klev+1-k)*fract(i) |
---|
1486 | ZLWFT0_i(i,k+1) = ZLWFT0_ii(i,klev+1-k) |
---|
1487 | ! |
---|
1488 | ZFLUP(i,k+1) = ZFLUX_i(i,1,klev+1-k) |
---|
1489 | ZFLDN(i,k+1) = -1.*ZFLUX_i(i,2,klev+1-k) |
---|
1490 | ZFLUP0(i,k+1) = ZFLUC_i(i,1,klev+1-k) |
---|
1491 | ZFLDN0(i,k+1) = -1.*ZFLUC_i(i,2,klev+1-k) |
---|
1492 | ZFSDN(i,k+1) = ZFSDWN_i(i,klev+1-k)*fract(i) |
---|
1493 | ZFSDN0(i,k+1) = ZFCDWN_i(i,klev+1-k)*fract(i) |
---|
1494 | ZFSDNC0(i,k+1)= ZFCCDWN_i(i,klev+1-k)*fract(i) |
---|
1495 | ZFSUP (i,k+1) = ZFSUP_i(i,klev+1-k)*fract(i) |
---|
1496 | ZFSUP0(i,k+1) = ZFCUP_i(i,klev+1-k)*fract(i) |
---|
1497 | ZFSUPC0(i,k+1)= ZFCCUP_i(i,klev+1-k)*fract(i) |
---|
1498 | ZFLDNC0(i,k+1)= -1.*ZFLCCDWN_i(i,klev+1-k) |
---|
1499 | ZFLUPC0(i,k+1)= ZFLCCUP_i(i,klev+1-k) |
---|
1500 | IF (ok_volcan) THEN |
---|
1501 | ZSWADAERO(i,k+1)=ZSWADAERO(i,klev+1-k)*fract(i) !--NL |
---|
1502 | ENDIF |
---|
1503 | |
---|
1504 | ! Nouveau calcul car visiblement ZSWFT et ZSWFC sont nuls dans RRTM cy32 |
---|
1505 | ! en sortie de radlsw.F90 - MPL 7.01.09 |
---|
1506 | ! AI ATTENTION |
---|
1507 | ! ZSWFT(i,k+1) = (ZFSDWN_i(i,k+1)-ZFSUP_i(i,k+1))*fract(i) |
---|
1508 | ! ZSWFT0_i(i,k+1) = (ZFCDWN_i(i,k+1)-ZFCUP_i(i,k+1))*fract(i) |
---|
1509 | ! ZLWFT(i,k+1) =-ZFLUX_i(i,2,k+1)-ZFLUX_i(i,1,k+1) |
---|
1510 | ! ZLWFT0_i(i,k+1)=-ZFLUC_i(i,2,k+1)-ZFLUC_i(i,1,k+1) |
---|
1511 | ENDDO |
---|
1512 | ENDDO |
---|
1513 | |
---|
1514 | !--ajout OB |
---|
1515 | ZTOPSWADAERO(:) =ZTOPSWADAERO(:) *fract(:) |
---|
1516 | ZSOLSWADAERO(:) =ZSOLSWADAERO(:) *fract(:) |
---|
1517 | ZTOPSWAD0AERO(:)=ZTOPSWAD0AERO(:)*fract(:) |
---|
1518 | ZSOLSWAD0AERO(:)=ZSOLSWAD0AERO(:)*fract(:) |
---|
1519 | ZTOPSWAIAERO(:) =ZTOPSWAIAERO(:) *fract(:) |
---|
1520 | ZSOLSWAIAERO(:) =ZSOLSWAIAERO(:) *fract(:) |
---|
1521 | ZTOPSWCF_AERO(:,1)=ZTOPSWCF_AERO(:,1)*fract(:) |
---|
1522 | ZTOPSWCF_AERO(:,2)=ZTOPSWCF_AERO(:,2)*fract(:) |
---|
1523 | ZTOPSWCF_AERO(:,3)=ZTOPSWCF_AERO(:,3)*fract(:) |
---|
1524 | ZSOLSWCF_AERO(:,1)=ZSOLSWCF_AERO(:,1)*fract(:) |
---|
1525 | ZSOLSWCF_AERO(:,2)=ZSOLSWCF_AERO(:,2)*fract(:) |
---|
1526 | ZSOLSWCF_AERO(:,3)=ZSOLSWCF_AERO(:,3)*fract(:) |
---|
1527 | |
---|
1528 | ! --------- |
---|
1529 | ! On renseigne les champs LMDz, pour avoir la meme chose qu'en sortie de |
---|
1530 | ! LW_LMDAR4 et SW_LMDAR4 |
---|
1531 | |
---|
1532 | !--fraction of diffuse radiation in surface SW downward radiation |
---|
1533 | DO i = 1, kdlon |
---|
1534 | zdir=SUM(PSFSWDIR(i,:)) |
---|
1535 | zdif=SUM(PSFSWDIF(i,:)) |
---|
1536 | IF (fract(i).GT.0.0.and.(zdir+zdif).gt.seuilmach) THEN |
---|
1537 | zsolswfdiff(i) = zdif/(zdir+zdif) |
---|
1538 | ELSE !--night |
---|
1539 | zsolswfdiff(i) = 1.0 |
---|
1540 | ENDIF |
---|
1541 | ENDDO |
---|
1542 | ! |
---|
1543 | DO i = 1, kdlon |
---|
1544 | zsolsw(i) = ZSWFT(i,1) |
---|
1545 | zsolsw0(i) = ZSWFT0_i(i,1) |
---|
1546 | ztopsw(i) = ZSWFT(i,klev+1) |
---|
1547 | ztopsw0(i) = ZSWFT0_i(i,klev+1) |
---|
1548 | zsollw(i) = ZLWFT(i,1) |
---|
1549 | zsollw0(i) = ZLWFT0_i(i,1) |
---|
1550 | ztoplw(i) = ZLWFT(i,klev+1)*(-1) |
---|
1551 | ztoplw0(i) = ZLWFT0_i(i,klev+1)*(-1) |
---|
1552 | ! |
---|
1553 | zsollwdown(i)= -1.*ZFLDN(i,1) |
---|
1554 | ENDDO |
---|
1555 | |
---|
1556 | DO k=1,kflev |
---|
1557 | DO i=1,kdlon |
---|
1558 | zheat(i,k)=(ZSWFT(i,k+1)-ZSWFT(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
1559 | zheat0(i,k)=(ZSWFT0_i(i,k+1)-ZSWFT0_i(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
1560 | zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
1561 | zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
1562 | IF (ok_volcan) THEN |
---|
1563 | zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL |
---|
1564 | zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL |
---|
1565 | ENDIF |
---|
1566 | ENDDO |
---|
1567 | ENDDO |
---|
1568 | #endif |
---|
1569 | print*,'Fin traitement ECRAD' |
---|
1570 | ! Fin ECRAD |
---|
1571 | ENDIF ! iflag_rrtm |
---|
1572 | ! ecrad |
---|
1573 | !====================================================================== |
---|
1574 | |
---|
1575 | DO i = 1, kdlon |
---|
1576 | topsw(iof+i) = ztopsw(i) |
---|
1577 | toplw(iof+i) = ztoplw(i) |
---|
1578 | solsw(iof+i) = zsolsw(i) |
---|
1579 | solswfdiff(iof+i) = zsolswfdiff(i) |
---|
1580 | sollw(iof+i) = zsollw(i) |
---|
1581 | sollwdown(iof+i) = zsollwdown(i) |
---|
1582 | DO k = 1, kflev+1 |
---|
1583 | lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) |
---|
1584 | lwdn ( iof+i,k) = ZFLDN ( i,k) |
---|
1585 | lwup0 ( iof+i,k) = ZFLUP0 ( i,k) |
---|
1586 | lwup ( iof+i,k) = ZFLUP ( i,k) |
---|
1587 | ENDDO |
---|
1588 | topsw0(iof+i) = ztopsw0(i) |
---|
1589 | toplw0(iof+i) = ztoplw0(i) |
---|
1590 | solsw0(iof+i) = zsolsw0(i) |
---|
1591 | sollw0(iof+i) = zsollw0(i) |
---|
1592 | albpla(iof+i) = zalbpla(i) |
---|
1593 | |
---|
1594 | DO k = 1, kflev+1 |
---|
1595 | swdnc0( iof+i,k) = ZFSDNC0( i,k) |
---|
1596 | swdn0 ( iof+i,k) = ZFSDN0 ( i,k) |
---|
1597 | swdn ( iof+i,k) = ZFSDN ( i,k) |
---|
1598 | swupc0( iof+i,k) = ZFSUPC0( i,k) |
---|
1599 | swup0 ( iof+i,k) = ZFSUP0 ( i,k) |
---|
1600 | swup ( iof+i,k) = ZFSUP ( i,k) |
---|
1601 | lwdnc0( iof+i,k) = ZFLDNC0( i,k) |
---|
1602 | lwupc0( iof+i,k) = ZFLUPC0( i,k) |
---|
1603 | ENDDO |
---|
1604 | ENDDO |
---|
1605 | !-transform the aerosol forcings, if they have |
---|
1606 | ! to be calculated |
---|
1607 | IF (ok_ade) THEN |
---|
1608 | DO i = 1, kdlon |
---|
1609 | topswad_aero(iof+i) = ztopswadaero(i) |
---|
1610 | topswad0_aero(iof+i) = ztopswad0aero(i) |
---|
1611 | solswad_aero(iof+i) = zsolswadaero(i) |
---|
1612 | solswad0_aero(iof+i) = zsolswad0aero(i) |
---|
1613 | topsw_aero(iof+i,:) = ztopsw_aero(i,:) |
---|
1614 | topsw0_aero(iof+i,:) = ztopsw0_aero(i,:) |
---|
1615 | solsw_aero(iof+i,:) = zsolsw_aero(i,:) |
---|
1616 | solsw0_aero(iof+i,:) = zsolsw0_aero(i,:) |
---|
1617 | topswcf_aero(iof+i,:) = ztopswcf_aero(i,:) |
---|
1618 | solswcf_aero(iof+i,:) = zsolswcf_aero(i,:) |
---|
1619 | !-LW |
---|
1620 | toplwad_aero(iof+i) = ztoplwadaero(i) |
---|
1621 | toplwad0_aero(iof+i) = ztoplwad0aero(i) |
---|
1622 | sollwad_aero(iof+i) = zsollwadaero(i) |
---|
1623 | sollwad0_aero(iof+i) = zsollwad0aero(i) |
---|
1624 | ENDDO |
---|
1625 | ELSE |
---|
1626 | DO i = 1, kdlon |
---|
1627 | topswad_aero(iof+i) = 0.0 |
---|
1628 | solswad_aero(iof+i) = 0.0 |
---|
1629 | topswad0_aero(iof+i) = 0.0 |
---|
1630 | solswad0_aero(iof+i) = 0.0 |
---|
1631 | topsw_aero(iof+i,:) = 0. |
---|
1632 | topsw0_aero(iof+i,:) =0. |
---|
1633 | solsw_aero(iof+i,:) = 0. |
---|
1634 | solsw0_aero(iof+i,:) = 0. |
---|
1635 | !-LW |
---|
1636 | toplwad_aero(iof+i) = 0.0 |
---|
1637 | sollwad_aero(iof+i) = 0.0 |
---|
1638 | toplwad0_aero(iof+i) = 0.0 |
---|
1639 | sollwad0_aero(iof+i) = 0.0 |
---|
1640 | ENDDO |
---|
1641 | ENDIF |
---|
1642 | IF (ok_aie) THEN |
---|
1643 | DO i = 1, kdlon |
---|
1644 | topswai_aero(iof+i) = ztopswaiaero(i) |
---|
1645 | solswai_aero(iof+i) = zsolswaiaero(i) |
---|
1646 | !-LW |
---|
1647 | toplwai_aero(iof+i) = ztoplwaiaero(i) |
---|
1648 | sollwai_aero(iof+i) = zsollwaiaero(i) |
---|
1649 | ENDDO |
---|
1650 | ELSE |
---|
1651 | DO i = 1, kdlon |
---|
1652 | topswai_aero(iof+i) = 0.0 |
---|
1653 | solswai_aero(iof+i) = 0.0 |
---|
1654 | !-LW |
---|
1655 | toplwai_aero(iof+i) = 0.0 |
---|
1656 | sollwai_aero(iof+i) = 0.0 |
---|
1657 | ENDDO |
---|
1658 | ENDIF |
---|
1659 | DO k = 1, kflev |
---|
1660 | DO i = 1, kdlon |
---|
1661 | ! scale factor to take into account the difference between |
---|
1662 | ! dry air and watter vapour scpecifi! heat capacity |
---|
1663 | zznormcp=1.0+RVTMP2*PWV(i,k) |
---|
1664 | heat(iof+i,k) = zheat(i,k)/zznormcp |
---|
1665 | cool(iof+i,k) = zcool(i,k)/zznormcp |
---|
1666 | heat0(iof+i,k) = zheat0(i,k)/zznormcp |
---|
1667 | cool0(iof+i,k) = zcool0(i,k)/zznormcp |
---|
1668 | IF(ok_volcan) THEN !NL |
---|
1669 | heat_volc(iof+i,k) = zheat_volc(i,k)/zznormcp |
---|
1670 | cool_volc(iof+i,k) = zcool_volc(i,k)/zznormcp |
---|
1671 | ENDIF |
---|
1672 | ENDDO |
---|
1673 | ENDDO |
---|
1674 | |
---|
1675 | ENDDO ! j = 1, nb_gr |
---|
1676 | |
---|
1677 | IF (lldebug) THEN |
---|
1678 | if (0.eq.1) then |
---|
1679 | ! Verifs dans le cas 1D |
---|
1680 | print*,'================== Sortie de radlw =================' |
---|
1681 | print*,'******** LW LW LW *******************' |
---|
1682 | print*,'ZLWFT =',ZLWFT |
---|
1683 | print*,'ZLWFT0_i =',ZLWFT0_i |
---|
1684 | print*,'ZFLUP0 =',ZFLUP0 |
---|
1685 | print*,'ZFLDN0 =',ZFLDN0 |
---|
1686 | print*,'ZFLDNC0 =',ZFLDNC0 |
---|
1687 | print*,'ZFLUPC0 =',ZFLUPC0 |
---|
1688 | |
---|
1689 | print*,'******** SW SW SW *******************' |
---|
1690 | print*,'ZSWFT =',ZSWFT |
---|
1691 | print*,'ZSWFT0_i =',ZSWFT0_i |
---|
1692 | print*,'ZFSDN =',ZFSDN |
---|
1693 | print*,'ZFSDN0 =',ZFSDN0 |
---|
1694 | print*,'ZFSDNC0 =',ZFSDNC0 |
---|
1695 | print*,'ZFSUP =',ZFSUP |
---|
1696 | print*,'ZFSUP0 =',ZFSUP0 |
---|
1697 | print*,'ZFSUPC0 =',ZFSUPC0 |
---|
1698 | |
---|
1699 | print*,'******** LMDZ *******************' |
---|
1700 | print*,'cool = ', cool |
---|
1701 | print*,'heat = ', heat |
---|
1702 | print*,'topsw = ', topsw |
---|
1703 | print*,'toplw = ', toplw |
---|
1704 | print*,'sollw = ', sollw |
---|
1705 | print*,'solsw = ', solsw |
---|
1706 | print*,'lwdn = ', lwdn |
---|
1707 | print*,'lwup = ', lwup |
---|
1708 | print*,'swdn = ', swdn |
---|
1709 | print*,'swup =', swup |
---|
1710 | endif |
---|
1711 | ENDIF |
---|
1712 | |
---|
1713 | END SUBROUTINE radlwsw |
---|
1714 | |
---|
1715 | end module radlwsw_m |
---|