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