URBAN_LW_COEF Subroutine

subroutine URBAN_LW_COEF(B, T, PLW_RAD, PEMIS_G, PTS_SR, PTS_G, PLW_WA_TO_WB, PLW_WA_TO_R, PLW_WB_TO_R, PLW_WA_TO_NR, PLW_WB_TO_NR, PLW_WA_TO_G, PLW_WB_TO_G, PLW_WA_TO_WIN, PLW_WB_TO_WIN, PLW_R_TO_WA, PLW_R_TO_WB, PLW_R_TO_WIN, PLW_G_TO_WA, PLW_G_TO_WB, PLW_G_TO_WIN, PLW_S_TO_WA, PLW_S_TO_WB, PLW_S_TO_R, PLW_S_TO_NR, PLW_S_TO_G, PLW_S_TO_WIN, PLW_WIN_TO_WA, PLW_WIN_TO_WB, PLW_WIN_TO_R, PLW_WIN_TO_NR, PLW_WIN_TO_G, PLW_NR_TO_WA, PLW_NR_TO_WB, PLW_NR_TO_WIN)

Arguments

Type IntentOptional AttributesName
type(BEM_t), intent(inout) :: B
type(TEB_t), intent(inout) :: T
real, intent(in), DIMENSION(:):: PLW_RAD
real, intent(in), DIMENSION(:):: PEMIS_G
real, intent(in), DIMENSION(:):: PTS_SR
real, intent(in), DIMENSION(:):: PTS_G
real, intent(out), DIMENSION(:):: PLW_WA_TO_WB
real, intent(out), DIMENSION(:):: PLW_WA_TO_R
real, intent(out), DIMENSION(:):: PLW_WB_TO_R
real, intent(out), DIMENSION(:):: PLW_WA_TO_NR
real, intent(out), DIMENSION(:):: PLW_WB_TO_NR
real, intent(out), DIMENSION(:):: PLW_WA_TO_G
real, intent(out), DIMENSION(:):: PLW_WB_TO_G
real, intent(out), DIMENSION(:):: PLW_WA_TO_WIN
real, intent(out), DIMENSION(:):: PLW_WB_TO_WIN
real, intent(out), DIMENSION(:):: PLW_R_TO_WA
real, intent(out), DIMENSION(:):: PLW_R_TO_WB
real, intent(out), DIMENSION(:):: PLW_R_TO_WIN
real, intent(out), DIMENSION(:):: PLW_G_TO_WA
real, intent(out), DIMENSION(:):: PLW_G_TO_WB
real, intent(out), DIMENSION(:):: PLW_G_TO_WIN
real, intent(out), DIMENSION(:):: PLW_S_TO_WA
real, intent(out), DIMENSION(:):: PLW_S_TO_WB
real, intent(out), DIMENSION(:):: PLW_S_TO_R
real, intent(out), DIMENSION(:):: PLW_S_TO_NR
real, intent(out), DIMENSION(:):: PLW_S_TO_G
real, intent(out), DIMENSION(:):: PLW_S_TO_WIN
real, intent(out), DIMENSION(:):: PLW_WIN_TO_WA
real, intent(out), DIMENSION(:):: PLW_WIN_TO_WB
real, intent(out), DIMENSION(:):: PLW_WIN_TO_R
real, intent(out), DIMENSION(:):: PLW_WIN_TO_NR
real, intent(out), DIMENSION(:):: PLW_WIN_TO_G
real, intent(out), DIMENSION(:):: PLW_NR_TO_WA
real, intent(out), DIMENSION(:):: PLW_NR_TO_WB
real, intent(out), DIMENSION(:):: PLW_NR_TO_WIN

Contents

Source Code


Source Code

    SUBROUTINE URBAN_LW_COEF(B, T, PLW_RAD, PEMIS_G, PTS_SR, PTS_G,              &  
                             PLW_WA_TO_WB, PLW_WA_TO_R, PLW_WB_TO_R,             &
                             PLW_WA_TO_NR,PLW_WB_TO_NR,                          &
                             PLW_WA_TO_G, PLW_WB_TO_G,                           &
                             PLW_WA_TO_WIN, PLW_WB_TO_WIN,                       &
                             PLW_R_TO_WA, PLW_R_TO_WB, PLW_R_TO_WIN,             &
                             PLW_G_TO_WA, PLW_G_TO_WB, PLW_G_TO_WIN,             &
                             PLW_S_TO_WA, PLW_S_TO_WB, PLW_S_TO_R,               &
                             PLW_S_TO_NR, PLW_S_TO_G, PLW_S_TO_WIN,              &
                             PLW_WIN_TO_WA, PLW_WIN_TO_WB, PLW_WIN_TO_R,         &
                             PLW_WIN_TO_NR, PLW_WIN_TO_G,                        &
                             PLW_NR_TO_WA, PLW_NR_TO_WB, PLW_NR_TO_WIN           )
!   ##########################################################################
!
!!****  *URBAN_LW_COEF*  
!!
!!    PURPOSE
!!    -------
!
!     Computes the coefficients before each of the temperatures in the
!     radiative budgets
!         
!     
!!**  METHOD
!     ------
!
!
!
!
!
!!    EXTERNAL
!!    --------
!!
!!
!!    IMPLICIT ARGUMENTS
!!    ------------------
!!
!!    MODD_CST
!!
!!      
!!    REFERENCE
!!    ---------
!!
!!      
!!    AUTHOR
!!    ------
!!
!!      V. Masson           * Meteo-France *
!!
!!    MODIFICATIONS
!!    -------------
!!      Original    08/09/98 
!-------------------------------------------------------------------------------
!
!*       0.     DECLARATIONS
!               ------------
!
USE MODD_BEM_n, ONLY : BEM_t
USE MODD_TEB_n, ONLY : TEB_t
!
USE MODD_CSTS,ONLY : XSTEFAN
USE MODD_SURF_PAR,ONLY : XUNDEF
!
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE PARKIND1  ,ONLY : JPRB
!
IMPLICIT NONE
!
!*      0.1    declarations of arguments
!
TYPE(BEM_t), INTENT(INOUT) :: B
TYPE(TEB_t), INTENT(INOUT) :: T
!
REAL, DIMENSION(:), INTENT(IN)  :: PLW_RAD  ! incoming LW radiation
REAL, DIMENSION(:), INTENT(IN)  :: PEMIS_G  ! GARDEN area emissivity
!
REAL, DIMENSION(:), INTENT(IN)  :: PTS_G    ! garden surface temperature
REAL, DIMENSION(:), INTENT(IN)  :: PTS_SR   ! snow surface temperature
!
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WA_TO_WB! L.W. interactions wall->opposite wall
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WA_TO_R  ! L.W. interactions wall->road for road balance 
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WB_TO_R  ! L.W. interactions wall->road for road balance 
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WA_TO_NR ! L.W. interactions wall->snow for snow balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WB_TO_NR ! L.W. interactions wall->snow for snow balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WA_TO_G  ! L.W. interactions wall->GARDEN areas for garden balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WB_TO_G  ! L.W. interactions wall->GARDEN areas for garden balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WA_TO_WIN! L.W. interactions wall->win for window balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WB_TO_WIN! L.W. interactions wall->win for window balance
!
REAL, DIMENSION(:), INTENT(OUT) :: PLW_R_TO_WA ! L.W. interactions road->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_R_TO_WB ! L.W. interactions road->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_R_TO_WIN  ! L.W. interactions road->win for win balance
!
REAL, DIMENSION(:), INTENT(OUT) :: PLW_G_TO_WA ! L.W. interactions GARDEN areas->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_G_TO_WB ! L.W. interactions GARDEN areas->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_G_TO_WIN  ! L.W. interactions GARDEN areas->road for window balance
!
REAL, DIMENSION(:), INTENT(OUT) :: PLW_S_TO_WA ! L.W. interactions sky->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_S_TO_WB ! L.W. interactions sky->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_S_TO_R  ! L.W. interactions sky->road for raod balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_S_TO_NR ! L.W. interactions sky->snow for snow balance 
REAL, DIMENSION(:), INTENT(OUT) :: PLW_S_TO_G  ! L.W. interactions sky->GARDEN areas for garden balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_S_TO_WIN ! L.W. interactions sky->win for window balance
!
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WIN_TO_WA ! L.W. interactions win->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WIN_TO_WB ! L.W. interactions win->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WIN_TO_R  ! L.W. interactions win->road for road balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WIN_TO_NR ! L.W. interactions win->GARDEN areas for snow balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_WIN_TO_G  ! L.W. interactions win->GARDEN areas for garden balance
!
REAL, DIMENSION(:), INTENT(OUT) :: PLW_NR_TO_WA! L.W. interactions snow(road)->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_NR_TO_WB! L.W. interactions snow(road)->wall for wall balance
REAL, DIMENSION(:), INTENT(OUT) :: PLW_NR_TO_WIN ! L.W. interactions snow(road)->WIN areas for window balance
!
!*      0.2    declarations of local variables
!
REAL, DIMENSION(SIZE(T%XBLD))  :: ZT_S        ! sky temperature
!
REAL, DIMENSION(SIZE(T%XBLD))  :: ZEMIS_WIN
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_W_W
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_R_W
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_R_WIN
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_W_R
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_W_G
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_W_WIN
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_W_NR
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_WIN_W
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_WIN_R
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_WIN_G
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_WIN_NR
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_G_W
REAL, DIMENSION(SIZE(T%XBLD))  :: ZF_G_WIN
!
REAL :: ZE1, ZE2, ZF, ZT1, ZT2, ZLW
ZLW(ZE1,ZE2,ZF,ZT1,ZT2) = 4.*XSTEFAN*ZE1*ZE2*ZF*((ZT1+ZT2)/2.)**3
!
INTEGER :: JJ
REAL(KIND=JPRB) :: ZHOOK_HANDLE
!-------------------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('URBAN_LW_COEF',0,ZHOOK_HANDLE)
!
ZT_S(:) = (PLW_RAD(:)/XSTEFAN)**0.25
!
DO JJ=1,SIZE(T%XROAD)
  !
  ZEMIS_WIN(JJ) = 0.84 !from Energy Plus Engineering Reference, p219
    ! see http://apps1.eere.energy.gov/buildings/energyplus/
  !
  ZF_W_R(JJ)     = T%XSVF_WALL(JJ) * (T%XROAD(JJ)    /(1.-T%XBLD(JJ)))
  ZF_W_G(JJ)     = T%XSVF_WALL(JJ) * (T%XGARDEN(JJ)  /(1.-T%XBLD(JJ)))
  ZF_W_NR(JJ)    = T%XSVF_WALL(JJ)    
  !  
  ZF_WIN_R(JJ)   = ZF_W_R(JJ)
  ZF_WIN_G(JJ)   = ZF_W_G(JJ)
  ZF_WIN_NR(JJ)  = ZF_W_NR(JJ)
  !
  ZF_R_W(JJ)     = (1 - T%XSVF_ROAD(JJ))*(1.-B%XGR(JJ)) * 0.5
  ZF_R_WIN(JJ)   = (1 - T%XSVF_ROAD(JJ))*B%XGR(JJ)
  !
  ZF_G_W(JJ)     = ZF_R_W(JJ) 
  ZF_G_WIN(JJ)   = ZF_R_WIN(JJ)    
  !
  ZF_WIN_W(JJ)   = (1.-2.*T%XSVF_WALL(JJ))*(1.-B%XGR(JJ))
  ZF_W_W  (JJ)   = (1.-2.*T%XSVF_WALL(JJ))*(1.-B%XGR(JJ))
  ZF_W_WIN(JJ)   = (1.-2.*T%XSVF_WALL(JJ))*B%XGR(JJ)
  !
  !
  PLW_WA_TO_WB(JJ)=ZLW(T%XEMIS_WALL(JJ),T%XEMIS_WALL(JJ),ZF_W_W(JJ),T%XT_WALL_A(JJ,1),T%XT_WALL_B(JJ,1))
  !
  PLW_WA_TO_R(JJ) = ZLW(T%XEMIS_WALL(JJ),T%XEMIS_ROAD(JJ),ZF_R_W(JJ),T%XT_WALL_A(JJ,1),T%XT_ROAD(JJ,1))
  PLW_WB_TO_R(JJ) = ZLW(T%XEMIS_WALL(JJ),T%XEMIS_ROAD(JJ),ZF_R_W(JJ),T%XT_WALL_B(JJ,1),T%XT_ROAD(JJ,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