Changeset 3121 for palm/trunk/SOURCE
- Timestamp:
- Jul 11, 2018 6:46:49 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/turbulence_closure_mod.f90
r3120 r3121 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - created the function phi_m 28 ! - implemented km = u* * kappa * zp / phi_m in production_e_init for all 29 ! surfaces 30 ! 31 ! 3120 2018-07-11 18:30:57Z gronemeier 27 32 ! - changed tcm_diffusivities to tcm_diffusivities_default 28 33 ! - created subroutine tcm_diffusivities that calls tcm_diffusivities_default … … 1977 1982 INTEGER(iwp) :: m !< running index surface elements 1978 1983 1984 REAL(wp) :: km_sfc !< km according to MOST 1985 1979 1986 IF ( constant_flux_layer ) THEN 1980 1987 ! … … 2001 2008 !-- interpolation of km onto the u/v-grid is necessary. However, the 2002 2009 !-- effect of this error is negligible. 2010 km_sfc = surf_def_h(0)%us(m) * kappa * surf_def_h(0)%z_mo(m) / & 2011 phi_m( surf_def_h(0)%z_mo(m) / surf_def_h(0)%ol(m) ) 2012 2003 2013 surf_def_h(0)%u_0(m) = u(k+1,j,i) + surf_def_h(0)%usws(m) * & 2004 2014 drho_air_zw(k-1) * & 2005 2015 ( zu(k+1) - zu(k-1) ) / & 2006 ( km (k,j,i)+ 1.0E-20_wp )2016 ( km_sfc + 1.0E-20_wp ) 2007 2017 surf_def_h(0)%v_0(m) = v(k+1,j,i) + surf_def_h(0)%vsws(m) * & 2008 2018 drho_air_zw(k-1) * & 2009 2019 ( zu(k+1) - zu(k-1) ) / & 2010 ( km (k,j,i)+ 1.0E-20_wp )2020 ( km_sfc + 1.0E-20_wp ) 2011 2021 2012 2022 IF ( ABS( u(k+1,j,i) - surf_def_h(0)%u_0(m) ) > & … … 2060 2070 !-- effect of this error is negligible. 2061 2071 !-- effect of this error is negligible. 2072 km_sfc = surf_lsm_h%us(m) * kappa * surf_lsm_h%z_mo(m) / & 2073 phi_m( surf_lsm_h%z_mo(m) / surf_lsm_h%ol(m) ) 2074 2062 2075 surf_lsm_h%u_0(m) = u(k+1,j,i) + surf_lsm_h%usws(m) * & 2063 2076 drho_air_zw(k-1) * & 2064 2077 ( zu(k+1) - zu(k-1) ) / & 2065 ( km (k,j,i)+ 1.0E-20_wp )2078 ( km_sfc + 1.0E-20_wp ) 2066 2079 surf_lsm_h%v_0(m) = v(k+1,j,i) + surf_lsm_h%vsws(m) * & 2067 2080 drho_air_zw(k-1) * & 2068 2081 ( zu(k+1) - zu(k-1) ) / & 2069 ( km (k,j,i)+ 1.0E-20_wp )2082 ( km_sfc + 1.0E-20_wp ) 2070 2083 2071 2084 IF ( ABS( u(k+1,j,i) - surf_lsm_h%u_0(m) ) > & … … 2091 2104 !-- interpolation of km onto the u/v-grid is necessary. However, the 2092 2105 !-- effect of this error is negligible. 2106 km_sfc = surf_usm_h%us(m) * kappa * surf_usm_h%z_mo(m) / & 2107 phi_m( surf_usm_h%z_mo(m) / surf_usm_h%ol(m) ) 2108 2093 2109 surf_usm_h%u_0(m) = u(k+1,j,i) + surf_usm_h%usws(m) * & 2094 2110 drho_air_zw(k-1) * & 2095 2111 ( zu(k+1) - zu(k-1) ) / & 2096 ( km (k,j,i)+ 1.0E-20_wp )2112 ( km_sfc + 1.0E-20_wp ) 2097 2113 surf_usm_h%v_0(m) = v(k+1,j,i) + surf_usm_h%vsws(m) * & 2098 2114 drho_air_zw(k-1) * & 2099 2115 ( zu(k+1) - zu(k-1) ) / & 2100 ( km (k,j,i)+ 1.0E-20_wp )2116 ( km_sfc + 1.0E-20_wp ) 2101 2117 2102 2118 IF ( ABS( u(k+1,j,i) - surf_usm_h%u_0(m) ) > & … … 2113 2129 2114 2130 END SUBROUTINE production_e_init 2131 2132 2133 !------------------------------------------------------------------------------! 2134 ! Description: 2135 ! ------------ 2136 !> Calculates stability function for momentum 2137 !> 2138 !> @author Hauke Wurps 2139 !------------------------------------------------------------------------------! 2140 FUNCTION phi_m( zeta ) 2141 2142 IMPLICIT NONE 2143 2144 REAL(wp) :: phi_m !< Value of the function 2145 REAL(wp) :: zeta !< Stability parameter z/L 2146 2147 REAL(wp), PARAMETER :: a = 16.0_wp !< constant 2148 REAL(wp), PARAMETER :: b = -0.25_wp !< constant 2149 REAL(wp), PARAMETER :: c = 5.0_wp !< constant 2150 2151 IF ( zeta < 0.0_wp ) THEN 2152 phi_m = ( 1.0_wp - a * zeta )**b 2153 ELSE 2154 phi_m = 1.0_wp + c * zeta 2155 ENDIF 2156 2157 END FUNCTION phi_m 2115 2158 2116 2159
Note: See TracChangeset
for help on using the changeset viewer.