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