Changeset 3597
- Timestamp:
- Dec 4, 2018 8:40:18 AM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/average_3d_data.f90
r3589 r3597 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added theta_2m 28 ! 29 ! 3589 2018-11-30 15:09:51Z suehring 27 30 ! Move the control parameter "salsa" from salsa_mod to control_parameters 28 31 ! (M. Kurppa) … … 518 521 ENDIF 519 522 523 CASE ( 'theta_2m' ) 524 IF ( ALLOCATED( pt_2m_av ) ) THEN 525 DO i = nxlg, nxrg 526 DO j = nysg, nyng 527 pt_2m_av(j,i) = pt_2m_av(j,i) / REAL( average_count_3d, KIND=wp ) 528 ENDDO 529 ENDDO 530 CALL exchange_horiz_2d( pt_2m_av, nbgp ) 531 ENDIF 532 520 533 CASE ( 'w' ) 521 534 IF ( ALLOCATED( w_av ) ) THEN -
palm/trunk/SOURCE/check_parameters.f90
r3589 r3597 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added checks for theta_2m 28 ! 29 ! 3589 2018-11-30 15:09:51Z suehring 27 30 ! Move the control parameter "salsa" from salsa_mod to control_parameters 28 31 ! (M. Kurppa) … … 3147 3150 CONTINUE 3148 3151 3149 CASE ( 'ghf*', 'lwp*', 'ol*', 'qsws*', 'r_a*', 3152 CASE ( 'ghf*', 'lwp*', 'ol*', 'qsws*', 'r_a*', 'theta_2m*', & 3150 3153 'shf*', 'ssws*', 't*', 'tsurf*', 'us*', 'z0*', 'z0h*', 'z0q*' ) 3151 3154 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN … … 3181 3184 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 3182 3185 ENDIF 3186 3183 3187 IF ( TRIM( var ) == 'ssws*' .AND. .NOT. passive_scalar ) THEN 3184 3188 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 3187 3191 ENDIF 3188 3192 3193 3194 ! 3195 !-- Activate calculation of 2m temperature if output is requested 3196 IF ( TRIM( var ) == 'theta_2m*' ) THEN 3197 do_output_at_2m = .TRUE. 3198 ENDIF 3199 3200 3189 3201 IF ( TRIM( var ) == 'ghf*' ) unit = 'W/m2' 3190 3202 IF ( TRIM( var ) == 'lwp*' ) unit = 'kg/m2' 3191 3203 IF ( TRIM( var ) == 'ol*' ) unit = 'm' 3204 IF ( TRIM( var ) == 'theta_2m*' ) unit = 'K' 3192 3205 IF ( TRIM( var ) == 'qsws*' ) unit = 'kgm/kgs' 3193 3206 IF ( TRIM( var ) == 'r_a*' ) unit = 's/m' -
palm/trunk/SOURCE/data_output_2d.f90
r3589 r3597 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added theta_2m 28 ! 29 ! 3589 2018-11-30 15:09:51Z suehring 27 30 ! Move the control parameter "salsa" from salsa_mod to control_parameters 28 31 ! (M. Kurppa) … … 1212 1215 IF ( mode == 'xy' ) level_z = zu 1213 1216 1217 CASE ( 'theta_2m*_xy' ) ! 2d-array 1218 IF ( av == 0 ) THEN 1219 DO m = 1, surf_def_h(0)%ns 1220 i = surf_def_h(0)%i(m) 1221 j = surf_def_h(0)%j(m) 1222 local_pf(i,j,nzb+1) = surf_def_h(0)%pt_2m(m) 1223 ENDDO 1224 DO m = 1, surf_lsm_h%ns 1225 i = surf_lsm_h%i(m) 1226 j = surf_lsm_h%j(m) 1227 local_pf(i,j,nzb+1) = surf_lsm_h%pt_2m(m) 1228 ENDDO 1229 DO m = 1, surf_usm_h%ns 1230 i = surf_usm_h%i(m) 1231 j = surf_usm_h%j(m) 1232 local_pf(i,j,nzb+1) = surf_usm_h%pt_2m(m) 1233 ENDDO 1234 ELSE 1235 IF ( .NOT. ALLOCATED( pt_2m_av ) ) THEN 1236 ALLOCATE( pt_2m_av(nysg:nyng,nxlg:nxrg) ) 1237 pt_2m_av = REAL( fill_value, KIND = wp ) 1238 ENDIF 1239 DO i = nxl, nxr 1240 DO j = nys, nyn 1241 local_pf(i,j,nzb+1) = pt_2m_av(j,i) 1242 ENDDO 1243 ENDDO 1244 ENDIF 1245 resorted = .TRUE. 1246 two_d = .TRUE. 1247 level_z(nzb+1) = zu(nzb+1) 1248 1249 1250 1214 1251 CASE ( 'w_xy', 'w_xz', 'w_yz' ) 1215 1252 flag_nr = 3 -
palm/trunk/SOURCE/indoor_model_mod.f90
r3593 r3597 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Renamed t_surf_10cm to pt_10cm 29 ! 30 ! 3593 2018-12-03 13:51:13Z kanani 28 31 ! Replace degree symbol by degree_C 29 32 ! … … 318 321 ! i_global --> net_sw_in !global radiation [W/m2] 319 322 ! theta_e --> pt(k,j,i) !undisturbed outside temperature, 1. PALM volume, for windows 320 ! theta_sup = theta_f --> surf_usm_h% t_surf_10cm(m)321 ! surf_usm_v(l)% t_surf_10cm(m) !Air temperature, facade near (10cm) air temperature from 1. Palm volume323 ! theta_sup = theta_f --> surf_usm_h%pt_10cm(m) 324 ! surf_usm_v(l)%pt_10cm(m) !Air temperature, facade near (10cm) air temperature from 1. Palm volume 322 325 ! theta_node --> t_wall_h(nzt_wall,m) 323 326 ! t_wall_v(l)%t(nzt_wall,m) !Temperature of innermost wall layer, for opaque wall … … 844 847 845 848 USE urban_surface_mod, & 846 ONLY: nzt_wall, t_ surf_10cm_h, t_surf_10cm_v, t_wall_h, t_wall_v,&847 t_window_h, t_window_v,building_type849 ONLY: nzt_wall, t_wall_h, t_wall_v, t_window_h, t_window_v, & 850 building_type 848 851 849 852 … … 1000 1003 j = surf_usm_h%j(m) 1001 1004 k = surf_usm_h%k(m) 1002 near_facade_temperature = t_surf_10cm_h(m)1005 near_facade_temperature = surf_usm_h%pt_10cm(m) 1003 1006 indoor_wall_window_temperature = & 1004 1007 surf_usm_h%frac(ind_veg_wall,m) * t_wall_h(nzt_wall,m) & … … 1192 1195 j = surf_usm_v(l)%j(m) 1193 1196 k = surf_usm_v(l)%k(m) 1194 near_facade_temperature = t_surf_10cm_v(l)%t(m)1197 near_facade_temperature = surf_usm_v(l)%pt_10cm(m) 1195 1198 indoor_wall_window_temperature = & 1196 1199 surf_usm_v(l)%frac(ind_veg_wall,m) * t_wall_v(l)%t(nzt_wall,m) & -
palm/trunk/SOURCE/land_surface_model_mod.f90
r3486 r3597 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added pt_2m / theta_2m. Removed unncessary _eb strings. 28 ! 29 ! 3486 2018-11-05 06:20:18Z maronga 27 30 ! Bugfix for liquid water treatment on pavements 28 31 ! … … 490 493 491 494 USE basic_constants_and_equations_mod, & 492 ONLY: c_p, g, lv_d_cp, l_v, magnus, rho_l, r_d, r_v, rd_d_rv495 ONLY: c_p, g, lv_d_cp, l_v, kappa, magnus, rho_l, r_d, r_v, rd_d_rv 493 496 494 497 USE calc_mean_profile_mod, & … … 530 533 531 534 USE surface_mod, & 532 ONLY : ind_pav_green, ind_veg_wall, ind_wat_win, surf_lsm_h,&533 surf_lsm_ v, surf_type, surface_restore_elements535 ONLY : ind_pav_green, ind_veg_wall, ind_wat_win, & 536 surf_lsm_h, surf_lsm_v, surf_type, surface_restore_elements 534 537 535 538 IMPLICIT NONE … … 750 753 c_soil_av, & !< average of c_soil 751 754 c_veg_av, & !< average of c_veg 752 lai_av, & !< average of lai 755 lai_av, & !< average of lai 753 756 qsws_liq_av, & !< average of qsws_liq 754 757 qsws_soil_av, & !< average of qsws_soil 755 758 qsws_veg_av, & !< average of qsws_veg 756 759 r_s_av !< average of r_s 757 758 760 759 761 ! 760 762 !-- Predefined Land surface classes (vegetation_type) … … 1000 1002 !-- Public functions 1001 1003 PUBLIC lsm_boundary_condition, lsm_check_data_output, & 1002 lsm_check_data_output_pr, 1004 lsm_check_data_output_pr, lsm_calc_pt_near_surface, & 1003 1005 lsm_check_parameters, lsm_define_netcdf_grid, lsm_3d_data_averaging,& 1004 1006 lsm_data_output_2d, lsm_data_output_3d, lsm_energy_balance, & … … 1021 1023 END INTERFACE lsm_boundary_condition 1022 1024 1025 INTERFACE lsm_calc_pt_near_surface 1026 MODULE PROCEDURE lsm_calc_pt_near_surface 1027 END INTERFACE lsm_calc_pt_near_surface 1028 1023 1029 INTERFACE lsm_check_data_output 1024 1030 MODULE PROCEDURE lsm_check_data_output … … 2340 2346 IF ( horizontal .AND. .NOT. constant_roughness ) CALL calc_z0_water_surface 2341 2347 2348 2342 2349 CONTAINS 2343 2350 !------------------------------------------------------------------------------! … … 2391 2398 2392 2399 ENDDO 2393 2400 2394 2401 END SUBROUTINE calc_q_surface 2395 2396 2397 2402 2398 2403 END SUBROUTINE lsm_energy_balance 2399 2404 2405 2400 2406 2401 2407 !------------------------------------------------------------------------------! … … 4923 4929 ALLOCATE ( surf_lsm_h%r_s(1:surf_lsm_h%ns) ) 4924 4930 ALLOCATE ( surf_lsm_h%r_canopy_min(1:surf_lsm_h%ns) ) 4931 ALLOCATE ( surf_lsm_h%pt_2m(1:surf_lsm_h%ns) ) 4925 4932 ALLOCATE ( surf_lsm_h%vegetation_surface(1:surf_lsm_h%ns) ) 4926 4933 ALLOCATE ( surf_lsm_h%water_surface(1:surf_lsm_h%ns) ) … … 5742 5749 ENDDO 5743 5750 ENDIF 5744 5751 5745 5752 CASE DEFAULT 5746 5753 CONTINUE … … 6090 6097 6091 6098 IF ( mode == 'xy' ) grid = 'zs' 6092 6099 6093 6100 CASE ( 'qsws_liq*_xy' ) ! 2d-array 6094 6101 IF ( av == 0 ) THEN … … 6208 6215 IF ( mode == 'xy' ) grid = 'zs' 6209 6216 6217 6210 6218 CASE DEFAULT 6211 6219 found = .FALSE. … … 6377 6385 WRITE ( 14 ) qsws_veg_av 6378 6386 ENDIF 6379 6387 6380 6388 IF ( ALLOCATED( t_soil_av ) ) THEN 6381 6389 CALL wrd_write_string( 't_soil_av' ) … … 6676 6684 t_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 6677 6685 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 6678 6686 6679 6687 CASE ( 'lsm_start_index_h', 'lsm_start_index_v' ) 6680 6688 IF ( k == 1 ) THEN … … 7196 7204 END SUBROUTINE calc_z0_water_surface 7197 7205 7198 7199 7206 7207 !------------------------------------------------------------------------------! 7208 ! Description: 7209 ! ------------ 7210 !> Calculates 2m temperature for data output at coarse resolution 7211 !------------------------------------------------------------------------------! 7212 SUBROUTINE lsm_calc_pt_near_surface 7213 7214 IMPLICIT NONE 7215 7216 INTEGER(iwp) :: i, j, k, l, m !< running indices 7217 7218 7219 DO m = 1, surf_lsm_h%ns 7220 7221 i = surf_lsm_h%i(m) 7222 j = surf_lsm_h%j(m) 7223 k = surf_lsm_h%k(m) 7224 7225 surf_lsm_h%pt_2m(m) = surf_lsm_h%pt_surface(m) + surf_lsm_h%ts(m) / kappa & 7226 * ( log( 2.0_wp / surf_lsm_h%z0h(m) ) & 7227 - psi_h( 2.0_wp / surf_lsm_h%ol(m) ) & 7228 + psi_h( surf_lsm_h%z0h(m) / surf_lsm_h%ol(m) ) ) 7229 7230 ENDDO 7231 7232 END SUBROUTINE lsm_calc_pt_near_surface 7233 7234 7235 7236 ! 7237 !-- Integrated stability function for heat and moisture 7238 FUNCTION psi_h( zeta ) 7239 7240 USE kinds 7241 7242 IMPLICIT NONE 7243 7244 REAL(wp) :: psi_h !< Integrated similarity function result 7245 REAL(wp) :: zeta !< Stability parameter z/L 7246 REAL(wp) :: x !< dummy variable 7247 7248 REAL(wp), PARAMETER :: a = 1.0_wp !< constant 7249 REAL(wp), PARAMETER :: b = 0.66666666666_wp !< constant 7250 REAL(wp), PARAMETER :: c = 5.0_wp !< constant 7251 REAL(wp), PARAMETER :: d = 0.35_wp !< constant 7252 REAL(wp), PARAMETER :: c_d_d = c / d !< constant 7253 REAL(wp), PARAMETER :: bc_d_d = b * c / d !< constant 7254 7255 7256 IF ( zeta < 0.0_wp ) THEN 7257 x = SQRT( 1.0_wp - 16.0_wp * zeta ) 7258 psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp ) 7259 ELSE 7260 psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp & 7261 + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d & 7262 + 1.0_wp 7263 ! 7264 !-- Old version for stable conditions (only valid for z/L < 0.5) 7265 !-- psi_h = - 5.0_wp * zeta 7266 ENDIF 7267 7268 END FUNCTION psi_h 7269 7200 7270 END MODULE land_surface_model_mod -
palm/trunk/SOURCE/modules.f90
r3589 r3597 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added flag parameter do_output_at_2m for automatic output of 2m-temperature 28 ! 29 ! 3589 2018-11-30 15:09:51Z suehring 27 30 ! Move the control parameter "salsa" from salsa_mod to control_parameters 28 31 ! (M. Kurppa) … … 1063 1066 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: lwp_av !< avg. liquid water path 1064 1067 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: ol_av !< avg. Obukhov length 1068 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: pt_2m_av !< avg. 2m- air potential temperature 1065 1069 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: qsws_av !< avg. surface moisture flux 1066 1070 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: r_a_av !< avg. resistance … … 1354 1358 LOGICAL :: do2d_at_begin = .FALSE. !< namelist parameter 1355 1359 LOGICAL :: do3d_at_begin = .FALSE. !< namelist parameter 1360 LOGICAL :: do_output_at_2m = .FALSE. !< flag for activating calculation of potential temperature at z = 2 m 1356 1361 LOGICAL :: do_sum = .FALSE. !< contribute to time average of profile data? 1357 1362 LOGICAL :: dp_external = .FALSE. !< namelist parameter -
palm/trunk/SOURCE/sum_up_3d_data.f90
r3589 r3597 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added output of theta_2m 28 ! 29 ! 3589 2018-11-30 15:09:51Z suehring 27 30 ! Move the control parameter "salsa" from salsa_mod to control_parameters 28 31 ! (M. Kurppa) … … 249 252 USE averaging, & 250 253 ONLY: e_av, ghf_av, lpt_av, lwp_av, ol_av, p_av, pc_av, pr_av, pt_av, & 251 q_av, ql_av, ql_c_av, ql_v_av, ql_vp_av, qsws_av, qv_av,&252 r_a_av, s_av, shf_av, ssws_av, ts_av, tsurf_av, u_av, us_av, &253 v_av, vpt_av, w_av, z0_av, z0h_av, z0q_av254 pt_2m_av, q_av, ql_av, ql_c_av, ql_v_av, ql_vp_av, qsws_av, & 255 qv_av, r_a_av, s_av, shf_av, ssws_av, ts_av, tsurf_av, u_av, & 256 us_av, v_av, vpt_av, w_av, z0_av, z0h_av, z0q_av 254 257 255 258 USE basic_constants_and_equations_mod, & … … 497 500 ENDIF 498 501 vpt_av = 0.0_wp 502 503 CASE ( 'theta_2m*' ) 504 IF ( .NOT. ALLOCATED( pt_2m_av ) ) THEN 505 ALLOCATE( pt_2m_av(nysg:nyng,nxlg:nxrg) ) 506 ENDIF 507 pt_2m_av = 0.0_wp 499 508 500 509 CASE ( 'w' ) -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r3547 r3597 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Added routine for calculating near surface air potential temperature (moved 29 ! from urban_surface_mod) 30 ! 31 ! 3547 2018-11-21 13:21:24Z suehring 28 32 ! variables documented 29 33 ! … … 250 254 ONLY: air_chemistry, cloud_droplets, & 251 255 constant_heatflux, constant_scalarflux, & 252 constant_waterflux, coupling_mode, humidity, ibc_e_b,&253 ibc_ pt_b, initializing_actions,&256 constant_waterflux, coupling_mode, do_output_at_2m, humidity, & 257 ibc_e_b, ibc_pt_b, indoor_model, initializing_actions, & 254 258 intermediate_timestep_count, intermediate_timestep_count_max, & 255 259 land_surface, large_scale_forcing, lsf_surf, message_string, & … … 413 417 CALL calc_us 414 418 CALL calc_surface_fluxes 419 420 IF ( do_output_at_2m ) THEN 421 CALL calc_pt_near_surface ( '2m' ) 422 ENDIF 415 423 ENDIF 416 424 ! … … 423 431 CALL calc_us 424 432 CALL calc_surface_fluxes 433 IF ( do_output_at_2m ) THEN 434 CALL calc_pt_near_surface ( '2m' ) 435 ENDIF 425 436 ENDIF 426 437 ! … … 433 444 CALL calc_us 434 445 CALL calc_surface_fluxes 446 IF ( do_output_at_2m ) THEN 447 CALL calc_pt_near_surface ( '2m' ) 448 ENDIF 449 IF ( indoor_model ) THEN 450 CALL calc_pt_near_surface ( '10cm' ) 451 ENDIF 435 452 ENDIF 436 453 ! … … 447 464 CALL calc_scaling_parameters 448 465 CALL calc_surface_fluxes 466 IF ( do_output_at_2m ) THEN 467 CALL calc_pt_near_surface ( '2m' ) 468 ENDIF 449 469 ENDIF 450 470 ! … … 457 477 CALL calc_scaling_parameters 458 478 CALL calc_surface_fluxes 479 IF ( do_output_at_2m ) THEN 480 CALL calc_pt_near_surface ( '2m' ) 481 ENDIF 459 482 ENDIF 460 483 ! … … 467 490 CALL calc_scaling_parameters 468 491 CALL calc_surface_fluxes 492 IF ( do_output_at_2m ) THEN 493 CALL calc_pt_near_surface ( '2m' ) 494 ENDIF 495 IF ( indoor_model ) THEN 496 CALL calc_pt_near_surface ( '10cm' ) 497 ENDIF 469 498 ENDIF 470 499 … … 2305 2334 END SUBROUTINE calc_surface_fluxes 2306 2335 2336 2337 !------------------------------------------------------------------------------! 2338 ! Description: 2339 ! ------------ 2340 !> Calculates temperature near surface (10 cm) for indoor model or 2 m 2341 !> temperature for output 2342 !------------------------------------------------------------------------------! 2343 SUBROUTINE calc_pt_near_surface ( z_char ) 2344 2345 IMPLICIT NONE 2346 2347 CHARACTER (LEN = *), INTENT(IN) :: z_char !< string identifier to identify z level 2348 INTEGER(iwp) :: i, j, k, l, m !< running indices 2349 2350 2351 SELECT CASE ( z_char) 2352 2353 2354 CASE ( '10cm' ) 2355 2356 DO m = 1, surf%ns 2357 2358 i = surf%i(m) 2359 j = surf%j(m) 2360 k = surf%k(m) 2361 2362 surf%pt_10cm(m) = surf%pt_surface(m) + surf%ts(m) / kappa & 2363 * ( log( 0.1_wp / surf%z0h(m) ) & 2364 - psi_h( 0.1_wp / surf%ol(m) ) & 2365 + psi_h( surf%z0h(m) / surf%ol(m) ) ) 2366 2367 ENDDO 2368 2369 2370 CASE ( '2m' ) 2371 2372 DO m = 1, surf%ns 2373 2374 i = surf%i(m) 2375 j = surf%j(m) 2376 k = surf%k(m) 2377 2378 surf%pt_2m(m) = surf%pt_surface(m) + surf%ts(m) / kappa & 2379 * ( log( 2.0_wp / surf%z0h(m) ) & 2380 - psi_h( 2.0_wp / surf%ol(m) ) & 2381 + psi_h( surf%z0h(m) / surf%ol(m) ) ) 2382 2383 ENDDO 2384 2385 2386 END SELECT 2387 2388 END SUBROUTINE calc_pt_near_surface 2389 2307 2390 2308 2391 ! -
palm/trunk/SOURCE/surface_mod.f90
r3593 r3597 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Added pt_2m and renamed t_surf_10cm to pt_10cm. Removed some _eb variables as 29 ! they are no longer used. 30 ! 31 ! 3593 2018-12-03 13:51:13Z kanani 28 32 ! Replace degree symbol by 'degrees' 29 33 ! … … 409 413 REAL(wp), DIMENSION(:), ALLOCATABLE :: rad_sw_ref !< incoming shortwave radiation from reflection 410 414 REAL(wp), DIMENSION(:), ALLOCATABLE :: rad_sw_res !< resedual shortwave radiation in surface after last reflection step 411 412 413 415 414 416 REAL(wp), DIMENSION(:), ALLOCATABLE :: c_liq !< liquid water coverage (of vegetated area) … … 422 424 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_eb !< 423 425 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq !< surface flux of latent heat (liquid water portion) 424 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_eb !< surface flux of latent heat (liquid water portion)425 426 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_soil !< surface flux of latent heat (soil portion) 426 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_soil_eb !< surface flux of latent heat (soil portion)427 427 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg !< surface flux of latent heat (vegetation portion) 428 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_eb !< surface flux of latent heat (vegetation portion)429 428 430 429 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_a !< aerodynamic resistance … … 436 435 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_s !< total surface resistance (combination of r_soil and r_canopy) 437 436 REAL(wp), DIMENSION(:), ALLOCATABLE :: r_canopy_min !< minimum canopy (stomatal) resistance 438 437 438 REAL(wp), DIMENSION(:), ALLOCATABLE :: pt_10cm !< near surface air potential temperature at distance 10 cm from the surface (K) 439 REAL(wp), DIMENSION(:), ALLOCATABLE :: pt_2m !< near surface air potential temperature at distance 2 m from the surface (K) 440 439 441 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: alpha_vg !< coef. of Van Genuchten 440 442 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: lambda_w !< hydraulic diffusivity of soil (?) … … 550 552 REAL(wp), DIMENSION(:), ALLOCATABLE :: wshf_eb_av !< average of wshf_eb 551 553 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_eb_av !< average of qsws_eb 552 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_ eb_av !< average of qsws_veg_eb553 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_ eb_av !< average of qsws_liq_eb554 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_av !< average of qsws_veg_eb 555 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_av !< average of qsws_liq_eb 554 556 REAL(wp), DIMENSION(:), ALLOCATABLE :: t_surf_wall_av !< average of wall surface temperature (K) 555 557 REAL(wp), DIMENSION(:), ALLOCATABLE :: t_surf_av !< average of wall surface temperature (K) 556 558 REAL(wp), DIMENSION(:), ALLOCATABLE :: t_surf_window_av !< average of window surface temperature (K) 557 559 REAL(wp), DIMENSION(:), ALLOCATABLE :: t_surf_green_av !< average of green wall surface temperature (K) 558 REAL(wp), DIMENSION(:), ALLOCATABLE :: t_surf_10cm_av !< average of the near surface temperature (K) 559 560 561 REAL(wp), DIMENSION(:), ALLOCATABLE :: pt_10cm_av !< average of theta_10cm (K) 562 560 563 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_wall_av !< Average of t_wall 561 564 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_window_av !< Average of t_window … … 1270 1273 ALLOCATE ( surfaces%shf(1:surfaces%ns) ) 1271 1274 ! 1272 !-- surface temperature1275 !-- Surface temperature 1273 1276 ALLOCATE ( surfaces%pt_surface(1:surfaces%ns) ) 1274 1277 ! … … 1280 1283 ALLOCATE ( surfaces%vpt_surface(1:surfaces%ns) ) 1281 1284 ENDIF 1285 1282 1286 ! 1283 1287 !-- Characteristic scalar and surface flux of scalar -
palm/trunk/SOURCE/time_integration.f90
r3589 r3597 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Removed call to calculation of near air (10 cm) potential temperature (now in 28 ! surface layer fluxes) 29 ! 30 ! 3589 2018-11-30 15:09:51Z suehring 27 31 ! Move the control parameter "salsa" from salsa_mod to control_parameters 28 32 ! (M. Kurppa) … … 578 582 ONLY: usm_boundary_condition, usm_material_heat_model, & 579 583 usm_material_model, & 580 usm_surface_energy_balance, usm_green_heat_model, & 581 usm_temperature_near_surface 584 usm_surface_energy_balance, usm_green_heat_model 582 585 583 586 USE synthetic_turbulence_generator_mod, & … … 1154 1157 CALL lsm_energy_balance( .FALSE., 3 ) 1155 1158 CALL lsm_soil_model( .FALSE., 3, .TRUE. ) 1159 1156 1160 ! 1157 1161 !-- At the end, set boundary conditons for potential temperature … … 1160 1164 CALL lsm_boundary_condition 1161 1165 1166 1162 1167 CALL cpu_log( log_point(54), 'land_surface', 'stop' ) 1163 1168 ENDIF … … 1174 1179 ENDIF 1175 1180 1176 CALL usm_temperature_near_surface1177 1181 ! 1178 1182 !-- At the end, set boundary conditons for potential temperature -
palm/trunk/SOURCE/time_integration_spinup.f90
r3467 r3597 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Removed call to calculation of near air (10 cm) potential temperature (now in 28 ! surface layer fluxes) 29 ! 30 ! 3467 2018-10-30 19:05:21Z suehring 27 31 ! call to material_heat_model now with check if spinup runs (rvtils) 28 32 ! … … 129 133 USE land_surface_model_mod, & 130 134 ONLY: lsm_energy_balance, lsm_soil_model, lsm_swap_timelevel 131 132 135 USE pegrid 133 136 … … 154 157 ONLY: usm_material_heat_model, usm_material_model, & 155 158 usm_surface_energy_balance, usm_swap_timelevel, & 156 usm_green_heat_model , usm_temperature_near_surface159 usm_green_heat_model 157 160 158 161 … … 389 392 CALL lsm_energy_balance( .FALSE., 3 ) 390 393 CALL lsm_soil_model( .FALSE., 3, calc_soil_moisture_during_spinup ) 391 394 392 395 CALL cpu_log( log_point(54), 'land_surface', 'stop' ) 393 396 ENDIF … … 403 406 CALL usm_material_heat_model( .TRUE. ) 404 407 ENDIF 405 IF ( urban_surface ) THEN 406 CALL usm_temperature_near_surface 407 ENDIF 408 408 409 CALL cpu_log( log_point(74), 'urban_surface', 'stop' ) 409 410 ENDIF -
palm/trunk/SOURCE/urban_surface_mod.f90
r3524 r3597 28 28 ! ----------------- 29 29 ! $Id$ 30 ! Fixed calculation method of near surface air potential temperature at 10 cm 31 ! and moved to surface_layer_fluxes. Removed unnecessary _eb strings. 32 ! 33 ! 3524 2018-11-14 13:36:44Z raasch 30 34 ! bugfix concerning allocation of t_surf_wall_v 31 35 ! … … 240 244 ! - Move first call of usm_radiatin from usm_init to init_3d_model 241 245 ! - fixed problem with near surface temperature 242 ! - added near surface temperature t_surf_10cm_h(m), t_surf_10cm_v(l)%t(m)246 ! - added near surface temperature pt_10cm_h(m), pt_10cm_v(l)%t(m) 243 247 ! - does not work with temp profile including stability, ol 244 ! t_surf_10cm = pt1 now248 ! pt_10cm = pt1 now 245 249 ! - merged with 2357 bugfix, error message for nopointer version 246 250 ! - added indoor model coupling with wall heat flux … … 986 990 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: t_window_av !< Average of t_window 987 991 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_eb_av !< average of qsws_eb 988 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_ eb_av !< average of qsws_veg_eb989 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_ eb_av !< average of qsws_liq_eb992 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_veg_av !< average of qsws_veg 993 REAL(wp), DIMENSION(:), ALLOCATABLE :: qsws_liq_av !< average of qsws_liq 990 994 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: swc_av !< Average of swc 991 995 … … 1041 1045 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h !< green surface temperature (K) at horizontal walls 1042 1046 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_p !< progn. green surface temperature (K) at horizontal walls 1043 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h !< near surface temperature (10cm) (K) at horizontal walls1044 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_p !< progn. near surface temperature (10cm) (K) at horizontal walls1045 1047 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v 1046 1048 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_p … … 1049 1051 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v 1050 1052 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_p 1051 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v1052 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_p1053 1053 #else 1054 1054 REAL(wp), DIMENSION(:), POINTER :: t_surf_wall_h … … 1058 1058 REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h 1059 1059 REAL(wp), DIMENSION(:), POINTER :: t_surf_green_h_p 1060 REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h1061 REAL(wp), DIMENSION(:), POINTER :: t_surf_10cm_h_p1062 1060 1063 1061 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_wall_h_1 … … 1067 1065 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_1 1068 1066 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_h_2 1069 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_11070 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_h_21071 1067 1072 1068 TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_wall_v … … 1076 1072 TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v 1077 1073 TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_green_v_p 1078 TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v1079 TYPE(t_surf_vertical), DIMENSION(:), POINTER :: t_surf_10cm_v_p1080 1074 1081 1075 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_wall_v_1 … … 1085 1079 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_1 1086 1080 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_green_v_2 1087 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_11088 TYPE(t_surf_vertical), DIMENSION(0:3), TARGET :: t_surf_10cm_v_21089 1081 1090 1082 #endif … … 1092 1084 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_window_av !< average of window surface temperature (K) 1093 1085 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_green_av !< average of green wall surface temperature (K) 1094 REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET :: t_surf_10cm_av !< average of whole wall surface temperature (K)1095 1086 1096 1087 !-- Temporal tendencies for time stepping … … 1218 1209 MODULE PROCEDURE usm_parin 1219 1210 END INTERFACE usm_parin 1220 1221 INTERFACE usm_temperature_near_surface1222 MODULE PROCEDURE usm_temperature_near_surface1223 END INTERFACE usm_temperature_near_surface1224 1211 1225 1212 INTERFACE usm_rrd_local … … 1262 1249 !-- Public parameters, constants and initial values 1263 1250 PUBLIC usm_anthropogenic_heat, usm_material_model, usm_wall_mod, & 1264 usm_green_heat_model, usm_temperature_near_surface,building_pars, &1265 nzt_wall, t_ surf_10cm_h, t_surf_10cm_v, t_wall_h, t_wall_v, &1251 usm_green_heat_model, building_pars, & 1252 nzt_wall, t_wall_h, t_wall_v, & 1266 1253 t_window_h, t_window_v, building_type 1267 1254 … … 1363 1350 ALLOCATE ( surf_usm_h%green_type_roof(1:surf_usm_h%ns) ) 1364 1351 ALLOCATE ( surf_usm_h%r_s(1:surf_usm_h%ns) ) 1352 1365 1353 ! 1366 1354 !-- For vertical surfaces. … … 1377 1365 ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns) ) 1378 1366 ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns) ) 1379 ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) 1380 1381 ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns) ) 1367 ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns) ) 1368 ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns) ) 1382 1369 ENDDO 1383 1370 … … 1421 1408 ALLOCATE ( surf_usm_h%g_d(1:surf_usm_h%ns) ) 1422 1409 ALLOCATE ( surf_usm_h%c_liq(1:surf_usm_h%ns) ) 1423 ALLOCATE ( surf_usm_h%qsws_liq _eb(1:surf_usm_h%ns) )1424 ALLOCATE ( surf_usm_h%qsws_veg _eb(1:surf_usm_h%ns) )1410 ALLOCATE ( surf_usm_h%qsws_liq(1:surf_usm_h%ns) ) 1411 ALLOCATE ( surf_usm_h%qsws_veg(1:surf_usm_h%ns) ) 1425 1412 ALLOCATE ( surf_usm_h%r_canopy(1:surf_usm_h%ns) ) 1426 1413 ALLOCATE ( surf_usm_h%r_canopy_min(1:surf_usm_h%ns) ) 1427 ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns) ) 1414 ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns) ) 1415 ALLOCATE ( surf_usm_h%pt_10cm(1:surf_usm_h%ns) ) 1416 ALLOCATE ( surf_usm_h%pt_2m(1:surf_usm_h%ns) ) 1428 1417 1429 1418 ! … … 1432 1421 ALLOCATE ( surf_usm_v(l)%g_d(1:surf_usm_v(l)%ns) ) 1433 1422 ALLOCATE ( surf_usm_v(l)%c_liq(1:surf_usm_v(l)%ns) ) 1434 ALLOCATE ( surf_usm_v(l)%qsws_liq _eb(1:surf_usm_v(l)%ns) )1435 ALLOCATE ( surf_usm_v(l)%qsws_veg _eb(1:surf_usm_v(l)%ns) )1423 ALLOCATE ( surf_usm_v(l)%qsws_liq(1:surf_usm_v(l)%ns) ) 1424 ALLOCATE ( surf_usm_v(l)%qsws_veg(1:surf_usm_v(l)%ns) ) 1436 1425 ALLOCATE ( surf_usm_v(l)%qsws_eb(1:surf_usm_v(l)%ns) ) 1437 1426 ALLOCATE ( surf_usm_v(l)%r_canopy(1:surf_usm_v(l)%ns) ) 1438 1427 ALLOCATE ( surf_usm_v(l)%r_canopy_min(1:surf_usm_v(l)%ns) ) 1428 ALLOCATE ( surf_usm_v(l)%pt_10cm(1:surf_usm_v(l)%ns) ) 1439 1429 ENDDO 1440 1430 … … 1504 1494 IF ( .NOT. ALLOCATED( t_green_h_p ) ) & 1505 1495 ALLOCATE ( t_green_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 1506 IF ( .NOT. ALLOCATED( t_surf_10cm_h ) ) &1507 ALLOCATE ( t_surf_10cm_h(1:surf_usm_h%ns) )1508 IF ( .NOT. ALLOCATED( t_surf_10cm_h_p ) ) &1509 ALLOCATE ( t_surf_10cm_h_p(1:surf_usm_h%ns) )1510 1496 IF ( .NOT. ALLOCATED( swc_h ) ) & 1511 1497 ALLOCATE ( swc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) … … 1560 1546 IF ( .NOT. ALLOCATED( t_green_h_2 ) ) & 1561 1547 ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 1562 IF ( .NOT. ALLOCATED( t_surf_10cm_h_1 ) ) &1563 ALLOCATE ( t_surf_10cm_h_1(1:surf_usm_h%ns) )1564 IF ( .NOT. ALLOCATED( t_surf_10cm_h_2 ) ) &1565 ALLOCATE ( t_surf_10cm_h_2(1:surf_usm_h%ns) )1566 1548 IF ( .NOT. ALLOCATED( swc_h_1 ) ) & 1567 1549 ALLOCATE ( swc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) … … 1592 1574 t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2 1593 1575 t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2 1594 t_surf_10cm_h => t_surf_10cm_h_1; t_surf_10cm_h_p => t_surf_10cm_h_21595 1576 m_liq_usm_h => m_liq_usm_h_1; m_liq_usm_h_p => m_liq_usm_h_2 1596 1577 swc_h => swc_h_1; swc_h_p => swc_h_2 … … 1630 1611 IF ( .NOT. ALLOCATED( t_surf_green_v_p(l)%t ) ) & 1631 1612 ALLOCATE ( t_surf_green_v_p(l)%t(1:surf_usm_v(l)%ns) ) 1632 IF ( .NOT. ALLOCATED( t_surf_10cm_v(l)%t ) ) &1633 ALLOCATE ( t_surf_10cm_v(l)%t(1:surf_usm_v(l)%ns) )1634 IF ( .NOT. ALLOCATED( t_surf_10cm_v_p(l)%t ) ) &1635 ALLOCATE ( t_surf_10cm_v_p(l)%t(1:surf_usm_v(l)%ns) )1636 1613 IF ( .NOT. ALLOCATED( m_liq_usm_v(l)%var_usm_1d ) ) & 1637 1614 ALLOCATE ( m_liq_usm_v(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) … … 1670 1647 IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) ) & 1671 1648 ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) 1672 IF ( .NOT. ALLOCATED( t_surf_10cm_v_1(l)%t ) ) &1673 ALLOCATE ( t_surf_10cm_v_1(l)%t(1:surf_usm_v(l)%ns) )1674 IF ( .NOT. ALLOCATED( t_surf_10cm_v_2(l)%t ) ) &1675 ALLOCATE ( t_surf_10cm_v_2(l)%t(1:surf_usm_v(l)%ns) )1676 1649 IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) ) & 1677 1650 ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) ) … … 1691 1664 t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2 1692 1665 t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2 1693 t_surf_10cm_v => t_surf_10cm_v_1; t_surf_10cm_v_p => t_surf_10cm_v_21694 1666 m_liq_usm_v => m_liq_usm_v_1; m_liq_usm_v_p => m_liq_usm_v_2 1695 1667 swc_v => swc_v_1; swc_v_p => swc_v_2 … … 2032 2004 !-- array of latent heat flux from vegetation surfaces 2033 2005 !-- land surfaces 2034 IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_veg_ eb_av) ) THEN2035 ALLOCATE( surf_usm_h%qsws_veg_ eb_av(1:surf_usm_h%ns) )2036 surf_usm_h%qsws_veg_ eb_av = 0.0_wp2006 IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_veg_av) ) THEN 2007 ALLOCATE( surf_usm_h%qsws_veg_av(1:surf_usm_h%ns) ) 2008 surf_usm_h%qsws_veg_av = 0.0_wp 2037 2009 ELSE 2038 IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_veg_ eb_av) ) THEN2039 ALLOCATE( surf_usm_v(l)%qsws_veg_ eb_av(1:surf_usm_v(l)%ns) )2040 surf_usm_v(l)%qsws_veg_ eb_av = 0.0_wp2010 IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_veg_av) ) THEN 2011 ALLOCATE( surf_usm_v(l)%qsws_veg_av(1:surf_usm_v(l)%ns) ) 2012 surf_usm_v(l)%qsws_veg_av = 0.0_wp 2041 2013 ENDIF 2042 2014 ENDIF … … 2045 2017 !-- array of latent heat flux from surfaces with liquid 2046 2018 !-- land surfaces 2047 IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_liq_ eb_av) ) THEN2048 ALLOCATE( surf_usm_h%qsws_liq_ eb_av(1:surf_usm_h%ns) )2049 surf_usm_h%qsws_liq_ eb_av = 0.0_wp2019 IF ( l == -1 .AND. .NOT. ALLOCATED(surf_usm_h%qsws_liq_av) ) THEN 2020 ALLOCATE( surf_usm_h%qsws_liq_av(1:surf_usm_h%ns) ) 2021 surf_usm_h%qsws_liq_av = 0.0_wp 2050 2022 ELSE 2051 IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_liq_ eb_av) ) THEN2052 ALLOCATE( surf_usm_v(l)%qsws_liq_ eb_av(1:surf_usm_v(l)%ns) )2053 surf_usm_v(l)%qsws_liq_ eb_av = 0.0_wp2023 IF ( .NOT. ALLOCATED(surf_usm_v(l)%qsws_liq_av) ) THEN 2024 ALLOCATE( surf_usm_v(l)%qsws_liq_av(1:surf_usm_v(l)%ns) ) 2025 surf_usm_v(l)%qsws_liq_av = 0.0_wp 2054 2026 ENDIF 2055 2027 ENDIF … … 2171 2143 ENDIF 2172 2144 2173 CASE ( 'usm_t _surf_10cm' )2174 !-- near surface temperature for whole surfaces2145 CASE ( 'usm_theta_10cm' ) 2146 !-- near surface (10cm) temperature for whole surfaces 2175 2147 IF ( l == -1 ) THEN 2176 IF ( .NOT. ALLOCATED(surf_usm_h% t_surf_10cm_av) ) THEN2177 ALLOCATE( surf_usm_h% t_surf_10cm_av(1:surf_usm_h%ns) )2178 surf_usm_h% t_surf_10cm_av = 0.0_wp2148 IF ( .NOT. ALLOCATED(surf_usm_h%pt_10cm_av) ) THEN 2149 ALLOCATE( surf_usm_h%pt_10cm_av(1:surf_usm_h%ns) ) 2150 surf_usm_h%pt_10cm_av = 0.0_wp 2179 2151 ENDIF 2180 2152 ELSE 2181 IF ( .NOT. ALLOCATED(surf_usm_v(l)% t_surf_10cm_av) ) THEN2182 ALLOCATE( surf_usm_v(l)% t_surf_10cm_av(1:surf_usm_v(l)%ns) )2183 surf_usm_v(l)% t_surf_10cm_av = 0.0_wp2153 IF ( .NOT. ALLOCATED(surf_usm_v(l)%pt_10cm_av) ) THEN 2154 ALLOCATE( surf_usm_v(l)%pt_10cm_av(1:surf_usm_v(l)%ns) ) 2155 surf_usm_v(l)%pt_10cm_av = 0.0_wp 2184 2156 ENDIF 2185 2157 ENDIF 2186 2158 2187 2159 CASE ( 'usm_t_wall' ) 2188 2160 !-- wall temperature for iwl layer of walls and land … … 2423 2395 IF ( l == -1 ) THEN 2424 2396 DO m = 1, surf_usm_h%ns 2425 surf_usm_h%qsws_veg_ eb_av(m) = &2426 surf_usm_h%qsws_veg_ eb_av(m) + &2427 surf_usm_h%qsws_veg _eb(m)2397 surf_usm_h%qsws_veg_av(m) = & 2398 surf_usm_h%qsws_veg_av(m) + & 2399 surf_usm_h%qsws_veg(m) 2428 2400 ENDDO 2429 2401 ELSE 2430 2402 DO m = 1, surf_usm_v(l)%ns 2431 surf_usm_v(l)%qsws_veg_ eb_av(m) = &2432 surf_usm_v(l)%qsws_veg_ eb_av(m) + &2433 surf_usm_v(l)%qsws_veg _eb(m)2403 surf_usm_v(l)%qsws_veg_av(m) = & 2404 surf_usm_v(l)%qsws_veg_av(m) + & 2405 surf_usm_v(l)%qsws_veg(m) 2434 2406 ENDDO 2435 2407 ENDIF … … 2439 2411 IF ( l == -1 ) THEN 2440 2412 DO m = 1, surf_usm_h%ns 2441 surf_usm_h%qsws_liq_ eb_av(m) = &2442 surf_usm_h%qsws_liq_ eb_av(m) + &2443 surf_usm_h%qsws_liq _eb(m)2413 surf_usm_h%qsws_liq_av(m) = & 2414 surf_usm_h%qsws_liq_av(m) + & 2415 surf_usm_h%qsws_liq(m) 2444 2416 ENDDO 2445 2417 ELSE 2446 2418 DO m = 1, surf_usm_v(l)%ns 2447 surf_usm_v(l)%qsws_liq_ eb_av(m) = &2448 surf_usm_v(l)%qsws_liq_ eb_av(m) + &2449 surf_usm_v(l)%qsws_liq _eb(m)2419 surf_usm_v(l)%qsws_liq_av(m) = & 2420 surf_usm_v(l)%qsws_liq_av(m) + & 2421 surf_usm_v(l)%qsws_liq(m) 2450 2422 ENDDO 2451 2423 ENDIF … … 2579 2551 ENDIF 2580 2552 2581 CASE ( 'usm_t _surf_10cm' )2553 CASE ( 'usm_theta_10cm' ) 2582 2554 !-- near surface temperature for whole surfaces 2583 2555 IF ( l == -1 ) THEN 2584 2556 DO m = 1, surf_usm_h%ns 2585 surf_usm_h% t_surf_10cm_av(m) = &2586 surf_usm_h% t_surf_10cm_av(m) + &2587 t_surf_10cm_h(m)2557 surf_usm_h%pt_10cm_av(m) = & 2558 surf_usm_h%pt_10cm_av(m) + & 2559 surf_usm_h%pt_10cm(m) 2588 2560 ENDDO 2589 2561 ELSE 2590 2562 DO m = 1, surf_usm_v(l)%ns 2591 surf_usm_v(l)% t_surf_10cm_av(m) = &2592 surf_usm_v(l)% t_surf_10cm_av(m) + &2593 t_surf_10cm_v(l)%t(m)2563 surf_usm_v(l)%pt_10cm_av(m) = & 2564 surf_usm_v(l)%pt_10cm_av(m) + & 2565 surf_usm_v(l)%pt_10cm(m) 2594 2566 ENDDO 2595 2567 ENDIF 2596 2597 2568 2598 2569 CASE ( 'usm_t_wall' ) … … 2840 2811 IF ( l == -1 ) THEN 2841 2812 DO m = 1, surf_usm_h%ns 2842 surf_usm_h%qsws_veg_ eb_av(m) = &2843 surf_usm_h%qsws_veg_ eb_av(m) / &2813 surf_usm_h%qsws_veg_av(m) = & 2814 surf_usm_h%qsws_veg_av(m) / & 2844 2815 REAL( average_count_3d, kind=wp ) 2845 2816 ENDDO 2846 2817 ELSE 2847 2818 DO m = 1, surf_usm_v(l)%ns 2848 surf_usm_v(l)%qsws_veg_ eb_av(m) = &2849 surf_usm_v(l)%qsws_veg_ eb_av(m) / &2819 surf_usm_v(l)%qsws_veg_av(m) = & 2820 surf_usm_v(l)%qsws_veg_av(m) / & 2850 2821 REAL( average_count_3d, kind=wp ) 2851 2822 ENDDO … … 2856 2827 IF ( l == -1 ) THEN 2857 2828 DO m = 1, surf_usm_h%ns 2858 surf_usm_h%qsws_liq_ eb_av(m) = &2859 surf_usm_h%qsws_liq_ eb_av(m) / &2829 surf_usm_h%qsws_liq_av(m) = & 2830 surf_usm_h%qsws_liq_av(m) / & 2860 2831 REAL( average_count_3d, kind=wp ) 2861 2832 ENDDO 2862 2833 ELSE 2863 2834 DO m = 1, surf_usm_v(l)%ns 2864 surf_usm_v(l)%qsws_liq_ eb_av(m) = &2865 surf_usm_v(l)%qsws_liq_ eb_av(m) / &2835 surf_usm_v(l)%qsws_liq_av(m) = & 2836 surf_usm_v(l)%qsws_liq_av(m) / & 2866 2837 REAL( average_count_3d, kind=wp ) 2867 2838 ENDDO … … 2996 2967 ENDIF 2997 2968 2998 CASE ( 'usm_t _surf_10cm' )2969 CASE ( 'usm_theta_10cm' ) 2999 2970 !-- near surface temperature for whole surfaces 3000 2971 IF ( l == -1 ) THEN 3001 2972 DO m = 1, surf_usm_h%ns 3002 surf_usm_h% t_surf_10cm_av(m) = &3003 surf_usm_h% t_surf_10cm_av(m) / &2973 surf_usm_h%pt_10cm_av(m) = & 2974 surf_usm_h%pt_10cm_av(m) / & 3004 2975 REAL( average_count_3d, kind=wp ) 3005 2976 ENDDO 3006 2977 ELSE 3007 2978 DO m = 1, surf_usm_v(l)%ns 3008 surf_usm_v(l)% t_surf_10cm_av(m) = &3009 surf_usm_v(l)% t_surf_10cm_av(m) / &2979 surf_usm_v(l)%pt_10cm_av(m) = & 2980 surf_usm_v(l)%pt_10cm_av(m) / & 3010 2981 REAL( average_count_3d, kind=wp ) 3011 2982 ENDDO 3012 2983 ENDIF 2984 3013 2985 3014 2986 CASE ( 'usm_t_wall' ) … … 3173 3145 'usm_t_surf_green ', & 3174 3146 'usm_t_green ', & 3175 'usm_t _surf_10cm', &3147 'usm_theta_10cm ', & 3176 3148 'usm_skyvf ', & 3177 3149 'usm_skyvft '/) … … 3260 3232 var(1:16) == 'usm_t_surf_green' .OR. & 3261 3233 var(1:11) == 'usm_t_green' .OR. var(1:7) == 'usm_swc' .OR. & 3262 var(1:1 5) == 'usm_t_surf_10cm' ) THEN3234 var(1:14) == 'usm_theta_10cm' ) THEN 3263 3235 unit = 'K' 3264 3236 ELSE IF ( var == 'usm_rad_pc_inlw' .OR. var == 'usm_rad_pc_insw' .OR. & … … 3935 3907 j = surf_usm_h%j(m) 3936 3908 k = surf_usm_h%k(m) 3937 temp_pf(k,j,i) = surf_usm_h%qsws_veg _eb(m)3909 temp_pf(k,j,i) = surf_usm_h%qsws_veg(m) 3938 3910 ENDDO 3939 3911 ELSE … … 3943 3915 j = surf_usm_v(l)%j(m) 3944 3916 k = surf_usm_v(l)%k(m) 3945 temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg _eb(m)3917 temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg(m) 3946 3918 ENDDO 3947 3919 ENDIF … … 3952 3924 j = surf_usm_h%j(m) 3953 3925 k = surf_usm_h%k(m) 3954 temp_pf(k,j,i) = surf_usm_h%qsws_veg_ eb_av(m)3926 temp_pf(k,j,i) = surf_usm_h%qsws_veg_av(m) 3955 3927 ENDDO 3956 3928 ELSE … … 3960 3932 j = surf_usm_v(l)%j(m) 3961 3933 k = surf_usm_v(l)%k(m) 3962 temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_ eb_av(m)3934 temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_av(m) 3963 3935 ENDDO 3964 3936 ENDIF … … 3973 3945 j = surf_usm_h%j(m) 3974 3946 k = surf_usm_h%k(m) 3975 temp_pf(k,j,i) = surf_usm_h%qsws_liq _eb(m)3947 temp_pf(k,j,i) = surf_usm_h%qsws_liq(m) 3976 3948 ENDDO 3977 3949 ELSE … … 3981 3953 j = surf_usm_v(l)%j(m) 3982 3954 k = surf_usm_v(l)%k(m) 3983 temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq _eb(m)3955 temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq(m) 3984 3956 ENDDO 3985 3957 ENDIF … … 3990 3962 j = surf_usm_h%j(m) 3991 3963 k = surf_usm_h%k(m) 3992 temp_pf(k,j,i) = surf_usm_h%qsws_liq_ eb_av(m)3964 temp_pf(k,j,i) = surf_usm_h%qsws_liq_av(m) 3993 3965 ENDDO 3994 3966 ELSE … … 3998 3970 j = surf_usm_v(l)%j(m) 3999 3971 k = surf_usm_v(l)%k(m) 4000 temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_ eb_av(m)3972 temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_av(m) 4001 3973 ENDDO 4002 3974 ENDIF … … 4321 4293 ENDIF 4322 4294 4323 CASE ( 'usm_t _surf_10cm' )4295 CASE ( 'usm_theta_10cm' ) 4324 4296 !-- near surface temperature for whole surfaces 4325 4297 … … 4330 4302 j = surf_usm_h%j(m) 4331 4303 k = surf_usm_h%k(m) 4332 temp_pf(k,j,i) = t_surf_10cm_h(m)4304 temp_pf(k,j,i) = surf_usm_h%pt_10cm(m) 4333 4305 ENDDO 4334 4306 ELSE … … 4338 4310 j = surf_usm_v(l)%j(m) 4339 4311 k = surf_usm_v(l)%k(m) 4340 temp_pf(k,j,i) = t_surf_10cm_v(l)%t(m)4312 temp_pf(k,j,i) = surf_usm_v(l)%pt_10cm(m) 4341 4313 ENDDO 4342 4314 ENDIF 4343 4315 4316 4344 4317 ELSE 4345 4318 IF ( idsint == iup_u ) THEN … … 4348 4321 j = surf_usm_h%j(m) 4349 4322 k = surf_usm_h%k(m) 4350 temp_pf(k,j,i) = surf_usm_h% t_surf_10cm_av(m)4323 temp_pf(k,j,i) = surf_usm_h%pt_10cm_av(m) 4351 4324 ENDDO 4352 4325 ELSE … … 4356 4329 j = surf_usm_v(l)%j(m) 4357 4330 k = surf_usm_v(l)%k(m) 4358 temp_pf(k,j,i) = surf_usm_v(l)%t_surf_10cm_av(m) 4359 ENDDO 4360 4361 ENDIF 4362 4331 temp_pf(k,j,i) = surf_usm_v(l)%pt_10cm_av(m) 4332 ENDDO 4333 4334 ENDIF 4363 4335 ENDIF 4364 4365 4336 4366 4337 CASE ( 'usm_t_wall' ) 4367 4338 !-- wall temperature for iwl layer of walls and land … … 4573 4544 var(1:17) == 'usm_t_surf_window' .OR. var(1:12) == 'usm_t_window' .OR. & 4574 4545 var(1:16) == 'usm_t_surf_green' .OR. var(1:11) == 'usm_t_green' .OR. & 4575 var(1:15) == 'usm_t _surf_10cm' .OR.&4546 var(1:15) == 'usm_theta_10cm' .OR. & 4576 4547 var(1:9) == 'usm_surfz' .OR. var(1:7) == 'usm_svf' .OR. & 4577 4548 var(1:7) == 'usm_dif' .OR. var(1:11) == 'usm_surfcat' .OR. & … … 6156 6127 t_surf_green_h_p = t_surf_green_h 6157 6128 t_surf_green_v_p = t_surf_green_v 6158 t_surf_10cm_h_p = t_surf_10cm_h6159 t_surf_10cm_v_p = t_surf_10cm_v6160 6129 6161 6130 t_wall_h_p = t_wall_h … … 6180 6149 surf_usm_h%c_liq = 0.0_wp 6181 6150 6182 surf_usm_h%qsws_liq _eb= 0.0_wp6183 surf_usm_h%qsws_veg _eb= 0.0_wp6151 surf_usm_h%qsws_liq = 0.0_wp 6152 surf_usm_h%qsws_veg = 0.0_wp 6184 6153 6185 6154 ! … … 6189 6158 surf_usm_v(l)%c_liq = 0.0_wp 6190 6159 6191 surf_usm_v(l)%qsws_liq _eb= 0.0_wp6192 surf_usm_v(l)%qsws_veg _eb= 0.0_wp6160 surf_usm_v(l)%qsws_liq = 0.0_wp 6161 surf_usm_v(l)%qsws_veg = 0.0_wp 6193 6162 ENDDO 6194 6163 … … 6779 6748 ENDIF 6780 6749 6781 !-- The root extraction (= root_extr * qsws_veg _eb/ (rho_l6750 !-- The root extraction (= root_extr * qsws_veg / (rho_l 6782 6751 !-- * l_v)) ensures the mass conservation for water. The 6783 6752 !-- transpiration of plants equals the cumulative withdrawals by … … 6818 6787 swc_h(nzb_wall+1,m) - swc_h(nzb_wall,m) ) & 6819 6788 * surf_usm_h%ddz_green(nzb_wall+1,m) - surf_usm_h%gamma_w_green(nzb_wall,m) - ( & 6820 root_extr_green(nzb_wall) * surf_usm_h%qsws_veg _eb(m) &6821 ! + surf_usm_h%qsws_soil_ eb_green(m)6789 root_extr_green(nzb_wall) * surf_usm_h%qsws_veg(m) & 6790 ! + surf_usm_h%qsws_soil_green(m) 6822 6791 ) * drho_l_lv ) & 6823 6792 * surf_usm_h%ddz_green_stag(nzb_wall,m) … … 6830 6799 swc_h(kw-1,m)) * surf_usm_h%ddz_green(kw,m) & 6831 6800 + surf_usm_h%gamma_w_green(kw-1,m) - (root_extr_green(kw) & 6832 * surf_usm_h%qsws_veg _eb(m) * drho_l_lv) &6801 * surf_usm_h%qsws_veg(m) * drho_l_lv) & 6833 6802 ) * surf_usm_h%ddz_green_stag(kw,m) 6834 6803 … … 6841 6810 + surf_usm_h%gamma_w_green(nzt_wall-1,m) - ( & 6842 6811 root_extr_green(nzt_wall) & 6843 * surf_usm_h%qsws_veg _eb(m) * drho_l_lv ) &6812 * surf_usm_h%qsws_veg(m) * drho_l_lv ) & 6844 6813 ) * surf_usm_h%ddz_green_stag(nzt_wall,m) 6845 6814 … … 7053 7022 END SUBROUTINE usm_parin 7054 7023 7055 !------------------------------------------------------------------------------!7056 ! Description:7057 ! ------------7058 !> Calculates temperature near surface (10 cm) for indoor model7059 !------------------------------------------------------------------------------!7060 SUBROUTINE usm_temperature_near_surface7061 7062 IMPLICIT NONE7063 7064 INTEGER(iwp) :: i, j, k, l, m !< running indices7065 7066 !7067 !-- First, treat horizontal surface elements7068 DO m = 1, surf_usm_h%ns7069 7070 !-- Get indices of respective grid point7071 i = surf_usm_h%i(m)7072 j = surf_usm_h%j(m)7073 k = surf_usm_h%k(m)7074 7075 t_surf_10cm_h(m) = surf_usm_h%pt_surface(m) + surf_usm_h%ts(m) / kappa &7076 * ( log( 0.1_wp / surf_usm_h%z0h(m) ) &7077 - psi_h( 0.1_wp / surf_usm_h%ol(m) ) &7078 + psi_h( surf_usm_h%z0h(m) / surf_usm_h%ol(m) ) )7079 7080 ENDDO7081 !7082 !-- Now, treat vertical surface elements7083 DO l = 0, 37084 DO m = 1, surf_usm_v(l)%ns7085 7086 !-- Get indices of respective grid point7087 i = surf_usm_v(l)%i(m)7088 j = surf_usm_v(l)%j(m)7089 k = surf_usm_v(l)%k(m)7090 7091 t_surf_10cm_v(l)%t(m) =surf_usm_v(l)%pt_surface(m) + surf_usm_v(l)%ts(m) / kappa &7092 * ( log( 0.1_wp / surf_usm_v(l)%z0h(m) ) &7093 - psi_h( 0.1_wp / surf_usm_v(l)%ol(m) ) &7094 + psi_h( surf_usm_v(l)%z0h(m) / surf_usm_v(l)%ol(m) ) )7095 7096 ENDDO7097 7098 ENDDO7099 7100 7101 END SUBROUTINE usm_temperature_near_surface7102 7103 7104 7024 7105 7025 !------------------------------------------------------------------------------! … … 9442 9362 surf_usm_h%qsws(m) = surf_usm_h%qsws_eb(m) / rho_lv 9443 9363 9444 surf_usm_h%qsws_veg _eb(m) = - f_qsws_veg * ( qv1 - q_s &9364 surf_usm_h%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & 9445 9365 + dq_s_dt * t_surf_green_h(m) - dq_s_dt & 9446 9366 * t_surf_green_h_p(m) ) 9447 9367 9448 surf_usm_h%qsws_liq _eb(m) = - f_qsws_liq * ( qv1 - q_s &9368 surf_usm_h%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & 9449 9369 + dq_s_dt * t_surf_green_h(m) - dq_s_dt & 9450 9370 * t_surf_green_h_p(m) ) … … 9478 9398 !-- as runoff as qsws_soil is then not used in the soil model 9479 9399 IF ( m_liq_usm_h%var_usm_1d(m) /= m_liq_max ) THEN 9480 surf_usm_h%qsws_liq _eb(m) = surf_usm_h%qsws_liq_eb(m) &9400 surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) & 9481 9401 + surf_usm_h%frac(ind_pav_green,m) * prr(k+k_off,j+j_off,i+i_off)& 9482 9402 * hyrho(k+k_off) & … … 9497 9417 ! surf_usm_h%qsws_soil(m) = surf_usm_h%qsws_soil(m) + surf_usm_h%qsws_liq(m) 9498 9418 9499 surf_usm_h%qsws_liq _eb(m) = 0.0_wp9419 surf_usm_h%qsws_liq(m) = 0.0_wp 9500 9420 ENDIF 9501 9421 … … 9504 9424 !-- let the water enter the liquid water reservoir as dew on the 9505 9425 !-- plant 9506 IF ( surf_usm_h%qsws_veg _eb(m) < 0.0_wp ) THEN9507 surf_usm_h%qsws_liq _eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m)9508 surf_usm_h%qsws_veg _eb(m) = 0.0_wp9426 IF ( surf_usm_h%qsws_veg(m) < 0.0_wp ) THEN 9427 surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) + surf_usm_h%qsws_veg(m) 9428 surf_usm_h%qsws_veg(m) = 0.0_wp 9509 9429 ENDIF 9510 9430 ENDIF … … 9512 9432 surf_usm_h%qsws(m) = surf_usm_h%qsws(m) / l_v 9513 9433 9514 tend = - surf_usm_h%qsws_liq _eb(m) * drho_l_lv9434 tend = - surf_usm_h%qsws_liq(m) * drho_l_lv 9515 9435 m_liq_usm_h_p%var_usm_1d(m) = m_liq_usm_h%var_usm_1d(m) + dt_3d * & 9516 9436 ( tsc(2) * tend + & … … 9895 9815 surf_usm_v(l)%qsws(m) = surf_usm_v(l)%qsws_eb(m) / rho_lv 9896 9816 9897 surf_usm_v(l)%qsws_veg _eb(m) = - f_qsws_veg * ( qv1 - q_s &9817 surf_usm_v(l)%qsws_veg(m) = - f_qsws_veg * ( qv1 - q_s & 9898 9818 + dq_s_dt * t_surf_green_v(l)%t(m) - dq_s_dt & 9899 9819 * t_surf_green_v_p(l)%t(m) ) 9900 9820 9901 ! surf_usm_h%qsws_liq _eb(m) = - f_qsws_liq * ( qv1 - q_s &9821 ! surf_usm_h%qsws_liq(m) = - f_qsws_liq * ( qv1 - q_s & 9902 9822 ! + dq_s_dt * t_surf_green_h(m) - dq_s_dt & 9903 9823 ! * t_surf_green_h_p(m) ) … … 9928 9848 !-- let the water enter the liquid water reservoir as dew on the 9929 9849 !-- plant 9930 IF ( surf_usm_v(l)%qsws_veg _eb(m) < 0.0_wp ) THEN9931 ! surf_usm_h%qsws_liq _eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m)9932 surf_usm_v(l)%qsws_veg _eb(m) = 0.0_wp9850 IF ( surf_usm_v(l)%qsws_veg(m) < 0.0_wp ) THEN 9851 ! surf_usm_h%qsws_liq(m) = surf_usm_h%qsws_liq(m) + surf_usm_h%qsws_veg(m) 9852 surf_usm_v(l)%qsws_veg(m) = 0.0_wp 9933 9853 ENDIF 9934 9854 ENDIF … … 10256 10176 CALL wrd_write_string( 't_green_v(' // dum // ')' ) 10257 10177 WRITE ( 14 ) t_green_v(l)%t 10258 10178 ! 10259 10179 ENDDO 10260 10180 … … 10262 10182 END SUBROUTINE usm_wrd_local 10263 10183 10264 ! 10265 !-- Integrated stability function for heat and moisture 10266 FUNCTION psi_h( zeta ) 10267 10268 USE kinds 10269 10270 IMPLICIT NONE 10271 10272 REAL(wp) :: psi_h !< Integrated similarity function result 10273 REAL(wp) :: zeta !< Stability parameter z/L 10274 REAL(wp) :: x !< dummy variable 10275 10276 REAL(wp), PARAMETER :: a = 1.0_wp !< constant 10277 REAL(wp), PARAMETER :: b = 0.66666666666_wp !< constant 10278 REAL(wp), PARAMETER :: c = 5.0_wp !< constant 10279 REAL(wp), PARAMETER :: d = 0.35_wp !< constant 10280 REAL(wp), PARAMETER :: c_d_d = c / d !< constant 10281 REAL(wp), PARAMETER :: bc_d_d = b * c / d !< constant 10282 10283 10284 IF ( zeta < 0.0_wp ) THEN 10285 x = SQRT( 1.0_wp - 16.0_wp * zeta ) 10286 psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp ) 10287 ELSE 10288 psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp & 10289 + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d & 10290 + 1.0_wp 10291 ! 10292 !-- Old version for stable conditions (only valid for z/L < 0.5) 10293 !-- psi_h = - 5.0_wp * zeta 10294 ENDIF 10295 10296 END FUNCTION psi_h 10297 10184 10298 10185 END MODULE urban_surface_mod
Note: See TracChangeset
for help on using the changeset viewer.