[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,& |
---|
| 13 | tau_aero, piz_aero, cg_aero,& |
---|
| 14 | cldtaupi, new_aod, & |
---|
| 15 | qsat, flwc, fiwc, & |
---|
| 16 | heat,heat0,cool,cool0,radsol,albpla,& |
---|
| 17 | topsw,toplw,solsw,sollw,& |
---|
| 18 | sollwdown,& |
---|
| 19 | topsw0,toplw0,solsw0,sollw0,& |
---|
| 20 | lwdn0, lwdn, lwup0, lwup,& |
---|
| 21 | swdn0, swdn, swup0, swup,& |
---|
| 22 | topswad_aero, solswad_aero,& |
---|
| 23 | topswai_aero, solswai_aero, & |
---|
| 24 | topswad0_aero, solswad0_aero,& |
---|
| 25 | topsw_aero, topsw0_aero,& |
---|
| 26 | solsw_aero, solsw0_aero, & |
---|
| 27 | topswcf_aero, solswcf_aero) |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | USE DIMPHY |
---|
| 32 | USE assert_m, ONLY : assert |
---|
| 33 | USE infotrac, ONLY : type_trac |
---|
| 34 | #ifdef REPROBUS |
---|
| 35 | USE CHEM_REP, ONLY : solaireTIME, ok_SUNTIME, ndimozon |
---|
| 36 | #endif |
---|
| 37 | |
---|
| 38 | !====================================================================== |
---|
| 39 | ! Auteur(s): Z.X. Li (LMD/CNRS) date: 19960719 |
---|
| 40 | ! Objet: interface entre le modele et les rayonnements |
---|
| 41 | ! Arguments: |
---|
| 42 | ! dist-----input-R- distance astronomique terre-soleil |
---|
| 43 | ! rmu0-----input-R- cosinus de l'angle zenithal |
---|
| 44 | ! fract----input-R- duree d'ensoleillement normalisee |
---|
| 45 | ! co2_ppm--input-R- concentration du gaz carbonique (en ppm) |
---|
| 46 | ! paprs----input-R- pression a inter-couche (Pa) |
---|
| 47 | ! pplay----input-R- pression au milieu de couche (Pa) |
---|
| 48 | ! tsol-----input-R- temperature du sol (en K) |
---|
| 49 | ! alb1-----input-R- albedo du sol(entre 0 et 1) dans l'interval visible |
---|
| 50 | ! alb2-----input-R- albedo du sol(entre 0 et 1) dans l'interval proche infra-rouge |
---|
| 51 | ! t--------input-R- temperature (K) |
---|
| 52 | ! q--------input-R- vapeur d'eau (en kg/kg) |
---|
| 53 | ! cldfra---input-R- fraction nuageuse (entre 0 et 1) |
---|
| 54 | ! cldtaupd---input-R- epaisseur optique des nuages dans le visible (present-day value) |
---|
| 55 | ! cldemi---input-R- emissivite des nuages dans l'IR (entre 0 et 1) |
---|
| 56 | ! ok_ade---input-L- apply the Aerosol Direct Effect or not? |
---|
| 57 | ! ok_aie---input-L- apply the Aerosol Indirect Effect or not? |
---|
| 58 | ! flag_aerosol-input-I- aerosol flag from 0 to 6 |
---|
| 59 | ! tau_ae, piz_ae, cg_ae-input-R- aerosol optical properties (calculated in aeropt.F) |
---|
| 60 | ! cldtaupi-input-R- epaisseur optique des nuages dans le visible |
---|
| 61 | ! calculated for pre-industrial (pi) aerosol concentrations, i.e. with smaller |
---|
| 62 | ! droplet concentration, thus larger droplets, thus generally cdltaupi cldtaupd |
---|
| 63 | ! it is needed for the diagnostics of the aerosol indirect radiative forcing |
---|
| 64 | ! |
---|
| 65 | ! heat-----output-R- echauffement atmospherique (visible) (K/jour) |
---|
| 66 | ! cool-----output-R- refroidissement dans l'IR (K/jour) |
---|
| 67 | ! radsol---output-R- bilan radiatif net au sol (W/m**2) (+ vers le bas) |
---|
| 68 | ! albpla---output-R- albedo planetaire (entre 0 et 1) |
---|
| 69 | ! topsw----output-R- flux solaire net au sommet de l'atm. |
---|
| 70 | ! toplw----output-R- ray. IR montant au sommet de l'atmosphere |
---|
| 71 | ! solsw----output-R- flux solaire net a la surface |
---|
| 72 | ! sollw----output-R- ray. IR montant a la surface |
---|
| 73 | ! solswad---output-R- ray. solaire net absorbe a la surface (aerosol dir) |
---|
| 74 | ! topswad---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol dir) |
---|
| 75 | ! solswai---output-R- ray. solaire net absorbe a la surface (aerosol ind) |
---|
| 76 | ! topswai---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol ind) |
---|
| 77 | ! |
---|
| 78 | ! ATTENTION: swai and swad have to be interpreted in the following manner: |
---|
| 79 | ! --------- |
---|
| 80 | ! ok_ade=F & ok_aie=F -both are zero |
---|
| 81 | ! ok_ade=T & ok_aie=F -aerosol direct forcing is F_{AD} = topsw-topswad |
---|
| 82 | ! indirect is zero |
---|
| 83 | ! ok_ade=F & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
| 84 | ! direct is zero |
---|
| 85 | ! ok_ade=T & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
| 86 | ! aerosol direct forcing is F_{AD} = topswai-topswad |
---|
| 87 | ! |
---|
| 88 | |
---|
| 89 | !====================================================================== |
---|
| 90 | |
---|
| 91 | ! ==================================================================== |
---|
| 92 | ! Adapte au modele de chimie INCA par Celine Deandreis & Anne Cozic -- 2009 |
---|
| 93 | ! 1 = ZERO |
---|
| 94 | ! 2 = AER total |
---|
| 95 | ! 3 = NAT |
---|
| 96 | ! 4 = BC |
---|
| 97 | ! 5 = SO4 |
---|
| 98 | ! 6 = POM |
---|
| 99 | ! 7 = DUST |
---|
| 100 | ! 8 = SS |
---|
| 101 | ! 9 = NO3 |
---|
| 102 | ! |
---|
| 103 | ! ==================================================================== |
---|
| 104 | include "YOETHF.h" |
---|
| 105 | include "YOMCST.h" |
---|
| 106 | include "clesphys.h" |
---|
| 107 | include "iniprint.h" |
---|
| 108 | |
---|
| 109 | ! Input arguments |
---|
| 110 | REAL, INTENT(in) :: dist |
---|
| 111 | REAL, INTENT(in) :: rmu0(KLON), fract(KLON) |
---|
| 112 | REAL, INTENT(in) :: paprs(KLON,KLEV+1), pplay(KLON,KLEV) |
---|
| 113 | REAL, INTENT(in) :: alb1(KLON), alb2(KLON), tsol(KLON) |
---|
| 114 | REAL, INTENT(in) :: t(KLON,KLEV), q(KLON,KLEV) |
---|
| 115 | |
---|
| 116 | REAL, INTENT(in):: wo(:, :, :) ! dimension(KLON,KLEV, 1 or 2) |
---|
| 117 | ! column-density of ozone in a layer, in kilo-Dobsons |
---|
| 118 | ! "wo(:, :, 1)" is for the average day-night field, |
---|
| 119 | ! "wo(:, :, 2)" is for daylight time. |
---|
| 120 | |
---|
| 121 | LOGICAL, INTENT(in) :: ok_ade, ok_aie ! switches whether to use aerosol direct (indirect) effects or not |
---|
| 122 | INTEGER, INTENT(in) :: flag_aerosol ! takes value 0 (no aerosol) or 1 to 6 (aerosols) |
---|
| 123 | REAL, INTENT(in) :: cldfra(KLON,KLEV), cldemi(KLON,KLEV), cldtaupd(KLON,KLEV) |
---|
| 124 | REAL, INTENT(in) :: tau_aero(KLON,KLEV,9,2) ! aerosol optical properties (see aeropt.F) |
---|
| 125 | REAL, INTENT(in) :: piz_aero(KLON,KLEV,9,2) ! aerosol optical properties (see aeropt.F) |
---|
| 126 | REAL, INTENT(in) :: cg_aero(KLON,KLEV,9,2) ! aerosol optical properties (see aeropt.F) |
---|
| 127 | REAL, INTENT(in) :: cldtaupi(KLON,KLEV) ! cloud optical thickness for pre-industrial aerosol concentrations |
---|
| 128 | 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 |
---|
| 129 | REAL, INTENT(in) :: qsat(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
| 130 | REAL, INTENT(in) :: flwc(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
| 131 | REAL, INTENT(in) :: fiwc(klon,klev) ! Variable pour iflag_rrtm=1 |
---|
| 132 | |
---|
| 133 | ! Output arguments |
---|
| 134 | REAL, INTENT(out) :: heat(KLON,KLEV), cool(KLON,KLEV) |
---|
| 135 | REAL, INTENT(out) :: heat0(KLON,KLEV), cool0(KLON,KLEV) |
---|
| 136 | REAL, INTENT(out) :: radsol(KLON), topsw(KLON), toplw(KLON) |
---|
| 137 | REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON) |
---|
| 138 | REAL, INTENT(out) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON) |
---|
| 139 | REAL, INTENT(out) :: sollwdown(KLON) |
---|
| 140 | REAL, INTENT(out) :: swdn(KLON,kflev+1),swdn0(KLON,kflev+1) |
---|
| 141 | REAL, INTENT(out) :: swup(KLON,kflev+1),swup0(KLON,kflev+1) |
---|
| 142 | REAL, INTENT(out) :: lwdn(KLON,kflev+1),lwdn0(KLON,kflev+1) |
---|
| 143 | REAL, INTENT(out) :: lwup(KLON,kflev+1),lwup0(KLON,kflev+1) |
---|
| 144 | REAL, INTENT(out) :: topswad_aero(KLON), solswad_aero(KLON) ! output: aerosol direct forcing at TOA and surface |
---|
| 145 | REAL, INTENT(out) :: topswai_aero(KLON), solswai_aero(KLON) ! output: aerosol indirect forcing atTOA and surface |
---|
| 146 | REAL, DIMENSION(klon), INTENT(out) :: topswad0_aero |
---|
| 147 | REAL, DIMENSION(klon), INTENT(out) :: solswad0_aero |
---|
| 148 | REAL, DIMENSION(kdlon,9), INTENT(out) :: topsw_aero |
---|
| 149 | REAL, DIMENSION(kdlon,9), INTENT(out) :: topsw0_aero |
---|
| 150 | REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw_aero |
---|
| 151 | REAL, DIMENSION(kdlon,9), INTENT(out) :: solsw0_aero |
---|
| 152 | REAL, DIMENSION(kdlon,3), INTENT(out) :: topswcf_aero |
---|
| 153 | REAL, DIMENSION(kdlon,3), INTENT(out) :: solswcf_aero |
---|
| 154 | |
---|
| 155 | ! Local variables |
---|
| 156 | REAL(KIND=8) ZFSUP(KDLON,KFLEV+1) |
---|
| 157 | REAL(KIND=8) ZFSDN(KDLON,KFLEV+1) |
---|
| 158 | REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1) |
---|
| 159 | REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1) |
---|
| 160 | REAL(KIND=8) ZFLUP(KDLON,KFLEV+1) |
---|
| 161 | REAL(KIND=8) ZFLDN(KDLON,KFLEV+1) |
---|
| 162 | REAL(KIND=8) ZFLUP0(KDLON,KFLEV+1) |
---|
| 163 | REAL(KIND=8) ZFLDN0(KDLON,KFLEV+1) |
---|
| 164 | REAL(KIND=8) zx_alpha1, zx_alpha2 |
---|
| 165 | INTEGER k, kk, i, j, iof, nb_gr |
---|
| 166 | REAL(KIND=8) PSCT |
---|
| 167 | REAL(KIND=8) PALBD(kdlon,2), PALBP(kdlon,2) |
---|
| 168 | REAL(KIND=8) PEMIS(kdlon), PDT0(kdlon), PVIEW(kdlon) |
---|
| 169 | REAL(KIND=8) PPSOL(kdlon), PDP(kdlon,KLEV) |
---|
| 170 | REAL(KIND=8) PTL(kdlon,kflev+1), PPMB(kdlon,kflev+1) |
---|
| 171 | REAL(KIND=8) PTAVE(kdlon,kflev) |
---|
| 172 | REAL(KIND=8) PWV(kdlon,kflev), PQS(kdlon,kflev) |
---|
| 173 | |
---|
| 174 | real(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone |
---|
| 175 | ! "POZON(:, :, 1)" is for the average day-night field, |
---|
| 176 | ! "POZON(:, :, 2)" is for daylight time. |
---|
| 177 | |
---|
| 178 | REAL(KIND=8) PAER(kdlon,kflev,5) |
---|
| 179 | REAL(KIND=8) PCLDLD(kdlon,kflev) |
---|
| 180 | REAL(KIND=8) PCLDLU(kdlon,kflev) |
---|
| 181 | REAL(KIND=8) PCLDSW(kdlon,kflev) |
---|
| 182 | REAL(KIND=8) PTAU(kdlon,2,kflev) |
---|
| 183 | REAL(KIND=8) POMEGA(kdlon,2,kflev) |
---|
| 184 | REAL(KIND=8) PCG(kdlon,2,kflev) |
---|
| 185 | REAL(KIND=8) zfract(kdlon), zrmu0(kdlon), zdist |
---|
| 186 | REAL(KIND=8) zheat(kdlon,kflev), zcool(kdlon,kflev) |
---|
| 187 | REAL(KIND=8) zheat0(kdlon,kflev), zcool0(kdlon,kflev) |
---|
| 188 | REAL(KIND=8) ztopsw(kdlon), ztoplw(kdlon) |
---|
| 189 | REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon) |
---|
| 190 | REAL(KIND=8) zsollwdown(kdlon) |
---|
| 191 | REAL(KIND=8) ztopsw0(kdlon), ztoplw0(kdlon) |
---|
| 192 | REAL(KIND=8) zsolsw0(kdlon), zsollw0(kdlon) |
---|
| 193 | REAL(KIND=8) zznormcp |
---|
| 194 | REAL(KIND=8) tauaero(kdlon,kflev,9,2) ! aer opt properties |
---|
| 195 | REAL(KIND=8) pizaero(kdlon,kflev,9,2) |
---|
| 196 | REAL(KIND=8) cgaero(kdlon,kflev,9,2) |
---|
| 197 | REAL(KIND=8) PTAUA(kdlon,2,kflev) ! present-day value of cloud opt thickness (PTAU is pre-industrial value), local use |
---|
| 198 | REAL(KIND=8) POMEGAA(kdlon,2,kflev) ! dito for single scatt albedo |
---|
| 199 | REAL(KIND=8) ztopswadaero(kdlon), zsolswadaero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
| 200 | REAL(KIND=8) ztopswad0aero(kdlon), zsolswad0aero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
| 201 | REAL(KIND=8) ztopswaiaero(kdlon), zsolswaiaero(kdlon) ! dito, indirect |
---|
| 202 | REAL(KIND=8) ztopsw_aero(kdlon,9), ztopsw0_aero(kdlon,9) |
---|
| 203 | REAL(KIND=8) zsolsw_aero(kdlon,9), zsolsw0_aero(kdlon,9) |
---|
| 204 | REAL(KIND=8) ztopswcf_aero(kdlon,3), zsolswcf_aero(kdlon,3) |
---|
| 205 | real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
---|
| 206 | |
---|
| 207 | call assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") |
---|
| 208 | ! initialisation |
---|
| 209 | tauaero(:,:,:,:)=0. |
---|
| 210 | pizaero(:,:,:,:)=0. |
---|
| 211 | cgaero(:,:,:,:)=0. |
---|
| 212 | |
---|
| 213 | ! |
---|
| 214 | !------------------------------------------- |
---|
| 215 | nb_gr = KLON / kdlon |
---|
| 216 | IF (nb_gr*kdlon .NE. KLON) THEN |
---|
| 217 | PRINT*, "kdlon mauvais:", KLON, kdlon, nb_gr |
---|
| 218 | CALL abort |
---|
| 219 | ENDIF |
---|
| 220 | IF (kflev .NE. KLEV) THEN |
---|
| 221 | PRINT*, "kflev differe de KLEV, kflev, KLEV" |
---|
| 222 | CALL abort |
---|
| 223 | ENDIF |
---|
| 224 | !------------------------------------------- |
---|
| 225 | DO k = 1, KLEV |
---|
| 226 | DO i = 1, KLON |
---|
| 227 | heat(i,k)=0. |
---|
| 228 | cool(i,k)=0. |
---|
| 229 | heat0(i,k)=0. |
---|
| 230 | cool0(i,k)=0. |
---|
| 231 | ENDDO |
---|
| 232 | ENDDO |
---|
| 233 | ! |
---|
| 234 | zdist = dist |
---|
| 235 | ! |
---|
| 236 | PSCT = solaire/zdist/zdist |
---|
| 237 | |
---|
| 238 | IF (type_trac == 'repr') THEN |
---|
| 239 | #ifdef REPROBUS |
---|
| 240 | if(ok_SUNTIME) PSCT = solaireTIME/zdist/zdist |
---|
| 241 | print*,'Constante solaire: ',PSCT*zdist*zdist |
---|
| 242 | #endif |
---|
| 243 | END IF |
---|
| 244 | |
---|
| 245 | DO j = 1, nb_gr |
---|
| 246 | iof = kdlon*(j-1) |
---|
| 247 | DO i = 1, kdlon |
---|
| 248 | zfract(i) = fract(iof+i) |
---|
| 249 | zrmu0(i) = rmu0(iof+i) |
---|
| 250 | PALBD(i,1) = alb1(iof+i) |
---|
| 251 | PALBD(i,2) = alb2(iof+i) |
---|
| 252 | PALBP(i,1) = alb1(iof+i) |
---|
| 253 | PALBP(i,2) = alb2(iof+i) |
---|
| 254 | PEMIS(i) = 1.0 |
---|
| 255 | PVIEW(i) = 1.66 |
---|
| 256 | PPSOL(i) = paprs(iof+i,1) |
---|
| 257 | zx_alpha1 = (paprs(iof+i,1)-pplay(iof+i,2))/(pplay(iof+i,1)-pplay(iof+i,2)) |
---|
| 258 | zx_alpha2 = 1.0 - zx_alpha1 |
---|
| 259 | PTL(i,1) = t(iof+i,1) * zx_alpha1 + t(iof+i,2) * zx_alpha2 |
---|
| 260 | PTL(i,KLEV+1) = t(iof+i,KLEV) |
---|
| 261 | PDT0(i) = tsol(iof+i) - PTL(i,1) |
---|
| 262 | ENDDO |
---|
| 263 | DO k = 2, kflev |
---|
| 264 | DO i = 1, kdlon |
---|
| 265 | PTL(i,k) = (t(iof+i,k)+t(iof+i,k-1))*0.5 |
---|
| 266 | ENDDO |
---|
| 267 | ENDDO |
---|
| 268 | DO k = 1, kflev |
---|
| 269 | DO i = 1, kdlon |
---|
| 270 | PDP(i,k) = paprs(iof+i,k)-paprs(iof+i,k+1) |
---|
| 271 | PTAVE(i,k) = t(iof+i,k) |
---|
| 272 | PWV(i,k) = MAX (q(iof+i,k), 1.0e-12) |
---|
| 273 | PQS(i,k) = PWV(i,k) |
---|
| 274 | POZON(i,k, :) = wo(iof+i, k, :) * RG * dobson_u * 1e3 & |
---|
| 275 | / (paprs(iof+i, k) - paprs(iof+i, k+1)) |
---|
| 276 | PCLDLD(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
| 277 | PCLDLU(i,k) = cldfra(iof+i,k)*cldemi(iof+i,k) |
---|
| 278 | PCLDSW(i,k) = cldfra(iof+i,k) |
---|
| 279 | PTAU(i,1,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
| 280 | PTAU(i,2,k) = MAX(cldtaupi(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
| 281 | POMEGA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAU(i,1,k)) |
---|
| 282 | POMEGA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAU(i,2,k)) |
---|
| 283 | PCG(i,1,k) = 0.865 |
---|
| 284 | PCG(i,2,k) = 0.910 |
---|
| 285 | !- |
---|
| 286 | ! Introduced for aerosol indirect forcings. |
---|
| 287 | ! The following values use the cloud optical thickness calculated from |
---|
| 288 | ! present-day aerosol concentrations whereas the quantities without the |
---|
| 289 | ! "A" at the end are for pre-industial (natural-only) aerosol concentrations |
---|
| 290 | ! |
---|
| 291 | PTAUA(i,1,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! 1e-12 serait instable |
---|
| 292 | PTAUA(i,2,k) = MAX(cldtaupd(iof+i,k), 1.0e-05)! pour 32-bit machines |
---|
| 293 | POMEGAA(i,1,k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAUA(i,1,k)) |
---|
| 294 | POMEGAA(i,2,k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAUA(i,2,k)) |
---|
| 295 | ENDDO |
---|
| 296 | ENDDO |
---|
| 297 | |
---|
| 298 | IF (type_trac == 'repr') THEN |
---|
| 299 | #ifdef REPROBUS |
---|
| 300 | ndimozon = size(wo, 3) |
---|
| 301 | CALL RAD_INTERACTIF(POZON,iof) |
---|
| 302 | #endif |
---|
| 303 | END IF |
---|
| 304 | |
---|
| 305 | ! |
---|
| 306 | DO k = 1, kflev+1 |
---|
| 307 | DO i = 1, kdlon |
---|
| 308 | PPMB(i,k) = paprs(iof+i,k)/100.0 |
---|
| 309 | ENDDO |
---|
| 310 | ENDDO |
---|
| 311 | ! |
---|
| 312 | DO kk = 1, 5 |
---|
| 313 | DO k = 1, kflev |
---|
| 314 | DO i = 1, kdlon |
---|
| 315 | PAER(i,k,kk) = 1.0E-15 |
---|
| 316 | ENDDO |
---|
| 317 | ENDDO |
---|
| 318 | ENDDO |
---|
| 319 | DO k = 1, kflev |
---|
| 320 | DO i = 1, kdlon |
---|
| 321 | tauaero(i,k,:,1)=tau_aero(iof+i,k,:,1) |
---|
| 322 | pizaero(i,k,:,1)=piz_aero(iof+i,k,:,1) |
---|
| 323 | cgaero(i,k,:,1) =cg_aero(iof+i,k,:,1) |
---|
| 324 | tauaero(i,k,:,2)=tau_aero(iof+i,k,:,2) |
---|
| 325 | pizaero(i,k,:,2)=piz_aero(iof+i,k,:,2) |
---|
| 326 | cgaero(i,k,:,2) =cg_aero(iof+i,k,:,2) |
---|
| 327 | ENDDO |
---|
| 328 | ENDDO |
---|
| 329 | |
---|
| 330 | ! |
---|
| 331 | !===== iflag_rrtm ================================================ |
---|
| 332 | ! |
---|
| 333 | IF (iflag_rrtm == 0) THEN |
---|
| 334 | ! Old radiation scheme, used for AR4 runs |
---|
| 335 | ! average day-night ozone for longwave |
---|
| 336 | CALL LW_LMDAR4(& |
---|
| 337 | PPMB, PDP,& |
---|
| 338 | PPSOL,PDT0,PEMIS,& |
---|
| 339 | PTL, PTAVE, PWV, POZON(:, :, 1), PAER,& |
---|
| 340 | PCLDLD,PCLDLU,& |
---|
| 341 | PVIEW,& |
---|
| 342 | zcool, zcool0,& |
---|
| 343 | ztoplw,zsollw,ztoplw0,zsollw0,& |
---|
| 344 | zsollwdown,& |
---|
| 345 | ZFLUP, ZFLDN, ZFLUP0,ZFLDN0) |
---|
| 346 | |
---|
| 347 | ! daylight ozone, if we have it, for short wave |
---|
| 348 | IF (.NOT. new_aod) THEN |
---|
| 349 | ! use old version |
---|
| 350 | CALL SW_LMDAR4(PSCT, zrmu0, zfract,& |
---|
| 351 | PPMB, PDP, & |
---|
| 352 | PPSOL, PALBD, PALBP,& |
---|
| 353 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
| 354 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
| 355 | zheat, zheat0,& |
---|
| 356 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
| 357 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
| 358 | tauaero(:,:,5,:), pizaero(:,:,5,:), cgaero(:,:,5,:),& |
---|
| 359 | PTAUA, POMEGAA,& |
---|
| 360 | ztopswadaero,zsolswadaero,& |
---|
| 361 | ztopswaiaero,zsolswaiaero,& |
---|
| 362 | ok_ade, ok_aie, flag_aerosol) |
---|
| 363 | |
---|
| 364 | ELSE ! new_aod=T |
---|
| 365 | CALL SW_AEROAR4(PSCT, zrmu0, zfract,& |
---|
| 366 | PPMB, PDP,& |
---|
| 367 | PPSOL, PALBD, PALBP,& |
---|
| 368 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER,& |
---|
| 369 | PCLDSW, PTAU, POMEGA, PCG,& |
---|
| 370 | zheat, zheat0,& |
---|
| 371 | zalbpla,ztopsw,zsolsw,ztopsw0,zsolsw0,& |
---|
| 372 | ZFSUP,ZFSDN,ZFSUP0,ZFSDN0,& |
---|
| 373 | tauaero, pizaero, cgaero, & |
---|
| 374 | PTAUA, POMEGAA,& |
---|
| 375 | ztopswadaero,zsolswadaero,& |
---|
| 376 | ztopswad0aero,zsolswad0aero,& |
---|
| 377 | ztopswaiaero,zsolswaiaero, & |
---|
| 378 | ztopsw_aero,ztopsw0_aero,& |
---|
| 379 | zsolsw_aero,zsolsw0_aero,& |
---|
| 380 | ztopswcf_aero,zsolswcf_aero, & |
---|
| 381 | ok_ade, ok_aie, flag_aerosol) |
---|
| 382 | ENDIF |
---|
| 383 | |
---|
| 384 | ELSE |
---|
| 385 | !===== iflag_rrtm=1, on passe dans SW via RECMWFL =============== |
---|
| 386 | WRITE(lunout,*) "Option iflag_rrtm=T ne fonctionne pas encore !!!" |
---|
| 387 | CALL abort_gcm('radlwsw','iflag_rrtm=T not valid',1) |
---|
| 388 | |
---|
| 389 | ENDIF ! iflag_rrtm |
---|
| 390 | !====================================================================== |
---|
| 391 | |
---|
| 392 | DO i = 1, kdlon |
---|
| 393 | radsol(iof+i) = zsolsw(i) + zsollw(i) |
---|
| 394 | topsw(iof+i) = ztopsw(i) |
---|
| 395 | toplw(iof+i) = ztoplw(i) |
---|
| 396 | solsw(iof+i) = zsolsw(i) |
---|
| 397 | sollw(iof+i) = zsollw(i) |
---|
| 398 | sollwdown(iof+i) = zsollwdown(i) |
---|
| 399 | DO k = 1, kflev+1 |
---|
| 400 | lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) |
---|
| 401 | lwdn ( iof+i,k) = ZFLDN ( i,k) |
---|
| 402 | lwup0 ( iof+i,k) = ZFLUP0 ( i,k) |
---|
| 403 | lwup ( iof+i,k) = ZFLUP ( i,k) |
---|
| 404 | ENDDO |
---|
| 405 | topsw0(iof+i) = ztopsw0(i) |
---|
| 406 | toplw0(iof+i) = ztoplw0(i) |
---|
| 407 | solsw0(iof+i) = zsolsw0(i) |
---|
| 408 | sollw0(iof+i) = zsollw0(i) |
---|
| 409 | albpla(iof+i) = zalbpla(i) |
---|
| 410 | |
---|
| 411 | DO k = 1, kflev+1 |
---|
| 412 | swdn0 ( iof+i,k) = ZFSDN0 ( i,k) |
---|
| 413 | swdn ( iof+i,k) = ZFSDN ( i,k) |
---|
| 414 | swup0 ( iof+i,k) = ZFSUP0 ( i,k) |
---|
| 415 | swup ( iof+i,k) = ZFSUP ( i,k) |
---|
| 416 | ENDDO |
---|
| 417 | ENDDO |
---|
| 418 | !-transform the aerosol forcings, if they have |
---|
| 419 | ! to be calculated |
---|
| 420 | IF (ok_ade) THEN |
---|
| 421 | DO i = 1, kdlon |
---|
| 422 | topswad_aero(iof+i) = ztopswadaero(i) |
---|
| 423 | topswad0_aero(iof+i) = ztopswad0aero(i) |
---|
| 424 | solswad_aero(iof+i) = zsolswadaero(i) |
---|
| 425 | solswad0_aero(iof+i) = zsolswad0aero(i) |
---|
| 426 | ! MS the following lines seem to be wrong, why is iof on right hand side??? |
---|
| 427 | ! topsw_aero(iof+i,:) = ztopsw_aero(iof+i,:) |
---|
| 428 | ! topsw0_aero(iof+i,:) = ztopsw0_aero(iof+i,:) |
---|
| 429 | ! solsw_aero(iof+i,:) = zsolsw_aero(iof+i,:) |
---|
| 430 | ! solsw0_aero(iof+i,:) = zsolsw0_aero(iof+i,:) |
---|
| 431 | topsw_aero(iof+i,:) = ztopsw_aero(i,:) |
---|
| 432 | topsw0_aero(iof+i,:) = ztopsw0_aero(i,:) |
---|
| 433 | solsw_aero(iof+i,:) = zsolsw_aero(i,:) |
---|
| 434 | solsw0_aero(iof+i,:) = zsolsw0_aero(i,:) |
---|
| 435 | topswcf_aero(iof+i,:) = ztopswcf_aero(i,:) |
---|
| 436 | solswcf_aero(iof+i,:) = zsolswcf_aero(i,:) |
---|
| 437 | ENDDO |
---|
| 438 | ELSE |
---|
| 439 | DO i = 1, kdlon |
---|
| 440 | topswad_aero(iof+i) = 0.0 |
---|
| 441 | solswad_aero(iof+i) = 0.0 |
---|
| 442 | topswad0_aero(iof+i) = 0.0 |
---|
| 443 | solswad0_aero(iof+i) = 0.0 |
---|
| 444 | topsw_aero(iof+i,:) = 0. |
---|
| 445 | topsw0_aero(iof+i,:) =0. |
---|
| 446 | solsw_aero(iof+i,:) = 0. |
---|
| 447 | solsw0_aero(iof+i,:) = 0. |
---|
| 448 | ENDDO |
---|
| 449 | ENDIF |
---|
| 450 | IF (ok_aie) THEN |
---|
| 451 | DO i = 1, kdlon |
---|
| 452 | topswai_aero(iof+i) = ztopswaiaero(i) |
---|
| 453 | solswai_aero(iof+i) = zsolswaiaero(i) |
---|
| 454 | ENDDO |
---|
| 455 | ELSE |
---|
| 456 | DO i = 1, kdlon |
---|
| 457 | topswai_aero(iof+i) = 0.0 |
---|
| 458 | solswai_aero(iof+i) = 0.0 |
---|
| 459 | ENDDO |
---|
| 460 | ENDIF |
---|
| 461 | DO k = 1, kflev |
---|
| 462 | DO i = 1, kdlon |
---|
| 463 | ! scale factor to take into account the difference between |
---|
| 464 | ! dry air and watter vapour scpecifi! heat capacity |
---|
| 465 | zznormcp=1.0+RVTMP2*PWV(i,k) |
---|
| 466 | heat(iof+i,k) = zheat(i,k)/zznormcp |
---|
| 467 | cool(iof+i,k) = zcool(i,k)/zznormcp |
---|
| 468 | heat0(iof+i,k) = zheat0(i,k)/zznormcp |
---|
| 469 | cool0(iof+i,k) = zcool0(i,k)/zznormcp |
---|
| 470 | ENDDO |
---|
| 471 | ENDDO |
---|
| 472 | |
---|
| 473 | ENDDO ! j = 1, nb_gr |
---|
| 474 | |
---|
| 475 | END SUBROUTINE radlwsw |
---|
| 476 | |
---|
| 477 | end module radlwsw_m |
---|