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