Changeset 3802 for palm/trunk/SOURCE/urban_surface_mod.f90
 Timestamp:
 Mar 17, 2019 1:33:42 PM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/urban_surface_mod.f90
r3769 r3802 28 28 !  29 29 ! $Id$ 30 ! unused subroutine commented out 31 ! 32 ! 3769 20190228 10:16:49Z moh.hefny 30 33 ! removed unused variables 31 34 ! … … 8629 8632 8630 8633 8631 CONTAINS8632 !!8633 ! Description:8634 ! 8635 !> Calculation of specific humidity of the skin layer (surface). It is assumend8636 !> that the skin is always saturated.8637 !!8638 SUBROUTINE calc_q_surface_usm8639 8640 IMPLICIT NONE8641 8642 REAL(wp) :: resistance !< aerodynamic and soil resistance term8643 8644 DO m = 1, surf_usm_h%ns8645 8646 i = surf_usm_h%i(m)8647 j = surf_usm_h%j(m)8648 k = surf_usm_h%k(m)8649 8650 ! 8651 !  Calculate water vapour pressure at saturation8652 e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * &8653 ( t_surf_green_h_p(m)  273.16_wp ) / &8654 ( t_surf_green_h_p(m)  35.86_wp ) &8655 )8656 8657 ! 8658 !  Calculate specific humidity at saturation8659 q_s = 0.622_wp * e_s / ( surface_pressure  e_s )8660 8661 ! surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m)  t_surf_green_h(m) / exner(k) ) / &8662 ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E10_wp )8663 ! 8664 ! ! make sure that the resistance does not drop to zero8665 ! IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E10_wp ) surf_usm_h%r_a_green(m) = 1.0E10_wp8666 8667 resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E5_wp )8668 8669 ! 8670 !  Calculate specific humidity at surface8671 IF ( bulk_cloud_model ) THEN8672 q(k,j,i) = resistance * q_s + &8673 ( 1.0_wp  resistance ) * &8674 ( q(k,j,i)  ql(k,j,i) )8675 ELSE8676 q(k,j,i) = resistance * q_s + &8677 ( 1.0_wp  resistance ) * &8678 q(k,j,i)8679 ENDIF8680 8681 ! 8682 !  Update virtual potential temperature8683 vpt(k,j,i) = pt(k,j,i) * &8684 ( 1.0_wp + 0.61_wp * q(k,j,i) )8685 8686 ENDDO8687 8688 ! 8689 !  Now, treat vertical surface elements8690 DO l = 0, 38691 DO m = 1, surf_usm_v(l)%ns8692 ! 8693 !  Get indices of respective grid point8694 i = surf_usm_v(l)%i(m)8695 j = surf_usm_v(l)%j(m)8696 k = surf_usm_v(l)%k(m)8697 8698 ! 8699 !  Calculate water vapour pressure at saturation8700 e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * &8701 ( t_surf_green_v_p(l)%t(m)  273.16_wp ) / &8702 ( t_surf_green_v_p(l)%t(m)  35.86_wp ) &8703 )8704 8705 ! 8706 !  Calculate specific humidity at saturation8707 q_s = 0.622_wp * e_s / ( surface_pressure e_s )8708 8709 ! 8710 !  Calculate specific humidity at surface8711 IF ( bulk_cloud_model ) THEN8712 q(k,j,i) = ( q(k,j,i)  ql(k,j,i) )8713 ELSE8714 q(k,j,i) = q(k,j,i)8715 ENDIF8716 ! 8717 !  Update virtual potential temperature8718 vpt(k,j,i) = pt(k,j,i) * &8719 ( 1.0_wp + 0.61_wp * q(k,j,i) )8720 8721 ENDDO8722 8723 ENDDO8724 8725 END SUBROUTINE calc_q_surface_usm8634 ! CONTAINS 8635 ! !! 8636 ! ! Description: 8637 ! !  8638 ! !> Calculation of specific humidity of the skin layer (surface). It is assumend 8639 ! !> that the skin is always saturated. 8640 ! !! 8641 ! SUBROUTINE calc_q_surface_usm 8642 ! 8643 ! IMPLICIT NONE 8644 ! 8645 ! REAL(wp) :: resistance !< aerodynamic and soil resistance term 8646 ! 8647 ! DO m = 1, surf_usm_h%ns 8648 ! 8649 ! i = surf_usm_h%i(m) 8650 ! j = surf_usm_h%j(m) 8651 ! k = surf_usm_h%k(m) 8652 ! 8653 !! 8654 !! Calculate water vapour pressure at saturation 8655 ! e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & 8656 ! ( t_surf_green_h_p(m)  273.16_wp ) / & 8657 ! ( t_surf_green_h_p(m)  35.86_wp ) & 8658 ! ) 8659 ! 8660 !! 8661 !! Calculate specific humidity at saturation 8662 ! q_s = 0.622_wp * e_s / ( surface_pressure  e_s ) 8663 ! 8664 !! surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m)  t_surf_green_h(m) / exner(k) ) / & 8665 !! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E10_wp ) 8666 !! 8667 !! ! make sure that the resistance does not drop to zero 8668 !! IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E10_wp ) surf_usm_h%r_a_green(m) = 1.0E10_wp 8669 ! 8670 ! resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E5_wp ) 8671 ! 8672 !! 8673 !! Calculate specific humidity at surface 8674 ! IF ( bulk_cloud_model ) THEN 8675 ! q(k,j,i) = resistance * q_s + & 8676 ! ( 1.0_wp  resistance ) * & 8677 ! ( q(k,j,i)  ql(k,j,i) ) 8678 ! ELSE 8679 ! q(k,j,i) = resistance * q_s + & 8680 ! ( 1.0_wp  resistance ) * & 8681 ! q(k,j,i) 8682 ! ENDIF 8683 ! 8684 !! 8685 !! Update virtual potential temperature 8686 ! vpt(k,j,i) = pt(k,j,i) * & 8687 ! ( 1.0_wp + 0.61_wp * q(k,j,i) ) 8688 ! 8689 ! ENDDO 8690 ! 8691 !! 8692 !! Now, treat vertical surface elements 8693 ! DO l = 0, 3 8694 ! DO m = 1, surf_usm_v(l)%ns 8695 !! 8696 !! Get indices of respective grid point 8697 ! i = surf_usm_v(l)%i(m) 8698 ! j = surf_usm_v(l)%j(m) 8699 ! k = surf_usm_v(l)%k(m) 8700 ! 8701 !! 8702 !! Calculate water vapour pressure at saturation 8703 ! e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * & 8704 ! ( t_surf_green_v_p(l)%t(m)  273.16_wp ) / & 8705 ! ( t_surf_green_v_p(l)%t(m)  35.86_wp ) & 8706 ! ) 8707 ! 8708 !! 8709 !! Calculate specific humidity at saturation 8710 ! q_s = 0.622_wp * e_s / ( surface_pressure e_s ) 8711 ! 8712 !! 8713 !! Calculate specific humidity at surface 8714 ! IF ( bulk_cloud_model ) THEN 8715 ! q(k,j,i) = ( q(k,j,i)  ql(k,j,i) ) 8716 ! ELSE 8717 ! q(k,j,i) = q(k,j,i) 8718 ! ENDIF 8719 !! 8720 !! Update virtual potential temperature 8721 ! vpt(k,j,i) = pt(k,j,i) * & 8722 ! ( 1.0_wp + 0.61_wp * q(k,j,i) ) 8723 ! 8724 ! ENDDO 8725 ! 8726 ! ENDDO 8727 ! 8728 ! END SUBROUTINE calc_q_surface_usm 8726 8729 8727 8730 END SUBROUTINE usm_surface_energy_balance
Note: See TracChangeset
for help on using the changeset viewer.