--- trunk/phylmd/Radlwsw/radlwsw.f90 2013/11/15 18:45:49 76 +++ trunk/Sources/phylmd/Radlwsw/radlwsw.f 2017/02/27 15:44:55 213 @@ -4,12 +4,11 @@ contains - SUBROUTINE radlwsw(dist, rmu0, fract, paprs, play, tsol, albedo, alblw, & - t, q, wo, cldfra, cldemi, cldtaupd, heat, heat0, cool, cool0, radsol, & - albpla, topsw, toplw, solsw, sollw, sollwdown, topsw0, toplw0, solsw0, & - sollw0, lwdn0, lwdn, lwup0, lwup, swdn0, swdn, swup0, swup, ok_ade, & - ok_aie, tau_ae, piz_ae, cg_ae, topswad, solswad, cldtaupi, topswai, & - solswai) + SUBROUTINE radlwsw(dist, mu0, fract, paprs, play, tsol, albedo, t, q, wo, & + cldfra, cldemi, cldtaupd, heat, heat0, cool, cool0, radsol, albpla, & + topsw, toplw, solsw, sollw, sollwdown, topsw0, toplw0, solsw0, sollw0, & + lwdn0, lwdn, lwup0, lwup, swdn0, swdn, swup0, swup, ok_ade, ok_aie, & + tau_ae, piz_ae, cg_ae, topswad, solswad, cldtaupi, topswai, solswai) ! From LMDZ4/libf/phylmd/radlwsw.F, version 1.4 2005/06/06 13:16:33 ! Author: Z. X. Li (LMD/CNRS) @@ -35,7 +34,7 @@ ! aerosol indirect forcing is F_{AI} = topsw - topswai ! aerosol direct forcing is F_{AD} = topswai - topswad - USE clesphys, ONLY: bug_ozone, solaire + USE clesphys, ONLY: solaire USE dimphy, ONLY: klev, klon use lw_m, only: lw USE raddim, ONLY: kdlon @@ -43,46 +42,41 @@ use sw_m, only: sw USE yoethf_m, ONLY: rvtmp2 - ! Arguments: + real, intent(in):: dist ! distance astronomique terre-soleil + real, intent(in):: mu0(klon) ! cosinus de l'angle zenithal + real, intent(in):: fract(klon) ! duree d'ensoleillement normalisee + real, intent(in):: paprs(klon, klev+1) ! pression a inter-couche (Pa) + real, intent(in):: play(klon, klev) ! pression au milieu de couche (Pa) + real, intent(in):: tsol(klon) ! temperature du sol (en K) + real, intent(in):: albedo(klon) ! albedo du sol (entre 0 et 1) + real, intent(in):: t(klon, klev) ! temperature (K) + real, intent(in):: q(klon, klev) ! vapeur d'eau (en kg/kg) - real dist, rmu0(klon), fract(klon) - ! dist-----input-R- distance astronomique terre-soleil - ! rmu0-----input-R- cosinus de l'angle zenithal - ! fract----input-R- duree d'ensoleillement normalisee - - real, intent(in):: paprs(klon, klev+1) - ! paprs----input-R- pression a inter-couche (Pa) - real, intent(in):: play(klon, klev) - ! play----input-R- pression au milieu de couche (Pa) - real tsol(klon), albedo(klon), alblw(klon) - ! albedo---input-R- albedo du sol (entre 0 et 1) - ! tsol-----input-R- temperature du sol (en K) - real, intent(in):: t(klon, klev) - ! t--------input-R- temperature (K) - real q(klon, klev) - ! q--------input-R- vapeur d'eau (en kg/kg) real, intent(in):: wo(klon, klev) - ! wo-------input-R- contenu en ozone (en kg/kg) correction MPL 100505 - real cldfra(klon, klev), cldemi(klon, klev) - ! cldfra---input-R- fraction nuageuse (entre 0 et 1) - ! cldemi---input-R- emissivite des nuages dans l'IR (entre 0 et 1) + ! column-density of ozone in a layer, in kilo-Dobsons - real cldtaupd(klon, klev) - ! input-R- epaisseur optique des nuages dans le visible (present-day value) + real, intent(in):: cldfra(klon, klev) ! fraction nuageuse (entre 0 et 1) + + real, intent(in):: cldemi(klon, klev) + ! emissivite des nuages dans l'IR (entre 0 et 1) + + real, intent(in):: cldtaupd(klon, klev) + ! epaisseur optique des nuages dans le visible (present-day value) real, intent(out):: heat(klon, klev) ! échauffement atmosphérique (visible) (K/jour) - real heat0(klon, klev) - real cool(klon, klev) - ! cool-----output-R- refroidissement dans l'IR (K/jour) - real cool0(klon, klev) - real radsol(klon) - ! radsol---output-R- bilan radiatif net au sol (W/m**2) (+ vers le bas) - real albpla(klon) - ! albpla---output-R- albedo planetaire (entre 0 et 1) - real topsw(klon) - ! topsw----output-R- flux solaire net au sommet de l'atm. + real, intent(out):: heat0(klon, klev) ! chauffage solaire ciel clair + real, intent(out):: cool(klon, klev) ! refroidissement dans l'IR (K/jour) + + real, intent(out):: cool0(klon, klev) + ! refroidissement infrarouge ciel clair + + real, intent(out):: radsol(klon) + ! bilan radiatif net au sol (W/m**2) (+ vers le bas) + + real, intent(out):: albpla(klon) ! albedo planetaire (entre 0 et 1) + real, intent(out):: topsw(klon) ! flux solaire net au sommet de l'atm. real, intent(out):: toplw(klon) ! rayonnement infrarouge montant au sommet de l'atmosphère @@ -93,41 +87,34 @@ ! rayonnement infrarouge montant à la surface real, intent(out):: sollwdown(klon) - real topsw0(klon) + real, intent(out):: topsw0(klon) real, intent(out):: toplw0(klon) - real solsw0(klon), sollw0(klon) - !IM output 3D: SWup, SWdn, LWup, LWdn - REAL lwdn0(klon, klev+1), lwdn(klon, klev+1) - REAL lwup0(klon, klev+1), lwup(klon, klev+1) - REAL swdn0(klon, klev+1), swdn(klon, klev+1) - REAL swup0(klon, klev+1), swup(klon, klev+1) - - logical ok_ade, ok_aie - ! switches whether to use aerosol direct (indirect) effects or not - ! ok_ade---input-L- apply the Aerosol Direct Effect or not? - ! ok_aie---input-L- apply the Aerosol Indirect Effect or not? - - real tau_ae(klon, klev, 2), piz_ae(klon, klev, 2), cg_ae(klon, klev, 2) - ! input-R- aerosol optical properties (calculated in aeropt.F) - - real topswad(klon), solswad(klon) - ! output: aerosol direct forcing at TOA and surface - ! topswad---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol dir) - ! solswad---output-R- ray. solaire net absorbe a la surface (aerosol dir) - - real cldtaupi(klon, klev) - ! cloud optical thickness for pre-industrial aerosol concentrations - ! (i.e. with a smaller droplet concentration and thus larger droplet radii) - ! -input-R- epaisseur optique des nuages dans le visible - ! calculated for pre-industrial (pi) aerosol concentrations, + real, intent(out):: solsw0(klon), sollw0(klon) + REAL, intent(out):: lwdn0(klon, klev+1), lwdn(klon, klev+1) + REAL, intent(out):: lwup0(klon, klev+1), lwup(klon, klev+1) + REAL, intent(out):: swdn0(klon, klev+1), swdn(klon, klev+1) + REAL, intent(out):: swup0(klon, klev+1), swup(klon, klev+1) + + logical, intent(in):: ok_ade ! apply the Aerosol Direct Effect + logical, intent(in):: ok_aie ! apply the Aerosol Indirect Effect + + ! aerosol optical properties (calculated in aeropt.F): + real, intent(in):: tau_ae(klon, klev, 2), piz_ae(klon, klev, 2) + real, intent(in):: cg_ae(klon, klev, 2) + + real, intent(out):: topswad(klon), solswad(klon) + ! aerosol direct forcing at TOA and surface + ! ray. solaire net absorbe + + real, intent(in):: cldtaupi(klon, klev) + ! cloud visible optical thickness for pre-industrial aerosol concentrations ! i.e. with smaller droplet concentration, thus larger droplets, ! thus generally cdltaupi cldtaupd it is needed for the ! diagnostics of the aerosol indirect radiative forcing - real topswai(klon), solswai(klon) - ! output: aerosol indirect forcing atTOA and surface - ! topswai---output-R- ray. solaire absorbe au sommet de l'atm. (aerosol ind) - ! solswai---output-R- ray. solaire net absorbe a la surface (aerosol ind) + real, intent(out):: topswai(klon), solswai(klon) + ! aerosol indirect forcing at TOA and surface + ! ray. solaire net absorbe ! Local: @@ -135,7 +122,6 @@ double precision pizae(kdlon, klev, 2) double precision cgae(kdlon, klev, 2) - !IM output 3D DOUBLE PRECISION ZFSUP(KDLON, KLEV+1) DOUBLE PRECISION ZFSDN(KDLON, KLEV+1) DOUBLE PRECISION ZFSUP0(KDLON, KLEV+1) @@ -155,8 +141,9 @@ DOUBLE PRECISION PPSOL(kdlon), PDP(kdlon, klev) DOUBLE PRECISION PTL(kdlon, klev+1), PPMB(kdlon, klev+1) DOUBLE PRECISION PTAVE(kdlon, klev) - DOUBLE PRECISION PWV(kdlon, klev), PQS(kdlon, klev), POZON(kdlon, klev) - DOUBLE PRECISION PAER(kdlon, klev, 5) + DOUBLE PRECISION PWV(kdlon, klev), PQS(kdlon, klev) + DOUBLE PRECISION POZON(kdlon, klev) ! mass fraction of ozone + DOUBLE PRECISION PAER(kdlon, klev, 5) ! AEROSOLS' OPTICAL THICKNESS DOUBLE PRECISION PCLDLD(kdlon, klev) DOUBLE PRECISION PCLDLU(kdlon, klev) DOUBLE PRECISION PCLDSW(kdlon, klev) @@ -164,7 +151,7 @@ DOUBLE PRECISION POMEGA(kdlon, 2, klev) DOUBLE PRECISION PCG(kdlon, 2, klev) - DOUBLE PRECISION zfract(kdlon), zrmu0(kdlon), zdist + DOUBLE PRECISION zfract(kdlon), zrmu0(kdlon) DOUBLE PRECISION zheat(kdlon, klev), zcool(kdlon, klev) DOUBLE PRECISION zheat0(kdlon, klev), zcool0(kdlon, klev) @@ -188,6 +175,7 @@ ! Aerosol direct forcing at TOAand surface DOUBLE PRECISION ztopswai(kdlon), zsolswai(kdlon) ! dito, indirect + real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 !---------------------------------------------------------------------- @@ -205,17 +193,16 @@ cool = 0. heat0 = 0. cool0 = 0. - zdist = dist - PSCT = solaire / zdist / zdist + PSCT = solaire / dist**2 loop_iof: DO iof = 0, klon - kdlon, kdlon DO i = 1, kdlon zfract(i) = fract(iof+i) - zrmu0(i) = rmu0(iof+i) + zrmu0(i) = mu0(iof+i) PALBD(i, 1) = albedo(iof+i) - PALBD(i, 2) = alblw(iof+i) + PALBD(i, 2) = albedo(iof+i) PALBP(i, 1) = albedo(iof+i) - PALBP(i, 2) = alblw(iof+i) + PALBP(i, 2) = albedo(iof+i) ! cf. JLD pour etre en accord avec ORCHIDEE il faut mettre ! PEMIS(i) = 0.96 PEMIS(i) = 1.0 @@ -239,16 +226,8 @@ PTAVE(i, k) = t(iof+i, k) PWV(i, k) = MAX (q(iof+i, k), 1.0e-12) PQS(i, k) = PWV(i, k) - ! wo: cm.atm (epaisseur en cm dans la situation standard) - ! POZON: kg/kg - IF (bug_ozone) then - POZON(i, k) = MAX(wo(iof+i, k), 1.0e-12)*RG/46.6968 & - /(paprs(iof+i, k)-paprs(iof+i, k+1)) & - *(paprs(iof+i, 1)/101325.0) - ELSE - ! le calcul qui suit est maintenant fait dans ozonecm (MPL) - POZON(i, k) = wo(i, k) - ENDIF + POZON(i, k) = wo(iof+i, k) * RG * dobson_u * 1e3 & + / (paprs(iof+i, k) - paprs(iof+i, k+1)) PCLDLD(i, k) = cldfra(iof+i, k)*cldemi(iof+i, k) PCLDLU(i, k) = cldfra(iof+i, k)*cldemi(iof+i, k) PCLDSW(i, k) = cldfra(iof+i, k) @@ -301,11 +280,11 @@ ENDDO ENDDO - CALL LW(PPMB, PDP, PPSOL, PDT0, PEMIS, PTL, PTAVE, PWV, POZON, PAER, & - PCLDLD, PCLDLU, PVIEW, zcool, zcool0, ztoplw, zsollw, ztoplw0, & - zsollw0, zsollwdown, ZFLUP, ZFLDN, ZFLUP0, ZFLDN0) + CALL LW(PPMB, PDP, PDT0, PEMIS, PTL, PTAVE, PWV, POZON, PAER, PCLDLD, & + PCLDLU, PVIEW, zcool, zcool0, ztoplw, zsollw, ztoplw0, zsollw0, & + zsollwdown, ZFLUP, ZFLDN, ZFLUP0, ZFLDN0) CALL SW(PSCT, zrmu0, zfract, PPMB, PDP, PPSOL, PALBD, PALBP, PTAVE, & - PWV, PQS, POZON, PAER, PCLDSW, PTAU, POMEGA, PCG, zheat, zheat0, & + PWV, PQS, POZON, PCLDSW, PTAU, POMEGA, PCG, zheat, zheat0, & zalbpla, ztopsw, zsolsw, ztopsw0, zsolsw0, ZFSUP, ZFSDN, ZFSUP0, & ZFSDN0, tauae, pizae, cgae, PTAUA, POMEGAA, ztopswad, zsolswad, & ztopswai, zsolswai, ok_ade, ok_aie)