Changeset 3486 for palm/trunk/SOURCE
- Timestamp:
- Nov 5, 2018 6:20:18 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r3361 r3486 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix for liquid water treatment on pavements 28 ! 29 ! 3361 2018-10-16 20:39:37Z knoop 27 30 ! Bugfix in initialization of soil properties from dynamic input file 28 31 ! … … 479 482 !> more levels are used this may cause an potential bug 480 483 !> @todo Routine calc_q_surface required? 484 !> @todo Allow for precipitation water to enter pavements that are semi-pervious 481 485 !------------------------------------------------------------------------------! 482 486 MODULE land_surface_model_mod … … 2057 2061 f_qsws_soil = 0.0_wp 2058 2062 f_qsws_liq = rho_lv / surf%r_a(m) 2059 ELSEIF ( surf%pavement_surface 2063 ELSEIF ( surf%pavement_surface(m) ) THEN 2060 2064 f_qsws_veg = 0.0_wp 2061 2065 f_qsws_soil = 0.0_wp … … 2222 2226 !-- Add precipitation to liquid water reservoir, if possible. 2223 2227 !-- Otherwise, add the water to soil. In case of 2224 !-- pavements, the exceeding water amount is implicitely removed 2225 !-- as runoff as qsws_soil is then not used in the soil model 2226 IF ( surf_m_liq%var_1d(m) /= m_liq_max ) THEN 2227 surf%qsws_liq(m) = surf%qsws_liq(m) & 2228 !-- pavements, the exceeding water amount is explicitly removed 2229 !-- (as fictive runoff by drainage systems) 2230 IF ( surf%pavement_surface(m) ) THEN 2231 IF ( surf_m_liq%var_1d(m) < m_liq_max ) THEN 2232 surf%qsws_liq(m) = surf%qsws_liq(m) & 2233 + prr(k+k_off,j+j_off,i+i_off) & 2234 * hyrho(k+k_off) & 2235 * 0.001_wp * rho_l * l_v 2236 ENDIF 2237 ELSE 2238 IF ( surf_m_liq%var_1d(m) < m_liq_max ) THEN 2239 surf%qsws_liq(m) = surf%qsws_liq(m) & 2228 2240 + surf%c_veg(m) * prr(k+k_off,j+j_off,i+i_off)& 2229 2241 * hyrho(k+k_off) & 2230 2242 * 0.001_wp * rho_l * l_v 2231 ELSE 2232 surf%qsws_soil(m) = surf%qsws_soil(m) & 2243 surf%qsws_soil(m) = surf%qsws_soil(m) + ( 1.0_wp - & 2244 surf%c_veg(m) ) * prr(k+k_off,j+j_off,i+i_off)& 2245 * hyrho(k+k_off) & 2246 * 0.001_wp * rho_l * l_v 2247 ELSE 2248 2249 !-- Add precipitation to bare soil according to the bare soil 2250 !-- coverage. 2251 surf%qsws_soil(m) = surf%qsws_soil(m) & 2233 2252 + surf%c_veg(m) * prr(k+k_off,j+j_off,i+i_off)& 2234 2253 * hyrho(k+k_off) & 2235 2254 * 0.001_wp * rho_l * l_v 2255 2256 ENDIF 2236 2257 ENDIF 2237 2258 2238 !-- Add precipitation to bare soil according to the bare soil2239 !-- coverage.2240 surf%qsws_soil(m) = surf%qsws_soil(m) + ( 1.0_wp &2241 - surf%c_veg(m) ) * prr(k+k_off,j+j_off,i+i_off)&2242 * hyrho(k+k_off) &2243 * 0.001_wp * rho_l * l_v2244 2259 ENDIF 2245 2260 … … 2249 2264 ! 2250 2265 !-- Check if reservoir is full (avoid values > m_liq_max) 2251 !-- In that case, qsws_liq goes to qsws_soil . In this2252 !-- case qsws_veg is zero anyway (because c_liq = 1),2266 !-- In that case, qsws_liq goes to qsws_soil for pervious surfaces. In 2267 !-- this case qsws_veg is zero anyway (because c_liq = 1), 2253 2268 !-- so that tend is zero and no further check is needed 2254 2269 IF ( surf_m_liq%var_1d(m) == m_liq_max ) THEN 2255 surf%qsws_soil(m) = surf%qsws_soil(m) + surf%qsws_liq(m) 2256 2270 IF ( .NOT. surf%pavement_surface(m)) THEN 2271 surf%qsws_soil(m) = surf%qsws_soil(m) + surf%qsws_liq(m) 2272 ENDIF 2257 2273 surf%qsws_liq(m) = 0.0_wp 2258 2274 ENDIF … … 5400 5416 5401 5417 ! 5402 !-- Account for dry soils (find a better solution here!) 5418 !-- Account for dry and wet soils to keep solution stable 5419 !-- (mass conservation is violated here) 5403 5420 DO k = nzb_soil, nzt_soil 5404 IF ( surf_m_soil_p%var_2d(k,m) < 0.0_wp ) surf_m_soil_p%var_2d(k,m) = 0.0_wp 5421 surf_m_soil_p%var_2d(k,m) = MIN( surf_m_soil_p%var_2d(k,m), surf_m_soil_p%var_2d(k,m) ) 5422 surf_m_soil_p%var_2d(k,m) = MAX( surf_m_soil_p%var_2d(k,m), 0.0_wp ) 5405 5423 ENDDO 5406 5424
Note: See TracChangeset
for help on using the changeset viewer.