Changeset 2735 for palm/trunk/SOURCE/urban_surface_mod.f90
- Timestamp:
- Jan 11, 2018 12:01:27 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/urban_surface_mod.f90
r2723 r2735 26 26 ! ----------------- 27 27 ! $Id$ 28 ! resistances are saved in surface attributes 29 ! 30 ! 2723 2018-01-05 09:27:03Z maronga 28 31 ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) 29 32 ! … … 826 829 ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns) ) 827 830 ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns) ) 831 ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns) ) 832 ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns) ) 833 ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns) ) 828 834 829 835 ! … … 838 844 ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns) ) 839 845 ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns) ) 840 841 846 ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns) ) 847 ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) 848 ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) 849 ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) 842 850 ENDDO 843 851 … … 6859 6867 REAL(wp) :: coef_green_2 !< second coeficient for prognostic green wall equation 6860 6868 REAL(wp) :: rho_cp !< rho_wall_surface * cp 6861 REAL(wp) :: r_a !< aerodynamic resistance for horizontal and vertical surfaces6862 REAL(wp) :: r_a_window !< aerodynamic resistance for horizontal and vertical window surfaces6863 REAL(wp) :: r_a_green !< aerodynamic resistance for horizontal and vertical green surfaces6864 6869 REAL(wp) :: f_shf !< factor for shf_eb 6865 6870 REAL(wp) :: f_shf_window !< factor for shf_eb window … … 6918 6923 !-- Workaround: use single r_a as stability is only treated for the 6919 6924 !-- average temperature 6920 r_a = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) / & 6921 ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) 6922 r_a_window = r_a 6923 r_a_green = r_a 6925 surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /& 6926 ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) 6927 surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m) 6928 surf_usm_h%r_a_green(m) = surf_usm_h%r_a(m) 6929 6924 6930 ! r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exn(k) ) / & 6925 6931 ! ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp ) … … 6930 6936 6931 6937 !-- make sure that the resistance does not drop to zero 6932 IF ( r_a < 1.0_wp ) r_a = 1.0_wp 6933 IF ( r_a_window < 1.0_wp ) r_a_window = 1.0_wp 6934 IF ( r_a_green < 1.0_wp ) r_a_green = 1.0_wp 6938 IF ( surf_usm_h%r_a(m) < 1.0_wp ) & 6939 surf_usm_h%r_a(m) = 1.0_wp 6940 IF ( surf_usm_h%r_a_green(m) < 1.0_wp ) & 6941 surf_usm_h%r_a_green(m) = 1.0_wp 6942 IF ( surf_usm_h%r_a_window(m) < 1.0_wp ) & 6943 surf_usm_h%r_a_window(m) = 1.0_wp 6935 6944 6936 6945 … … 6941 6950 !-- A temporary solution would be multiplication by magic constant :-(. 6942 6951 !-- For the moment this is comment out. 6943 r_a = r_a!* ra_horiz_coef6944 r_a_window = r_a_window!* ra_horiz_coef6945 r_a_green = r_a_green!* ra_horiz_coef6952 surf_usm_h%r_a(m) = surf_usm_h%r_a(m) !* ra_horiz_coef 6953 surf_usm_h%r_a_window(m) = surf_usm_h%r_a_window(m) !* ra_horiz_coef 6954 surf_usm_h%r_a_green(m) = surf_usm_h%r_a_green(m) !* ra_horiz_coef 6946 6955 6947 6956 !-- factor for shf_eb 6948 f_shf = rho_cp / r_a6949 f_shf_window = rho_cp / r_a_window6950 f_shf_green = rho_cp / r_a_green6957 f_shf = rho_cp / surf_usm_h%r_a(m) 6958 f_shf_window = rho_cp / surf_usm_h%r_a_window(m) 6959 f_shf_green = rho_cp / surf_usm_h%r_a_green(m) 6951 6960 6952 6961 !-- add LW up so that it can be removed in prognostic equation
Note: See TracChangeset
for help on using the changeset viewer.