SNOW_FRAC_ROOF Subroutine

public subroutine SNOW_FRAC_ROOF(PWSNOW_ROOF, OSNOW, PDN_ROOF, PDF_ROOF)

Arguments

Type IntentOptional AttributesName
real, intent(in), DIMENSION(:):: PWSNOW_ROOF
logical, intent(in), DIMENSION(:):: OSNOW
real, intent(out), DIMENSION(:):: PDN_ROOF
real, intent(out), DIMENSION(:):: PDF_ROOF

Contents

Source Code


Source Code

      SUBROUTINE SNOW_FRAC_ROOF(PWSNOW_ROOF,OSNOW,PDN_ROOF,PDF_ROOF)
!     ##############################################################
!
USE MODD_SNOW_PAR, ONLY : XWCRN
!
REAL, DIMENSION(:), INTENT(IN)  :: PWSNOW_ROOF ! snow amount over roofs (kg/m2) 
LOGICAL, DIMENSION(:), INTENT(IN)  :: OSNOW    ! T: snow-fall is occuring
REAL, DIMENSION(:), INTENT(OUT) :: PDN_ROOF    ! snow fraction over roofs
REAL, DIMENSION(:), INTENT(OUT) :: PDF_ROOF    ! snow-free fraction over roofs
REAL(KIND=JPRB) :: ZHOOK_HANDLE
!
IF (LHOOK) CALL DR_HOOK('MODE_SURF_SNOW_FRAC:SNOW_FRAC_ROOF',0,ZHOOK_HANDLE)
PDF_ROOF(:)     = 1.
PDN_ROOF(:)     = 0.
!
! due to the flatness of horizontal surfaces (compared to landscape and
! vegetation), the amount of snow necessary to cover the entire surface XWCRN
! is reduced (equal to 1kg/m2 instead of 10).
!
WHERE (PWSNOW_ROOF(:)>0. .OR. OSNOW)
  PDN_ROOF(:)     = MAX(PWSNOW_ROOF(:)/(PWSNOW_ROOF(:) + XWCRN*0.1),0.01)
  PDF_ROOF(:)     = 1.-PDN_ROOF(:)
END WHERE
IF (LHOOK) CALL DR_HOOK('MODE_SURF_SNOW_FRAC:SNOW_FRAC_ROOF',1,ZHOOK_HANDLE)
!
END SUBROUTINE SNOW_FRAC_ROOF