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