[2003] | 1 | ! $Id: radlwsw_m.F90 5133 2024-07-26 12:20:54Z abarral $ |
---|
[5099] | 2 | |
---|
[1687] | 3 | module radlwsw_m |
---|
[5111] | 4 | USE lmdz_abort_physic, ONLY: abort_physic |
---|
[1687] | 5 | IMPLICIT NONE |
---|
| 6 | |
---|
[5119] | 7 | CONTAINS |
---|
[1687] | 8 | |
---|
[5111] | 9 | SUBROUTINE radlwsw(& |
---|
| 10 | debut, dist, rmu0, fract, & |
---|
| 11 | !albedo SB >>> |
---|
| 12 | ! paprs, pplay,tsol,alb1, alb2, & |
---|
| 13 | paprs, pplay, tsol, SFRWL, alb_dir, alb_dif, & |
---|
| 14 | !albedo SB <<< |
---|
| 15 | t, q, wo, & |
---|
| 16 | cldfra, cldemi, cldtaupd, & |
---|
| 17 | ok_ade, ok_aie, ok_volcan, flag_volc_surfstrat, flag_aerosol, & |
---|
| 18 | flag_aerosol_strat, flag_aer_feedback, & |
---|
| 19 | tau_aero, piz_aero, cg_aero, & |
---|
| 20 | tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm, & ! rajoute par OB RRTM |
---|
| 21 | tau_aero_lw_rrtm, & ! rajoute par C.Kleinschmitt pour RRTM |
---|
| 22 | cldtaupi, m_allaer, & |
---|
| 23 | qsat, flwc, fiwc, & |
---|
| 24 | ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, & |
---|
| 25 | namelist_ecrad_file, & |
---|
| 26 | heat, heat0, cool, cool0, albpla, & |
---|
| 27 | heat_volc, cool_volc, & |
---|
| 28 | topsw, toplw, solsw, solswfdiff, sollw, & |
---|
| 29 | sollwdown, & |
---|
| 30 | topsw0, toplw0, solsw0, sollw0, & |
---|
| 31 | lwdnc0, lwdn0, lwdn, lwupc0, lwup0, lwup, & |
---|
| 32 | swdnc0, swdn0, swdn, swupc0, swup0, swup, & |
---|
| 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, & |
---|
| 38 | topswcf_aero, solswcf_aero, & |
---|
| 39 | !-C. Kleinschmitt for LW diagnostics |
---|
| 40 | toplwad_aero, sollwad_aero, & |
---|
| 41 | toplwai_aero, sollwai_aero, & |
---|
| 42 | toplwad0_aero, sollwad0_aero, & |
---|
| 43 | !-end |
---|
| 44 | ZLWFT0_i, ZFLDN0, ZFLUP0, & |
---|
| 45 | ZSWFT0_i, ZFSDN0, ZFSUP0, & |
---|
| 46 | cloud_cover_sw) |
---|
[1687] | 47 | |
---|
[4866] | 48 | ! Modules necessaires |
---|
| 49 | USE DIMPHY |
---|
[5113] | 50 | USE lmdz_assert, ONLY: assert |
---|
[5101] | 51 | USE infotrac_phy, ONLY: type_trac |
---|
[5133] | 52 | USE lmdz_writefield_phy |
---|
[3908] | 53 | |
---|
[1687] | 54 | #ifdef REPROBUS |
---|
[5101] | 55 | USE CHEM_REP, ONLY: solaireTIME, ok_SUNTIME, ndimozon |
---|
[1687] | 56 | #endif |
---|
[3908] | 57 | |
---|
[1989] | 58 | #ifdef CPP_RRTM |
---|
[4866] | 59 | ! modules necessaires au rayonnement |
---|
| 60 | ! ----------------------------------------- |
---|
[5101] | 61 | USE YOERAD , ONLY: NLW, LRRTM ,LCCNL ,LCCNO ,& |
---|
[4866] | 62 | NRADIP , NRADLP , NICEOPT, NLIQOPT ,RCCNLND , RCCNSEA |
---|
[5101] | 63 | USE YOELW , ONLY: NSIL ,NTRA ,NUA ,TSTAND ,XP |
---|
| 64 | USE YOESW , ONLY: RYFWCA ,RYFWCB ,RYFWCC ,RYFWCD,& |
---|
[4866] | 65 | RYFWCE ,RYFWCF ,REBCUA ,REBCUB ,REBCUC,& |
---|
| 66 | REBCUD ,REBCUE ,REBCUF ,REBCUI ,REBCUJ,& |
---|
| 67 | REBCUG ,REBCUH ,RHSAVI ,RFULIO ,RFLAA0,& |
---|
| 68 | RFLAA1 ,RFLBB0 ,RFLBB1 ,RFLBB2 ,RFLBB3,& |
---|
| 69 | RFLCC0 ,RFLCC1 ,RFLCC2 ,RFLCC3 ,RFLDD0,& |
---|
| 70 | RFLDD1 ,RFLDD2 ,RFLDD3 ,RFUETA ,RASWCA,& |
---|
| 71 | RASWCB ,RASWCC ,RASWCD ,RASWCE ,RASWCF |
---|
[5101] | 72 | USE YOERDU , ONLY: NUAER ,NTRAER ,REPLOG ,REPSC ,REPSCW ,DIFF |
---|
| 73 | USE YOERRTWN , ONLY: DELWAVE ,TOTPLNK |
---|
| 74 | USE YOMPHY3 , ONLY: RII0 |
---|
[1989] | 75 | #endif |
---|
[4866] | 76 | USE aero_mod |
---|
[1687] | 77 | |
---|
[4866] | 78 | ! AI 02.2021 |
---|
| 79 | ! Besoin pour ECRAD de pctsrf, zmasq, longitude, altitude |
---|
[3908] | 80 | #ifdef CPP_ECRAD |
---|
[5112] | 81 | USE lmdz_geometry, ONLY: latitude, longitude |
---|
[4976] | 82 | USE phys_state_var_mod, ONLY: pctsrf |
---|
[4866] | 83 | USE indice_sol_mod |
---|
[5116] | 84 | USE time_phylmdz_mod, ONLY: current_time |
---|
| 85 | USE phys_cal_mod, ONLY: day_cur |
---|
[4866] | 86 | USE interface_lmdz_ecrad |
---|
[3908] | 87 | #endif |
---|
| 88 | |
---|
[4866] | 89 | !====================================================================== |
---|
| 90 | ! Auteur(s): Z.X. Li (LMD/CNRS) date: 19960719 |
---|
| 91 | ! Objet: interface entre le modele et les rayonnements |
---|
| 92 | ! Arguments: |
---|
| 93 | ! INPUTS |
---|
| 94 | ! dist----- input-R- distance astronomique terre-soleil |
---|
| 95 | ! rmu0----- input-R- cosinus de l'angle zenithal |
---|
| 96 | ! fract---- input-R- duree d'ensoleillement normalisee |
---|
| 97 | ! co2_ppm-- input-R- concentration du gaz carbonique (en ppm) |
---|
| 98 | ! paprs---- input-R- pression a inter-couche (Pa) |
---|
| 99 | ! pplay---- input-R- pression au milieu de couche (Pa) |
---|
| 100 | ! tsol----- input-R- temperature du sol (en K) |
---|
| 101 | ! alb1----- input-R- albedo du sol(entre 0 et 1) dans l'interval visible |
---|
| 102 | ! alb2----- input-R- albedo du sol(entre 0 et 1) dans l'interval proche infra-rouge |
---|
| 103 | ! t-------- input-R- temperature (K) |
---|
| 104 | ! q-------- input-R- vapeur d'eau (en kg/kg) |
---|
| 105 | ! cldfra--- input-R- fraction nuageuse (entre 0 et 1) |
---|
| 106 | ! cldtaupd- input-R- epaisseur optique des nuages dans le visible (present-day value) |
---|
| 107 | ! cldemi--- input-R- emissivite des nuages dans l'IR (entre 0 et 1) |
---|
| 108 | ! ok_ade--- input-L- apply the Aerosol Direct Effect or not? |
---|
| 109 | ! ok_aie--- input-L- apply the Aerosol Indirect Effect or not? |
---|
| 110 | ! ok_volcan input-L- activate volcanic diags (SW heat & LW cool rate, SW & LW flux) |
---|
| 111 | ! flag_volc_surfstrat input-I- activate volcanic surf cooling or strato heating (or nothing) |
---|
| 112 | ! flag_aerosol input-I- aerosol flag from 0 to 6 |
---|
| 113 | ! flag_aerosol_strat input-I- use stratospheric aerosols flag (0, 1, 2) |
---|
| 114 | ! flag_aer_feedback input-I- activate aerosol radiative feedback (T, F) |
---|
| 115 | ! tau_ae, piz_ae, cg_ae input-R- aerosol optical properties (calculated in aeropt.F) |
---|
| 116 | ! cldtaupi input-R- epaisseur optique des nuages dans le visible |
---|
| 117 | ! calculated for pre-industrial (pi) aerosol concentrations, i.e. with smaller |
---|
| 118 | ! droplet concentration, thus larger droplets, thus generally cdltaupi cldtaupd |
---|
| 119 | ! it is needed for the diagnostics of the aerosol indirect radiative forcing |
---|
[5099] | 120 | |
---|
[4866] | 121 | ! OUTPUTS |
---|
| 122 | ! heat-----output-R- echauffement atmospherique (visible) (K/jour) |
---|
| 123 | ! cool-----output-R- refroidissement dans l'IR (K/jour) |
---|
| 124 | ! albpla---output-R- albedo planetaire (entre 0 et 1) |
---|
| 125 | ! topsw----output-R- flux solaire net au sommet de l'atm. |
---|
| 126 | ! toplw----output-R- ray. IR montant au sommet de l'atmosphere |
---|
| 127 | ! solsw----output-R- flux solaire net a la surface |
---|
| 128 | ! solswfdiff----output-R- fraction de rayonnement diffus pour le flux solaire descendant a la surface |
---|
| 129 | ! sollw----output-R- ray. IR montant a la surface |
---|
| 130 | ! solswad---output-R- ray. solaire net absorbe a la surface (aerosol dir) |
---|
| 131 | ! topswad---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol dir) |
---|
| 132 | ! solswai---output-R- ray. solaire net absorbe a la surface (aerosol ind) |
---|
| 133 | ! topswai---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol ind) |
---|
[5099] | 134 | |
---|
[4866] | 135 | ! heat_volc-----output-R- echauffement atmospherique du au forcage volcanique (visible) (K/s) |
---|
| 136 | ! cool_volc-----output-R- refroidissement dans l'IR du au forcage volcanique (K/s) |
---|
[5099] | 137 | |
---|
[4866] | 138 | ! ATTENTION: swai and swad have to be interpreted in the following manner: |
---|
| 139 | ! --------- |
---|
| 140 | ! ok_ade=F & ok_aie=F -both are zero |
---|
| 141 | ! ok_ade=T & ok_aie=F -aerosol direct forcing is F_{AD} = topsw-topswad |
---|
| 142 | ! indirect is zero |
---|
| 143 | ! ok_ade=F & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
| 144 | ! direct is zero |
---|
| 145 | ! ok_ade=T & ok_aie=T -aerosol indirect forcing is F_{AI} = topsw-topswai |
---|
| 146 | ! aerosol direct forcing is F_{AD} = topswai-topswad |
---|
[5099] | 147 | |
---|
[4866] | 148 | ! --------- RRTM: output RECMWFL |
---|
| 149 | ! ZEMTD (KPROMA,KLEV+1) ; TOTAL DOWNWARD LONGWAVE EMISSIVITY |
---|
| 150 | ! ZEMTU (KPROMA,KLEV+1) ; TOTAL UPWARD LONGWAVE EMISSIVITY |
---|
| 151 | ! ZTRSO (KPROMA,KLEV+1) ; TOTAL SHORTWAVE TRANSMISSIVITY |
---|
| 152 | ! ZTH (KPROMA,KLEV+1) ; HALF LEVEL TEMPERATURE |
---|
| 153 | ! ZCTRSO(KPROMA,2) ; CLEAR-SKY SHORTWAVE TRANSMISSIVITY |
---|
| 154 | ! ZCEMTR(KPROMA,2) ; CLEAR-SKY NET LONGWAVE EMISSIVITY |
---|
| 155 | ! ZTRSOD(KPROMA) ; TOTAL-SKY SURFACE SW TRANSMISSITY |
---|
| 156 | ! ZLWFC (KPROMA,2) ; CLEAR-SKY LONGWAVE FLUXES |
---|
| 157 | ! ZLWFT (KPROMA,KLEV+1) ; TOTAL-SKY LONGWAVE FLUXES |
---|
| 158 | ! ZLWFT0(KPROMA,KLEV+1) ; CLEAR-SKY LONGWAVE FLUXES ! added by MPL 090109 |
---|
| 159 | ! ZSWFC (KPROMA,2) ; CLEAR-SKY SHORTWAVE FLUXES |
---|
| 160 | ! ZSWFT (KPROMA,KLEV+1) ; TOTAL-SKY SHORTWAVE FLUXES |
---|
| 161 | ! ZSWFT0(KPROMA,KLEV+1) ; CLEAR-SKY SHORTWAVE FLUXES ! added by MPL 090109 |
---|
| 162 | ! ZFLUX (KLON,2,KLEV+1) ; TOTAL LW FLUXES 1=up, 2=DWN ! added by MPL 080411 |
---|
| 163 | ! ZFLUC (KLON,2,KLEV+1) ; CLEAR SKY LW FLUXES ! added by MPL 080411 |
---|
| 164 | ! ZFSDWN(klon,KLEV+1) ; TOTAL SW DWN FLUXES ! added by MPL 080411 |
---|
| 165 | ! ZFCDWN(klon,KLEV+1) ; CLEAR SKY SW DWN FLUXES ! added by MPL 080411 |
---|
| 166 | ! ZFCCDWN(klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) SW DWN FLUXES ! added by OB 211117 |
---|
| 167 | ! ZFSUP (klon,KLEV+1) ; TOTAL SW UP FLUXES ! added by MPL 080411 |
---|
| 168 | ! ZFCUP (klon,KLEV+1) ; CLEAR SKY SW UP FLUXES ! added by MPL 080411 |
---|
| 169 | ! ZFCCUP (klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) SW UP FLUXES ! added by OB 211117 |
---|
| 170 | ! ZFLCCDWN(klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) LW DWN FLUXES ! added by OB 211117 |
---|
| 171 | ! ZFLCCUP (klon,KLEV+1) ; CLEAR SKY CLEAN (NO AEROSOL) LW UP FLUXES ! added by OB 211117 |
---|
[3908] | 172 | |
---|
[4866] | 173 | !====================================================================== |
---|
[1687] | 174 | |
---|
[4866] | 175 | ! ==================================================================== |
---|
| 176 | ! Adapte au modele de chimie INCA par Celine Deandreis & Anne Cozic -- 2009 |
---|
| 177 | ! 1 = ZERO |
---|
| 178 | ! 2 = AER total |
---|
| 179 | ! 3 = NAT |
---|
| 180 | ! 4 = BC |
---|
| 181 | ! 5 = SO4 |
---|
| 182 | ! 6 = POM |
---|
| 183 | ! 7 = DUST |
---|
| 184 | ! 8 = SS |
---|
| 185 | ! 9 = NO3 |
---|
[5099] | 186 | |
---|
[4866] | 187 | ! ==================================================================== |
---|
[1687] | 188 | |
---|
[4866] | 189 | ! ============== |
---|
| 190 | ! DECLARATIONS |
---|
| 191 | ! ============== |
---|
| 192 | include "YOETHF.h" |
---|
| 193 | include "YOMCST.h" |
---|
| 194 | include "clesphys.h" |
---|
[1687] | 195 | |
---|
[4866] | 196 | ! Input arguments |
---|
[5117] | 197 | REAL, INTENT(IN) :: dist |
---|
| 198 | REAL, INTENT(IN) :: rmu0(KLON), fract(KLON) |
---|
| 199 | REAL, INTENT(IN) :: paprs(KLON, KLEV + 1), pplay(KLON, KLEV) |
---|
[4866] | 200 | !albedo SB >>> |
---|
[5117] | 201 | ! REAL, INTENT(IN) :: alb1(KLON), alb2(KLON), tsol(KLON) |
---|
| 202 | REAL, INTENT(IN) :: tsol(KLON) |
---|
| 203 | REAL, INTENT(IN) :: alb_dir(KLON, NSW), alb_dif(KLON, NSW) |
---|
| 204 | REAL, INTENT(IN) :: SFRWL(6) |
---|
[4866] | 205 | !albedo SB <<< |
---|
[5117] | 206 | REAL, INTENT(IN) :: t(KLON, KLEV), q(KLON, KLEV) |
---|
[2146] | 207 | |
---|
[5117] | 208 | REAL, INTENT(IN) :: wo(:, :, :) ! DIMENSION(KLON,KLEV, 1 or 2) |
---|
[4866] | 209 | ! column-density of ozone in a layer, in kilo-Dobsons |
---|
| 210 | ! "wo(:, :, 1)" is for the average day-night field, |
---|
| 211 | ! "wo(:, :, 2)" is for daylight time. |
---|
| 212 | |
---|
[5117] | 213 | LOGICAL, INTENT(IN) :: ok_ade, ok_aie ! switches whether to use aerosol direct (indirect) effects or not |
---|
| 214 | LOGICAL, INTENT(IN) :: ok_volcan ! produce volcanic diags (SW/LW heat flux and rate) |
---|
| 215 | INTEGER, INTENT(IN) :: flag_volc_surfstrat ! allow to impose volcanic cooling rate at surf or heating in strato |
---|
[5111] | 216 | LOGICAL :: lldebug = .FALSE. |
---|
[5117] | 217 | INTEGER, INTENT(IN) :: flag_aerosol ! takes value 0 (no aerosol) or 1 to 6 (aerosols) |
---|
| 218 | INTEGER, INTENT(IN) :: flag_aerosol_strat ! use stratospheric aerosols |
---|
| 219 | LOGICAL, INTENT(IN) :: flag_aer_feedback ! activate aerosol radiative feedback |
---|
| 220 | REAL, INTENT(IN) :: cldfra(KLON, KLEV), cldemi(KLON, KLEV), cldtaupd(KLON, KLEV) |
---|
| 221 | REAL, INTENT(IN) :: tau_aero(KLON, KLEV, naero_grp, 2) ! aerosol optical properties (see aeropt.F) |
---|
| 222 | REAL, INTENT(IN) :: piz_aero(KLON, KLEV, naero_grp, 2) ! aerosol optical properties (see aeropt.F) |
---|
| 223 | REAL, INTENT(IN) :: cg_aero(KLON, KLEV, naero_grp, 2) ! aerosol optical properties (see aeropt.F) |
---|
[4866] | 224 | !--OB |
---|
[5117] | 225 | REAL, INTENT(IN) :: tau_aero_sw_rrtm(KLON, KLEV, 2, NSW) ! aerosol optical properties RRTM |
---|
| 226 | REAL, INTENT(IN) :: piz_aero_sw_rrtm(KLON, KLEV, 2, NSW) ! aerosol optical properties RRTM |
---|
| 227 | REAL, INTENT(IN) :: cg_aero_sw_rrtm(KLON, KLEV, 2, NSW) ! aerosol optical properties RRTM |
---|
[4866] | 228 | ! AI |
---|
| 229 | !--OB fin |
---|
| 230 | |
---|
| 231 | !--C. Kleinschmitt |
---|
[2146] | 232 | #ifdef CPP_RRTM |
---|
[5117] | 233 | REAL, INTENT(IN) :: tau_aero_lw_rrtm(KLON,KLEV,2,NLW) ! LW aerosol optical properties RRTM |
---|
[2146] | 234 | #else |
---|
[5117] | 235 | REAL, INTENT(IN) :: tau_aero_lw_rrtm(KLON, KLEV, 2, nbands_lw_rrtm) |
---|
[2146] | 236 | #endif |
---|
[4866] | 237 | !--C. Kleinschmitt end |
---|
[2146] | 238 | |
---|
[5117] | 239 | REAL, INTENT(IN) :: cldtaupi(KLON, KLEV) ! cloud optical thickness for pre-industrial aerosol concentrations |
---|
| 240 | REAL, INTENT(IN) :: qsat(klon, klev) ! Variable pour iflag_rrtm=1 |
---|
| 241 | REAL, INTENT(IN) :: flwc(klon, klev) ! Variable pour iflag_rrtm=1 |
---|
| 242 | REAL, INTENT(IN) :: fiwc(klon, klev) ! Variable pour iflag_rrtm=1 |
---|
| 243 | REAL, INTENT(IN) :: ref_liq(klon, klev) ! cloud droplet radius present-day from newmicro |
---|
| 244 | REAL, INTENT(IN) :: ref_ice(klon, klev) ! ice crystal radius present-day from newmicro |
---|
| 245 | REAL, INTENT(IN) :: ref_liq_pi(klon, klev) ! cloud droplet radius pre-industrial from newmicro |
---|
| 246 | REAL, INTENT(IN) :: ref_ice_pi(klon, klev) ! ice crystal radius pre-industrial from newmicro |
---|
| 247 | REAL, INTENT(IN) :: m_allaer(klon, klev, naero_tot) ! mass aero |
---|
[1687] | 248 | |
---|
[5117] | 249 | CHARACTER(len = 512), INTENT(IN) :: namelist_ecrad_file |
---|
| 250 | LOGICAL, INTENT(IN) :: debut |
---|
[4773] | 251 | |
---|
[4866] | 252 | ! Output arguments |
---|
[5117] | 253 | REAL, INTENT(OUT) :: heat(KLON, KLEV), cool(KLON, KLEV) |
---|
| 254 | REAL, INTENT(OUT) :: heat0(KLON, KLEV), cool0(KLON, KLEV) |
---|
| 255 | REAL, INTENT(OUT) :: heat_volc(KLON, KLEV), cool_volc(KLON, KLEV) !NL |
---|
| 256 | REAL, INTENT(OUT) :: topsw(KLON), toplw(KLON) |
---|
| 257 | REAL, INTENT(OUT) :: solsw(KLON), sollw(KLON), albpla(KLON), solswfdiff(KLON) |
---|
| 258 | REAL, INTENT(OUT) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON) |
---|
| 259 | REAL, INTENT(OUT) :: sollwdown(KLON) |
---|
| 260 | REAL, INTENT(OUT) :: swdn(KLON, kflev + 1), swdn0(KLON, kflev + 1), swdnc0(KLON, kflev + 1) |
---|
| 261 | REAL, INTENT(OUT) :: swup(KLON, kflev + 1), swup0(KLON, kflev + 1), swupc0(KLON, kflev + 1) |
---|
| 262 | REAL, INTENT(OUT) :: lwdn(KLON, kflev + 1), lwdn0(KLON, kflev + 1), lwdnc0(KLON, kflev + 1) |
---|
| 263 | REAL, INTENT(OUT) :: lwup(KLON, kflev + 1), lwup0(KLON, kflev + 1), lwupc0(KLON, kflev + 1) |
---|
| 264 | REAL, INTENT(OUT) :: topswad_aero(KLON), solswad_aero(KLON) ! output: aerosol direct forcing at TOA and surface |
---|
| 265 | REAL, INTENT(OUT) :: topswai_aero(KLON), solswai_aero(KLON) ! output: aerosol indirect forcing atTOA and surface |
---|
| 266 | REAL, INTENT(OUT) :: toplwad_aero(KLON), sollwad_aero(KLON) ! output: LW aerosol direct forcing at TOA and surface |
---|
| 267 | REAL, INTENT(OUT) :: toplwai_aero(KLON), sollwai_aero(KLON) ! output: LW aerosol indirect forcing atTOA and surface |
---|
| 268 | REAL, DIMENSION(klon), INTENT(OUT) :: topswad0_aero |
---|
| 269 | REAL, DIMENSION(klon), INTENT(OUT) :: solswad0_aero |
---|
| 270 | REAL, DIMENSION(klon), INTENT(OUT) :: toplwad0_aero |
---|
| 271 | REAL, DIMENSION(klon), INTENT(OUT) :: sollwad0_aero |
---|
| 272 | REAL, DIMENSION(kdlon, 9), INTENT(OUT) :: topsw_aero |
---|
| 273 | REAL, DIMENSION(kdlon, 9), INTENT(OUT) :: topsw0_aero |
---|
| 274 | REAL, DIMENSION(kdlon, 9), INTENT(OUT) :: solsw_aero |
---|
| 275 | REAL, DIMENSION(kdlon, 9), INTENT(OUT) :: solsw0_aero |
---|
| 276 | REAL, DIMENSION(kdlon, 3), INTENT(OUT) :: topswcf_aero |
---|
| 277 | REAL, DIMENSION(kdlon, 3), INTENT(OUT) :: solswcf_aero |
---|
| 278 | REAL, DIMENSION(kdlon, kflev + 1), INTENT(OUT) :: ZSWFT0_i |
---|
| 279 | REAL, DIMENSION(kdlon, kflev + 1), INTENT(OUT) :: ZLWFT0_i |
---|
[1687] | 280 | |
---|
[4866] | 281 | ! Local variables |
---|
[5111] | 282 | REAL(KIND = 8) ZFSUP(KDLON, KFLEV + 1) |
---|
| 283 | REAL(KIND = 8) ZFSDN(KDLON, KFLEV + 1) |
---|
| 284 | REAL(KIND = 8) ZFSUP0(KDLON, KFLEV + 1) |
---|
| 285 | REAL(KIND = 8) ZFSDN0(KDLON, KFLEV + 1) |
---|
| 286 | REAL(KIND = 8) ZFSUPC0(KDLON, KFLEV + 1) |
---|
| 287 | REAL(KIND = 8) ZFSDNC0(KDLON, KFLEV + 1) |
---|
| 288 | REAL(KIND = 8) ZFLUP(KDLON, KFLEV + 1) |
---|
| 289 | REAL(KIND = 8) ZFLDN(KDLON, KFLEV + 1) |
---|
| 290 | REAL(KIND = 8) ZFLUP0(KDLON, KFLEV + 1) |
---|
| 291 | REAL(KIND = 8) ZFLDN0(KDLON, KFLEV + 1) |
---|
| 292 | REAL(KIND = 8) ZFLUPC0(KDLON, KFLEV + 1) |
---|
| 293 | REAL(KIND = 8) ZFLDNC0(KDLON, KFLEV + 1) |
---|
| 294 | REAL(KIND = 8) zx_alpha1, zx_alpha2 |
---|
[4866] | 295 | INTEGER k, kk, i, j, iof, nb_gr |
---|
[5111] | 296 | INTEGER ist, iend, ktdia, kmode |
---|
| 297 | REAL(KIND = 8) PSCT |
---|
| 298 | REAL(KIND = 8) PALBD(kdlon, 2), PALBP(kdlon, 2) |
---|
[4866] | 299 | ! MPL 06.01.09: pour RRTM, creation de PALBD_NEW et PALBP_NEW |
---|
| 300 | ! avec NSW en deuxieme dimension |
---|
[5111] | 301 | REAL(KIND = 8) PALBD_NEW(kdlon, NSW), PALBP_NEW(kdlon, NSW) |
---|
| 302 | REAL(KIND = 8) PEMIS(kdlon), PDT0(kdlon), PVIEW(kdlon) |
---|
| 303 | REAL(KIND = 8) PPSOL(kdlon), PDP(kdlon, KLEV) |
---|
| 304 | REAL(KIND = 8) PTL(kdlon, kflev + 1), PPMB(kdlon, kflev + 1) |
---|
| 305 | REAL(KIND = 8) PTAVE(kdlon, kflev) |
---|
| 306 | REAL(KIND = 8) PWV(kdlon, kflev), PQS(kdlon, kflev) |
---|
[1687] | 307 | |
---|
[5111] | 308 | REAL(KIND = 8) cloud_cover_sw(klon) |
---|
[4773] | 309 | |
---|
[5111] | 310 | !!!!!!! Declarations specifiques pour ECRAD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[4866] | 311 | ! AI 02.2021 |
---|
[3908] | 312 | #ifdef CPP_ECRAD |
---|
[4866] | 313 | ! ATTENTION les dimensions klon, kdlon ??? |
---|
| 314 | ! INPUTS |
---|
| 315 | REAL, DIMENSION(kdlon,kflev+1) :: ZSWFT0_ii, ZLWFT0_ii |
---|
| 316 | REAL(KIND=8) ZEMISW(klon), & ! LW emissivity inside the window region |
---|
| 317 | ZEMIS(klon) ! LW emissivity outside the window region |
---|
| 318 | REAL(KIND=8) ZGELAM(klon), & ! longitudes en rad |
---|
| 319 | ZGEMU(klon) ! sin(latitude) |
---|
| 320 | REAL(KIND=8) ZCO2, & ! CO2 mass mixing ratios on full levels |
---|
| 321 | ZCH4, & ! CH4 mass mixing ratios on full levels |
---|
| 322 | ZN2O, & ! N2O mass mixing ratios on full levels |
---|
| 323 | ZNO2, & ! NO2 mass mixing ratios on full levels |
---|
| 324 | ZCFC11, & ! CFC11 |
---|
| 325 | ZCFC12, & ! CFC12 |
---|
| 326 | ZHCFC22, & ! HCFC22 |
---|
| 327 | ZCCL4, & ! CCL4 |
---|
| 328 | ZO2 ! O2 |
---|
[4031] | 329 | |
---|
[4866] | 330 | REAL(KIND=8) ZQ_RAIN(klon,klev), & ! Rain cloud mass mixing ratio (kg/kg) ? |
---|
| 331 | ZQ_SNOW(klon,klev) ! Snow cloud mass mixing ratio (kg/kg) ? |
---|
| 332 | REAL(KIND=8) ZAEROSOL_OLD(KLON,6,KLEV), & ! |
---|
| 333 | ZAEROSOL(KLON,KLEV,naero_spc) ! |
---|
| 334 | ! OUTPUTS |
---|
| 335 | REAL(KIND=8) ZFLUX_DIR(klon), & ! Direct compt of surf flux into horizontal plane |
---|
| 336 | ZFLUX_DIR_CLEAR(klon), & ! CS Direct |
---|
| 337 | ZFLUX_DIR_INTO_SUN(klon), & ! |
---|
| 338 | ZFLUX_UV(klon), & ! UV flux |
---|
| 339 | ZFLUX_PAR(klon), & ! photosynthetically active radiation similarly |
---|
| 340 | ZFLUX_PAR_CLEAR(klon), & ! CS photosynthetically |
---|
| 341 | ZFLUX_SW_DN_TOA(klon), & ! DN SW flux at TOA |
---|
| 342 | ZEMIS_OUT(klon) ! effective broadband emissivity |
---|
[4773] | 343 | |
---|
[4866] | 344 | REAL(KIND=8) ZLWDERIVATIVE(klon,klev+1) ! LW derivatives |
---|
| 345 | REAL(KIND=8) ZSWDIFFUSEBAND(klon,NSW), & ! SW DN flux in diffuse albedo band |
---|
| 346 | ZSWDIRECTBAND(klon,NSW) ! SW DN flux in direct albedo band |
---|
| 347 | REAL(KIND=8) SOLARIRAD |
---|
| 348 | REAL(KIND=8) seuilmach |
---|
| 349 | ! AI 10 mars 22 : Pour les tests Offline |
---|
[5103] | 350 | logical :: lldebug_for_offline = .FALSE. |
---|
[4866] | 351 | REAL(KIND=8) solaire_off(klon), & |
---|
| 352 | ZCO2_off(klon,klev), & |
---|
| 353 | ZCH4_off(klon,klev), & ! CH4 mass mixing ratios on full levels |
---|
| 354 | ZN2O_off(klon,klev), & ! N2O mass mixing ratios on full levels |
---|
| 355 | ZNO2_off(klon,klev), & ! NO2 mass mixing ratios on full levels |
---|
| 356 | ZCFC11_off(klon,klev), & ! CFC11 |
---|
| 357 | ZCFC12_off(klon,klev), & ! CFC12 |
---|
| 358 | ZHCFC22_off(klon,klev), & ! HCFC22 |
---|
| 359 | ZCCL4_off(klon,klev), & ! CCL4 |
---|
| 360 | ZO2_off(klon,klev) ! O2#endif |
---|
[3908] | 361 | #endif |
---|
[5111] | 362 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[3908] | 363 | |
---|
[5111] | 364 | REAL(kind = 8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone |
---|
[4866] | 365 | ! "POZON(:, :, 1)" is for the average day-night field, |
---|
| 366 | ! "POZON(:, :, 2)" is for daylight time. |
---|
[5111] | 367 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
| 368 | REAL(KIND = 8) PAER(kdlon, kflev, 6) |
---|
| 369 | REAL(KIND = 8) PCLDLD(kdlon, kflev) |
---|
| 370 | REAL(KIND = 8) PCLDLU(kdlon, kflev) |
---|
| 371 | REAL(KIND = 8) PCLDSW(kdlon, kflev) |
---|
| 372 | REAL(KIND = 8) PTAU(kdlon, 2, kflev) |
---|
| 373 | REAL(KIND = 8) POMEGA(kdlon, 2, kflev) |
---|
| 374 | REAL(KIND = 8) PCG(kdlon, 2, kflev) |
---|
| 375 | REAL(KIND = 8) zfract(kdlon), zrmu0(kdlon), zdist |
---|
| 376 | REAL(KIND = 8) zheat(kdlon, kflev), zcool(kdlon, kflev) |
---|
| 377 | REAL(KIND = 8) zheat0(kdlon, kflev), zcool0(kdlon, kflev) |
---|
| 378 | REAL(KIND = 8) zheat_volc(kdlon, kflev), zcool_volc(kdlon, kflev) !NL |
---|
| 379 | REAL(KIND = 8) ztopsw(kdlon), ztoplw(kdlon) |
---|
| 380 | REAL(KIND = 8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon), zsolswfdiff(kdlon) |
---|
| 381 | REAL(KIND = 8) zsollwdown(kdlon) |
---|
| 382 | REAL(KIND = 8) ztopsw0(kdlon), ztoplw0(kdlon) |
---|
| 383 | REAL(KIND = 8) zsolsw0(kdlon), zsollw0(kdlon) |
---|
| 384 | REAL(KIND = 8) zznormcp |
---|
| 385 | REAL(KIND = 8) tauaero(kdlon, kflev, naero_grp, 2) ! aer opt properties |
---|
| 386 | REAL(KIND = 8) pizaero(kdlon, kflev, naero_grp, 2) |
---|
| 387 | REAL(KIND = 8) cgaero(kdlon, kflev, naero_grp, 2) |
---|
| 388 | REAL(KIND = 8) PTAUA(kdlon, 2, kflev) ! present-day value of cloud opt thickness (PTAU is pre-industrial value), local use |
---|
| 389 | REAL(KIND = 8) POMEGAA(kdlon, 2, kflev) ! dito for single scatt albedo |
---|
| 390 | REAL(KIND = 8) ztopswadaero(kdlon), zsolswadaero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
| 391 | REAL(KIND = 8) ztopswad0aero(kdlon), zsolswad0aero(kdlon) ! Aerosol direct forcing at TOAand surface |
---|
| 392 | REAL(KIND = 8) ztopswaiaero(kdlon), zsolswaiaero(kdlon) ! dito, indirect |
---|
[4866] | 393 | !--NL |
---|
[5111] | 394 | REAL(KIND = 8) zswadaero(kdlon, kflev + 1) ! SW Aerosol direct forcing |
---|
| 395 | REAL(KIND = 8) zlwadaero(kdlon, kflev + 1) ! LW Aerosol direct forcing |
---|
| 396 | REAL(KIND = 8) volmip_solsw(kdlon) ! SW clear sky in the case of VOLMIP |
---|
[4866] | 397 | !-LW by CK |
---|
[5111] | 398 | REAL(KIND = 8) ztoplwadaero(kdlon), zsollwadaero(kdlon) ! LW Aerosol direct forcing at TOAand surface |
---|
| 399 | REAL(KIND = 8) ztoplwad0aero(kdlon), zsollwad0aero(kdlon) ! LW Aerosol direct forcing at TOAand surface |
---|
| 400 | REAL(KIND = 8) ztoplwaiaero(kdlon), zsollwaiaero(kdlon) ! dito, indirect |
---|
[4866] | 401 | !-end |
---|
[5111] | 402 | REAL(KIND = 8) ztopsw_aero(kdlon, 9), ztopsw0_aero(kdlon, 9) |
---|
| 403 | REAL(KIND = 8) zsolsw_aero(kdlon, 9), zsolsw0_aero(kdlon, 9) |
---|
| 404 | REAL(KIND = 8) ztopswcf_aero(kdlon, 3), zsolswcf_aero(kdlon, 3) |
---|
[5117] | 405 | ! REAL, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 deje declare dans physiq.F MPL 20130618 |
---|
[4866] | 406 | !MPL input supplementaires pour RECMWFL |
---|
| 407 | ! flwc, fiwc = Liquid Water Content & Ice Water Content (kg/kg) |
---|
[5111] | 408 | REAL(KIND = 8) GEMU(klon) |
---|
[4866] | 409 | !MPL input RECMWFL: |
---|
| 410 | ! Tableaux aux niveaux inverses pour respecter convention Arpege |
---|
[5111] | 411 | REAL(KIND = 8) ref_liq_i(klon, klev) ! cloud droplet radius present-day from newmicro (inverted) |
---|
| 412 | REAL(KIND = 8) ref_ice_i(klon, klev) ! ice crystal radius present-day from newmicro (inverted) |
---|
[4866] | 413 | !--OB |
---|
[5111] | 414 | REAL(KIND = 8) ref_liq_pi_i(klon, klev) ! cloud droplet radius pre-industrial from newmicro (inverted) |
---|
| 415 | REAL(KIND = 8) ref_ice_pi_i(klon, klev) ! ice crystal radius pre-industrial from newmicro (inverted) |
---|
[4866] | 416 | !--end OB |
---|
[5111] | 417 | REAL(KIND = 8) paprs_i(klon, klev + 1) |
---|
| 418 | REAL(KIND = 8) pplay_i(klon, klev) |
---|
| 419 | REAL(KIND = 8) cldfra_i(klon, klev) |
---|
| 420 | REAL(KIND = 8) POZON_i(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone |
---|
[4866] | 421 | ! "POZON(:, :, 1)" is for the average day-night field, |
---|
| 422 | ! "POZON(:, :, 2)" is for daylight time. |
---|
[5111] | 423 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
| 424 | REAL(KIND = 8) PAER_i(kdlon, kflev, 6) |
---|
| 425 | REAL(KIND = 8) PDP_i(klon, klev) |
---|
| 426 | REAL(KIND = 8) t_i(klon, klev), q_i(klon, klev), qsat_i(klon, klev) |
---|
| 427 | REAL(KIND = 8) flwc_i(klon, klev), fiwc_i(klon, klev) |
---|
[4866] | 428 | !MPL output RECMWFL: |
---|
[5111] | 429 | REAL(KIND = 8) ZEMTD (klon, klev + 1), ZEMTD_i (klon, klev + 1) |
---|
| 430 | REAL(KIND = 8) ZEMTU (klon, klev + 1), ZEMTU_i (klon, klev + 1) |
---|
| 431 | REAL(KIND = 8) ZTRSO (klon, klev + 1), ZTRSO_i (klon, klev + 1) |
---|
| 432 | REAL(KIND = 8) ZTH (klon, klev + 1), ZTH_i (klon, klev + 1) |
---|
| 433 | REAL(KIND = 8) ZCTRSO(klon, 2) |
---|
| 434 | REAL(KIND = 8) ZCEMTR(klon, 2) |
---|
| 435 | REAL(KIND = 8) ZTRSOD(klon) |
---|
| 436 | REAL(KIND = 8) ZLWFC (klon, 2) |
---|
| 437 | REAL(KIND = 8) ZLWFT (klon, klev + 1), ZLWFT_i (klon, klev + 1) |
---|
| 438 | REAL(KIND = 8) ZSWFC (klon, 2) |
---|
| 439 | REAL(KIND = 8) ZSWFT (klon, klev + 1), ZSWFT_i (klon, klev + 1) |
---|
| 440 | REAL(KIND = 8) ZFLUCDWN_i(klon, klev + 1), ZFLUCUP_i(klon, klev + 1) |
---|
| 441 | REAL(KIND = 8) PPIZA_TOT(klon, klev, NSW) |
---|
| 442 | REAL(KIND = 8) PCGA_TOT(klon, klev, NSW) |
---|
| 443 | REAL(KIND = 8) PTAU_TOT(klon, klev, NSW) |
---|
| 444 | REAL(KIND = 8) PPIZA_NAT(klon, klev, NSW) |
---|
| 445 | REAL(KIND = 8) PCGA_NAT(klon, klev, NSW) |
---|
| 446 | REAL(KIND = 8) PTAU_NAT(klon, klev, NSW) |
---|
[2146] | 447 | #ifdef CPP_RRTM |
---|
[4866] | 448 | REAL(KIND=8) PTAU_LW_TOT(klon,klev,NLW) |
---|
| 449 | REAL(KIND=8) PTAU_LW_NAT(klon,klev,NLW) |
---|
[2146] | 450 | #endif |
---|
[5111] | 451 | REAL(KIND = 8) PSFSWDIR(klon, NSW) |
---|
| 452 | REAL(KIND = 8) PSFSWDIF(klon, NSW) |
---|
| 453 | REAL(KIND = 8) PFSDNN(klon) |
---|
| 454 | REAL(KIND = 8) PFSDNV(klon) |
---|
[4866] | 455 | !MPL On ne redefinit pas les tableaux ZFLUX,ZFLUC, |
---|
| 456 | !MPL ZFSDWN,ZFCDWN,ZFSUP,ZFCUP car ils existent deja |
---|
| 457 | !MPL sous les noms de ZFLDN,ZFLDN0,ZFLUP,ZFLUP0, |
---|
| 458 | !MPL ZFSDN,ZFSDN0,ZFSUP,ZFSUP0 |
---|
[5111] | 459 | REAL(KIND = 8) ZFLUX_i (klon, 2, klev + 1) |
---|
| 460 | REAL(KIND = 8) ZFLUC_i (klon, 2, klev + 1) |
---|
| 461 | REAL(KIND = 8) ZFSDWN_i (klon, klev + 1) |
---|
| 462 | REAL(KIND = 8) ZFCDWN_i (klon, klev + 1) |
---|
| 463 | REAL(KIND = 8) ZFCCDWN_i (klon, klev + 1) |
---|
| 464 | REAL(KIND = 8) ZFSUP_i (klon, klev + 1) |
---|
| 465 | REAL(KIND = 8) ZFCUP_i (klon, klev + 1) |
---|
| 466 | REAL(KIND = 8) ZFCCUP_i (klon, klev + 1) |
---|
| 467 | REAL(KIND = 8) ZFLCCDWN_i (klon, klev + 1) |
---|
| 468 | REAL(KIND = 8) ZFLCCUP_i (klon, klev + 1) |
---|
[4866] | 469 | ! 3 lignes suivantes a activer pour CCMVAL (MPL 20100412) |
---|
| 470 | ! REAL(KIND=8) RSUN(3,2) |
---|
| 471 | ! REAL(KIND=8) SUN(3) |
---|
| 472 | ! REAL(KIND=8) SUN_FRACT(2) |
---|
[5111] | 473 | REAL, PARAMETER :: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 |
---|
| 474 | CHARACTER (LEN = 80) :: abort_message |
---|
| 475 | CHARACTER (LEN = 80) :: modname = 'radlwsw_m' |
---|
[1687] | 476 | |
---|
[4866] | 477 | REAL zdir, zdif |
---|
[3756] | 478 | |
---|
[4866] | 479 | ! ========= INITIALISATIONS ============================================== |
---|
| 480 | IF (lldebug) THEN |
---|
[5111] | 481 | PRINT*, 'Entree dans radlwsw ' |
---|
| 482 | PRINT*, '************* INITIALISATIONS *****************************' |
---|
| 483 | PRINT*, 'klon, kdlon, klev, kflev =', klon, kdlon, klev, kflev |
---|
[4866] | 484 | ENDIF |
---|
[3908] | 485 | |
---|
[4866] | 486 | CALL assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") |
---|
[3435] | 487 | |
---|
[5111] | 488 | ist = 1 |
---|
| 489 | iend = klon |
---|
| 490 | ktdia = 1 |
---|
| 491 | kmode = ist |
---|
[4866] | 492 | ! Aeros |
---|
[5111] | 493 | tauaero(:, :, :, :) = 0. |
---|
| 494 | pizaero(:, :, :, :) = 0. |
---|
| 495 | cgaero(:, :, :, :) = 0. |
---|
[4866] | 496 | ! lldebug=.FALSE. |
---|
[3465] | 497 | |
---|
[5111] | 498 | ztopsw_aero(:, :) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 |
---|
| 499 | ztopsw0_aero(:, :) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 |
---|
| 500 | zsolsw_aero(:, :) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 |
---|
| 501 | zsolsw0_aero(:, :) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 |
---|
[3465] | 502 | |
---|
[5111] | 503 | ZTOPSWADAERO(:) = 0. !ym missing init |
---|
| 504 | ZSOLSWADAERO(:) = 0. !ym missing init |
---|
[4866] | 505 | ZTOPSWAD0AERO(:) = 0. !ym missing init |
---|
| 506 | ZSOLSWAD0AERO(:) = 0. !ym missing init |
---|
[5111] | 507 | ZTOPSWAIAERO(:) = 0. !ym missing init |
---|
| 508 | ZSOLSWAIAERO(:) = 0. !ym missing init |
---|
| 509 | ZTOPSWCF_AERO(:, :) = 0.!ym missing init |
---|
| 510 | ZSOLSWCF_AERO(:, :) = 0. !ym missing init |
---|
[4866] | 511 | |
---|
| 512 | ! AI 02.2021 |
---|
[4031] | 513 | #ifdef CPP_ECRAD |
---|
[4866] | 514 | ZEMIS = 1.0 |
---|
| 515 | ZEMISW = 1.0 |
---|
| 516 | ZGELAM = longitude |
---|
| 517 | ZGEMU = sin(latitude) |
---|
| 518 | ZCO2 = RCO2 |
---|
| 519 | ZCH4 = RCH4 |
---|
| 520 | ZN2O = RN2O |
---|
| 521 | ZNO2 = 0.0 |
---|
| 522 | ZCFC11 = RCFC11 |
---|
| 523 | ZCFC12 = RCFC12 |
---|
| 524 | ZHCFC22 = 0.0 |
---|
| 525 | ZO2 = 0.0 |
---|
| 526 | ZCCL4 = 0.0 |
---|
| 527 | ZQ_RAIN = 0.0 |
---|
| 528 | ZQ_SNOW = 0.0 |
---|
| 529 | ZAEROSOL_OLD = 0.0 |
---|
| 530 | ZAEROSOL = 0.0 |
---|
| 531 | seuilmach=tiny(seuilmach) |
---|
[4031] | 532 | #endif |
---|
| 533 | |
---|
[4866] | 534 | !------------------------------------------- |
---|
| 535 | nb_gr = KLON / kdlon |
---|
[5111] | 536 | IF (nb_gr * kdlon /= KLON) THEN |
---|
| 537 | PRINT*, "kdlon mauvais:", KLON, kdlon, nb_gr |
---|
| 538 | CALL abort_physic("radlwsw", "", 1) |
---|
[4866] | 539 | ENDIF |
---|
[5082] | 540 | IF (kflev /= KLEV) THEN |
---|
[5111] | 541 | PRINT*, "kflev differe de KLEV, kflev, KLEV" |
---|
| 542 | CALL abort_physic("radlwsw", "", 1) |
---|
[4866] | 543 | ENDIF |
---|
| 544 | !------------------------------------------- |
---|
| 545 | DO k = 1, KLEV |
---|
[5111] | 546 | DO i = 1, KLON |
---|
| 547 | heat(i, k) = 0. |
---|
| 548 | cool(i, k) = 0. |
---|
| 549 | heat_volc(i, k) = 0. !NL |
---|
| 550 | cool_volc(i, k) = 0. !NL |
---|
| 551 | heat0(i, k) = 0. |
---|
| 552 | cool0(i, k) = 0. |
---|
| 553 | ENDDO |
---|
[1687] | 554 | ENDDO |
---|
[5099] | 555 | |
---|
[4866] | 556 | zdist = dist |
---|
[5099] | 557 | |
---|
[5111] | 558 | PSCT = solaire / zdist / zdist |
---|
[1687] | 559 | |
---|
[4866] | 560 | IF (type_trac == 'repr') THEN |
---|
[1687] | 561 | #ifdef REPROBUS |
---|
[4866] | 562 | IF (iflag_rrtm==0) THEN |
---|
| 563 | IF (ok_SUNTIME) PSCT = solaireTIME/zdist/zdist |
---|
[5103] | 564 | PRINT*,'Constante solaire: ',PSCT*zdist*zdist |
---|
[4866] | 565 | ENDIF |
---|
| 566 | #endif |
---|
[3756] | 567 | ENDIF |
---|
[1687] | 568 | |
---|
[4866] | 569 | IF (lldebug) THEN |
---|
[5111] | 570 | PRINT*, '************** Debut boucle de 1 a ', nb_gr |
---|
[4866] | 571 | ENDIF |
---|
[3908] | 572 | |
---|
[4866] | 573 | DO j = 1, nb_gr |
---|
[5111] | 574 | iof = kdlon * (j - 1) |
---|
| 575 | DO i = 1, kdlon |
---|
| 576 | zfract(i) = fract(iof + i) |
---|
| 577 | zrmu0(i) = rmu0(iof + i) |
---|
[2227] | 578 | |
---|
[5111] | 579 | IF (iflag_rrtm==0) THEN |
---|
| 580 | ! Albedo |
---|
| 581 | PALBD(i, 1) = alb_dif(iof + i, 1) |
---|
| 582 | PALBD(i, 2) = alb_dif(iof + i, 2) |
---|
| 583 | PALBP(i, 1) = alb_dir(iof + i, 1) |
---|
| 584 | PALBP(i, 2) = alb_dir(iof + i, 2) |
---|
| 585 | ! AI 02.2021 cas iflag_rrtm=1 et 2 |
---|
| 586 | ELSEIF (iflag_rrtm==1.OR.iflag_rrtm==2) THEN |
---|
| 587 | DO kk = 1, NSW |
---|
| 588 | PALBD_NEW(i, kk) = alb_dif(iof + i, kk) |
---|
| 589 | PALBP_NEW(i, kk) = alb_dir(iof + i, kk) |
---|
| 590 | ENDDO |
---|
[2227] | 591 | |
---|
[5111] | 592 | ENDIF |
---|
| 593 | !albedo SB <<< |
---|
[5099] | 594 | |
---|
[5111] | 595 | PEMIS(i) = 1.0 !!!!! A REVOIR (MPL) |
---|
| 596 | PVIEW(i) = 1.66 |
---|
| 597 | PPSOL(i) = paprs(iof + i, 1) |
---|
| 598 | zx_alpha1 = (paprs(iof + i, 1) - pplay(iof + i, 2)) / (pplay(iof + i, 1) - pplay(iof + i, 2)) |
---|
| 599 | zx_alpha2 = 1.0 - zx_alpha1 |
---|
| 600 | PTL(i, 1) = t(iof + i, 1) * zx_alpha1 + t(iof + i, 2) * zx_alpha2 |
---|
| 601 | PTL(i, KLEV + 1) = t(iof + i, KLEV) |
---|
| 602 | PDT0(i) = tsol(iof + i) - PTL(i, 1) |
---|
| 603 | ENDDO |
---|
| 604 | DO k = 2, kflev |
---|
| 605 | DO i = 1, kdlon |
---|
| 606 | PTL(i, k) = (t(iof + i, k) + t(iof + i, k - 1)) * 0.5 |
---|
| 607 | ENDDO |
---|
| 608 | ENDDO |
---|
| 609 | DO k = 1, kflev |
---|
| 610 | DO i = 1, kdlon |
---|
| 611 | PDP(i, k) = paprs(iof + i, k) - paprs(iof + i, k + 1) |
---|
| 612 | PTAVE(i, k) = t(iof + i, k) |
---|
| 613 | PWV(i, k) = MAX (q(iof + i, k), 1.0e-12) |
---|
| 614 | PQS(i, k) = PWV(i, k) |
---|
| 615 | ! Confert from column density of ozone in a cell, in kDU, to a mass fraction |
---|
| 616 | POZON(i, k, :) = wo(iof + i, k, :) * RG * dobson_u * 1e3 & |
---|
| 617 | / (paprs(iof + i, k) - paprs(iof + i, k + 1)) |
---|
| 618 | ! A activer pour CCMVAL on prend l'ozone impose (MPL 07042010) |
---|
| 619 | ! POZON(i,k,:) = wo(i,k,:) |
---|
| 620 | ! print *,'RADLWSW: POZON',k, POZON(i,k,1) |
---|
| 621 | PCLDLD(i, k) = cldfra(iof + i, k) * cldemi(iof + i, k) |
---|
| 622 | PCLDLU(i, k) = cldfra(iof + i, k) * cldemi(iof + i, k) |
---|
| 623 | PCLDSW(i, k) = cldfra(iof + i, k) |
---|
| 624 | PTAU(i, 1, k) = MAX(cldtaupi(iof + i, k), 1.0e-05)! 1e-12 serait instable |
---|
| 625 | PTAU(i, 2, k) = MAX(cldtaupi(iof + i, k), 1.0e-05)! pour 32-bit machines |
---|
| 626 | POMEGA(i, 1, k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAU(i, 1, k)) |
---|
| 627 | POMEGA(i, 2, k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAU(i, 2, k)) |
---|
| 628 | PCG(i, 1, k) = 0.865 |
---|
| 629 | PCG(i, 2, k) = 0.910 |
---|
| 630 | !- |
---|
| 631 | ! Introduced for aerosol indirect forcings. |
---|
| 632 | ! The following values use the cloud optical thickness calculated from |
---|
| 633 | ! present-day aerosol concentrations whereas the quantities without the |
---|
| 634 | ! "A" at the end are for pre-industial (natural-only) aerosol concentrations |
---|
[2227] | 635 | |
---|
[5111] | 636 | PTAUA(i, 1, k) = MAX(cldtaupd(iof + i, k), 1.0e-05)! 1e-12 serait instable |
---|
| 637 | PTAUA(i, 2, k) = MAX(cldtaupd(iof + i, k), 1.0e-05)! pour 32-bit machines |
---|
| 638 | POMEGAA(i, 1, k) = 0.9999 - 5.0e-04 * EXP(-0.5 * PTAUA(i, 1, k)) |
---|
| 639 | POMEGAA(i, 2, k) = 0.9988 - 2.5e-03 * EXP(-0.05 * PTAUA(i, 2, k)) |
---|
| 640 | ENDDO |
---|
| 641 | ENDDO |
---|
[5099] | 642 | |
---|
[5111] | 643 | IF (type_trac == 'repr') THEN |
---|
[1687] | 644 | #ifdef REPROBUS |
---|
[4866] | 645 | ndimozon = size(wo, 3) |
---|
| 646 | CALL RAD_INTERACTIF(POZON,iof) |
---|
[1687] | 647 | #endif |
---|
[5111] | 648 | ENDIF |
---|
[5099] | 649 | |
---|
[5111] | 650 | DO k = 1, kflev + 1 |
---|
| 651 | DO i = 1, kdlon |
---|
| 652 | PPMB(i, k) = paprs(iof + i, k) / 100.0 |
---|
| 653 | ENDDO |
---|
| 654 | ENDDO |
---|
[5099] | 655 | |
---|
[5111] | 656 | !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
| 657 | DO kk = 1, 6 |
---|
| 658 | DO k = 1, kflev |
---|
[4866] | 659 | DO i = 1, kdlon |
---|
[5111] | 660 | PAER(i, k, kk) = 1.0E-15 !!!!! A REVOIR (MPL) |
---|
[4866] | 661 | ENDDO |
---|
[5111] | 662 | ENDDO |
---|
| 663 | ENDDO |
---|
| 664 | DO k = 1, kflev |
---|
| 665 | DO i = 1, kdlon |
---|
| 666 | tauaero(i, k, :, 1) = tau_aero(iof + i, k, :, 1) |
---|
| 667 | pizaero(i, k, :, 1) = piz_aero(iof + i, k, :, 1) |
---|
| 668 | cgaero(i, k, :, 1) = cg_aero(iof + i, k, :, 1) |
---|
| 669 | tauaero(i, k, :, 2) = tau_aero(iof + i, k, :, 2) |
---|
| 670 | pizaero(i, k, :, 2) = piz_aero(iof + i, k, :, 2) |
---|
| 671 | cgaero(i, k, :, 2) = cg_aero(iof + i, k, :, 2) |
---|
| 672 | ENDDO |
---|
| 673 | ENDDO |
---|
[5099] | 674 | |
---|
[5111] | 675 | !===== iflag_rrtm ================================================ |
---|
[5099] | 676 | |
---|
[5111] | 677 | IF (iflag_rrtm == 0) THEN !!!! remettre 0 juste pour tester l'ancien rayt via rrtm |
---|
[5099] | 678 | |
---|
[5111] | 679 | !--- Mise a zero des tableaux output du rayonnement LW-AR4 ---------- |
---|
| 680 | DO k = 1, kflev + 1 |
---|
| 681 | DO i = 1, kdlon |
---|
| 682 | ! print *,'RADLWSW: boucle mise a zero i k',i,k |
---|
| 683 | ZFLUP(i, k) = 0. |
---|
| 684 | ZFLDN(i, k) = 0. |
---|
| 685 | ZFLUP0(i, k) = 0. |
---|
| 686 | ZFLDN0(i, k) = 0. |
---|
| 687 | ZLWFT0_i(i, k) = 0. |
---|
| 688 | ZFLUCUP_i(i, k) = 0. |
---|
| 689 | ZFLUCDWN_i(i, k) = 0. |
---|
[4866] | 690 | ENDDO |
---|
[5111] | 691 | ENDDO |
---|
| 692 | DO k = 1, kflev |
---|
| 693 | DO i = 1, kdlon |
---|
| 694 | zcool(i, k) = 0. |
---|
| 695 | zcool_volc(i, k) = 0. !NL |
---|
| 696 | zcool0(i, k) = 0. |
---|
[4866] | 697 | ENDDO |
---|
[5111] | 698 | ENDDO |
---|
| 699 | DO i = 1, kdlon |
---|
| 700 | ztoplw(i) = 0. |
---|
| 701 | zsollw(i) = 0. |
---|
| 702 | ztoplw0(i) = 0. |
---|
| 703 | zsollw0(i) = 0. |
---|
| 704 | zsollwdown(i) = 0. |
---|
| 705 | ztoplwad0aero(i) = 0. |
---|
| 706 | ztoplwadaero(i) = 0. |
---|
| 707 | ENDDO |
---|
| 708 | ! Old radiation scheme, used for AR4 runs |
---|
| 709 | ! average day-night ozone for longwave |
---|
| 710 | CALL LW_LMDAR4(& |
---|
| 711 | PPMB, PDP, & |
---|
| 712 | PPSOL, PDT0, PEMIS, & |
---|
| 713 | PTL, PTAVE, PWV, POZON(:, :, 1), PAER, & |
---|
| 714 | PCLDLD, PCLDLU, & |
---|
| 715 | PVIEW, & |
---|
| 716 | zcool, zcool0, & |
---|
| 717 | ztoplw, zsollw, ztoplw0, zsollw0, & |
---|
| 718 | zsollwdown, & |
---|
| 719 | ZFLUP, ZFLDN, ZFLUP0, ZFLDN0) |
---|
| 720 | !----- Mise a zero des tableaux output du rayonnement SW-AR4 |
---|
| 721 | DO k = 1, kflev + 1 |
---|
[4866] | 722 | DO i = 1, kdlon |
---|
[5111] | 723 | ZFSUP(i, k) = 0. |
---|
| 724 | ZFSDN(i, k) = 0. |
---|
| 725 | ZFSUP0(i, k) = 0. |
---|
| 726 | ZFSDN0(i, k) = 0. |
---|
| 727 | ZFSUPC0(i, k) = 0. |
---|
| 728 | ZFSDNC0(i, k) = 0. |
---|
| 729 | ZFLUPC0(i, k) = 0. |
---|
| 730 | ZFLDNC0(i, k) = 0. |
---|
| 731 | ZSWFT0_i(i, k) = 0. |
---|
| 732 | ZFCUP_i(i, k) = 0. |
---|
| 733 | ZFCDWN_i(i, k) = 0. |
---|
| 734 | ZFCCUP_i(i, k) = 0. |
---|
| 735 | ZFCCDWN_i(i, k) = 0. |
---|
| 736 | ZFLCCUP_i(i, k) = 0. |
---|
| 737 | ZFLCCDWN_i(i, k) = 0. |
---|
| 738 | zswadaero(i, k) = 0. !--NL |
---|
[4866] | 739 | ENDDO |
---|
[5111] | 740 | ENDDO |
---|
| 741 | DO k = 1, kflev |
---|
[4866] | 742 | DO i = 1, kdlon |
---|
[5111] | 743 | zheat(i, k) = 0. |
---|
| 744 | zheat_volc(i, k) = 0. |
---|
| 745 | zheat0(i, k) = 0. |
---|
[4866] | 746 | ENDDO |
---|
[5111] | 747 | ENDDO |
---|
| 748 | DO i = 1, kdlon |
---|
| 749 | zalbpla(i) = 0. |
---|
| 750 | ztopsw(i) = 0. |
---|
| 751 | zsolsw(i) = 0. |
---|
| 752 | ztopsw0(i) = 0. |
---|
| 753 | zsolsw0(i) = 0. |
---|
| 754 | ztopswadaero(i) = 0. |
---|
| 755 | zsolswadaero(i) = 0. |
---|
| 756 | ztopswaiaero(i) = 0. |
---|
| 757 | zsolswaiaero(i) = 0. |
---|
| 758 | ENDDO |
---|
[3756] | 759 | |
---|
[5111] | 760 | !--fraction of diffuse radiation in surface SW downward radiation |
---|
| 761 | !--not computed with old radiation scheme |
---|
| 762 | zsolswfdiff(:) = -999.999 |
---|
[3756] | 763 | |
---|
[5111] | 764 | ! print *,'Avant SW_LMDAR4: PSCT zrmu0 zfract',PSCT, zrmu0, zfract |
---|
| 765 | ! daylight ozone, if we have it, for short wave |
---|
| 766 | CALL SW_AEROAR4(PSCT, zrmu0, zfract, & |
---|
| 767 | PPMB, PDP, & |
---|
| 768 | PPSOL, PALBD, PALBP, & |
---|
| 769 | PTAVE, PWV, PQS, POZON(:, :, size(wo, 3)), PAER, & |
---|
| 770 | PCLDSW, PTAU, POMEGA, PCG, & |
---|
| 771 | zheat, zheat0, & |
---|
| 772 | zalbpla, ztopsw, zsolsw, ztopsw0, zsolsw0, & |
---|
| 773 | ZFSUP, ZFSDN, ZFSUP0, ZFSDN0, & |
---|
| 774 | tauaero, pizaero, cgaero, & |
---|
| 775 | PTAUA, POMEGAA, & |
---|
| 776 | ztopswadaero, zsolswadaero, & |
---|
| 777 | ztopswad0aero, zsolswad0aero, & |
---|
| 778 | ztopswaiaero, zsolswaiaero, & |
---|
| 779 | ztopsw_aero, ztopsw0_aero, & |
---|
| 780 | zsolsw_aero, zsolsw0_aero, & |
---|
| 781 | ztopswcf_aero, zsolswcf_aero, & |
---|
| 782 | ok_ade, ok_aie, flag_aerosol, flag_aerosol_strat) |
---|
[1687] | 783 | |
---|
[5111] | 784 | ZSWFT0_i(:, :) = ZFSDN0(:, :) - ZFSUP0(:, :) |
---|
| 785 | ZLWFT0_i(:, :) = -ZFLDN0(:, :) - ZFLUP0(:, :) |
---|
[2413] | 786 | |
---|
[5111] | 787 | DO i = 1, kdlon |
---|
| 788 | DO k = 1, kflev + 1 |
---|
| 789 | lwdn0 (iof + i, k) = ZFLDN0 (i, k) |
---|
| 790 | lwdn (iof + i, k) = ZFLDN (i, k) |
---|
| 791 | lwup0 (iof + i, k) = ZFLUP0 (i, k) |
---|
| 792 | lwup (iof + i, k) = ZFLUP (i, k) |
---|
| 793 | swdn0 (iof + i, k) = ZFSDN0 (i, k) |
---|
| 794 | swdn (iof + i, k) = ZFSDN (i, k) |
---|
| 795 | swup0 (iof + i, k) = ZFSUP0 (i, k) |
---|
| 796 | swup (iof + i, k) = ZFSUP (i, k) |
---|
[4866] | 797 | ENDDO |
---|
[5111] | 798 | ENDDO |
---|
[5099] | 799 | |
---|
[5116] | 800 | ELSE IF (iflag_rrtm == 1) THEN |
---|
[1989] | 801 | #ifdef CPP_RRTM |
---|
[5116] | 802 | ! if (prt_level.gt.10)WRITE(lunout,*)'CPP_RRTM=.T.' |
---|
[4866] | 803 | !===== iflag_rrtm=1, on passe dans SW via RECMWFL =============== |
---|
[1687] | 804 | |
---|
[4866] | 805 | DO k = 1, kflev+1 |
---|
| 806 | DO i = 1, kdlon |
---|
| 807 | ZEMTD_i(i,k)=0. |
---|
| 808 | ZEMTU_i(i,k)=0. |
---|
| 809 | ZTRSO_i(i,k)=0. |
---|
| 810 | ZTH_i(i,k)=0. |
---|
| 811 | ZLWFT_i(i,k)=0. |
---|
| 812 | ZSWFT_i(i,k)=0. |
---|
| 813 | ZFLUX_i(i,1,k)=0. |
---|
| 814 | ZFLUX_i(i,2,k)=0. |
---|
| 815 | ZFLUC_i(i,1,k)=0. |
---|
| 816 | ZFLUC_i(i,2,k)=0. |
---|
| 817 | ZFSDWN_i(i,k)=0. |
---|
| 818 | ZFCDWN_i(i,k)=0. |
---|
| 819 | ZFCCDWN_i(i,k)=0. |
---|
| 820 | ZFSUP_i(i,k)=0. |
---|
| 821 | ZFCUP_i(i,k)=0. |
---|
| 822 | ZFCCUP_i(i,k)=0. |
---|
| 823 | ZFLCCDWN_i(i,k)=0. |
---|
| 824 | ZFLCCUP_i(i,k)=0. |
---|
| 825 | ENDDO |
---|
| 826 | ENDDO |
---|
[5099] | 827 | |
---|
[4866] | 828 | !--OB |
---|
| 829 | !--aerosol TOT - anthropogenic+natural - index 2 |
---|
| 830 | !--aerosol NAT - natural only - index 1 |
---|
[5099] | 831 | |
---|
[4866] | 832 | DO i = 1, kdlon |
---|
| 833 | DO k = 1, kflev |
---|
| 834 | DO kk=1, NSW |
---|
[5099] | 835 | |
---|
[4866] | 836 | PTAU_TOT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,2,kk) |
---|
| 837 | PPIZA_TOT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,2,kk) |
---|
| 838 | PCGA_TOT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,2,kk) |
---|
[5099] | 839 | |
---|
[4866] | 840 | PTAU_NAT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,1,kk) |
---|
| 841 | PPIZA_NAT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,1,kk) |
---|
| 842 | PCGA_NAT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,1,kk) |
---|
[5099] | 843 | |
---|
[4866] | 844 | ENDDO |
---|
| 845 | ENDDO |
---|
| 846 | ENDDO |
---|
| 847 | !-end OB |
---|
[5099] | 848 | |
---|
[4866] | 849 | !--C. Kleinschmitt |
---|
| 850 | !--aerosol TOT - anthropogenic+natural - index 2 |
---|
| 851 | !--aerosol NAT - natural only - index 1 |
---|
[5099] | 852 | |
---|
[4866] | 853 | DO i = 1, kdlon |
---|
| 854 | DO k = 1, kflev |
---|
| 855 | DO kk=1, NLW |
---|
[5099] | 856 | |
---|
[4866] | 857 | PTAU_LW_TOT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,2,kk) |
---|
| 858 | PTAU_LW_NAT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,1,kk) |
---|
[5099] | 859 | |
---|
[4866] | 860 | ENDDO |
---|
| 861 | ENDDO |
---|
| 862 | ENDDO |
---|
| 863 | !-end C. Kleinschmitt |
---|
[5099] | 864 | |
---|
[4866] | 865 | DO i = 1, kdlon |
---|
| 866 | ZCTRSO(i,1)=0. |
---|
| 867 | ZCTRSO(i,2)=0. |
---|
| 868 | ZCEMTR(i,1)=0. |
---|
| 869 | ZCEMTR(i,2)=0. |
---|
| 870 | ZTRSOD(i)=0. |
---|
| 871 | ZLWFC(i,1)=0. |
---|
| 872 | ZLWFC(i,2)=0. |
---|
| 873 | ZSWFC(i,1)=0. |
---|
| 874 | ZSWFC(i,2)=0. |
---|
| 875 | PFSDNN(i)=0. |
---|
| 876 | PFSDNV(i)=0. |
---|
| 877 | DO kk = 1, NSW |
---|
| 878 | PSFSWDIR(i,kk)=0. |
---|
| 879 | PSFSWDIF(i,kk)=0. |
---|
| 880 | ENDDO |
---|
| 881 | ENDDO |
---|
| 882 | !----- Fin des mises a zero des tableaux output de RECMWF ------------------- |
---|
| 883 | ! GEMU(1:klon)=sin(rlatd(1:klon)) |
---|
| 884 | ! On met les donnees dans l'ordre des niveaux arpege |
---|
| 885 | paprs_i(:,1)=paprs(:,klev+1) |
---|
| 886 | DO k=1,klev |
---|
| 887 | paprs_i(1:klon,k+1) =paprs(1:klon,klev+1-k) |
---|
| 888 | pplay_i(1:klon,k) =pplay(1:klon,klev+1-k) |
---|
| 889 | cldfra_i(1:klon,k) =cldfra(1:klon,klev+1-k) |
---|
| 890 | PDP_i(1:klon,k) =PDP(1:klon,klev+1-k) |
---|
| 891 | t_i(1:klon,k) =t(1:klon,klev+1-k) |
---|
| 892 | q_i(1:klon,k) =q(1:klon,klev+1-k) |
---|
| 893 | qsat_i(1:klon,k) =qsat(1:klon,klev+1-k) |
---|
| 894 | flwc_i(1:klon,k) =flwc(1:klon,klev+1-k) |
---|
| 895 | fiwc_i(1:klon,k) =fiwc(1:klon,klev+1-k) |
---|
| 896 | ref_liq_i(1:klon,k) =ref_liq(1:klon,klev+1-k) |
---|
| 897 | ref_ice_i(1:klon,k) =ref_ice(1:klon,klev+1-k) |
---|
| 898 | !-OB |
---|
| 899 | ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k) |
---|
| 900 | ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k) |
---|
| 901 | ENDDO |
---|
| 902 | DO k=1,kflev |
---|
| 903 | POZON_i(1:klon,k,:)=POZON(1:klon,kflev+1-k,:) |
---|
[1989] | 904 | !!! POZON_i(1:klon,k)=POZON(1:klon,k) !!! on laisse 1=sol et klev=top |
---|
[4866] | 905 | ! print *,'Juste avant RECMWFL: k tsol temp',k,tsol,t(1,k) |
---|
[1989] | 906 | !!!!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 |
---|
[4866] | 907 | DO i=1,6 |
---|
| 908 | PAER_i(1:klon,k,i)=PAER(1:klon,kflev+1-k,i) |
---|
| 909 | ENDDO |
---|
| 910 | ENDDO |
---|
[3908] | 911 | |
---|
[4866] | 912 | ! print *,'RADLWSW: avant RECMWFL, RI0,rmu0=',solaire,rmu0 |
---|
[1989] | 913 | |
---|
[4866] | 914 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 915 | ! La version ARPEGE1D utilise differentes valeurs de la constante |
---|
| 916 | ! solaire suivant le rayonnement utilise. |
---|
| 917 | ! A controler ... |
---|
| 918 | ! SOLAR FLUX AT THE TOP (/YOMPHY3/) |
---|
| 919 | ! introduce season correction |
---|
| 920 | !-------------------------------------- |
---|
| 921 | ! RII0 = RIP0 |
---|
| 922 | ! IF(LRAYFM) |
---|
| 923 | ! RII0 = RIP0M ! =rip0m if Morcrette non-each time step call. |
---|
| 924 | ! IF(LRAYFM15) |
---|
| 925 | ! RII0 = RIP0M15 ! =rip0m if Morcrette non-each time step call. |
---|
| 926 | RII0=solaire/zdist/zdist |
---|
| 927 | ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 928 | ! Ancien appel a RECMWF (celui du cy25) |
---|
| 929 | ! CALL RECMWF (ist , iend, klon , ktdia , klev , kmode , |
---|
| 930 | ! s PALBD , PALBP , paprs_i , pplay_i , RCO2 , cldfra_i, |
---|
| 931 | ! s POZON_i , PAER_i , PDP_i , PEMIS , GEMU , rmu0, |
---|
| 932 | ! s q_i , qsat_i , fiwc_i , flwc_i , zmasq , t_i ,tsol, |
---|
| 933 | ! s ZEMTD_i , ZEMTU_i , ZTRSO_i , |
---|
| 934 | ! s ZTH_i , ZCTRSO , ZCEMTR , ZTRSOD , |
---|
| 935 | ! s ZLWFC , ZLWFT_i , ZSWFC , ZSWFT_i , |
---|
| 936 | ! s ZFLUX_i , ZFLUC_i , ZFSDWN_i, ZFSUP_i , ZFCDWN_i,ZFCUP_i) |
---|
| 937 | ! s 'RECMWF ') |
---|
[5099] | 938 | |
---|
[4866] | 939 | IF (lldebug) THEN |
---|
| 940 | CALL writefield_phy('paprs_i',paprs_i,klev+1) |
---|
| 941 | CALL writefield_phy('pplay_i',pplay_i,klev) |
---|
| 942 | CALL writefield_phy('cldfra_i',cldfra_i,klev) |
---|
| 943 | CALL writefield_phy('pozon_i',POZON_i,klev) |
---|
| 944 | CALL writefield_phy('paer_i',PAER_i,klev) |
---|
| 945 | CALL writefield_phy('pdp_i',PDP_i,klev) |
---|
| 946 | CALL writefield_phy('q_i',q_i,klev) |
---|
| 947 | CALL writefield_phy('qsat_i',qsat_i,klev) |
---|
| 948 | CALL writefield_phy('fiwc_i',fiwc_i,klev) |
---|
| 949 | CALL writefield_phy('flwc_i',flwc_i,klev) |
---|
| 950 | CALL writefield_phy('t_i',t_i,klev) |
---|
| 951 | CALL writefield_phy('palbd_new',PALBD_NEW,NSW) |
---|
| 952 | CALL writefield_phy('palbp_new',PALBP_NEW,NSW) |
---|
| 953 | ENDIF |
---|
[1989] | 954 | |
---|
[4866] | 955 | ! Nouvel appel a RECMWF (celui du cy32t0) |
---|
| 956 | CALL RECMWF_AERO (ist , iend, klon , ktdia , klev , kmode ,& |
---|
| 957 | PALBD_NEW,PALBP_NEW, paprs_i , pplay_i , RCO2 , cldfra_i,& |
---|
| 958 | POZON_i , PAER_i , PDP_i , PEMIS , rmu0 ,& |
---|
| 959 | q_i , qsat_i , fiwc_i , flwc_i , zmasq , t_i ,tsol,& |
---|
| 960 | ref_liq_i, ref_ice_i, & |
---|
| 961 | ref_liq_pi_i, ref_ice_pi_i, & ! rajoute par OB pour diagnostiquer effet indirect |
---|
| 962 | ZEMTD_i , ZEMTU_i , ZTRSO_i ,& |
---|
| 963 | ZTH_i , ZCTRSO , ZCEMTR , ZTRSOD ,& |
---|
| 964 | ZLWFC , ZLWFT_i , ZSWFC , ZSWFT_i ,& |
---|
| 965 | PSFSWDIR , PSFSWDIF, PFSDNN , PFSDNV ,& |
---|
| 966 | PPIZA_TOT, PCGA_TOT,PTAU_TOT,& |
---|
| 967 | PPIZA_NAT, PCGA_NAT,PTAU_NAT, & ! rajoute par OB pour diagnostiquer effet direct |
---|
| 968 | PTAU_LW_TOT, PTAU_LW_NAT, & ! rajoute par C. Kleinschmitt |
---|
| 969 | ZFLUX_i , ZFLUC_i ,& |
---|
| 970 | ZFSDWN_i , ZFSUP_i , ZFCDWN_i, ZFCUP_i, ZFCCDWN_i, ZFCCUP_i, ZFLCCDWN_i, ZFLCCUP_i, & |
---|
| 971 | ZTOPSWADAERO,ZSOLSWADAERO,& ! rajoute par OB pour diagnostics |
---|
| 972 | ZTOPSWAD0AERO,ZSOLSWAD0AERO,& |
---|
| 973 | ZTOPSWAIAERO,ZSOLSWAIAERO, & |
---|
| 974 | ZTOPSWCF_AERO,ZSOLSWCF_AERO, & |
---|
| 975 | ZSWADAERO, & !--NL |
---|
| 976 | ZTOPLWADAERO,ZSOLLWADAERO,& ! rajoute par C. Kleinscmitt pour LW diagnostics |
---|
| 977 | ZTOPLWAD0AERO,ZSOLLWAD0AERO,& |
---|
| 978 | ZTOPLWAIAERO,ZSOLLWAIAERO, & |
---|
| 979 | ZLWADAERO, & !--NL |
---|
| 980 | volmip_solsw, flag_volc_surfstrat, & !--VOLMIP |
---|
| 981 | ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat, flag_aer_feedback) ! flags aerosols |
---|
[3908] | 982 | |
---|
[4866] | 983 | !--OB diagnostics |
---|
| 984 | ! & PTOPSWAIAERO,PSOLSWAIAERO,& |
---|
| 985 | ! & PTOPSWCFAERO,PSOLSWCFAERO,& |
---|
| 986 | ! & PSWADAERO,& !--NL |
---|
| 987 | !!--LW diagnostics CK |
---|
| 988 | ! & PTOPLWADAERO,PSOLLWADAERO,& |
---|
| 989 | ! & PTOPLWAD0AERO,PSOLLWAD0AERO,& |
---|
| 990 | ! & PTOPLWAIAERO,PSOLLWAIAERO,& |
---|
| 991 | ! & PLWADAERO,& !--NL |
---|
| 992 | !!..end |
---|
| 993 | ! & ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat,& |
---|
| 994 | ! & flag_aer_feedback) |
---|
[3908] | 995 | |
---|
[3951] | 996 | |
---|
[4866] | 997 | ! print *,'RADLWSW: apres RECMWF' |
---|
| 998 | IF (lldebug) THEN |
---|
| 999 | CALL writefield_phy('zemtd_i',ZEMTD_i,klev+1) |
---|
| 1000 | CALL writefield_phy('zemtu_i',ZEMTU_i,klev+1) |
---|
| 1001 | CALL writefield_phy('ztrso_i',ZTRSO_i,klev+1) |
---|
| 1002 | CALL writefield_phy('zth_i',ZTH_i,klev+1) |
---|
| 1003 | CALL writefield_phy('zctrso',ZCTRSO,2) |
---|
| 1004 | CALL writefield_phy('zcemtr',ZCEMTR,2) |
---|
| 1005 | CALL writefield_phy('ztrsod',ZTRSOD,1) |
---|
| 1006 | CALL writefield_phy('zlwfc',ZLWFC,2) |
---|
| 1007 | CALL writefield_phy('zlwft_i',ZLWFT_i,klev+1) |
---|
| 1008 | CALL writefield_phy('zswfc',ZSWFC,2) |
---|
| 1009 | CALL writefield_phy('zswft_i',ZSWFT_i,klev+1) |
---|
| 1010 | CALL writefield_phy('psfswdir',PSFSWDIR,6) |
---|
| 1011 | CALL writefield_phy('psfswdif',PSFSWDIF,6) |
---|
| 1012 | CALL writefield_phy('pfsdnn',PFSDNN,1) |
---|
| 1013 | CALL writefield_phy('pfsdnv',PFSDNV,1) |
---|
| 1014 | CALL writefield_phy('ppiza_dst',PPIZA_TOT,klev) |
---|
| 1015 | CALL writefield_phy('pcga_dst',PCGA_TOT,klev) |
---|
| 1016 | CALL writefield_phy('ptaurel_dst',PTAU_TOT,klev) |
---|
| 1017 | CALL writefield_phy('zflux_i',ZFLUX_i,klev+1) |
---|
| 1018 | CALL writefield_phy('zfluc_i',ZFLUC_i,klev+1) |
---|
| 1019 | CALL writefield_phy('zfsdwn_i',ZFSDWN_i,klev+1) |
---|
| 1020 | CALL writefield_phy('zfsup_i',ZFSUP_i,klev+1) |
---|
| 1021 | CALL writefield_phy('zfcdwn_i',ZFCDWN_i,klev+1) |
---|
| 1022 | CALL writefield_phy('zfcup_i',ZFCUP_i,klev+1) |
---|
| 1023 | ENDIF |
---|
[1989] | 1024 | |
---|
[4866] | 1025 | ! --------- |
---|
| 1026 | ! --------- |
---|
| 1027 | ! On retablit l'ordre des niveaux lmd pour les tableaux de sortie |
---|
| 1028 | ! D autre part, on multiplie les resultats SW par fract pour etre coherent |
---|
| 1029 | ! avec l ancien rayonnement AR4. Si nuit, fract=0 donc pas de |
---|
| 1030 | ! rayonnement SW. (MPL 260609) |
---|
| 1031 | DO k=0,klev |
---|
| 1032 | DO i=1,klon |
---|
| 1033 | ZEMTD(i,k+1) = ZEMTD_i(i,k+1) |
---|
| 1034 | ZEMTU(i,k+1) = ZEMTU_i(i,k+1) |
---|
| 1035 | ZTRSO(i,k+1) = ZTRSO_i(i,k+1) |
---|
| 1036 | ZTH(i,k+1) = ZTH_i(i,k+1) |
---|
| 1037 | ! ZLWFT(i,k+1) = ZLWFT_i(i,klev+1-k) |
---|
| 1038 | ! ZSWFT(i,k+1) = ZSWFT_i(i,klev+1-k) |
---|
| 1039 | ZFLUP(i,k+1) = ZFLUX_i(i,1,k+1) |
---|
| 1040 | ZFLDN(i,k+1) = ZFLUX_i(i,2,k+1) |
---|
| 1041 | ZFLUP0(i,k+1) = ZFLUC_i(i,1,k+1) |
---|
| 1042 | ZFLDN0(i,k+1) = ZFLUC_i(i,2,k+1) |
---|
| 1043 | ZFSDN(i,k+1) = ZFSDWN_i(i,k+1)*fract(i) |
---|
| 1044 | ZFSDN0(i,k+1) = ZFCDWN_i(i,k+1)*fract(i) |
---|
| 1045 | ZFSDNC0(i,k+1)= ZFCCDWN_i(i,k+1)*fract(i) |
---|
| 1046 | ZFSUP (i,k+1) = ZFSUP_i(i,k+1)*fract(i) |
---|
| 1047 | ZFSUP0(i,k+1) = ZFCUP_i(i,k+1)*fract(i) |
---|
| 1048 | ZFSUPC0(i,k+1)= ZFCCUP_i(i,k+1)*fract(i) |
---|
| 1049 | ZFLDNC0(i,k+1)= ZFLCCDWN_i(i,k+1) |
---|
| 1050 | ZFLUPC0(i,k+1)= ZFLCCUP_i(i,k+1) |
---|
| 1051 | IF (ok_volcan) THEN |
---|
| 1052 | ZSWADAERO(i,k+1)=ZSWADAERO(i,k+1)*fract(i) !--NL |
---|
| 1053 | ENDIF |
---|
[2003] | 1054 | |
---|
[4866] | 1055 | ! Nouveau calcul car visiblement ZSWFT et ZSWFC sont nuls dans RRTM cy32 |
---|
| 1056 | ! en sortie de radlsw.F90 - MPL 7.01.09 |
---|
| 1057 | ZSWFT(i,k+1) = (ZFSDWN_i(i,k+1)-ZFSUP_i(i,k+1))*fract(i) |
---|
| 1058 | ZSWFT0_i(i,k+1) = (ZFCDWN_i(i,k+1)-ZFCUP_i(i,k+1))*fract(i) |
---|
| 1059 | ! WRITE(*,'("FSDN FSUP FCDN FCUP: ",4E12.5)') ZFSDWN_i(i,k+1),& |
---|
| 1060 | ! ZFSUP_i(i,k+1),ZFCDWN_i(i,k+1),ZFCUP_i(i,k+1) |
---|
| 1061 | ZLWFT(i,k+1) =-ZFLUX_i(i,2,k+1)-ZFLUX_i(i,1,k+1) |
---|
| 1062 | ZLWFT0_i(i,k+1)=-ZFLUC_i(i,2,k+1)-ZFLUC_i(i,1,k+1) |
---|
| 1063 | ! print *,'FLUX2 FLUX1 FLUC2 FLUC1',ZFLUX_i(i,2,k+1),& |
---|
| 1064 | ! & ZFLUX_i(i,1,k+1),ZFLUC_i(i,2,k+1),ZFLUC_i(i,1,k+1) |
---|
| 1065 | ENDDO |
---|
| 1066 | ENDDO |
---|
[3756] | 1067 | |
---|
[4866] | 1068 | !--ajout OB |
---|
| 1069 | ZTOPSWADAERO(:) =ZTOPSWADAERO(:) *fract(:) |
---|
| 1070 | ZSOLSWADAERO(:) =ZSOLSWADAERO(:) *fract(:) |
---|
| 1071 | ZTOPSWAD0AERO(:)=ZTOPSWAD0AERO(:)*fract(:) |
---|
| 1072 | ZSOLSWAD0AERO(:)=ZSOLSWAD0AERO(:)*fract(:) |
---|
| 1073 | ZTOPSWAIAERO(:) =ZTOPSWAIAERO(:) *fract(:) |
---|
| 1074 | ZSOLSWAIAERO(:) =ZSOLSWAIAERO(:) *fract(:) |
---|
| 1075 | ZTOPSWCF_AERO(:,1)=ZTOPSWCF_AERO(:,1)*fract(:) |
---|
| 1076 | ZTOPSWCF_AERO(:,2)=ZTOPSWCF_AERO(:,2)*fract(:) |
---|
| 1077 | ZTOPSWCF_AERO(:,3)=ZTOPSWCF_AERO(:,3)*fract(:) |
---|
| 1078 | ZSOLSWCF_AERO(:,1)=ZSOLSWCF_AERO(:,1)*fract(:) |
---|
| 1079 | ZSOLSWCF_AERO(:,2)=ZSOLSWCF_AERO(:,2)*fract(:) |
---|
| 1080 | ZSOLSWCF_AERO(:,3)=ZSOLSWCF_AERO(:,3)*fract(:) |
---|
| 1081 | |
---|
| 1082 | ! --------- |
---|
| 1083 | ! --------- |
---|
| 1084 | ! On renseigne les champs LMDz, pour avoir la meme chose qu'en sortie de |
---|
| 1085 | ! LW_LMDAR4 et SW_LMDAR4 |
---|
| 1086 | |
---|
| 1087 | !--fraction of diffuse radiation in surface SW downward radiation |
---|
| 1088 | DO i = 1, kdlon |
---|
| 1089 | IF (fract(i).GT.0.0) THEN |
---|
| 1090 | zdir=SUM(PSFSWDIR(i,:)) |
---|
| 1091 | zdif=SUM(PSFSWDIF(i,:)) |
---|
| 1092 | zsolswfdiff(i) = zdif/(zdir+zdif) |
---|
| 1093 | ELSE !--night |
---|
| 1094 | zsolswfdiff(i) = 1.0 |
---|
| 1095 | ENDIF |
---|
| 1096 | ENDDO |
---|
[5099] | 1097 | |
---|
[4866] | 1098 | DO i = 1, kdlon |
---|
| 1099 | zsolsw(i) = ZSWFT(i,1) |
---|
| 1100 | zsolsw0(i) = ZSWFT0_i(i,1) |
---|
| 1101 | ! zsolsw0(i) = ZFSDN0(i,1) -ZFSUP0(i,1) |
---|
| 1102 | ztopsw(i) = ZSWFT(i,klev+1) |
---|
| 1103 | ztopsw0(i) = ZSWFT0_i(i,klev+1) |
---|
| 1104 | ! ztopsw0(i) = ZFSDN0(i,klev+1)-ZFSUP0(i,klev+1) |
---|
[5099] | 1105 | |
---|
[4866] | 1106 | ! zsollw(i) = ZFLDN(i,1) -ZFLUP(i,1) |
---|
| 1107 | ! zsollw0(i) = ZFLDN0(i,1) -ZFLUP0(i,1) |
---|
| 1108 | ! ztoplw(i) = ZFLDN(i,klev+1) -ZFLUP(i,klev+1) |
---|
| 1109 | ! ztoplw0(i) = ZFLDN0(i,klev+1)-ZFLUP0(i,klev+1) |
---|
| 1110 | zsollw(i) = ZLWFT(i,1) |
---|
| 1111 | zsollw0(i) = ZLWFT0_i(i,1) |
---|
| 1112 | ztoplw(i) = ZLWFT(i,klev+1)*(-1) |
---|
| 1113 | ztoplw0(i) = ZLWFT0_i(i,klev+1)*(-1) |
---|
[5099] | 1114 | |
---|
[4866] | 1115 | IF (fract(i) == 0.) THEN |
---|
[1989] | 1116 | !!!!! A REVOIR MPL (20090630) ca n a pas de sens quand fract=0 |
---|
[4866] | 1117 | ! pas plus que dans le sw_AR4 |
---|
| 1118 | zalbpla(i) = 1.0e+39 |
---|
| 1119 | ELSE |
---|
| 1120 | zalbpla(i) = ZFSUP(i,klev+1)/ZFSDN(i,klev+1) |
---|
| 1121 | ENDIF |
---|
[2297] | 1122 | !!! 5 juin 2015 |
---|
| 1123 | !!! Correction MP bug RRTM |
---|
[4866] | 1124 | zsollwdown(i)= -1.*ZFLDN(i,1) |
---|
| 1125 | ENDDO |
---|
[5103] | 1126 | ! PRINT*,'OK2' |
---|
[1989] | 1127 | |
---|
[4866] | 1128 | !--add VOLMIP (surf cool or strat heat activate) |
---|
| 1129 | IF (flag_volc_surfstrat > 0) THEN |
---|
| 1130 | DO i = 1, kdlon |
---|
| 1131 | zsolsw(i) = volmip_solsw(i)*fract(i) |
---|
| 1132 | ENDDO |
---|
| 1133 | ENDIF |
---|
[3989] | 1134 | |
---|
[4866] | 1135 | ! extrait de SW_AR4 |
---|
| 1136 | ! DO k = 1, KFLEV |
---|
| 1137 | ! kpl1 = k+1 |
---|
| 1138 | ! DO i = 1, KDLON |
---|
| 1139 | ! PHEAT(i,k) = -(ZFSUP(i,kpl1)-ZFSUP(i,k)) -(ZFSDN(i,k)-ZFSDN(i,kpl1)) |
---|
| 1140 | ! PHEAT(i,k) = PHEAT(i,k) * RDAY*RG/RCPD / PDP(i,k) |
---|
| 1141 | ! ZLWFT(klon,k),ZSWFT |
---|
[1989] | 1142 | |
---|
[4866] | 1143 | DO k=1,kflev |
---|
| 1144 | DO i=1,kdlon |
---|
| 1145 | zheat(i,k)=(ZSWFT(i,k+1)-ZSWFT(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 1146 | zheat0(i,k)=(ZSWFT0_i(i,k+1)-ZSWFT0_i(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 1147 | zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 1148 | zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 1149 | IF (ok_volcan) THEN |
---|
| 1150 | zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL |
---|
| 1151 | zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL |
---|
| 1152 | ENDIF |
---|
| 1153 | ! print *,'heat cool heat0 cool0 ',zheat(i,k),zcool(i,k),zheat0(i,k),zcool0(i,k) |
---|
| 1154 | ! ZFLUCUP_i(i,k)=ZFLUC_i(i,1,k) |
---|
| 1155 | ! ZFLUCDWN_i(i,k)=ZFLUC_i(i,2,k) |
---|
| 1156 | ENDDO |
---|
| 1157 | ENDDO |
---|
[1989] | 1158 | #else |
---|
[5111] | 1159 | abort_message = "You should compile with -rrtm if running with iflag_rrtm=1" |
---|
| 1160 | CALL abort_physic(modname, abort_message, 1) |
---|
[1989] | 1161 | #endif |
---|
[5111] | 1162 | !====================================================================== |
---|
| 1163 | ! AI fev 2021 |
---|
| 1164 | ELSE IF(iflag_rrtm == 2) THEN |
---|
| 1165 | PRINT*, 'Traitement cas iflag_rrtm = ', iflag_rrtm |
---|
| 1166 | ! PRINT*,'Mise a zero des flux ' |
---|
[3908] | 1167 | #ifdef CPP_ECRAD |
---|
[4866] | 1168 | DO k = 1, kflev+1 |
---|
| 1169 | DO i = 1, kdlon |
---|
| 1170 | ZEMTD_i(i,k)=0. |
---|
| 1171 | ZEMTU_i(i,k)=0. |
---|
| 1172 | ZTRSO_i(i,k)=0. |
---|
| 1173 | ZTH_i(i,k)=0. |
---|
| 1174 | ZLWFT_i(i,k)=0. |
---|
| 1175 | ZSWFT_i(i,k)=0. |
---|
| 1176 | ZFLUX_i(i,1,k)=0. |
---|
| 1177 | ZFLUX_i(i,2,k)=0. |
---|
| 1178 | ZFLUC_i(i,1,k)=0. |
---|
| 1179 | ZFLUC_i(i,2,k)=0. |
---|
| 1180 | ZFSDWN_i(i,k)=0. |
---|
| 1181 | ZFCDWN_i(i,k)=0. |
---|
| 1182 | ZFCCDWN_i(i,k)=0. |
---|
| 1183 | ZFSUP_i(i,k)=0. |
---|
| 1184 | ZFCUP_i(i,k)=0. |
---|
| 1185 | ZFCCUP_i(i,k)=0. |
---|
| 1186 | ZFLCCDWN_i(i,k)=0. |
---|
| 1187 | ZFLCCUP_i(i,k)=0. |
---|
| 1188 | ENDDO |
---|
| 1189 | ENDDO |
---|
[5099] | 1190 | |
---|
[4866] | 1191 | ! AI ATTENTION Aerosols A REVOIR |
---|
| 1192 | DO i = 1, kdlon |
---|
| 1193 | DO k = 1, kflev |
---|
| 1194 | DO kk= 1, naero_spc |
---|
| 1195 | ! DO kk=1, NSW |
---|
[5099] | 1196 | |
---|
[4866] | 1197 | ! PTAU_TOT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,2,kk) |
---|
| 1198 | ! PPIZA_TOT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,2,kk) |
---|
| 1199 | ! PCGA_TOT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,2,kk) |
---|
[5099] | 1200 | |
---|
[4866] | 1201 | ! PTAU_NAT(i,kflev+1-k,kk)=tau_aero_sw_rrtm(i,k,1,kk) |
---|
| 1202 | ! PPIZA_NAT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,1,kk) |
---|
| 1203 | ! PCGA_NAT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,1,kk) |
---|
| 1204 | ! ZAEROSOL(i,kflev+1-k,kk)=m_allaer(i,k,kk) |
---|
| 1205 | ZAEROSOL(i,kflev+1-k,kk)=m_allaer(i,k,kk) |
---|
[5099] | 1206 | |
---|
[4866] | 1207 | ENDDO |
---|
| 1208 | ENDDO |
---|
| 1209 | ENDDO |
---|
| 1210 | !-end OB |
---|
[5099] | 1211 | |
---|
[4866] | 1212 | ! DO i = 1, kdlon |
---|
| 1213 | ! DO k = 1, kflev |
---|
| 1214 | ! DO kk=1, NLW |
---|
[5099] | 1215 | |
---|
[4866] | 1216 | ! PTAU_LW_TOT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,2,kk) |
---|
| 1217 | ! PTAU_LW_NAT(i,kflev+1-k,kk)=tau_aero_lw_rrtm(i,k,1,kk) |
---|
[5099] | 1218 | |
---|
[4866] | 1219 | ! ENDDO |
---|
| 1220 | ! ENDDO |
---|
| 1221 | ! ENDDO |
---|
| 1222 | !-end C. Kleinschmitt |
---|
[5099] | 1223 | |
---|
[4866] | 1224 | DO i = 1, kdlon |
---|
| 1225 | ZCTRSO(i,1)=0. |
---|
| 1226 | ZCTRSO(i,2)=0. |
---|
| 1227 | ZCEMTR(i,1)=0. |
---|
| 1228 | ZCEMTR(i,2)=0. |
---|
| 1229 | ZTRSOD(i)=0. |
---|
| 1230 | ZLWFC(i,1)=0. |
---|
| 1231 | ZLWFC(i,2)=0. |
---|
| 1232 | ZSWFC(i,1)=0. |
---|
| 1233 | ZSWFC(i,2)=0. |
---|
| 1234 | PFSDNN(i)=0. |
---|
| 1235 | PFSDNV(i)=0. |
---|
| 1236 | DO kk = 1, NSW |
---|
| 1237 | PSFSWDIR(i,kk)=0. |
---|
| 1238 | PSFSWDIF(i,kk)=0. |
---|
| 1239 | ENDDO |
---|
| 1240 | ENDDO |
---|
| 1241 | !----- Fin des mises a zero des tableaux output ------------------- |
---|
[1687] | 1242 | |
---|
[4866] | 1243 | ! On met les donnees dans l'ordre des niveaux ecrad |
---|
[5103] | 1244 | ! PRINT*,'On inverse sur la verticale ' |
---|
[4866] | 1245 | paprs_i(:,1)=paprs(:,klev+1) |
---|
| 1246 | DO k=1,klev |
---|
| 1247 | paprs_i(1:klon,k+1) =paprs(1:klon,klev+1-k) |
---|
| 1248 | pplay_i(1:klon,k) =pplay(1:klon,klev+1-k) |
---|
| 1249 | cldfra_i(1:klon,k) =cldfra(1:klon,klev+1-k) |
---|
| 1250 | PDP_i(1:klon,k) =PDP(1:klon,klev+1-k) |
---|
| 1251 | t_i(1:klon,k) =t(1:klon,klev+1-k) |
---|
| 1252 | q_i(1:klon,k) =q(1:klon,klev+1-k) |
---|
| 1253 | qsat_i(1:klon,k) =qsat(1:klon,klev+1-k) |
---|
| 1254 | flwc_i(1:klon,k) =flwc(1:klon,klev+1-k) |
---|
| 1255 | fiwc_i(1:klon,k) =fiwc(1:klon,klev+1-k) |
---|
| 1256 | ref_liq_i(1:klon,k) =ref_liq(1:klon,klev+1-k)*1.0e-6 |
---|
| 1257 | ref_ice_i(1:klon,k) =ref_ice(1:klon,klev+1-k)*1.0e-6 |
---|
| 1258 | !-OB |
---|
| 1259 | ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k) |
---|
| 1260 | ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k) |
---|
| 1261 | ENDDO |
---|
| 1262 | DO k=1,kflev |
---|
| 1263 | POZON_i(1:klon,k,:)=POZON(1:klon,kflev+1-k,:) |
---|
| 1264 | ! ZO3_DP_i(1:klon,k)=ZO3_DP(1:klon,kflev+1-k) |
---|
| 1265 | ! DO i=1,6 |
---|
| 1266 | PAER_i(1:klon,k,:)=PAER(1:klon,kflev+1-k,:) |
---|
| 1267 | ! ENDDO |
---|
| 1268 | ENDDO |
---|
[4031] | 1269 | |
---|
[4866] | 1270 | ! AI 11.2021 |
---|
| 1271 | ! Calcul de ZTH_i (temp aux interfaces 1:klev+1) |
---|
| 1272 | ! IFS currently sets the half-level temperature at the surface to be |
---|
| 1273 | ! equal to the skin temperature. The radiation scheme takes as input |
---|
| 1274 | ! only the half-level temperatures and assumes the Planck function to |
---|
| 1275 | ! vary linearly in optical depth between half levels. In the lowest |
---|
| 1276 | ! atmospheric layer, where the atmospheric temperature can be much |
---|
| 1277 | ! cooler than the skin temperature, this can lead to significant |
---|
| 1278 | ! differences between the effective temperature of this lowest layer |
---|
| 1279 | ! and the true value in the model. |
---|
| 1280 | ! We may approximate the temperature profile in the lowest model level |
---|
| 1281 | ! as piecewise linear between the top of the layer T[k-1/2], the |
---|
| 1282 | ! centre of the layer T[k] and the base of the layer Tskin. The mean |
---|
| 1283 | ! temperature of the layer is then 0.25*T[k-1/2] + 0.5*T[k] + |
---|
| 1284 | ! 0.25*Tskin, which can be achieved by setting the atmospheric |
---|
| 1285 | ! temperature at the half-level corresponding to the surface as |
---|
| 1286 | ! follows: |
---|
| 1287 | ! AI ATTENTION fais dans interface radlw |
---|
| 1288 | !thermodynamics%temperature_hl(KIDIA:KFDIA,KLEV+1) & |
---|
| 1289 | ! & = PTEMPERATURE(KIDIA:KFDIA,KLEV) & |
---|
| 1290 | ! & + 0.5_JPRB * (PTEMPERATURE_H(KIDIA:KFDIA,KLEV+1) & |
---|
| 1291 | ! & -PTEMPERATURE_H(KIDIA:KFDIA,KLEV)) |
---|
[4031] | 1292 | |
---|
[4866] | 1293 | DO K=2,KLEV |
---|
| 1294 | DO i = 1, kdlon |
---|
| 1295 | ZTH_i(i,K)=& |
---|
[5087] | 1296 | (t_i(i,K-1)*pplay_i(i,K-1)*(pplay_i(i,K)-paprs_i(i,K))& |
---|
| 1297 | +t_i(i,K)*pplay_i(i,K)*(paprs_i(i,K)-pplay_i(i,K-1)))& |
---|
| 1298 | *(1.0/(paprs_i(i,K)*(pplay_i(i,K)-pplay_i(i,K-1)))) |
---|
[4866] | 1299 | ENDDO |
---|
| 1300 | ENDDO |
---|
[4031] | 1301 | DO i = 1, kdlon |
---|
[4866] | 1302 | ! Sommet |
---|
| 1303 | ZTH_i(i,1)=t_i(i,1)-pplay_i(i,1)*(t_i(i,1)-ZTH_i(i,2))& |
---|
[5087] | 1304 | /(pplay_i(i,1)-paprs_i(i,2)) |
---|
[4866] | 1305 | ! Vers le sol |
---|
| 1306 | ZTH_i(i,KLEV+1)=t_i(i,KLEV) + 0.5 * & |
---|
| 1307 | (tsol(i) - ZTH_i(i,KLEV)) |
---|
| 1308 | ENDDO |
---|
[3908] | 1309 | |
---|
[4031] | 1310 | |
---|
[4866] | 1311 | print *,'RADLWSW: avant RADIATION_SCHEME ' |
---|
| 1312 | |
---|
| 1313 | ! AI mars 2022 |
---|
| 1314 | SOLARIRAD = solaire/zdist/zdist |
---|
| 1315 | !! diagnos pour la comparaison a la version offline |
---|
[4116] | 1316 | !!! - Gas en VMR pour offline et MMR pour online |
---|
| 1317 | !!! - on utilise pour solarirrad une valeur constante |
---|
[5117] | 1318 | IF (lldebug_for_offline) THEN |
---|
[4866] | 1319 | SOLARIRAD = 1366.0896 |
---|
| 1320 | ZCH4_off = CH4_ppb*1e-9 |
---|
| 1321 | ZN2O_off = N2O_ppb*1e-9 |
---|
| 1322 | ZNO2_off = 0.0 |
---|
| 1323 | ZCFC11_off = CFC11_ppt*1e-12 |
---|
| 1324 | ZCFC12_off = CFC12_ppt*1e-12 |
---|
| 1325 | ZHCFC22_off = 0.0 |
---|
| 1326 | ZCCL4_off = 0.0 |
---|
| 1327 | ZO2_off = 0.0 |
---|
| 1328 | ZCO2_off = co2_ppm*1e-6 |
---|
[4031] | 1329 | |
---|
[4866] | 1330 | CALL writefield_phy('rmu0',rmu0,1) |
---|
| 1331 | CALL writefield_phy('tsol',tsol,1) |
---|
| 1332 | CALL writefield_phy('emissiv_out',ZEMIS,1) |
---|
| 1333 | CALL writefield_phy('paprs_i',paprs_i,klev+1) |
---|
| 1334 | CALL writefield_phy('ZTH_i',ZTH_i,klev+1) |
---|
| 1335 | CALL writefield_phy('cldfra_i',cldfra_i,klev) |
---|
| 1336 | CALL writefield_phy('q_i',q_i,klev) |
---|
| 1337 | CALL writefield_phy('fiwc_i',fiwc_i,klev) |
---|
| 1338 | CALL writefield_phy('flwc_i',flwc_i,klev) |
---|
| 1339 | CALL writefield_phy('palbd_new',PALBD_NEW,NSW) |
---|
| 1340 | CALL writefield_phy('palbp_new',PALBP_NEW,NSW) |
---|
| 1341 | CALL writefield_phy('POZON',POZON_i(:,:,1),klev) |
---|
| 1342 | CALL writefield_phy('ZCO2',ZCO2_off,klev) |
---|
| 1343 | CALL writefield_phy('ZCH4',ZCH4_off,klev) |
---|
| 1344 | CALL writefield_phy('ZN2O',ZN2O_off,klev) |
---|
| 1345 | CALL writefield_phy('ZO2',ZO2_off,klev) |
---|
| 1346 | CALL writefield_phy('ZNO2',ZNO2_off,klev) |
---|
| 1347 | CALL writefield_phy('ZCFC11',ZCFC11_off,klev) |
---|
| 1348 | CALL writefield_phy('ZCFC12',ZCFC12_off,klev) |
---|
| 1349 | CALL writefield_phy('ZHCFC22',ZHCFC22_off,klev) |
---|
| 1350 | CALL writefield_phy('ZCCL4',ZCCL4_off,klev) |
---|
| 1351 | CALL writefield_phy('ref_liq_i',ref_liq_i,klev) |
---|
| 1352 | CALL writefield_phy('ref_ice_i',ref_ice_i,klev) |
---|
| 1353 | endif |
---|
| 1354 | ! lldebug_for_offline |
---|
[4853] | 1355 | |
---|
[5117] | 1356 | IF (namelist_ecrad_file.EQ.'namelist_ecrad') THEN |
---|
[5103] | 1357 | PRINT*,' 1er apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', & |
---|
[4866] | 1358 | ok_3Deffect, namelist_ecrad_file |
---|
| 1359 | CALL RADIATION_SCHEME & |
---|
[5087] | 1360 | (ist, iend, klon, klev, naero_spc, NSW, & |
---|
| 1361 | namelist_ecrad_file, ok_3Deffect, & |
---|
| 1362 | debut, ok_volcan, flag_aerosol_strat, & |
---|
| 1363 | day_cur, current_time, & |
---|
[4866] | 1364 | ! Cste solaire/(d_Terre-Soleil)**2 |
---|
[5087] | 1365 | SOLARIRAD, & |
---|
[4866] | 1366 | ! Cos(angle zin), temp sol |
---|
[5087] | 1367 | rmu0, tsol, & |
---|
[4866] | 1368 | ! Albedo diffuse et directe |
---|
[5087] | 1369 | PALBD_NEW,PALBP_NEW, & |
---|
[4866] | 1370 | ! Emessivite : PEMIS_WINDOW (???), & |
---|
[5087] | 1371 | ZEMIS, ZEMISW, & |
---|
[4866] | 1372 | ! longitude(rad), sin(latitude), PMASQ_ ??? |
---|
[5087] | 1373 | ZGELAM, ZGEMU, & |
---|
[4866] | 1374 | ! Temp et pres aux interf, vapeur eau, Satur spec humid |
---|
[5087] | 1375 | paprs_i, ZTH_i, q_i, qsat_i, & |
---|
[4866] | 1376 | ! Gas |
---|
[5087] | 1377 | ZCO2, ZCH4, ZN2O, ZNO2, ZCFC11, ZCFC12, ZHCFC22, & |
---|
| 1378 | ZCCL4, POZON_i(:,:,1), ZO2, & |
---|
[4866] | 1379 | ! nuages : |
---|
[5087] | 1380 | cldfra_i, flwc_i, fiwc_i, ZQ_SNOW, & |
---|
[4866] | 1381 | ! rayons effectifs des gouttelettes |
---|
[5087] | 1382 | ref_liq_i, ref_ice_i, & |
---|
[4866] | 1383 | ! aerosols |
---|
[5087] | 1384 | ZAEROSOL_OLD, ZAEROSOL, & |
---|
[4866] | 1385 | ! Outputs |
---|
| 1386 | ! Net flux : |
---|
[5087] | 1387 | ZSWFT_i, ZLWFT_i, ZSWFT0_ii, ZLWFT0_ii, & |
---|
[4866] | 1388 | ! DWN flux : |
---|
[5087] | 1389 | ZFSDWN_i, ZFLUX_i(:,2,:), ZFCDWN_i, ZFLUC_i(:,2,:), & |
---|
[4866] | 1390 | ! UP flux : |
---|
[5087] | 1391 | ZFSUP_i, ZFLUX_i(:,1,:), ZFCUP_i, ZFLUC_i(:,1,:), & |
---|
[4866] | 1392 | ! Surf Direct flux : ATTENTION |
---|
[5087] | 1393 | ZFLUX_DIR, ZFLUX_DIR_CLEAR, ZFLUX_DIR_INTO_SUN, & |
---|
[4866] | 1394 | ! UV and para flux |
---|
[5087] | 1395 | ZFLUX_UV, ZFLUX_PAR, ZFLUX_PAR_CLEAR, & |
---|
[4866] | 1396 | ! & ZFLUX_SW_DN_TOA, |
---|
[5087] | 1397 | ZEMIS_OUT, ZLWDERIVATIVE, & |
---|
| 1398 | PSFSWDIF, PSFSWDIR, & |
---|
| 1399 | cloud_cover_sw) |
---|
[4866] | 1400 | else |
---|
[5103] | 1401 | PRINT*,' 2e apell Ecrad : ok_3Deffect, namelist_ecrad_file = ', & |
---|
[4866] | 1402 | ok_3Deffect, namelist_ecrad_file |
---|
| 1403 | CALL RADIATION_SCHEME_S2 & |
---|
[5087] | 1404 | (ist, iend, klon, klev, naero_grp, NSW, & |
---|
| 1405 | namelist_ecrad_file, ok_3Deffect, & |
---|
| 1406 | debut, ok_volcan, flag_aerosol_strat, & |
---|
| 1407 | day_cur, current_time, & |
---|
[4866] | 1408 | ! Cste solaire/(d_Terre-Soleil)**2 |
---|
[5087] | 1409 | SOLARIRAD, & |
---|
[4866] | 1410 | ! Cos(angle zin), temp sol |
---|
[5087] | 1411 | rmu0, tsol, & |
---|
[4866] | 1412 | ! Albedo diffuse et directe |
---|
[5087] | 1413 | PALBD_NEW,PALBP_NEW, & |
---|
[4866] | 1414 | ! Emessivite : PEMIS_WINDOW (???), & |
---|
[5087] | 1415 | ZEMIS, ZEMISW, & |
---|
[4866] | 1416 | ! longitude(rad), sin(latitude), PMASQ_ ??? |
---|
[5087] | 1417 | ZGELAM, ZGEMU, & |
---|
[4866] | 1418 | ! Temp et pres aux interf, vapeur eau, Satur spec humid |
---|
[5087] | 1419 | paprs_i, ZTH_i, q_i, qsat_i, & |
---|
[4866] | 1420 | ! Gas |
---|
[5087] | 1421 | ZCO2, ZCH4, ZN2O, ZNO2, ZCFC11, ZCFC12, ZHCFC22, & |
---|
| 1422 | ZCCL4, POZON_i(:,:,1), ZO2, & |
---|
[4866] | 1423 | ! nuages : |
---|
[5087] | 1424 | cldfra_i, flwc_i, fiwc_i, ZQ_SNOW, & |
---|
[4866] | 1425 | ! rayons effectifs des gouttelettes |
---|
[5087] | 1426 | ref_liq_i, ref_ice_i, & |
---|
[4866] | 1427 | ! aerosols |
---|
[5087] | 1428 | ZAEROSOL_OLD, ZAEROSOL, & |
---|
[4866] | 1429 | ! Outputs |
---|
| 1430 | ! Net flux : |
---|
[5087] | 1431 | ZSWFT_i, ZLWFT_i, ZSWFT0_ii, ZLWFT0_ii, & |
---|
[4866] | 1432 | ! DWN flux : |
---|
[5087] | 1433 | ZFSDWN_i, ZFLUX_i(:,2,:), ZFCDWN_i, ZFLUC_i(:,2,:), & |
---|
[4866] | 1434 | ! UP flux : |
---|
[5087] | 1435 | ZFSUP_i, ZFLUX_i(:,1,:), ZFCUP_i, ZFLUC_i(:,1,:), & |
---|
[4866] | 1436 | ! Surf Direct flux : ATTENTION |
---|
[5087] | 1437 | ZFLUX_DIR, ZFLUX_DIR_CLEAR, ZFLUX_DIR_INTO_SUN, & |
---|
[4866] | 1438 | ! UV and para flux |
---|
[5087] | 1439 | ZFLUX_UV, ZFLUX_PAR, ZFLUX_PAR_CLEAR, & |
---|
[4866] | 1440 | ! & ZFLUX_SW_DN_TOA, |
---|
[5087] | 1441 | ZEMIS_OUT, ZLWDERIVATIVE, & |
---|
| 1442 | PSFSWDIF, PSFSWDIR, & |
---|
| 1443 | cloud_cover_sw) |
---|
[4866] | 1444 | endif |
---|
[3908] | 1445 | |
---|
[4853] | 1446 | |
---|
[4866] | 1447 | print *,'========= RADLWSW: apres RADIATION_SCHEME ==================== ' |
---|
[3908] | 1448 | |
---|
[5117] | 1449 | IF (lldebug_for_offline) THEN |
---|
[4866] | 1450 | CALL writefield_phy('FLUX_LW',ZLWFT_i,klev+1) |
---|
| 1451 | CALL writefield_phy('FLUX_LW_CLEAR',ZLWFT0_ii,klev+1) |
---|
| 1452 | CALL writefield_phy('FLUX_SW',ZSWFT_i,klev+1) |
---|
| 1453 | CALL writefield_phy('FLUX_SW_CLEAR',ZSWFT0_ii,klev+1) |
---|
| 1454 | CALL writefield_phy('FLUX_DN_SW',ZFSDWN_i,klev+1) |
---|
| 1455 | CALL writefield_phy('FLUX_DN_LW',ZFLUX_i(:,2,:),klev+1) |
---|
| 1456 | CALL writefield_phy('FLUX_DN_SW_CLEAR',ZFCDWN_i,klev+1) |
---|
| 1457 | CALL writefield_phy('FLUX_DN_LW_CLEAR',ZFLUC_i(:,2,:),klev+1) |
---|
| 1458 | CALL writefield_phy('PSFSWDIR',PSFSWDIR,6) |
---|
| 1459 | CALL writefield_phy('PSFSWDIF',PSFSWDIF,6) |
---|
| 1460 | CALL writefield_phy('FLUX_UP_LW',ZFLUX_i(:,1,:),klev+1) |
---|
| 1461 | CALL writefield_phy('FLUX_UP_LW_CLEAR',ZFLUC_i(:,1,:),klev+1) |
---|
| 1462 | CALL writefield_phy('FLUX_UP_SW',ZFSUP_i,klev+1) |
---|
| 1463 | CALL writefield_phy('FLUX_UP_SW_CLEAR',ZFCUP_i,klev+1) |
---|
| 1464 | endif |
---|
[4116] | 1465 | |
---|
[4866] | 1466 | ! --------- |
---|
| 1467 | ! On retablit l'ordre des niveaux lmd pour les tableaux de sortie |
---|
| 1468 | ! D autre part, on multiplie les resultats SW par fract pour etre coherent |
---|
| 1469 | ! avec l ancien rayonnement AR4. Si nuit, fract=0 donc pas de |
---|
| 1470 | ! rayonnement SW. (MPL 260609) |
---|
[5103] | 1471 | PRINT*,'On retablit l ordre des niveaux verticaux pour LMDZ' |
---|
| 1472 | PRINT*,'On multiplie les flux SW par fract et LW dwn par -1' |
---|
[4866] | 1473 | DO k=0,klev |
---|
| 1474 | DO i=1,klon |
---|
| 1475 | ZEMTD(i,k+1) = ZEMTD_i(i,klev+1-k) |
---|
| 1476 | ZEMTU(i,k+1) = ZEMTU_i(i,klev+1-k) |
---|
| 1477 | ZTRSO(i,k+1) = ZTRSO_i(i,klev+1-k) |
---|
| 1478 | ! ZTH(i,k+1) = ZTH_i(i,klev+1-k) |
---|
| 1479 | ! AI ATTENTION |
---|
| 1480 | ZLWFT(i,k+1) = ZLWFT_i(i,klev+1-k) |
---|
| 1481 | ZSWFT(i,k+1) = ZSWFT_i(i,klev+1-k)*fract(i) |
---|
| 1482 | ZSWFT0_i(i,k+1) = ZSWFT0_ii(i,klev+1-k)*fract(i) |
---|
| 1483 | ZLWFT0_i(i,k+1) = ZLWFT0_ii(i,klev+1-k) |
---|
[5099] | 1484 | |
---|
[4866] | 1485 | ZFLUP(i,k+1) = ZFLUX_i(i,1,klev+1-k) |
---|
| 1486 | ZFLDN(i,k+1) = -1.*ZFLUX_i(i,2,klev+1-k) |
---|
| 1487 | ZFLUP0(i,k+1) = ZFLUC_i(i,1,klev+1-k) |
---|
| 1488 | ZFLDN0(i,k+1) = -1.*ZFLUC_i(i,2,klev+1-k) |
---|
| 1489 | ZFSDN(i,k+1) = ZFSDWN_i(i,klev+1-k)*fract(i) |
---|
| 1490 | ZFSDN0(i,k+1) = ZFCDWN_i(i,klev+1-k)*fract(i) |
---|
| 1491 | ZFSDNC0(i,k+1)= ZFCCDWN_i(i,klev+1-k)*fract(i) |
---|
| 1492 | ZFSUP (i,k+1) = ZFSUP_i(i,klev+1-k)*fract(i) |
---|
| 1493 | ZFSUP0(i,k+1) = ZFCUP_i(i,klev+1-k)*fract(i) |
---|
| 1494 | ZFSUPC0(i,k+1)= ZFCCUP_i(i,klev+1-k)*fract(i) |
---|
| 1495 | ZFLDNC0(i,k+1)= -1.*ZFLCCDWN_i(i,klev+1-k) |
---|
| 1496 | ZFLUPC0(i,k+1)= ZFLCCUP_i(i,klev+1-k) |
---|
| 1497 | IF (ok_volcan) THEN |
---|
| 1498 | ZSWADAERO(i,k+1)=ZSWADAERO(i,klev+1-k)*fract(i) !--NL |
---|
| 1499 | ENDIF |
---|
[3908] | 1500 | |
---|
[4866] | 1501 | ! Nouveau calcul car visiblement ZSWFT et ZSWFC sont nuls dans RRTM cy32 |
---|
| 1502 | ! en sortie de radlsw.F90 - MPL 7.01.09 |
---|
| 1503 | ! AI ATTENTION |
---|
| 1504 | ! ZSWFT(i,k+1) = (ZFSDWN_i(i,k+1)-ZFSUP_i(i,k+1))*fract(i) |
---|
| 1505 | ! ZSWFT0_i(i,k+1) = (ZFCDWN_i(i,k+1)-ZFCUP_i(i,k+1))*fract(i) |
---|
| 1506 | ! ZLWFT(i,k+1) =-ZFLUX_i(i,2,k+1)-ZFLUX_i(i,1,k+1) |
---|
| 1507 | ! ZLWFT0_i(i,k+1)=-ZFLUC_i(i,2,k+1)-ZFLUC_i(i,1,k+1) |
---|
| 1508 | ENDDO |
---|
| 1509 | ENDDO |
---|
[3908] | 1510 | |
---|
[4866] | 1511 | !--ajout OB |
---|
| 1512 | ZTOPSWADAERO(:) =ZTOPSWADAERO(:) *fract(:) |
---|
| 1513 | ZSOLSWADAERO(:) =ZSOLSWADAERO(:) *fract(:) |
---|
| 1514 | ZTOPSWAD0AERO(:)=ZTOPSWAD0AERO(:)*fract(:) |
---|
| 1515 | ZSOLSWAD0AERO(:)=ZSOLSWAD0AERO(:)*fract(:) |
---|
| 1516 | ZTOPSWAIAERO(:) =ZTOPSWAIAERO(:) *fract(:) |
---|
| 1517 | ZSOLSWAIAERO(:) =ZSOLSWAIAERO(:) *fract(:) |
---|
| 1518 | ZTOPSWCF_AERO(:,1)=ZTOPSWCF_AERO(:,1)*fract(:) |
---|
| 1519 | ZTOPSWCF_AERO(:,2)=ZTOPSWCF_AERO(:,2)*fract(:) |
---|
| 1520 | ZTOPSWCF_AERO(:,3)=ZTOPSWCF_AERO(:,3)*fract(:) |
---|
| 1521 | ZSOLSWCF_AERO(:,1)=ZSOLSWCF_AERO(:,1)*fract(:) |
---|
| 1522 | ZSOLSWCF_AERO(:,2)=ZSOLSWCF_AERO(:,2)*fract(:) |
---|
| 1523 | ZSOLSWCF_AERO(:,3)=ZSOLSWCF_AERO(:,3)*fract(:) |
---|
[3908] | 1524 | |
---|
[4866] | 1525 | ! --------- |
---|
| 1526 | ! On renseigne les champs LMDz, pour avoir la meme chose qu'en sortie de |
---|
| 1527 | ! LW_LMDAR4 et SW_LMDAR4 |
---|
[3908] | 1528 | |
---|
[4866] | 1529 | !--fraction of diffuse radiation in surface SW downward radiation |
---|
| 1530 | DO i = 1, kdlon |
---|
| 1531 | zdir=SUM(PSFSWDIR(i,:)) |
---|
| 1532 | zdif=SUM(PSFSWDIF(i,:)) |
---|
[5117] | 1533 | IF (fract(i).GT.0.0.AND.(zdir+zdif).gt.seuilmach) THEN |
---|
[4866] | 1534 | zsolswfdiff(i) = zdif/(zdir+zdif) |
---|
| 1535 | ELSE !--night |
---|
| 1536 | zsolswfdiff(i) = 1.0 |
---|
| 1537 | ENDIF |
---|
| 1538 | ENDDO |
---|
[5099] | 1539 | |
---|
[4866] | 1540 | DO i = 1, kdlon |
---|
| 1541 | zsolsw(i) = ZSWFT(i,1) |
---|
| 1542 | zsolsw0(i) = ZSWFT0_i(i,1) |
---|
| 1543 | ztopsw(i) = ZSWFT(i,klev+1) |
---|
| 1544 | ztopsw0(i) = ZSWFT0_i(i,klev+1) |
---|
| 1545 | zsollw(i) = ZLWFT(i,1) |
---|
| 1546 | zsollw0(i) = ZLWFT0_i(i,1) |
---|
| 1547 | ztoplw(i) = ZLWFT(i,klev+1)*(-1) |
---|
| 1548 | ztoplw0(i) = ZLWFT0_i(i,klev+1)*(-1) |
---|
[5099] | 1549 | |
---|
[4866] | 1550 | zsollwdown(i)= -1.*ZFLDN(i,1) |
---|
| 1551 | ENDDO |
---|
| 1552 | |
---|
| 1553 | DO k=1,kflev |
---|
| 1554 | DO i=1,kdlon |
---|
| 1555 | zheat(i,k)=(ZSWFT(i,k+1)-ZSWFT(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 1556 | zheat0(i,k)=(ZSWFT0_i(i,k+1)-ZSWFT0_i(i,k))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 1557 | zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 1558 | zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k) |
---|
| 1559 | IF (ok_volcan) THEN |
---|
| 1560 | zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL |
---|
| 1561 | zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL |
---|
| 1562 | ENDIF |
---|
| 1563 | ENDDO |
---|
| 1564 | ENDDO |
---|
[3908] | 1565 | #endif |
---|
[5111] | 1566 | PRINT*, 'Fin traitement ECRAD' |
---|
| 1567 | ! Fin ECRAD |
---|
| 1568 | ENDIF ! iflag_rrtm |
---|
| 1569 | ! ecrad |
---|
| 1570 | !====================================================================== |
---|
[3908] | 1571 | |
---|
[5111] | 1572 | DO i = 1, kdlon |
---|
| 1573 | topsw(iof + i) = ztopsw(i) |
---|
| 1574 | toplw(iof + i) = ztoplw(i) |
---|
| 1575 | solsw(iof + i) = zsolsw(i) |
---|
| 1576 | solswfdiff(iof + i) = zsolswfdiff(i) |
---|
| 1577 | sollw(iof + i) = zsollw(i) |
---|
| 1578 | sollwdown(iof + i) = zsollwdown(i) |
---|
| 1579 | DO k = 1, kflev + 1 |
---|
| 1580 | lwdn0 (iof + i, k) = ZFLDN0 (i, k) |
---|
| 1581 | lwdn (iof + i, k) = ZFLDN (i, k) |
---|
| 1582 | lwup0 (iof + i, k) = ZFLUP0 (i, k) |
---|
| 1583 | lwup (iof + i, k) = ZFLUP (i, k) |
---|
| 1584 | ENDDO |
---|
| 1585 | topsw0(iof + i) = ztopsw0(i) |
---|
| 1586 | toplw0(iof + i) = ztoplw0(i) |
---|
| 1587 | solsw0(iof + i) = zsolsw0(i) |
---|
| 1588 | sollw0(iof + i) = zsollw0(i) |
---|
| 1589 | albpla(iof + i) = zalbpla(i) |
---|
[1687] | 1590 | |
---|
[5111] | 1591 | DO k = 1, kflev + 1 |
---|
| 1592 | swdnc0(iof + i, k) = ZFSDNC0(i, k) |
---|
| 1593 | swdn0 (iof + i, k) = ZFSDN0 (i, k) |
---|
| 1594 | swdn (iof + i, k) = ZFSDN (i, k) |
---|
| 1595 | swupc0(iof + i, k) = ZFSUPC0(i, k) |
---|
| 1596 | swup0 (iof + i, k) = ZFSUP0 (i, k) |
---|
| 1597 | swup (iof + i, k) = ZFSUP (i, k) |
---|
| 1598 | lwdnc0(iof + i, k) = ZFLDNC0(i, k) |
---|
| 1599 | lwupc0(iof + i, k) = ZFLUPC0(i, k) |
---|
| 1600 | ENDDO |
---|
| 1601 | ENDDO |
---|
| 1602 | !-transform the aerosol forcings, if they have |
---|
| 1603 | ! to be calculated |
---|
| 1604 | IF (ok_ade) THEN |
---|
| 1605 | DO i = 1, kdlon |
---|
| 1606 | topswad_aero(iof + i) = ztopswadaero(i) |
---|
| 1607 | topswad0_aero(iof + i) = ztopswad0aero(i) |
---|
| 1608 | solswad_aero(iof + i) = zsolswadaero(i) |
---|
| 1609 | solswad0_aero(iof + i) = zsolswad0aero(i) |
---|
| 1610 | topsw_aero(iof + i, :) = ztopsw_aero(i, :) |
---|
| 1611 | topsw0_aero(iof + i, :) = ztopsw0_aero(i, :) |
---|
| 1612 | solsw_aero(iof + i, :) = zsolsw_aero(i, :) |
---|
| 1613 | solsw0_aero(iof + i, :) = zsolsw0_aero(i, :) |
---|
| 1614 | topswcf_aero(iof + i, :) = ztopswcf_aero(i, :) |
---|
| 1615 | solswcf_aero(iof + i, :) = zsolswcf_aero(i, :) |
---|
| 1616 | !-LW |
---|
| 1617 | toplwad_aero(iof + i) = ztoplwadaero(i) |
---|
| 1618 | toplwad0_aero(iof + i) = ztoplwad0aero(i) |
---|
| 1619 | sollwad_aero(iof + i) = zsollwadaero(i) |
---|
| 1620 | sollwad0_aero(iof + i) = zsollwad0aero(i) |
---|
| 1621 | ENDDO |
---|
| 1622 | ELSE |
---|
| 1623 | DO i = 1, kdlon |
---|
| 1624 | topswad_aero(iof + i) = 0.0 |
---|
| 1625 | solswad_aero(iof + i) = 0.0 |
---|
| 1626 | topswad0_aero(iof + i) = 0.0 |
---|
| 1627 | solswad0_aero(iof + i) = 0.0 |
---|
| 1628 | topsw_aero(iof + i, :) = 0. |
---|
| 1629 | topsw0_aero(iof + i, :) = 0. |
---|
| 1630 | solsw_aero(iof + i, :) = 0. |
---|
| 1631 | solsw0_aero(iof + i, :) = 0. |
---|
| 1632 | !-LW |
---|
| 1633 | toplwad_aero(iof + i) = 0.0 |
---|
| 1634 | sollwad_aero(iof + i) = 0.0 |
---|
| 1635 | toplwad0_aero(iof + i) = 0.0 |
---|
| 1636 | sollwad0_aero(iof + i) = 0.0 |
---|
| 1637 | ENDDO |
---|
| 1638 | ENDIF |
---|
| 1639 | IF (ok_aie) THEN |
---|
| 1640 | DO i = 1, kdlon |
---|
| 1641 | topswai_aero(iof + i) = ztopswaiaero(i) |
---|
| 1642 | solswai_aero(iof + i) = zsolswaiaero(i) |
---|
| 1643 | !-LW |
---|
| 1644 | toplwai_aero(iof + i) = ztoplwaiaero(i) |
---|
| 1645 | sollwai_aero(iof + i) = zsollwaiaero(i) |
---|
| 1646 | ENDDO |
---|
| 1647 | ELSE |
---|
| 1648 | DO i = 1, kdlon |
---|
| 1649 | topswai_aero(iof + i) = 0.0 |
---|
| 1650 | solswai_aero(iof + i) = 0.0 |
---|
| 1651 | !-LW |
---|
| 1652 | toplwai_aero(iof + i) = 0.0 |
---|
| 1653 | sollwai_aero(iof + i) = 0.0 |
---|
| 1654 | ENDDO |
---|
| 1655 | ENDIF |
---|
| 1656 | DO k = 1, kflev |
---|
| 1657 | DO i = 1, kdlon |
---|
| 1658 | ! scale factor to take into account the difference between |
---|
| 1659 | ! dry air and watter vapour scpecifi! heat capacity |
---|
| 1660 | zznormcp = 1.0 + RVTMP2 * PWV(i, k) |
---|
| 1661 | heat(iof + i, k) = zheat(i, k) / zznormcp |
---|
| 1662 | cool(iof + i, k) = zcool(i, k) / zznormcp |
---|
| 1663 | heat0(iof + i, k) = zheat0(i, k) / zznormcp |
---|
| 1664 | cool0(iof + i, k) = zcool0(i, k) / zznormcp |
---|
| 1665 | IF(ok_volcan) THEN !NL |
---|
| 1666 | heat_volc(iof + i, k) = zheat_volc(i, k) / zznormcp |
---|
| 1667 | cool_volc(iof + i, k) = zcool_volc(i, k) / zznormcp |
---|
| 1668 | ENDIF |
---|
| 1669 | ENDDO |
---|
| 1670 | ENDDO |
---|
[1687] | 1671 | |
---|
[4866] | 1672 | ENDDO ! j = 1, nb_gr |
---|
[1687] | 1673 | |
---|
[4866] | 1674 | IF (lldebug) THEN |
---|
[5117] | 1675 | IF (0==1) THEN |
---|
[5111] | 1676 | ! Verifs dans le cas 1D |
---|
| 1677 | PRINT*, '================== Sortie de radlw =================' |
---|
| 1678 | PRINT*, '******** LW LW LW *******************' |
---|
| 1679 | PRINT*, 'ZLWFT =', ZLWFT |
---|
| 1680 | PRINT*, 'ZLWFT0_i =', ZLWFT0_i |
---|
| 1681 | PRINT*, 'ZFLUP0 =', ZFLUP0 |
---|
| 1682 | PRINT*, 'ZFLDN0 =', ZFLDN0 |
---|
| 1683 | PRINT*, 'ZFLDNC0 =', ZFLDNC0 |
---|
| 1684 | PRINT*, 'ZFLUPC0 =', ZFLUPC0 |
---|
[3918] | 1685 | |
---|
[5111] | 1686 | PRINT*, '******** SW SW SW *******************' |
---|
| 1687 | PRINT*, 'ZSWFT =', ZSWFT |
---|
| 1688 | PRINT*, 'ZSWFT0_i =', ZSWFT0_i |
---|
| 1689 | PRINT*, 'ZFSDN =', ZFSDN |
---|
| 1690 | PRINT*, 'ZFSDN0 =', ZFSDN0 |
---|
| 1691 | PRINT*, 'ZFSDNC0 =', ZFSDNC0 |
---|
| 1692 | PRINT*, 'ZFSUP =', ZFSUP |
---|
| 1693 | PRINT*, 'ZFSUP0 =', ZFSUP0 |
---|
| 1694 | PRINT*, 'ZFSUPC0 =', ZFSUPC0 |
---|
[3951] | 1695 | |
---|
[5111] | 1696 | PRINT*, '******** LMDZ *******************' |
---|
| 1697 | PRINT*, 'cool = ', cool |
---|
| 1698 | PRINT*, 'heat = ', heat |
---|
| 1699 | PRINT*, 'topsw = ', topsw |
---|
| 1700 | PRINT*, 'toplw = ', toplw |
---|
| 1701 | PRINT*, 'sollw = ', sollw |
---|
| 1702 | PRINT*, 'solsw = ', solsw |
---|
| 1703 | PRINT*, 'lwdn = ', lwdn |
---|
| 1704 | PRINT*, 'lwup = ', lwup |
---|
| 1705 | PRINT*, 'swdn = ', swdn |
---|
| 1706 | PRINT*, 'swup =', swup |
---|
| 1707 | endif |
---|
[4866] | 1708 | ENDIF |
---|
[3951] | 1709 | |
---|
[4866] | 1710 | END SUBROUTINE radlwsw |
---|
[1687] | 1711 | |
---|
[5119] | 1712 | END MODULE radlwsw_m |
---|