--- trunk/phylmd/Radlwsw/lw.f90 2013/11/15 18:45:49 76 +++ trunk/Sources/phylmd/Radlwsw/lw.f 2015/09/09 10:41:47 168 @@ -4,38 +4,38 @@ contains - SUBROUTINE LW(PPMB, PDP, PPSOL, PDT0, PEMIS, PTL, PTAVE, PWV, POZON, PAER, & - PCLDLD, PCLDLU, PVIEW, PCOLR, PCOLR0, PTOPLW, PSOLLW, PTOPLW0, PSOLLW0, & + SUBROUTINE LW(PPMB, PDP, PDT0, PEMIS, PTL, PTAVE, PWV, POZON, PAER, PCLDLD, & + PCLDLU, PVIEW, PCOLR, PCOLR0, PTOPLW, PSOLLW, PTOPLW0, PSOLLW0, & psollwdown, plwup, plwdn, plwup0, plwdn0) + use lwbv_m, only: lwbv use LWU_m, only: LWU - USE suphec_m, ONLY: md, rcpd, rday, rg, rmo3 USE raddim, ONLY: kdlon, kflev USE raddimlw, ONLY: nua + USE suphec_m, ONLY: md, rcpd, rday, rg, rmo3 ! Method. ! 1. Computes the pressure and temperature weighted amounts of ! absorbers. - ! 2. Computes the planck functions on the interfaces and the - ! gradient of planck functions in the layers. + ! 2. Computes the Planck functions on the interfaces and the + ! gradient of Planck functions in the layers. - ! 3. Performs the vertical integration distinguishing the con- - ! tributions of the adjacent and distant layers and those from the - ! boundaries. + ! 3. Performs the vertical integration distinguishing the + ! contributions of the adjacent and distant layers and those from + ! the boundaries. ! 4. Computes the clear-sky downward and upward emissivities. ! 5. Introduces the effects of the clouds on the fluxes. - ! Reference: see radiation's part of the model's documentation and - ! ECMWF research department documentation of the IFS + ! Reference: see radiation part of ECMWF documentation of the IFS. ! Author: - ! Jean-Jacques Morcrette *ECMWF* + ! Jean-Jacques Morcrette ECMWF - ! Original : 89-07-14 + ! Original : July 14th, 1989 DOUBLE PRECISION PCLDLD(KDLON, KFLEV) ! DOWNWARD EFFECTIVE CLOUD COVER DOUBLE PRECISION PCLDLU(KDLON, KFLEV) ! UPWARD EFFECTIVE CLOUD COVER @@ -43,7 +43,6 @@ DOUBLE PRECISION PDT0(KDLON) ! SURFACE TEMPERATURE DISCONTINUITY (K) DOUBLE PRECISION PEMIS(KDLON) ! SURFACE EMISSIVITY DOUBLE PRECISION PPMB(KDLON, KFLEV+1) ! HALF LEVEL PRESSURE (mb) - DOUBLE PRECISION PPSOL(KDLON) ! SURFACE PRESSURE (Pa) DOUBLE PRECISION POZON(KDLON, KFLEV) ! O3 CONCENTRATION (kg/kg) DOUBLE PRECISION PTL(KDLON, KFLEV+1) ! HALF LEVEL TEMPERATURE (K) DOUBLE PRECISION PAER(KDLON, KFLEV, 5) ! OPTICAL THICKNESS OF THE AEROSOLS @@ -68,13 +67,17 @@ DOUBLE PRECISION ZABCU(KDLON, NUA, 3*KFLEV+1) DOUBLE PRECISION ZOZ(KDLON, KFLEV) - DOUBLE PRECISION ZFLUX(KDLON, 2, KFLEV+1) ! RADIATIVE FLUXES (1:up; 2:down) - DOUBLE PRECISION ZFLUC(KDLON, 2, KFLEV+1) ! CLEAR-SKY RADIATIVE FLUXES - DOUBLE PRECISION ZBINT(KDLON, KFLEV+1) ! Intermediate variable - DOUBLE PRECISION ZBSUI(KDLON) ! Intermediate variable - DOUBLE PRECISION ZCTS(KDLON, KFLEV) ! Intermediate variable - DOUBLE PRECISION ZCNTRB(KDLON, KFLEV+1, KFLEV+1) ! Intermediate variable - SAVE ZFLUX, ZFLUC, ZBINT, ZBSUI, ZCTS, ZCNTRB + DOUBLE PRECISION, save:: ZFLUX(KDLON, 2, KFLEV+1) + ! RADIATIVE FLUXES (1:up; 2:down) + + DOUBLE PRECISION, save:: ZFLUC(KDLON, 2, KFLEV+1) + ! CLEAR-SKY RADIATIVE FLUXES + + ! Intermediate variables: + DOUBLE PRECISION, save:: ZBINT(KDLON, KFLEV+1) + DOUBLE PRECISION, save:: ZBSUI(KDLON) + DOUBLE PRECISION, save:: ZCTS(KDLON, KFLEV) + DOUBLE PRECISION, save:: ZCNTRB(KDLON, KFLEV+1, KFLEV+1) INTEGER ilim, i, k, kpl1 @@ -93,8 +96,8 @@ ZOZ(i, k) = POZON(i, k)*PDP(i, k) * MD/RMO3 ENDDO ENDDO - CALL LWU(PAER, PDP, PPMB, PPSOL, ZOZ, PTAVE, PVIEW, PWV, ZABCU) - CALL LWBV(ILIM, PDP, PDT0, PEMIS, PPMB, PTL, PTAVE, ZABCU, & + CALL LWU(PAER, PDP, PPMB, ZOZ, PTAVE, PVIEW, PWV, ZABCU) + CALL LWBV(ILIM, PDT0, PEMIS, PPMB, PTL, PTAVE, ZABCU, & ZFLUC, ZBINT, ZBSUI, ZCTS, ZCNTRB) itaplw0 = 0 ENDIF