Changeset 3993 for palm/trunk/SOURCE/urban_surface_mod.f90
 Timestamp:
 May 22, 2019 5:27:26 PM (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/urban_surface_mod.f90
r3987 r3993 28 28 !  29 29 ! $Id$ 30 ! In order to avoid confusion with global control parameter, rename the 31 ! USMinternal flag spinup into during_spinup. 32 ! 33 ! 3987 20190522 09:52:13Z kanani 30 34 ! Introduce alternative switch for debug output during timestepping 31 35 ! … … 498 502 timestep_scheme, tsc, coupling_char, io_blocks, io_group, & 499 503 message_string, time_since_reference_point, surface_pressure, & 500 pt_surface, large_scale_forcing, lsf_surf, spinup,&504 pt_surface, large_scale_forcing, lsf_surf, & 501 505 spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & 502 506 average_count_3d, varnamelength, urban_surface, dz … … 5256 5260 !> possible timestep. 5257 5261 !! 5258 SUBROUTINE usm_material_heat_model( spinup )5262 SUBROUTINE usm_material_heat_model( during_spinup ) 5259 5263 5260 5264 … … 5267 5271 REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wall_mod 5268 5272 5269 LOGICAL :: spinup !< if true, no calculation of window temperatures5273 LOGICAL :: during_spinup !< if true, no calculation of window temperatures 5270 5274 5271 5275 5272 5276 IF ( debug_output_timestep ) THEN 5273 WRITE( debug_string, * ) 'usm_material_heat_model  spinup: ', spinup 5277 WRITE( debug_string, * ) 'usm_material_heat_model  during_spinup: ',& 5278 during_spinup 5274 5279 CALL debug_message( debug_string, 'start' ) 5275 5280 ENDIF … … 5277 5282 !$OMP PARALLEL PRIVATE (m, i, j, k, kw, wtend, wintend, win_absorp, wall_mod) 5278 5283 wall_mod=1.0_wp 5279 IF ( usm_wall_mod .AND. spinup)THEN5284 IF ( usm_wall_mod .AND. during_spinup ) THEN 5280 5285 DO kw=nzb_wall,nzb_wall+1 5281 5286 wall_mod(kw)=0.1_wp … … 5356 5361 ! 5357 5362 ! during spinup the tempeature inside window layers is not calculated to make larger timesteps possible 5358 IF ( .NOT. spinup) THEN5363 IF ( .NOT. during_spinup ) THEN 5359 5364 win_absorp = log(surf_usm_h%transmissivity(m)) / surf_usm_h%zw_window(nzt_wall,m) 5360 5365 ! … … 5444 5449 ENDIF 5445 5450 5446 IF ( .NOT. spinup)THEN5451 IF ( .NOT. during_spinup ) THEN 5447 5452 ! 5448 5453 ! calculate t_window tendencies for the next RungeKutta step … … 5537 5542 * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) ) 5538 5543 5539 IF ( .NOT. spinup)THEN5544 IF ( .NOT. during_spinup ) THEN 5540 5545 win_absorp = log(surf_usm_v(l)%transmissivity(m)) / surf_usm_v(l)%zw_window(nzt_wall,m) 5541 5546 ! … … 5624 5629 5625 5630 5626 IF ( .NOT. spinup)THEN5631 IF ( .NOT. during_spinup ) THEN 5627 5632 ! 5628 5633 ! calculate t_window tendencies for the next RungeKutta step … … 5648 5653 5649 5654 IF ( debug_output_timestep ) THEN 5650 WRITE( debug_string, * ) 'usm_material_heat_model  spinup: ', spinup 5655 WRITE( debug_string, * ) 'usm_material_heat_model  during_spinup: ',& 5656 during_spinup 5651 5657 CALL debug_message( debug_string, 'end' ) 5652 5658 ENDIF … … 7651 7657 !> maximum possible timstep 7652 7658 !! 7653 SUBROUTINE usm_surface_energy_balance( spinup )7659 SUBROUTINE usm_surface_energy_balance( during_spinup ) 7654 7660 7655 7661 … … 7662 7668 INTEGER(iwp) :: k_off !< offset to determine index of surface element, seen from atmospheric grid point, for z 7663 7669 7664 LOGICAL :: spinup !true during spinup7670 LOGICAL :: during_spinup !< flag indicating soil/wall spinup phase 7665 7671 7666 7672 REAL(wp) :: frac_win !< window fraction, used to restore original values during spinup … … 7711 7717 7712 7718 IF ( debug_output_timestep ) THEN 7713 WRITE( debug_string, * ) 'usm_surface_energy_balance  spinup: ', spinup 7719 WRITE( debug_string, * ) 'usm_surface_energy_balance  during_spinup: ',& 7720 during_spinup 7714 7721 CALL debug_message( debug_string, 'start' ) 7715 7722 ENDIF … … 7735 7742 ! at the end of the loop. 7736 7743 ! Note, this is a temporary fix and need to be removed later. 7737 IF ( spinup ) THEN7744 IF ( during_spinup ) THEN 7738 7745 frac_win = surf_usm_h%frac(ind_wat_win,m) 7739 7746 frac_wall = surf_usm_h%frac(ind_veg_wall,m) … … 7927 7934 f_shf * surf_usm_h%pt1(m) + & 7928 7935 lambda_surface * t_wall_h(nzb_wall,m) 7929 IF ( ( .NOT. spinup ) .AND. (surf_usm_h%frac(ind_wat_win,m) > 0.0_wp ) ) THEN7936 IF ( ( .NOT. during_spinup ) .AND. (surf_usm_h%frac(ind_wat_win,m) > 0.0_wp ) ) THEN 7930 7937 coef_window_1 = surf_usm_h%rad_net_l(m) + & 7931 7938 ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m) & … … 7953 7960 sigma_sb * t_surf_wall_h(m) ** 3 & 7954 7961 + lambda_surface + f_shf / exner(k) 7955 IF ( ( .NOT. spinup ) .AND. ( surf_usm_h%frac(ind_wat_win,m) > 0.0_wp ) ) THEN7962 IF ( ( .NOT. during_spinup ) .AND. ( surf_usm_h%frac(ind_wat_win,m) > 0.0_wp ) ) THEN 7956 7963 coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) * & 7957 7964 sigma_sb * t_surf_window_h(m) ** 3 & … … 7973 7980 surf_usm_h%c_surface(m) * t_surf_wall_h(m) ) / & 7974 7981 ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) 7975 IF (( .NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m) > 0.0_wp)) THEN7982 IF (( .NOT. during_spinup ) .AND. (surf_usm_h%frac(ind_wat_win,m) > 0.0_wp)) THEN 7976 7983 t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) + & 7977 7984 surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) / & … … 8187 8194 ! During spinup green and window fraction are set to zero. Here, the original 8188 8195 ! values are restored. 8189 IF ( spinup ) THEN8196 IF ( during_spinup ) THEN 8190 8197 surf_usm_h%frac(ind_wat_win,m) = frac_win 8191 8198 surf_usm_h%frac(ind_veg_wall,m) = frac_wall … … 8203 8210 ! at the end of the loop. 8204 8211 ! Note, this is a temporary fix and need to be removed later. 8205 IF ( spinup ) THEN8212 IF ( during_spinup ) THEN 8206 8213 frac_win = surf_usm_v(l)%frac(ind_wat_win,m) 8207 8214 frac_wall = surf_usm_v(l)%frac(ind_veg_wall,m) … … 8366 8373 f_shf * surf_usm_v(l)%pt1(m) + & 8367 8374 lambda_surface * t_wall_v(l)%t(nzb_wall,m) 8368 IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN8375 IF ( ( .NOT. during_spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN 8369 8376 coef_window_1 = surf_usm_v(l)%rad_net_l(m) + & ! coef +1 corresponds to lwout 8370 8377 ! included in calculation of radnet_l … … 8396 8403 t_surf_wall_v(l)%t(m) ** 3 & 8397 8404 + lambda_surface + f_shf / exner(k) 8398 IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN8405 IF ( ( .NOT. during_spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN 8399 8406 coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) * sigma_sb * & 8400 8407 t_surf_window_v(l)%t(m) ** 3 & … … 8416 8423 surf_usm_v(l)%c_surface(m) * t_surf_wall_v(l)%t(m) ) / & 8417 8424 ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) 8418 IF ( ( .NOT. spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN8425 IF ( ( .NOT. during_spinup ) .AND. ( surf_usm_v(l)%frac(ind_wat_win,m) > 0.0_wp ) ) THEN 8419 8426 t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) + & 8420 8427 surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & … … 8584 8591 ! During spinup green and window fraction are set to zero. Here, the original 8585 8592 ! values are restored. 8586 IF ( spinup ) THEN8593 IF ( during_spinup ) THEN 8587 8594 surf_usm_v(l)%frac(ind_wat_win,m) = frac_win 8588 8595 surf_usm_v(l)%frac(ind_veg_wall,m) = frac_wall … … 8757 8764 8758 8765 IF ( debug_output_timestep ) THEN 8759 WRITE( debug_string, * ) 'usm_surface_energy_balance  spinup: ', spinup 8766 WRITE( debug_string, * ) 'usm_surface_energy_balance  during_spinup: ',& 8767 during_spinup 8760 8768 CALL debug_message( debug_string, 'end' ) 8761 8769 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.