[2056] | 1 | ! |
---|
| 2 | ! $Id: radlwsw_m.F90 2641 2016-09-29 21:26:46Z aborella $ |
---|
| 3 | ! |
---|
[1687] | 4 | module radlwsw_m |
---|
| 5 | |
---|
| 6 | IMPLICIT NONE |
---|
| 7 | |
---|
| 8 | contains |
---|
| 9 | |
---|
| 10 | SUBROUTINE radlwsw( & |
---|
| 11 | dist, rmu0, fract, & |
---|
[2258] | 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,& |
---|
[1795] | 19 | flag_aerosol_strat,& |
---|
[1687] | 20 | tau_aero, piz_aero, cg_aero,& |
---|
[2160] | 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, & |
---|
[1999] | 25 | ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & |
---|
[2408] | 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, & |
---|
[1999] | 37 | topswcf_aero, solswcf_aero,& |
---|
[2160] | 38 | !-C. Kleinschmitt for LW diagnostics |
---|
| 39 | toplwad_aero, sollwad_aero,& |
---|
| 40 | toplwai_aero, sollwai_aero, & |
---|
| 41 | toplwad0_aero, sollwad0_aero,& |
---|
| 42 | !-end |
---|
[1999] | 43 | ZLWFT0_i, ZFLDN0, ZFLUP0,& |
---|
| 44 | ZSWFT0_i, ZFSDN0, ZFSUP0) |
---|
[1687] | 45 | |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | USE DIMPHY |
---|
| 49 | USE assert_m, ONLY : assert |
---|
[2408] | 50 | USE infotrac_phy, ONLY : type_trac |
---|
[1999] | 51 | USE write_field_phy |
---|
[1687] | 52 | #ifdef REPROBUS |
---|
| 53 | USE CHEM_REP, ONLY : solaireTIME, ok_SUNTIME, ndimozon |
---|
| 54 | #endif |
---|
[1999] | 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 |
---|
[2160] | 62 | ! NLW ajoute par OB |
---|
| 63 | USE YOERAD , ONLY : NLW, LRRTM ,LCCNL ,LCCNO ,& |
---|
[1999] | 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 |
---|
[2056] | 76 | ! USE YOETHF , ONLY : RTICE |
---|
[1999] | 77 | USE YOERRTWN , ONLY : DELWAVE ,TOTPLNK |
---|
| 78 | USE YOMPHY3 , ONLY : RII0 |
---|
| 79 | #endif |
---|
[2408] | 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 |
---|
[2542] | 103 | ! flag_aerosol_strat-input-I- use stratospheric aerosols flag (0, 1, 2) |
---|
[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 | ! |
---|
[1999] | 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) |
---|
[2258] | 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 |
---|
[1999] | 190 | LOGICAL :: lldebug |
---|
[1687] | 191 | INTEGER, INTENT(in) :: flag_aerosol ! takes value 0 (no aerosol) or 1 to 6 (aerosols) |
---|
[2542] | 192 | INTEGER, INTENT(in) :: flag_aerosol_strat ! use stratospheric aerosols |
---|
[1687] | 193 | REAL, INTENT(in) :: cldfra(KLON,KLEV), cldemi(KLON,KLEV), cldtaupd(KLON,KLEV) |
---|
[2408] | 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) |
---|
[2056] | 197 | !--OB |
---|
[2160] | 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 |
---|
[2056] | 201 | !--OB fin |
---|
[2160] | 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 |
---|
[1999] | 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) |
---|
[2408] | 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 |
---|
[2160] | 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 |
---|
[2160] | 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 |
---|
[1999] | 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 |
---|
[1999] | 260 | INTEGER ist,iend,ktdia,kmode |
---|
[1687] | 261 | REAL(KIND=8) PSCT |
---|
| 262 | REAL(KIND=8) PALBD(kdlon,2), PALBP(kdlon,2) |
---|
[1999] | 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. |
---|
[1999] | 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 |
---|
[2408] | 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 |
---|
[2160] | 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) |
---|
[1999] | 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) |
---|
[2056] | 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 |
---|
[1999] | 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) |
---|
[2056] | 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) |
---|
[2160] | 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 |
---|
[1999] | 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 |
---|
[2056] | 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 |
---|
[1999] | 378 | ist=1 |
---|
| 379 | iend=klon |
---|
| 380 | ktdia=1 |
---|
| 381 | kmode=ist |
---|
[1687] | 382 | tauaero(:,:,:,:)=0. |
---|
| 383 | pizaero(:,:,:,:)=0. |
---|
| 384 | cgaero(:,:,:,:)=0. |
---|
[1999] | 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 |
---|
[2408] | 392 | call abort_physic("radlwsw", "", 1) |
---|
[1687] | 393 | ENDIF |
---|
| 394 | IF (kflev .NE. KLEV) THEN |
---|
| 395 | PRINT*, "kflev differe de KLEV, kflev, KLEV" |
---|
[2408] | 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) |
---|
[1999] | 423 | ! zfract(i) = 1. !!!!!! essai MPL 19052010 |
---|
[1687] | 424 | zrmu0(i) = rmu0(iof+i) |
---|
[2258] | 425 | |
---|
| 426 | |
---|
| 427 | !albedo SB >>> |
---|
[1999] | 428 | ! |
---|
[2435] | 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 | ! |
---|
[2258] | 438 | DO kk=1,NSW |
---|
[2435] | 439 | PALBD_NEW(i,kk)=alb_dif(iof+i,kk) |
---|
| 440 | PALBP_NEW(i,kk)=alb_dir(iof+i,kk) |
---|
[2258] | 441 | ENDDO |
---|
[2435] | 442 | ! |
---|
| 443 | ENDIF |
---|
[2258] | 444 | !albedo SB <<< |
---|
| 445 | |
---|
| 446 | |
---|
[1999] | 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) |
---|
[2641] | 467 | ! Confert from column density of ozone in a cell, in kDU, to a mass fraction |
---|
[1687] | 468 | POZON(i,k, :) = wo(iof+i, k, :) * RG * dobson_u * 1e3 & |
---|
| 469 | / (paprs(iof+i, k) - paprs(iof+i, k+1)) |
---|
[1999] | 470 | ! A activer pour CCMVAL on prend l'ozone impose (MPL 07042010) |
---|
| 471 | ! POZON(i,k,:) = wo(i,k,:) |
---|
| 472 | ! print *,'RADLWSW: POZON',k, POZON(i,k,1) |
---|
[1687] | 473 | PCLDLD(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
| 474 | PCLDLU(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
| 475 | PCLDSW(i,k) = cldfra(iof+i,k) |
---|
| 476 | PTAU(i,1,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
| 477 | PTAU(i,2,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
| 478 | POMEGA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAU(i,1,k)) |
---|
| 479 | POMEGA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAU(i,2,k)) |
---|
| 480 | PCG(i,1,k) = 0.865 |
---|
| 481 | PCG(i,2,k) = 0.910 |
---|
| 482 | !- |
---|
| 483 | ! Introduced for aerosol indirect forcings. |
---|
| 484 | ! The following values use the cloud optical thickness calculated from |
---|
| 485 | ! present-day aerosol concentrations whereas the quantities without the |
---|
| 486 | ! "A" at the end are for pre-industial (natural-only) aerosol concentrations |
---|
| 487 | ! |
---|
| 488 | PTAUA(i,1,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
| 489 | PTAUA(i,2,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
| 490 | POMEGAA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAUA(i,1,k)) |
---|
| 491 | POMEGAA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAUA(i,2,k)) |
---|
| 492 | ENDDO |
---|
| 493 | ENDDO |
---|
| 494 | |
---|
| 495 | IF (type_trac == 'repr') THEN |
---|
| 496 | #ifdef REPROBUS |
---|
| 497 | ndimozon = size(wo, 3) |
---|
| 498 | CALL RAD_INTERACTIF(POZON,iof) |
---|
| 499 | #endif |
---|
| 500 | END IF |
---|
| 501 | |
---|
| 502 | ! |
---|
| 503 | DO k = 1, kflev+1 |
---|
| 504 | DO i = 1, kdlon |
---|
| 505 | PPMB(i,k) = paprs(iof+i,k)/100.0 |
---|
| 506 | ENDDO |
---|
| 507 | ENDDO |
---|
| 508 | ! |
---|
[1999] | 509 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
| 510 | DO kk = 1, 6 |
---|
[1687] | 511 | DO k = 1, kflev |
---|
| 512 | DO i = 1, kdlon |
---|
[1999] | 513 | PAER(i,k,kk) = 1.0E-15 !!!!! A REVOIR (MPL) |
---|
[1687] | 514 | ENDDO |
---|
| 515 | ENDDO |
---|
| 516 | ENDDO |
---|
| 517 | DO k = 1, kflev |
---|
| 518 | DO i = 1, kdlon |
---|
| 519 | tauaero(i,k,:,1)=tau_aero(iof+i,k,:,1) |
---|
| 520 | pizaero(i,k,:,1)=piz_aero(iof+i,k,:,1) |
---|
| 521 | cgaero(i,k,:,1) =cg_aero(iof+i,k,:,1) |
---|
| 522 | tauaero(i,k,:,2)=tau_aero(iof+i,k,:,2) |
---|
| 523 | pizaero(i,k,:,2)=piz_aero(iof+i,k,:,2) |
---|
| 524 | cgaero(i,k,:,2) =cg_aero(iof+i,k,:,2) |
---|
| 525 | ENDDO |
---|
| 526 | ENDDO |
---|
| 527 | |
---|
| 528 | ! |
---|
| 529 | !===== iflag_rrtm ================================================ |
---|
| 530 | ! |
---|
[1999] | 531 | IF (iflag_rrtm == 0) THEN !!!! remettre 0 juste pour tester l'ancien rayt via rrtm |
---|
| 532 | !--- Mise a zero des tableaux output du rayonnement LW-AR4 ---------- |
---|
| 533 | DO k = 1, kflev+1 |
---|
| 534 | DO i = 1, kdlon |
---|
| 535 | ! print *,'RADLWSW: boucle mise a zero i k',i,k |
---|
| 536 | ZFLUP(i,k)=0. |
---|
| 537 | ZFLDN(i,k)=0. |
---|
| 538 | ZFLUP0(i,k)=0. |
---|
| 539 | ZFLDN0(i,k)=0. |
---|
| 540 | ZLWFT0_i(i,k)=0. |
---|
| 541 | ZFLUCUP_i(i,k)=0. |
---|
| 542 | ZFLUCDWN_i(i,k)=0. |
---|
| 543 | ENDDO |
---|
| 544 | ENDDO |
---|
| 545 | DO k = 1, kflev |
---|
| 546 | DO i = 1, kdlon |
---|
| 547 | zcool(i,k)=0. |
---|
| 548 | zcool0(i,k)=0. |
---|
| 549 | ENDDO |
---|
| 550 | ENDDO |
---|
| 551 | DO i = 1, kdlon |
---|
| 552 | ztoplw(i)=0. |
---|
| 553 | zsollw(i)=0. |
---|
| 554 | ztoplw0(i)=0. |
---|
| 555 | zsollw0(i)=0. |
---|
| 556 | zsollwdown(i)=0. |
---|
| 557 | ENDDO |
---|
[1687] | 558 | ! Old radiation scheme, used for AR4 runs |
---|
| 559 | ! average day-night ozone for longwave |
---|
| 560 | CALL LW_LMDAR4(& |
---|
| 561 | PPMB, PDP,& |
---|
| 562 | PPSOL,PDT0,PEMIS,& |
---|
| 563 | PTL, PTAVE, PWV, POZON(:, :, 1), PAER,& |
---|
| 564 | PCLDLD,PCLDLU,& |
---|
| 565 | PVIEW,& |
---|
| 566 | zcool, zcool0,& |
---|
| 567 | ztoplw,zsollw,ztoplw0,zsollw0,& |
---|
| 568 | zsollwdown,& |
---|
| 569 | ZFLUP, ZFLDN, ZFLUP0,ZFLDN0) |
---|
[1999] | 570 | !----- Mise a zero des tableaux output du rayonnement SW-AR4 |
---|
| 571 | DO k = 1, kflev+1 |
---|
| 572 | DO i = 1, kdlon |
---|
| 573 | ZFSUP(i,k)=0. |
---|
| 574 | ZFSDN(i,k)=0. |
---|
| 575 | ZFSUP0(i,k)=0. |
---|
| 576 | ZFSDN0(i,k)=0. |
---|
| 577 | ZSWFT0_i(i,k)=0. |
---|
| 578 | ZFCUP_i(i,k)=0. |
---|
| 579 | ZFCDWN_i(i,k)=0. |
---|
| 580 | ENDDO |
---|
| 581 | ENDDO |
---|
| 582 | DO k = 1, kflev |
---|
| 583 | DO i = 1, kdlon |
---|
| 584 | zheat(i,k)=0. |
---|
| 585 | zheat0(i,k)=0. |
---|
| 586 | ENDDO |
---|
| 587 | ENDDO |
---|
| 588 | DO i = 1, kdlon |
---|
| 589 | zalbpla(i)=0. |
---|
| 590 | ztopsw(i)=0. |
---|
| 591 | zsolsw(i)=0. |
---|
| 592 | ztopsw0(i)=0. |
---|
| 593 | zsolsw0(i)=0. |
---|
| 594 | ztopswadaero(i)=0. |
---|
| 595 | zsolswadaero(i)=0. |
---|
| 596 | ztopswaiaero(i)=0. |
---|
| 597 | zsolswaiaero(i)=0. |
---|
| 598 | ENDDO |
---|
| 599 | ! print *,'Avant SW_LMDAR4: PSCT zrmu0 zfract',PSCT, zrmu0, zfract |
---|
[1687] | 600 | ! daylight ozone, if we have it, for short wave |
---|
| 601 | IF (.NOT. new_aod) THEN |
---|
| 602 | ! use old version |
---|
| 603 | CALL SW_LMDAR4(PSCT, zrmu0, zfract,& |
---|
| 604 | PPMB, PDP, & |
---|
| 605 | PPSOL, PALBD, PALBP,& |
---|
| 606 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
| 607 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
| 608 | zheat, zheat0,& |
---|
| 609 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
| 610 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
| 611 | tauaero(:,:,5,:), pizaero(:,:,5,:), cgaero(:,:,5,:),& |
---|
| 612 | PTAUA, POMEGAA,& |
---|
| 613 | ztopswadaero,zsolswadaero,& |
---|
| 614 | ztopswaiaero,zsolswaiaero,& |
---|
[1795] | 615 | ok_ade, ok_aie) |
---|
[1687] | 616 | |
---|
| 617 | ELSE ! new_aod=T |
---|
| 618 | CALL SW_AEROAR4(PSCT, zrmu0, zfract,& |
---|
| 619 | PPMB, PDP,& |
---|
| 620 | PPSOL, PALBD, PALBP,& |
---|
| 621 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
| 622 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
| 623 | zheat, zheat0,& |
---|
| 624 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
| 625 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
| 626 | tauaero, pizaero, cgaero, & |
---|
| 627 | PTAUA, POMEGAA,& |
---|
| 628 | ztopswadaero,zsolswadaero,& |
---|
| 629 | ztopswad0aero,zsolswad0aero,& |
---|
| 630 | ztopswaiaero,zsolswaiaero, & |
---|
| 631 | ztopsw_aero,ztopsw0_aero,& |
---|
| 632 | zsolsw_aero,zsolsw0_aero,& |
---|
| 633 | ztopswcf_aero,zsolswcf_aero, & |
---|
[1795] | 634 | ok_ade, ok_aie, flag_aerosol,flag_aerosol_strat) |
---|
[1687] | 635 | ENDIF |
---|
| 636 | |
---|
[2435] | 637 | ZSWFT0_i(:,:) = ZFSDN0(:,:)-ZFSUP0(:,:) |
---|
| 638 | ZLWFT0_i(:,:) =-ZFLDN0(:,:)-ZFLUP0(:,:) |
---|
| 639 | |
---|
| 640 | DO i=1,kdlon |
---|
| 641 | DO k=1,kflev+1 |
---|
[1999] | 642 | ! print *,'iof i k klon klev=',iof,i,k,klon,klev |
---|
| 643 | lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) |
---|
| 644 | lwdn ( iof+i,k) = ZFLDN ( i,k) |
---|
| 645 | lwup0 ( iof+i,k) = ZFLUP0 ( i,k) |
---|
| 646 | lwup ( iof+i,k) = ZFLUP ( i,k) |
---|
| 647 | swdn0 ( iof+i,k) = ZFSDN0 ( i,k) |
---|
| 648 | swdn ( iof+i,k) = ZFSDN ( i,k) |
---|
| 649 | swup0 ( iof+i,k) = ZFSUP0 ( i,k) |
---|
| 650 | swup ( iof+i,k) = ZFSUP ( i,k) |
---|
[2435] | 651 | ENDDO |
---|
| 652 | ENDDO |
---|
[1999] | 653 | ! print*,'SW_AR4 ZFSDN0 1 , klev:',ZFSDN0(1:klon,1),ZFSDN0(1:klon,klev) |
---|
| 654 | ! print*,'SW_AR4 swdn0 1 , klev:',swdn0(1:klon,1),swdn0(1:klon,klev) |
---|
| 655 | ! print*,'SW_AR4 ZFSUP0 1 , klev:',ZFSUP0(1:klon,1),ZFSUP0(1:klon,klev) |
---|
| 656 | ! print*,'SW_AR4 swup0 1 , klev:',swup0(1:klon,1),swup0(1:klon,klev) |
---|
| 657 | ! print*,'SW_AR4 ZFSDN 1 , klev:',ZFSDN(1:klon,1) ,ZFSDN(1:klon,klev) |
---|
| 658 | ! print*,'SW_AR4 ZFSUP 1 , klev:',ZFSUP(1:klon,1) ,ZFSUP(1:klon,klev) |
---|
[1687] | 659 | ELSE |
---|
[1999] | 660 | #ifdef CPP_RRTM |
---|
| 661 | ! if (prt_level.gt.10)write(lunout,*)'CPP_RRTM=.T.' |
---|
[1687] | 662 | !===== iflag_rrtm=1, on passe dans SW via RECMWFL =============== |
---|
| 663 | |
---|
[1999] | 664 | DO k = 1, kflev+1 |
---|
| 665 | DO i = 1, kdlon |
---|
| 666 | ZEMTD_i(i,k)=0. |
---|
| 667 | ZEMTU_i(i,k)=0. |
---|
| 668 | ZTRSO_i(i,k)=0. |
---|
| 669 | ZTH_i(i,k)=0. |
---|
| 670 | ZLWFT_i(i,k)=0. |
---|
| 671 | ZSWFT_i(i,k)=0. |
---|
| 672 | ZFLUX_i(i,1,k)=0. |
---|
| 673 | ZFLUX_i(i,2,k)=0. |
---|
| 674 | ZFLUC_i(i,1,k)=0. |
---|
| 675 | ZFLUC_i(i,2,k)=0. |
---|
| 676 | ZFSDWN_i(i,k)=0. |
---|
| 677 | ZFCDWN_i(i,k)=0. |
---|
| 678 | ZFSUP_i(i,k)=0. |
---|
| 679 | ZFCUP_i(i,k)=0. |
---|
| 680 | ENDDO |
---|
| 681 | ENDDO |
---|
[2056] | 682 | ! |
---|
| 683 | !--OB |
---|
| 684 | !--aerosol TOT - anthropogenic+natural |
---|
| 685 | !--aerosol NAT - natural only |
---|
| 686 | ! |
---|
[1999] | 687 | DO i = 1, kdlon |
---|
| 688 | DO k = 1, kflev |
---|
| 689 | DO kk=1, NSW |
---|
[2056] | 690 | ! |
---|
[2160] | 691 | PTAU_TOT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,2,kk) |
---|
| 692 | PPIZA_TOT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,2,kk) |
---|
| 693 | PCGA_TOT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,2,kk) |
---|
[2056] | 694 | ! |
---|
[2160] | 695 | PTAU_NAT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,1,kk) |
---|
| 696 | PPIZA_NAT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,1,kk) |
---|
| 697 | PCGA_NAT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,1,kk) |
---|
[2056] | 698 | ! |
---|
[1999] | 699 | ENDDO |
---|
| 700 | ENDDO |
---|
| 701 | ENDDO |
---|
[2056] | 702 | !-end OB |
---|
[1999] | 703 | ! |
---|
[2160] | 704 | !--C. Kleinschmitt |
---|
| 705 | !--aerosol TOT - anthropogenic+natural |
---|
| 706 | !--aerosol NAT - natural only |
---|
| 707 | ! |
---|
| 708 | DO i = 1, kdlon |
---|
| 709 | DO k = 1, kflev |
---|
| 710 | DO kk=1, NLW |
---|
| 711 | ! |
---|
| 712 | PTAU_LW_TOT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,2,kk) |
---|
| 713 | PTAU_LW_NAT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,1,kk) |
---|
| 714 | ! |
---|
| 715 | ENDDO |
---|
| 716 | ENDDO |
---|
| 717 | ENDDO |
---|
| 718 | !-end C. Kleinschmitt |
---|
[1999] | 719 | ! |
---|
| 720 | DO i = 1, kdlon |
---|
| 721 | ZCTRSO(i,1)=0. |
---|
| 722 | ZCTRSO(i,2)=0. |
---|
| 723 | ZCEMTR(i,1)=0. |
---|
| 724 | ZCEMTR(i,2)=0. |
---|
| 725 | ZTRSOD(i)=0. |
---|
| 726 | ZLWFC(i,1)=0. |
---|
| 727 | ZLWFC(i,2)=0. |
---|
| 728 | ZSWFC(i,1)=0. |
---|
| 729 | ZSWFC(i,2)=0. |
---|
| 730 | PFSDNN(i)=0. |
---|
| 731 | PFSDNV(i)=0. |
---|
| 732 | DO kk = 1, NSW |
---|
| 733 | PSFSWDIR(i,kk)=0. |
---|
| 734 | PSFSWDIF(i,kk)=0. |
---|
| 735 | ENDDO |
---|
| 736 | ENDDO |
---|
| 737 | !----- Fin des mises a zero des tableaux output de RECMWF ------------------- |
---|
| 738 | ! GEMU(1:klon)=sin(rlatd(1:klon)) |
---|
| 739 | ! On met les donnees dans l'ordre des niveaux arpege |
---|
| 740 | paprs_i(:,1)=paprs(:,klev+1) |
---|
| 741 | do k=1,klev |
---|
| 742 | paprs_i(1:klon,k+1) =paprs(1:klon,klev+1-k) |
---|
| 743 | pplay_i(1:klon,k) =pplay(1:klon,klev+1-k) |
---|
| 744 | cldfra_i(1:klon,k) =cldfra(1:klon,klev+1-k) |
---|
| 745 | PDP_i(1:klon,k) =PDP(1:klon,klev+1-k) |
---|
| 746 | t_i(1:klon,k) =t(1:klon,klev+1-k) |
---|
| 747 | q_i(1:klon,k) =q(1:klon,klev+1-k) |
---|
| 748 | qsat_i(1:klon,k) =qsat(1:klon,klev+1-k) |
---|
| 749 | flwc_i(1:klon,k) =flwc(1:klon,klev+1-k) |
---|
| 750 | fiwc_i(1:klon,k) =fiwc(1:klon,klev+1-k) |
---|
| 751 | ref_liq_i(1:klon,k) =ref_liq(1:klon,klev+1-k) |
---|
| 752 | ref_ice_i(1:klon,k) =ref_ice(1:klon,klev+1-k) |
---|
[2056] | 753 | !-OB |
---|
| 754 | ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k) |
---|
| 755 | ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k) |
---|
[1999] | 756 | enddo |
---|
| 757 | do k=1,kflev |
---|
| 758 | POZON_i(1:klon,k,:)=POZON(1:klon,kflev+1-k,:) |
---|
| 759 | !!! POZON_i(1:klon,k)=POZON(1:klon,k) !!! on laisse 1=sol et klev=top |
---|
| 760 | ! print *,'Juste avant RECMWFL: k tsol temp',k,tsol,t(1,k) |
---|
| 761 | !!!!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
| 762 | do i=1,6 |
---|
| 763 | PAER_i(1:klon,k,i)=PAER(1:klon,kflev+1-k,i) |
---|
| 764 | enddo |
---|
| 765 | enddo |
---|
| 766 | ! print *,'RADLWSW: avant RECMWFL, RI0,rmu0=',solaire,rmu0 |
---|
| 767 | |
---|
| 768 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 769 | ! La version ARPEGE1D utilise differentes valeurs de la constante |
---|
| 770 | ! solaire suivant le rayonnement utilise. |
---|
| 771 | ! A controler ... |
---|
| 772 | ! SOLAR FLUX AT THE TOP (/YOMPHY3/) |
---|
| 773 | ! introduce season correction |
---|
| 774 | !-------------------------------------- |
---|
| 775 | ! RII0 = RIP0 |
---|
| 776 | ! IF(LRAYFM) |
---|
| 777 | ! RII0 = RIP0M ! =rip0m if Morcrette non-each time step call. |
---|
| 778 | ! IF(LRAYFM15) |
---|
| 779 | ! RII0 = RIP0M15 ! =rip0m if Morcrette non-each time step call. |
---|
| 780 | RII0=solaire/zdist/zdist |
---|
[2220] | 781 | !print*,'+++ radlwsw: solaire ,RII0',solaire,RII0 |
---|
[1999] | 782 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 783 | ! Ancien appel a RECMWF (celui du cy25) |
---|
| 784 | ! CALL RECMWF (ist , iend, klon , ktdia , klev , kmode , |
---|
| 785 | ! s PALBD , PALBP , paprs_i , pplay_i , RCO2 , cldfra_i, |
---|
| 786 | ! s POZON_i , PAER_i , PDP_i , PEMIS , GEMU , rmu0, |
---|
| 787 | ! s q_i , qsat_i , fiwc_i , flwc_i , zmasq , t_i ,tsol, |
---|
| 788 | ! s ZEMTD_i , ZEMTU_i , ZTRSO_i , |
---|
| 789 | ! s ZTH_i , ZCTRSO , ZCEMTR , ZTRSOD , |
---|
| 790 | ! s ZLWFC , ZLWFT_i , ZSWFC , ZSWFT_i , |
---|
| 791 | ! s ZFLUX_i , ZFLUC_i , ZFSDWN_i, ZFSUP_i , ZFCDWN_i,ZFCUP_i) |
---|
| 792 | ! s 'RECMWF ') |
---|
| 793 | ! |
---|
| 794 | if(lldebug) then |
---|
| 795 | CALL writefield_phy('paprs_i',paprs_i,klev+1) |
---|
| 796 | CALL writefield_phy('pplay_i',pplay_i,klev) |
---|
| 797 | CALL writefield_phy('cldfra_i',cldfra_i,klev) |
---|
| 798 | CALL writefield_phy('pozon_i',POZON_i,klev) |
---|
| 799 | CALL writefield_phy('paer_i',PAER_i,klev) |
---|
| 800 | CALL writefield_phy('pdp_i',PDP_i,klev) |
---|
| 801 | CALL writefield_phy('q_i',q_i,klev) |
---|
| 802 | CALL writefield_phy('qsat_i',qsat_i,klev) |
---|
| 803 | CALL writefield_phy('fiwc_i',fiwc_i,klev) |
---|
| 804 | CALL writefield_phy('flwc_i',flwc_i,klev) |
---|
| 805 | CALL writefield_phy('t_i',t_i,klev) |
---|
| 806 | CALL writefield_phy('palbd_new',PALBD_NEW,NSW) |
---|
| 807 | CALL writefield_phy('palbp_new',PALBP_NEW,NSW) |
---|
| 808 | endif |
---|
| 809 | |
---|
| 810 | ! Nouvel appel a RECMWF (celui du cy32t0) |
---|
[2056] | 811 | CALL RECMWF_AERO (ist , iend, klon , ktdia , klev , kmode ,& |
---|
[1999] | 812 | PALBD_NEW,PALBP_NEW, paprs_i , pplay_i , RCO2 , cldfra_i,& |
---|
| 813 | POZON_i , PAER_i , PDP_i , PEMIS , rmu0 ,& |
---|
| 814 | q_i , qsat_i , fiwc_i , flwc_i , zmasq , t_i ,tsol,& |
---|
| 815 | ref_liq_i, ref_ice_i, & |
---|
[2056] | 816 | ref_liq_pi_i, ref_ice_pi_i, & ! rajoute par OB pour diagnostiquer effet indirect |
---|
[1999] | 817 | ZEMTD_i , ZEMTU_i , ZTRSO_i ,& |
---|
| 818 | ZTH_i , ZCTRSO , ZCEMTR , ZTRSOD ,& |
---|
| 819 | ZLWFC , ZLWFT_i , ZSWFC , ZSWFT_i ,& |
---|
| 820 | PSFSWDIR , PSFSWDIF, PFSDNN , PFSDNV ,& |
---|
[2056] | 821 | PPIZA_TOT, PCGA_TOT,PTAU_TOT,& |
---|
| 822 | PPIZA_NAT, PCGA_NAT,PTAU_NAT, & ! rajoute par OB pour diagnostiquer effet direct |
---|
[2160] | 823 | PTAU_LW_TOT, PTAU_LW_NAT, & ! rajoute par C. Kleinschmitt |
---|
[2056] | 824 | ZFLUX_i , ZFLUC_i ,& |
---|
| 825 | ZFSDWN_i , ZFSUP_i , ZFCDWN_i, ZFCUP_i,& |
---|
| 826 | ZTOPSWADAERO,ZSOLSWADAERO,& ! rajoute par OB pour diagnostics |
---|
| 827 | ZTOPSWAD0AERO,ZSOLSWAD0AERO,& |
---|
| 828 | ZTOPSWAIAERO,ZSOLSWAIAERO, & |
---|
| 829 | ZTOPSWCF_AERO,ZSOLSWCF_AERO, & |
---|
[2160] | 830 | ZTOPLWADAERO,ZSOLLWADAERO,& ! rajoute par C. Kleinscmitt pour LW diagnostics |
---|
| 831 | ZTOPLWAD0AERO,ZSOLLWAD0AERO,& |
---|
| 832 | ZTOPLWAIAERO,ZSOLLWAIAERO, & |
---|
[2056] | 833 | ok_ade, ok_aie, flag_aerosol,flag_aerosol_strat) ! flags aerosols |
---|
[1999] | 834 | |
---|
[2220] | 835 | ! print *,'RADLWSW: apres RECMWF' |
---|
[1999] | 836 | if(lldebug) then |
---|
| 837 | CALL writefield_phy('zemtd_i',ZEMTD_i,klev+1) |
---|
| 838 | CALL writefield_phy('zemtu_i',ZEMTU_i,klev+1) |
---|
| 839 | CALL writefield_phy('ztrso_i',ZTRSO_i,klev+1) |
---|
| 840 | CALL writefield_phy('zth_i',ZTH_i,klev+1) |
---|
| 841 | CALL writefield_phy('zctrso',ZCTRSO,2) |
---|
| 842 | CALL writefield_phy('zcemtr',ZCEMTR,2) |
---|
| 843 | CALL writefield_phy('ztrsod',ZTRSOD,1) |
---|
| 844 | CALL writefield_phy('zlwfc',ZLWFC,2) |
---|
| 845 | CALL writefield_phy('zlwft_i',ZLWFT_i,klev+1) |
---|
| 846 | CALL writefield_phy('zswfc',ZSWFC,2) |
---|
| 847 | CALL writefield_phy('zswft_i',ZSWFT_i,klev+1) |
---|
| 848 | CALL writefield_phy('psfswdir',PSFSWDIR,6) |
---|
| 849 | CALL writefield_phy('psfswdif',PSFSWDIF,6) |
---|
| 850 | CALL writefield_phy('pfsdnn',PFSDNN,1) |
---|
| 851 | CALL writefield_phy('pfsdnv',PFSDNV,1) |
---|
[2056] | 852 | CALL writefield_phy('ppiza_dst',PPIZA_TOT,klev) |
---|
| 853 | CALL writefield_phy('pcga_dst',PCGA_TOT,klev) |
---|
| 854 | CALL writefield_phy('ptaurel_dst',PTAU_TOT,klev) |
---|
[1999] | 855 | CALL writefield_phy('zflux_i',ZFLUX_i,klev+1) |
---|
| 856 | CALL writefield_phy('zfluc_i',ZFLUC_i,klev+1) |
---|
| 857 | CALL writefield_phy('zfsdwn_i',ZFSDWN_i,klev+1) |
---|
| 858 | CALL writefield_phy('zfsup_i',ZFSUP_i,klev+1) |
---|
| 859 | CALL writefield_phy('zfcdwn_i',ZFCDWN_i,klev+1) |
---|
| 860 | CALL writefield_phy('zfcup_i',ZFCUP_i,klev+1) |
---|
| 861 | endif |
---|
| 862 | ! --------- output RECMWFL |
---|
| 863 | ! ZEMTD (KPROMA,KLEV+1) ; TOTAL DOWNWARD LONGWAVE EMISSIVITY |
---|
| 864 | ! ZEMTU (KPROMA,KLEV+1) ; TOTAL UPWARD LONGWAVE EMISSIVITY |
---|
| 865 | ! ZTRSO (KPROMA,KLEV+1) ; TOTAL SHORTWAVE TRANSMISSIVITY |
---|
| 866 | ! ZTH (KPROMA,KLEV+1) ; HALF LEVEL TEMPERATURE |
---|
| 867 | ! ZCTRSO (KPROMA,2) ; CLEAR-SKY SHORTWAVE TRANSMISSIVITY |
---|
| 868 | ! ZCEMTR (KPROMA,2) ; CLEAR-SKY NET LONGWAVE EMISSIVITY |
---|
| 869 | ! ZTRSOD (KPROMA) ; TOTAL-SKY SURFACE SW TRANSMISSITY |
---|
| 870 | ! ZLWFC (KPROMA,2) ; CLEAR-SKY LONGWAVE FLUXES |
---|
| 871 | ! ZLWFT (KPROMA,KLEV+1) ; TOTAL-SKY LONGWAVE FLUXES |
---|
| 872 | ! ZSWFC (KPROMA,2) ; CLEAR-SKY SHORTWAVE FLUXES |
---|
| 873 | ! ZSWFT (KPROMA,KLEV+1) ; TOTAL-SKY SHORTWAVE FLUXES |
---|
[2056] | 874 | ! PPIZA_TOT (KPROMA,KLEV,NSW); Single scattering albedo of total aerosols |
---|
| 875 | ! PCGA_TOT (KPROMA,KLEV,NSW); Assymetry factor for total aerosols |
---|
| 876 | ! PTAU_TOT (KPROMA,KLEV,NSW); Optical depth of total aerosols |
---|
| 877 | ! PPIZA_NAT (KPROMA,KLEV,NSW); Single scattering albedo of natural aerosols |
---|
| 878 | ! PCGA_NAT (KPROMA,KLEV,NSW); Assymetry factor for natural aerosols |
---|
[2160] | 879 | ! PTAU_NAT (KPROMA,KLEV,NSW); Optical depth of natiral aerosols |
---|
| 880 | ! PTAU_LW_TOT (KPROMA,KLEV,NLW); LW Optical depth of total aerosols |
---|
| 881 | ! PTAU_LW_NAT (KPROMA,KLEV,NLW); LW Optical depth of natural aerosols |
---|
[1999] | 882 | ! PSFSWDIR (KPROMA,NSW) ; |
---|
| 883 | ! PSFSWDIF (KPROMA,NSW) ; |
---|
| 884 | ! PFSDNN (KPROMA) ; |
---|
| 885 | ! PFSDNV (KPROMA) ; |
---|
| 886 | ! --------- |
---|
| 887 | ! --------- |
---|
| 888 | ! On retablit l'ordre des niveaux lmd pour les tableaux de sortie |
---|
| 889 | ! D autre part, on multiplie les resultats SW par fract pour etre coherent |
---|
| 890 | ! avec l ancien rayonnement AR4. Si nuit, fract=0 donc pas de |
---|
| 891 | ! rayonnement SW. (MPL 260609) |
---|
| 892 | DO k=0,klev |
---|
| 893 | DO i=1,klon |
---|
| 894 | ZEMTD(i,k+1) = ZEMTD_i(i,k+1) |
---|
| 895 | ZEMTU(i,k+1) = ZEMTU_i(i,k+1) |
---|
| 896 | ZTRSO(i,k+1) = ZTRSO_i(i,k+1) |
---|
| 897 | ZTH(i,k+1) = ZTH_i(i,k+1) |
---|
| 898 | ! ZLWFT(i,k+1) = ZLWFT_i(i,klev+1-k) |
---|
| 899 | ! ZSWFT(i,k+1) = ZSWFT_i(i,klev+1-k) |
---|
| 900 | ZFLUP(i,k+1) = ZFLUX_i(i,1,k+1) |
---|
| 901 | ZFLDN(i,k+1) = ZFLUX_i(i,2,k+1) |
---|
| 902 | ZFLUP0(i,k+1) = ZFLUC_i(i,1,k+1) |
---|
| 903 | ZFLDN0(i,k+1) = ZFLUC_i(i,2,k+1) |
---|
| 904 | ZFSDN(i,k+1) = ZFSDWN_i(i,k+1)*fract(i) |
---|
| 905 | ZFSDN0(i,k+1) = ZFCDWN_i(i,k+1)*fract(i) |
---|
| 906 | ZFSUP (i,k+1) = ZFSUP_i(i,k+1)*fract(i) |
---|
| 907 | ZFSUP0(i,k+1) = ZFCUP_i(i,k+1)*fract(i) |
---|
| 908 | ! Nouveau calcul car visiblement ZSWFT et ZSWFC sont nuls dans RRTM cy32 |
---|
| 909 | ! en sortie de radlsw.F90 - MPL 7.01.09 |
---|
| 910 | ZSWFT(i,k+1) = (ZFSDWN_i(i,k+1)-ZFSUP_i(i,k+1))*fract(i) |
---|
| 911 | ZSWFT0_i(i,k+1) = (ZFCDWN_i(i,k+1)-ZFCUP_i(i,k+1))*fract(i) |
---|
| 912 | ! WRITE(*,'("FSDN FSUP FCDN FCUP: ",4E12.5)') ZFSDWN_i(i,k+1),& |
---|
| 913 | ! ZFSUP_i(i,k+1),ZFCDWN_i(i,k+1),ZFCUP_i(i,k+1) |
---|
| 914 | ZLWFT(i,k+1) =-ZFLUX_i(i,2,k+1)-ZFLUX_i(i,1,k+1) |
---|
| 915 | ZLWFT0_i(i,k+1)=-ZFLUC_i(i,2,k+1)-ZFLUC_i(i,1,k+1) |
---|
| 916 | ! print *,'FLUX2 FLUX1 FLUC2 FLUC1',ZFLUX_i(i,2,k+1),& |
---|
| 917 | ! & ZFLUX_i(i,1,k+1),ZFLUC_i(i,2,k+1),ZFLUC_i(i,1,k+1) |
---|
| 918 | ENDDO |
---|
| 919 | ENDDO |
---|
| 920 | |
---|
[2056] | 921 | !--ajout OB |
---|
| 922 | ZTOPSWADAERO(:) =ZTOPSWADAERO(:) *fract(:) |
---|
| 923 | ZSOLSWADAERO(:) =ZSOLSWADAERO(:) *fract(:) |
---|
| 924 | ZTOPSWAD0AERO(:)=ZTOPSWAD0AERO(:)*fract(:) |
---|
| 925 | ZSOLSWAD0AERO(:)=ZSOLSWAD0AERO(:)*fract(:) |
---|
| 926 | ZTOPSWAIAERO(:) =ZTOPSWAIAERO(:) *fract(:) |
---|
| 927 | ZSOLSWAIAERO(:) =ZSOLSWAIAERO(:) *fract(:) |
---|
| 928 | ZTOPSWCF_AERO(:,1)=ZTOPSWCF_AERO(:,1)*fract(:) |
---|
| 929 | ZTOPSWCF_AERO(:,2)=ZTOPSWCF_AERO(:,2)*fract(:) |
---|
| 930 | ZTOPSWCF_AERO(:,3)=ZTOPSWCF_AERO(:,3)*fract(:) |
---|
| 931 | ZSOLSWCF_AERO(:,1)=ZSOLSWCF_AERO(:,1)*fract(:) |
---|
| 932 | ZSOLSWCF_AERO(:,2)=ZSOLSWCF_AERO(:,2)*fract(:) |
---|
| 933 | ZSOLSWCF_AERO(:,3)=ZSOLSWCF_AERO(:,3)*fract(:) |
---|
| 934 | |
---|
[1999] | 935 | ! print*,'SW_RRTM ZFSDN0 1 , klev:',ZFSDN0(1:klon,1),ZFSDN0(1:klon,klev) |
---|
| 936 | ! print*,'SW_RRTM ZFSUP0 1 , klev:',ZFSUP0(1:klon,1),ZFSUP0(1:klon,klev) |
---|
| 937 | ! print*,'SW_RRTM ZFSDN 1 , klev:',ZFSDN(1:klon,1),ZFSDN(1:klon,klev) |
---|
| 938 | ! print*,'SW_RRTM ZFSUP 1 , klev:',ZFSUP(1:klon,1),ZFSUP(1:klon,klev) |
---|
| 939 | ! print*,'OK1' |
---|
| 940 | ! --------- |
---|
| 941 | ! --------- |
---|
| 942 | ! On renseigne les champs LMDz, pour avoir la meme chose qu'en sortie de |
---|
| 943 | ! LW_LMDAR4 et SW_LMDAR4 |
---|
| 944 | DO i = 1, kdlon |
---|
| 945 | zsolsw(i) = ZSWFT(i,1) |
---|
| 946 | zsolsw0(i) = ZSWFT0_i(i,1) |
---|
| 947 | ! zsolsw0(i) = ZFSDN0(i,1) -ZFSUP0(i,1) |
---|
| 948 | ztopsw(i) = ZSWFT(i,klev+1) |
---|
| 949 | ztopsw0(i) = ZSWFT0_i(i,klev+1) |
---|
| 950 | ! ztopsw0(i) = ZFSDN0(i,klev+1)-ZFSUP0(i,klev+1) |
---|
| 951 | ! |
---|
| 952 | ! zsollw(i) = ZFLDN(i,1) -ZFLUP(i,1) |
---|
| 953 | ! zsollw0(i) = ZFLDN0(i,1) -ZFLUP0(i,1) |
---|
| 954 | ! ztoplw(i) = ZFLDN(i,klev+1) -ZFLUP(i,klev+1) |
---|
| 955 | ! ztoplw0(i) = ZFLDN0(i,klev+1)-ZFLUP0(i,klev+1) |
---|
| 956 | zsollw(i) = ZLWFT(i,1) |
---|
| 957 | zsollw0(i) = ZLWFT0_i(i,1) |
---|
| 958 | ztoplw(i) = ZLWFT(i,klev+1)*(-1) |
---|
| 959 | ztoplw0(i) = ZLWFT0_i(i,klev+1)*(-1) |
---|
| 960 | ! |
---|
| 961 | IF (fract(i) == 0.) THEN |
---|
| 962 | !!!!! A REVOIR MPL (20090630) ca n a pas de sens quand fract=0 |
---|
| 963 | ! pas plus que dans le sw_AR4 |
---|
| 964 | zalbpla(i) = 1.0e+39 |
---|
| 965 | ELSE |
---|
| 966 | zalbpla(i) = ZFSUP(i,klev+1)/ZFSDN(i,klev+1) |
---|
| 967 | ENDIF |
---|
[2408] | 968 | !!! 5 juin 2015 |
---|
| 969 | !!! Correction MP bug RRTM |
---|
| 970 | zsollwdown(i)= -1.*ZFLDN(i,1) |
---|
[1999] | 971 | ENDDO |
---|
[2220] | 972 | ! print*,'OK2' |
---|
[1999] | 973 | |
---|
| 974 | ! extrait de SW_AR4 |
---|
| 975 | ! DO k = 1, KFLEV |
---|
| 976 | ! kpl1 = k+1 |
---|
| 977 | ! DO i = 1, KDLON |
---|
| 978 | ! PHEAT(i,k) = -(ZFSUP(i,kpl1)-ZFSUP(i,k)) -(ZFSDN(i,k)-ZFSDN(i,kpl1)) |
---|
| 979 | ! PHEAT(i,k) = PHEAT(i,k) * RDAY*RG/RCPD / PDP(i,k) |
---|
| 980 | ! ZLWFT(klon,k),ZSWFT |
---|
| 981 | |
---|
| 982 | do k=1,kflev |
---|
| 983 | do i=1,kdlon |
---|
| 984 | zheat(i,k)=(ZSWFT(i,k+1)-ZSWFT(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 985 | zheat0(i,k)=(ZSWFT0_i(i,k+1)-ZSWFT0_i(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 986 | zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 987 | zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 988 | ! print *,'heat cool heat0 cool0 ',zheat(i,k),zcool(i,k),zheat0(i,k),zcool0(i,k) |
---|
| 989 | ! ZFLUCUP_i(i,k)=ZFLUC_i(i,1,k) |
---|
| 990 | ! ZFLUCDWN_i(i,k)=ZFLUC_i(i,2,k) |
---|
| 991 | enddo |
---|
| 992 | enddo |
---|
| 993 | #else |
---|
| 994 | abort_message="You should compile with -rrtm if running with iflag_rrtm=1" |
---|
[2408] | 995 | call abort_physic(modname, abort_message, 1) |
---|
[1999] | 996 | #endif |
---|
[1687] | 997 | ENDIF ! iflag_rrtm |
---|
| 998 | !====================================================================== |
---|
| 999 | |
---|
| 1000 | DO i = 1, kdlon |
---|
| 1001 | topsw(iof+i) = ztopsw(i) |
---|
| 1002 | toplw(iof+i) = ztoplw(i) |
---|
| 1003 | solsw(iof+i) = zsolsw(i) |
---|
| 1004 | sollw(iof+i) = zsollw(i) |
---|
| 1005 | sollwdown(iof+i) = zsollwdown(i) |
---|
| 1006 | DO k = 1, kflev+1 |
---|
| 1007 | lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) |
---|
| 1008 | lwdn ( iof+i,k) = ZFLDN ( i,k) |
---|
| 1009 | lwup0 ( iof+i,k) = ZFLUP0 ( i,k) |
---|
| 1010 | lwup ( iof+i,k) = ZFLUP ( i,k) |
---|
| 1011 | ENDDO |
---|
| 1012 | topsw0(iof+i) = ztopsw0(i) |
---|
| 1013 | toplw0(iof+i) = ztoplw0(i) |
---|
| 1014 | solsw0(iof+i) = zsolsw0(i) |
---|
| 1015 | sollw0(iof+i) = zsollw0(i) |
---|
| 1016 | albpla(iof+i) = zalbpla(i) |
---|
| 1017 | |
---|
| 1018 | DO k = 1, kflev+1 |
---|
| 1019 | swdn0 ( iof+i,k) = ZFSDN0 ( i,k) |
---|
| 1020 | swdn ( iof+i,k) = ZFSDN ( i,k) |
---|
| 1021 | swup0 ( iof+i,k) = ZFSUP0 ( i,k) |
---|
| 1022 | swup ( iof+i,k) = ZFSUP ( i,k) |
---|
| 1023 | ENDDO |
---|
| 1024 | ENDDO |
---|
| 1025 | !-transform the aerosol forcings, if they have |
---|
| 1026 | ! to be calculated |
---|
| 1027 | IF (ok_ade) THEN |
---|
| 1028 | DO i = 1, kdlon |
---|
| 1029 | topswad_aero(iof+i) = ztopswadaero(i) |
---|
| 1030 | topswad0_aero(iof+i) = ztopswad0aero(i) |
---|
| 1031 | solswad_aero(iof+i) = zsolswadaero(i) |
---|
| 1032 | solswad0_aero(iof+i) = zsolswad0aero(i) |
---|
| 1033 | ! MS the following lines seem to be wrong, why is iof on right hand side??? |
---|
| 1034 | ! topsw_aero(iof+i,:) = ztopsw_aero(iof+i,:) |
---|
| 1035 | ! topsw0_aero(iof+i,:) = ztopsw0_aero(iof+i,:) |
---|
| 1036 | ! solsw_aero(iof+i,:) = zsolsw_aero(iof+i,:) |
---|
| 1037 | ! solsw0_aero(iof+i,:) = zsolsw0_aero(iof+i,:) |
---|
| 1038 | topsw_aero(iof+i,:) = ztopsw_aero(i,:) |
---|
| 1039 | topsw0_aero(iof+i,:) = ztopsw0_aero(i,:) |
---|
| 1040 | solsw_aero(iof+i,:) = zsolsw_aero(i,:) |
---|
| 1041 | solsw0_aero(iof+i,:) = zsolsw0_aero(i,:) |
---|
| 1042 | topswcf_aero(iof+i,:) = ztopswcf_aero(i,:) |
---|
[2160] | 1043 | solswcf_aero(iof+i,:) = zsolswcf_aero(i,:) |
---|
| 1044 | !-LW |
---|
| 1045 | toplwad_aero(iof+i) = ztoplwadaero(i) |
---|
| 1046 | toplwad0_aero(iof+i) = ztoplwad0aero(i) |
---|
| 1047 | sollwad_aero(iof+i) = zsollwadaero(i) |
---|
| 1048 | sollwad0_aero(iof+i) = zsollwad0aero(i) |
---|
[1687] | 1049 | ENDDO |
---|
| 1050 | ELSE |
---|
| 1051 | DO i = 1, kdlon |
---|
| 1052 | topswad_aero(iof+i) = 0.0 |
---|
| 1053 | solswad_aero(iof+i) = 0.0 |
---|
| 1054 | topswad0_aero(iof+i) = 0.0 |
---|
| 1055 | solswad0_aero(iof+i) = 0.0 |
---|
| 1056 | topsw_aero(iof+i,:) = 0. |
---|
| 1057 | topsw0_aero(iof+i,:) =0. |
---|
| 1058 | solsw_aero(iof+i,:) = 0. |
---|
| 1059 | solsw0_aero(iof+i,:) = 0. |
---|
[2160] | 1060 | !-LW |
---|
| 1061 | toplwad_aero(iof+i) = 0.0 |
---|
| 1062 | sollwad_aero(iof+i) = 0.0 |
---|
| 1063 | toplwad0_aero(iof+i) = 0.0 |
---|
| 1064 | sollwad0_aero(iof+i) = 0.0 |
---|
[1687] | 1065 | ENDDO |
---|
| 1066 | ENDIF |
---|
| 1067 | IF (ok_aie) THEN |
---|
| 1068 | DO i = 1, kdlon |
---|
| 1069 | topswai_aero(iof+i) = ztopswaiaero(i) |
---|
| 1070 | solswai_aero(iof+i) = zsolswaiaero(i) |
---|
[2160] | 1071 | !-LW |
---|
| 1072 | toplwai_aero(iof+i) = ztoplwaiaero(i) |
---|
| 1073 | sollwai_aero(iof+i) = zsollwaiaero(i) |
---|
[1687] | 1074 | ENDDO |
---|
| 1075 | ELSE |
---|
| 1076 | DO i = 1, kdlon |
---|
| 1077 | topswai_aero(iof+i) = 0.0 |
---|
| 1078 | solswai_aero(iof+i) = 0.0 |
---|
[2160] | 1079 | !-LW |
---|
| 1080 | toplwai_aero(iof+i) = 0.0 |
---|
| 1081 | sollwai_aero(iof+i) = 0.0 |
---|
[1687] | 1082 | ENDDO |
---|
| 1083 | ENDIF |
---|
| 1084 | DO k = 1, kflev |
---|
| 1085 | DO i = 1, kdlon |
---|
| 1086 | ! scale factor to take into account the difference between |
---|
| 1087 | ! dry air and watter vapour scpecifi! heat capacity |
---|
| 1088 | zznormcp=1.0+RVTMP2*PWV(i,k) |
---|
| 1089 | heat(iof+i,k) = zheat(i,k)/zznormcp |
---|
| 1090 | cool(iof+i,k) = zcool(i,k)/zznormcp |
---|
| 1091 | heat0(iof+i,k) = zheat0(i,k)/zznormcp |
---|
| 1092 | cool0(iof+i,k) = zcool0(i,k)/zznormcp |
---|
| 1093 | ENDDO |
---|
| 1094 | ENDDO |
---|
| 1095 | |
---|
| 1096 | ENDDO ! j = 1, nb_gr |
---|
| 1097 | |
---|
| 1098 | END SUBROUTINE radlwsw |
---|
| 1099 | |
---|
| 1100 | end module radlwsw_m |
---|