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