Changeset 2968 for palm/trunk
- Timestamp:
- Apr 13, 2018 11:52:24 AM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/flow_statistics.f90
r2817 r2968 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix in output of timeseries quantities in case of elevated model surfaces. 28 ! 29 ! 2817 2018-02-19 16:32:21Z knoop 27 30 ! Preliminary gust module interface implemented 28 31 ! … … 292 295 USE indices, & 293 296 ONLY: ngp_2dh, ngp_2dh_s_inner, ngp_3d, ngp_3d_inner, ngp_sums, & 294 ngp_sums_ls, nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0 297 ngp_sums_ls, nxl, nxr, nyn, nys, nzb, nzt, topo_min_level, & 298 wall_flags_0 295 299 296 300 USE kinds … … 2102 2106 2103 2107 ! 2104 !-- Collect the time series quantities 2105 ts_value(1,sr) = hom(nzb+4,1,pr_palm,sr) ! E 2106 ts_value(2,sr) = hom(nzb+5,1,pr_palm,sr) ! E* 2108 !-- Collect the time series quantities. Please note, timeseries quantities 2109 !-- which are collected from horizontally averaged profiles, e.g. wpt 2110 !-- or pt(zp), are treated specially. In case of elevated model surfaces, 2111 !-- index nzb+1 might be within topography and data will be zero. Therefore, 2112 !-- take value for the first atmosphere index, which is topo_min_level+1. 2113 ts_value(1,sr) = hom(nzb+4,1,pr_palm,sr) ! E 2114 ts_value(2,sr) = hom(nzb+5,1,pr_palm,sr) ! E* 2107 2115 ts_value(3,sr) = dt_3d 2108 ts_value(4,sr) = hom(nzb,1,pr_palm,sr) ! u*2109 ts_value(5,sr) = hom(nzb+3,1,pr_palm,sr) ! th*2116 ts_value(4,sr) = hom(nzb,1,pr_palm,sr) ! u* 2117 ts_value(5,sr) = hom(nzb+3,1,pr_palm,sr) ! th* 2110 2118 ts_value(6,sr) = u_max 2111 2119 ts_value(7,sr) = v_max 2112 2120 ts_value(8,sr) = w_max 2113 ts_value(9,sr) = hom(nzb+10,1,pr_palm,sr) ! new divergence2114 ts_value(10,sr) = hom(nzb+9,1,pr_palm,sr) ! old Divergence2115 ts_value(11,sr) = hom(nzb+6,1,pr_palm,sr) ! z_i(1)2116 ts_value(12,sr) = hom(nzb+7,1,pr_palm,sr) ! z_i(2)2117 ts_value(13,sr) = hom(nzb+8,1,pr_palm,sr) ! w*2118 ts_value(14,sr) = hom(nzb,1,16,sr) ! w'pt' at k=02119 ts_value(15,sr) = hom( nzb+1,1,16,sr)! w'pt' at k=12120 ts_value(16,sr) = hom( nzb+1,1,18,sr)! wpt at k=12121 ts_value(17,sr) = hom(nzb+14,1,pr_palm,sr) ! pt(0)2122 ts_value(18,sr) = hom( nzb+1,1,4,sr)! pt(zp)2123 ts_value(19,sr) = hom(nzb+1,1,pr_palm,sr) ! u'w' at k=02124 ts_value(20,sr) = hom(nzb+2,1,pr_palm,sr) ! v'w' at k=02125 ts_value(21,sr) = hom(nzb,1,48,sr) ! w"q" at k=02121 ts_value(9,sr) = hom(nzb+10,1,pr_palm,sr) ! new divergence 2122 ts_value(10,sr) = hom(nzb+9,1,pr_palm,sr) ! old Divergence 2123 ts_value(11,sr) = hom(nzb+6,1,pr_palm,sr) ! z_i(1) 2124 ts_value(12,sr) = hom(nzb+7,1,pr_palm,sr) ! z_i(2) 2125 ts_value(13,sr) = hom(nzb+8,1,pr_palm,sr) ! w* 2126 ts_value(14,sr) = hom(nzb,1,16,sr) ! w'pt' at k=0 2127 ts_value(15,sr) = hom(topo_min_level+1,1,16,sr) ! w'pt' at k=1 2128 ts_value(16,sr) = hom(topo_min_level+1,1,18,sr) ! wpt at k=1 2129 ts_value(17,sr) = hom(nzb+14,1,pr_palm,sr) ! pt(0) 2130 ts_value(18,sr) = hom(topo_min_level+1,1,4,sr) ! pt(zp) 2131 ts_value(19,sr) = hom(nzb+1,1,pr_palm,sr) ! u'w' at k=0 2132 ts_value(20,sr) = hom(nzb+2,1,pr_palm,sr) ! v'w' at k=0 2133 ts_value(21,sr) = hom(nzb,1,48,sr) ! w"q" at k=0 2126 2134 2127 2135 IF ( .NOT. neutral ) THEN -
palm/trunk/SOURCE/init_grid.f90
r2955 r2968 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix in initialization in case of elevated model surface. Introduce 28 ! index for minimum topography-top. 29 ! 30 ! 2955 2018-04-09 15:14:01Z suehring 27 31 ! Improve topography filter routine and add ghost-point exchange for building 28 32 ! ID and building type. … … 332 336 nzb_max, nzb_s_inner, nzb_s_outer, nzb_u_inner, & 333 337 nzb_u_outer, nzb_v_inner, nzb_v_outer, nzb_w_inner, & 334 nzb_w_outer, nzt 338 nzb_w_outer, nzt, topo_min_level 335 339 336 340 USE kinds … … 348 352 IMPLICIT NONE 349 353 350 INTEGER(iwp) :: i !< index variable along x351 INTEGER(iwp) :: j !< index variable along y352 INTEGER(iwp) :: k !< index variable along z353 INTEGER(iwp) :: k_top !< topography top index on local PE354 INTEGER(iwp) :: l !< loop variable355 INTEGER(iwp) :: nzb_local_max !< vertical grid index of maximum topography height356 INTEGER(iwp) :: nzb_local_min !< vertical grid index of minimum topography height354 INTEGER(iwp) :: i !< index variable along x 355 INTEGER(iwp) :: j !< index variable along y 356 INTEGER(iwp) :: k !< index variable along z 357 INTEGER(iwp) :: k_top !< topography top index on local PE 358 INTEGER(iwp) :: l !< loop variable 359 INTEGER(iwp) :: nzb_local_max !< vertical grid index of maximum topography height 360 INTEGER(iwp) :: nzb_local_min !< vertical grid index of minimum topography height 357 361 358 362 INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: nzb_local !< index for topography top at cell-center … … 553 557 ! 554 558 !-- Finally, if topography extents up to the model top, limit nzb_max to nzt. 555 nzb_max = MIN( nzb_max, nzt ) 556 559 nzb_max = MIN( nzb_max, nzt ) 560 ! 561 !-- Determine minimum index of topography. Usually, this will be nzb. In case 562 !-- there is elevated topography, however, the lowest topography will be higher. 563 !-- This index is e.g. used to calculate mean first-grid point atmosphere 564 !-- temperature, surface pressure and density, etc. . 565 topo_min_level = 0 566 #if defined( __parallel ) 567 CALL MPI_ALLREDUCE( MINVAL( get_topography_top_index( 's' ) ), & 568 topo_min_level, 1, MPI_INTEGER, MPI_MIN, comm2d, ierr ) 569 #else 570 topo_min_level = MINVAL( get_topography_top_index( 's' ) ) 571 #endif 557 572 ! 558 573 !-- Initialize boundary conditions via surface type 559 574 CALL init_bc 560 561 575 ! 562 576 !-- Allocate and set topography height arrays required for data output … … 621 635 nzb_local(nys:nyn,nxl:nxr) = get_topography_top_index( 's' ) 622 636 CALL exchange_horiz_2d_int( nzb_local, nys, nyn, nxl, nxr, nbgp ) 623 637 ! 638 !-- Check topography for consistency with model domain. Therefore, use 639 !-- maximum and minium topography-top indices. Note, minimum topography top 640 !-- index is already calculated. 624 641 IF ( TRIM( topography ) /= 'flat' ) THEN 625 642 #if defined( __parallel ) 626 643 CALL MPI_ALLREDUCE( MAXVAL( get_topography_top_index( 's' ) ), & 627 nzb_local_max, 1, MPI_INTEGER, MPI_MAX, comm2d, ierr ) 628 CALL MPI_ALLREDUCE( MINVAL( get_topography_top_index( 's' ) ), & 629 nzb_local_min, 1, MPI_INTEGER, MPI_MIN, comm2d, ierr ) 644 nzb_local_max, 1, MPI_INTEGER, MPI_MAX, comm2d, ierr ) 630 645 #else 631 646 nzb_local_max = MAXVAL( get_topography_top_index( 's' ) ) 632 nzb_local_min = MINVAL( get_topography_top_index( 's' ) )633 647 #endif 648 nzb_local_min = topo_min_level 634 649 ! 635 650 !-- Consistency checks -
palm/trunk/SOURCE/land_surface_model_mod.f90
r2963 r2968 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix in initialization in case of elevated model surface 28 ! 29 ! 2963 2018-04-12 14:47:44Z suehring 27 30 ! - In initialization of surface types, consider the case that surface_fractions 28 31 ! is not given in static input file. … … 2374 2377 2375 2378 USE indices, & 2376 ONLY: nx, ny 2379 ONLY: nx, ny, topo_min_level 2377 2380 2378 2381 USE pmc_interface, & … … 2408 2411 IF ( .NOT. cloud_physics ) THEN 2409 2412 CALL calc_mean_profile( pt, 4 ) 2410 rho_surface = surface_pressure * 100.0_wp / ( r_d * hom( nzb+1,1,4,0) * exn )2413 rho_surface = surface_pressure * 100.0_wp / ( r_d * hom(topo_min_level+1,1,4,0) * exn ) 2411 2414 ENDIF 2412 2415 … … 2424 2427 tt_soil_h_m%var_2d = 0.0_wp 2425 2428 tm_soil_h_m%var_2d = 0.0_wp 2426 tm_liq_h_m%var_1d = 0.0_wp2427 surf_lsm_h%c_liq = 0.0_wp2429 tm_liq_h_m%var_1d = 0.0_wp 2430 surf_lsm_h%c_liq = 0.0_wp 2428 2431 2429 2432 surf_lsm_h%ghf = 0.0_wp … … 2443 2446 tt_soil_v_m(l)%var_2d = 0.0_wp 2444 2447 tm_soil_v_m(l)%var_2d = 0.0_wp 2445 tm_liq_v_m(l)%var_1d = 0.0_wp2446 surf_lsm_v(l)%c_liq = 0.0_wp2448 tm_liq_v_m(l)%var_1d = 0.0_wp 2449 surf_lsm_v(l)%c_liq = 0.0_wp 2447 2450 2448 2451 surf_lsm_v(l)%ghf = 0.0_wp -
palm/trunk/SOURCE/modules.f90
r2964 r2968 25 25 ! ----------------- 26 26 ! $Id$ 27 ! +topo_min_level 28 ! 29 ! 2964 2018-04-12 16:04:03Z raasch 27 30 ! *_time_count variables are all initialized with zero now 28 31 ! … … 1719 1722 USE kinds 1720 1723 1721 INTEGER(iwp) :: nbgp = 3 !< number of boundary ghost points 1722 INTEGER(iwp) :: ngp_sums !< number of vertical profile grid points time number of output profiles - used for allreduce statements in MPI calls 1723 INTEGER(iwp) :: ngp_sums_ls !< number of vertical profile grid points time number of large-scale forcing profiles - used for allreduce statements in MPI calls 1724 INTEGER(iwp) :: nnx !< number of subdomain grid points in x-direction 1725 INTEGER(iwp) :: nx = 0 !< nx+1 = total number of grid points in x-direction 1726 INTEGER(iwp) :: nx_a !< in coupled atmosphere-ocean runs: total number of grid points along x (atmosphere) 1727 INTEGER(iwp) :: nx_o !< in coupled atmosphere-ocean runs: total number of grid points along x (ocean) 1728 INTEGER(iwp) :: nxl !< left-most grid index of subdomain (excluding ghost points) 1729 INTEGER(iwp) :: nxlg !< left-most grid index of subdomain (including ghost points) 1730 INTEGER(iwp) :: nxlu !< =nxl+1 (at left domain boundary with inflow from left), else =nxl (used for u-velocity component) 1731 INTEGER(iwp) :: nxr !< right-most grid index of subdomain (excluding ghost points) 1732 INTEGER(iwp) :: nxrg !< right-most grid index of subdomain (including ghost points) 1733 INTEGER(iwp) :: nx_on_file !< nx of previous run in job chain 1734 INTEGER(iwp) :: nny !< number of subdomain grid points in y-direction 1735 INTEGER(iwp) :: ny = 0 !< ny+1 = total number of grid points in y-direction 1736 INTEGER(iwp) :: ny_a !< in coupled atmosphere-ocean runs: total number of grid points along y (atmosphere) 1737 INTEGER(iwp) :: ny_o !< in coupled atmosphere-ocean runs: total number of grid points along y (ocean) 1738 INTEGER(iwp) :: nyn !< north-most grid index of subdomain (excluding ghost points) 1739 INTEGER(iwp) :: nyng !< north-most grid index of subdomain (including ghost points) 1740 INTEGER(iwp) :: nys !< south-most grid index of subdomain (excluding ghost points) 1741 INTEGER(iwp) :: nysg !< south-most grid index of subdomain (including ghost points) 1742 INTEGER(iwp) :: nysv !< =nys+1 (at south domain boundary with inflow from south), else =nys (used for v-velocity component) 1743 INTEGER(iwp) :: ny_on_file !< ny of previous run in job chain 1744 INTEGER(iwp) :: nnz !< number of subdomain grid points in z-direction 1745 INTEGER(iwp) :: nz = 0 !< total number of grid points in z-direction 1746 INTEGER(iwp) :: nzb !< bottom grid index of computational domain 1747 INTEGER(iwp) :: nzb_diff !< will be removed 1748 INTEGER(iwp) :: nzb_max !< vertical index of topography top 1749 INTEGER(iwp) :: nzt !< nzt+1 = top grid index of computational domain 1724 INTEGER(iwp) :: nbgp = 3 !< number of boundary ghost points 1725 INTEGER(iwp) :: ngp_sums !< number of vertical profile grid points time number of output profiles - used for allreduce statements in MPI calls 1726 INTEGER(iwp) :: ngp_sums_ls !< number of vertical profile grid points time number of large-scale forcing profiles - used for allreduce statements in MPI calls 1727 INTEGER(iwp) :: nnx !< number of subdomain grid points in x-direction 1728 INTEGER(iwp) :: nx = 0 !< nx+1 = total number of grid points in x-direction 1729 INTEGER(iwp) :: nx_a !< in coupled atmosphere-ocean runs: total number of grid points along x (atmosphere) 1730 INTEGER(iwp) :: nx_o !< in coupled atmosphere-ocean runs: total number of grid points along x (ocean) 1731 INTEGER(iwp) :: nxl !< left-most grid index of subdomain (excluding ghost points) 1732 INTEGER(iwp) :: nxlg !< left-most grid index of subdomain (including ghost points) 1733 INTEGER(iwp) :: nxlu !< =nxl+1 (at left domain boundary with inflow from left), else =nxl (used for u-velocity component) 1734 INTEGER(iwp) :: nxr !< right-most grid index of subdomain (excluding ghost points) 1735 INTEGER(iwp) :: nxrg !< right-most grid index of subdomain (including ghost points) 1736 INTEGER(iwp) :: nx_on_file !< nx of previous run in job chain 1737 INTEGER(iwp) :: nny !< number of subdomain grid points in y-direction 1738 INTEGER(iwp) :: ny = 0 !< ny+1 = total number of grid points in y-direction 1739 INTEGER(iwp) :: ny_a !< in coupled atmosphere-ocean runs: total number of grid points along y (atmosphere) 1740 INTEGER(iwp) :: ny_o !< in coupled atmosphere-ocean runs: total number of grid points along y (ocean) 1741 INTEGER(iwp) :: nyn !< north-most grid index of subdomain (excluding ghost points) 1742 INTEGER(iwp) :: nyng !< north-most grid index of subdomain (including ghost points) 1743 INTEGER(iwp) :: nys !< south-most grid index of subdomain (excluding ghost points) 1744 INTEGER(iwp) :: nysg !< south-most grid index of subdomain (including ghost points) 1745 INTEGER(iwp) :: nysv !< =nys+1 (at south domain boundary with inflow from south), else =nys (used for v-velocity component) 1746 INTEGER(iwp) :: ny_on_file !< ny of previous run in job chain 1747 INTEGER(iwp) :: nnz !< number of subdomain grid points in z-direction 1748 INTEGER(iwp) :: nz = 0 !< total number of grid points in z-direction 1749 INTEGER(iwp) :: nzb !< bottom grid index of computational domain 1750 INTEGER(iwp) :: nzb_diff !< will be removed 1751 INTEGER(iwp) :: nzb_max !< vertical index of topography top 1752 INTEGER(iwp) :: nzt !< nzt+1 = top grid index of computational domain 1753 INTEGER(iwp) :: topo_min_level !< minimum topography-top index (usually equal to nzb) 1750 1754 1751 1755 INTEGER(idp), DIMENSION(:), ALLOCATABLE :: ngp_3d !< number of grid points of the total domain
Note: See TracChangeset
for help on using the changeset viewer.