- Timestamp:
- Jul 30, 2020 2:54:34 PM (4 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_grid.f90
r4601 r4630 25 25 ! ----------------- 26 26 ! $Id$ 27 ! In case of ASCII topography input flag grid points as terrain and building. 28 ! 29 ! 4601 2020-07-14 12:06:09Z suehring 27 30 ! Minor formatting adjustments 28 31 ! … … 1347 1350 !-- Flag topography for all grid points which are below 1348 1351 !-- the local topography height. 1349 !-- Note, each topography is flagged as building. 1352 !-- Note, each topography is flagged as building (bit 2) as well as 1353 !-- terrain (bit 1) in order to employ urban-surface as well as 1354 !-- land-surface model. 1350 1355 IF ( zu(k) - ocean_offset <= buildings_f%var_2d(j,i) ) THEN 1351 1356 topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 ) 1352 topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 2 ) !indicates building 1357 topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 1 ) 1358 topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 2 ) 1353 1359 ENDIF 1354 1360 ENDDO -
palm/trunk/SOURCE/land_surface_model_mod.f90
r4602 r4630 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - Bugfix in level 3 initialization of root-area-density 28 ! - Bugfix in resistance calculation - avoid potential divisions by zero 29 ! - Avoid double classifiation of vertical walls (at surfaces that are also 30 ! covered by buildings) 31 ! - Minor formatting adjustment to increase readability 32 ! 33 ! 4602 2020-07-14 14:49:45Z suehring 27 34 ! - Bugfix in level 3 initialization of pavements - wrongly assumed existence of 28 35 ! pavement_subsurface_pars … … 1579 1586 ddz_soil(nzb_soil:nzt_soil) = 1.0_wp / dz_soil(nzb_soil:nzt_soil) 1580 1587 1581 1582 1583 1588 END SUBROUTINE lsm_check_parameters 1584 1589 … … 1607 1612 LOGICAL :: horizontal !< Flag indicating horizontal or vertical surfaces 1608 1613 1609 REAL(wp) :: c_surface_tmp, & !< temporary variable for storing the volumetric heat capacity of the surface1610 f1, & !< resistance correction term 11611 f2, & !< resistance correction term 21612 f3, & !< resistance correction term 31613 m_min, & !< minimum soil moisture1614 e, & !< water vapour pressure1615 e_s, & !< water vapour saturation pressure1616 e_s_dt, & !< derivate of e_s with respect to T1617 tend, & !< tendency1618 dq_s_dt, & !< derivate of q_s with respect to T1619 coef_1, & !< coef. for prognostic equation1620 coef_2, & !< coef. for prognostic equation1621 f_qsws, & !< factor for qsws1622 f_qsws_veg, & !< factor for qsws_veg1623 f_qsws_soil, & !< factor for qsws_soil1624 f_qsws_liq, & !< factor for qsws_liq1625 f_shf, & !< factor for shf1626 lambda_soil, & !< Thermal conductivity of the uppermost soil layer (W/m2/K)1614 REAL(wp) :: c_surface_tmp, & !< temporary variable for storing the volumetric heat capacity of the surface 1615 f1, & !< resistance correction term 1 1616 f2, & !< resistance correction term 2 1617 f3, & !< resistance correction term 3 1618 m_min, & !< minimum soil moisture 1619 e, & !< water vapour pressure 1620 e_s, & !< water vapour saturation pressure 1621 e_s_dt, & !< derivate of e_s with respect to T 1622 tend, & !< tendency 1623 dq_s_dt, & !< derivate of q_s with respect to T 1624 coef_1, & !< coef. for prognostic equation 1625 coef_2, & !< coef. for prognostic equation 1626 f_qsws, & !< factor for qsws 1627 f_qsws_veg, & !< factor for qsws_veg 1628 f_qsws_soil, & !< factor for qsws_soil 1629 f_qsws_liq, & !< factor for qsws_liq 1630 f_shf, & !< factor for shf 1631 lambda_soil, & !< Thermal conductivity of the uppermost soil layer (W/m2/K) 1627 1632 lambda_surface, & !< Current value of lambda_surface (W/m2/K) 1628 m_liq_max !< maxmimum value of the liq. water reservoir 1633 m_liq_max, & !< maxmimum value of the liq. water reservoir 1634 ueff !< limited near-surface wind speed - used for calculation of resistance 1629 1635 1630 1636 TYPE(surf_type_lsm), POINTER :: surf_t_surface … … 1795 1801 !-- to positive values. 1796 1802 IF ( horizontal .OR. .NOT. aero_resist_kray ) THEN 1797 surf%r_a(m) = ABS( ( surf%pt1(m) - surf%pt_surface(m) ) / &1803 surf%r_a(m) = ABS( ( surf%pt1(m) - surf%pt_surface(m) ) / & 1798 1804 ( surf%ts(m) * surf%us(m) + 1.0E-20_wp ) ) 1799 1805 ELSE 1800 surf%r_a(m) = rho_cp / ( surf%z0(m) * 1000.0_wp & 1801 * ( 11.8_wp + 4.2_wp * & 1802 SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & 1803 ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & 1804 ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, & 1805 0.01_wp ) ) & 1806 ) - 4.0_wp ) 1806 ! 1807 !-- Limit wind velocity in order to avoid division by zero. 1808 !-- The nominator can become <= 0.0 for values z0 < 3*10E-4. 1809 ueff = MAX( SQRT( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & 1810 ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & 1811 ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2 ), & 1812 1.0_wp / 4.2_wp * ( 4.0_wp / ( surf%z0(m) * 1000.0_wp ) - 11.8_wp ), & 1813 0.1_wp & 1814 ) 1815 surf%r_a(m) = rho_cp / ( surf%z0(m) * 1000.0_wp & 1816 * ( 11.8_wp + 4.2_wp * ueff ) - 4.0_wp ) 1807 1817 ENDIF 1808 1818 ! … … 2020 2030 ENDIF 2021 2031 2022 surf%pt_surface(m) 2032 surf%pt_surface(m) = surf_t_surface_p%var_1d(m) / exner(nzb) 2023 2033 2024 2034 ! … … 2034 2044 2035 2045 surf%ghf(m) = lambda_surface * ( surf_t_surface_p%var_1d(m) & 2036 2046 - surf_t_soil%var_2d(nzb_soil,m) ) 2037 2047 2038 2048 surf%shf(m) = - f_shf * ( surf%pt1(m) - surf%pt_surface(m) ) / c_p 2039 2040 2049 ! 2041 2050 ! update the 3d field of rad_lw_out array to have consistent output … … 2198 2207 CALL calc_q_surface 2199 2208 ENDIF 2200 2201 2209 ! 2202 2210 !-- Calculate new roughness lengths (for water surfaces only) … … 2721 2729 building_type_f%var(j,i) /= building_type_f%fill ) & 2722 2730 THEN 2723 vegetation_type_f%var(j,i) = 1 ! bare soil 2724 soil_type_f%var_2d(j,i) = 1 2731 vegetation_type_f%var(j,i) = 1 ! bare soil 2732 soil_type_f%var_2d(j,i) = 1 2733 2734 water_type_f%var(j,i) = water_type_f%fill 2735 pavement_type_f%var(j,i) = pavement_type_f%fill 2725 2736 ! 2726 2737 !-- If surface_fraction is provided in static input, … … 2738 2749 !-- Normally proceed with setting surface types. 2739 2750 i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff, & 2740 surf_lsm_v(l)%building_covered(m) )2751 surf_lsm_v(l)%building_covered(m) ) 2741 2752 j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff, & 2742 surf_lsm_v(l)%building_covered(m) )2753 surf_lsm_v(l)%building_covered(m) ) 2743 2754 IF ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill ) & 2744 2755 surf_lsm_v(l)%vegetation_surface(m) = .TRUE. … … 3821 3832 nzt_pavement = pavement_depth_level 3822 3833 ENDIF 3823 3824 3834 ENDIF 3825 3835 ! … … 4904 4914 DO m = 1, surf_lsm_h%ns 4905 4915 IF ( surf_lsm_h%vegetation_surface(m) ) THEN 4906 i = surf_lsm_h%i(m) + MERGE( 0, surf_lsm_v(l)%ioff, & 4907 surf_lsm_v(l)%building_covered(m) ) 4908 j = surf_lsm_h%j(m) + MERGE( 0, surf_lsm_v(l)%joff, & 4909 surf_lsm_v(l)%building_covered(m) ) 4916 i = surf_lsm_h%i(m) 4917 j = surf_lsm_h%j(m) 4910 4918 DO k = nzb_soil, nzt_soil 4911 4919 surf_lsm_h%root_fr(k,m) = root_area_density_lsm_f%var(k,j,i) … … 5453 5461 !-- true pavement depth is considered 5454 5462 DO k = nzb_soil, nzt_soil-1 5455 surf%lambda_h(k,m) = ( lambda_temp(k+1) + lambda_temp(k) ) & 5456 * 0.5_wp 5463 surf%lambda_h(k,m) = ( lambda_temp(k+1) + lambda_temp(k) ) * 0.5_wp 5457 5464 ENDDO 5458 5465 surf%lambda_h(nzt_soil,m) = lambda_temp(nzt_soil) … … 5462 5469 tend(:) = 0.0_wp 5463 5470 5464 tend(nzb_soil) = ( 1.0_wp / surf%rho_c_total(nzb_soil,m) ) * & 5465 ( surf%lambda_h(nzb_soil,m) * ( surf_t_soil%var_2d(nzb_soil+1,m) & 5466 - surf_t_soil%var_2d(nzb_soil,m) ) * ddz_soil_center(nzb_soil) & 5467 + surf%ghf(m) ) * ddz_soil(nzb_soil) 5471 tend(nzb_soil) = ( 1.0_wp / surf%rho_c_total(nzb_soil,m) ) * & 5472 ( surf%lambda_h(nzb_soil,m) * & 5473 ( surf_t_soil%var_2d(nzb_soil+1,m) - surf_t_soil%var_2d(nzb_soil,m) ) & 5474 * ddz_soil_center(nzb_soil) & 5475 + surf%ghf(m) ) * ddz_soil(nzb_soil) 5468 5476 5469 5477 DO k = nzb_soil+1, nzt_soil … … 5472 5480 * ( surf_t_soil%var_2d(k+1,m) - surf_t_soil%var_2d(k,m) ) & 5473 5481 * ddz_soil_center(k) & 5474 - surf%lambda_h(k-1,m)&5482 - surf%lambda_h(k-1,m) & 5475 5483 * ( surf_t_soil%var_2d(k,m) - surf_t_soil%var_2d(k-1,m) ) & 5476 5484 * ddz_soil_center(k-1) & -
palm/trunk/SOURCE/urban_surface_mod.f90
r4602 r4630 27 27 ! ----------------- 28 28 ! $Id$ 29 ! - Bugfix in resistance calculation - avoid potential divisions by zero 30 ! - Minor formatting adjustment 31 ! 32 ! 4602 2020-07-14 14:49:45Z suehring 29 33 ! Add missing initialization of albedo type with values given from static input file 30 34 ! … … 463 467 INTEGER(iwp) :: wall_category = 2 !< default category for wall surface over pedestrian zone 464 468 469 REAL(wp) :: d_roughness_concrete !< inverse roughness length of average concrete surface 465 470 REAL(wp) :: roughness_concrete = 0.001_wp !< roughness length of average concrete surface 466 471 … … 3583 3588 ENDIF 3584 3589 ! 3590 !-- Calculate constant values 3591 d_roughness_concrete = 1.0_wp / roughness_concrete 3592 ! 3585 3593 !-- Flag surface elements belonging to the ground floor level. Therefore, use terrain height array 3586 3594 !-- from file, if available. This flag is later used to control initialization of surface attributes. … … 7539 7547 q_s, & !< saturation specific humidity 7540 7548 rho_lv, & !< frequently used parameter for green layers 7541 tend !< tendency 7549 tend, & !< tendency 7550 ueff !< limited near-surface wind speed - used for calculation of resistance 7542 7551 7543 7552 … … 8046 8055 !-- normal component is obtained by simple linear interpolation. (An alternative would be an 8047 8056 !-- logarithmic interpolation.) Parameter roughness_concrete (default value = 0.001) is used 8048 !-- to calculation of roughness relative to concrete 8049 surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) / roughness_concrete & 8050 * ( 11.8_wp + 4.2_wp & 8051 * SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & 8052 ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & 8053 ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2, 0.01_wp ) ) & 8054 ) - 4.0_wp ) 8057 !-- to calculation of roughness relative to concrete. Note, wind velocity is limited 8058 !-- to avoid division by zero. The nominator can become <= 0.0 for values z0 < 3*10E-4. 8059 ueff = MAX ( SQRT( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + & 8060 ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + & 8061 ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2 ), & 8062 1.0_wp / 4.2_wp & 8063 * ( 4.0_wp / ( surf_usm_v(l)%z0(m) * d_roughness_concrete ) & 8064 - 11.8_wp ), & 8065 0.1_wp & 8066 ) 8067 8068 surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) * d_roughness_concrete & 8069 * ( 11.8_wp + 4.2_wp * ueff ) - 4.0_wp ) 8055 8070 ! 8056 8071 !-- Limit aerodynamic resistance
Note: See TracChangeset
for help on using the changeset viewer.