Ignore:
Timestamp:
Feb 16, 2019 3:15:23 PM (5 years ago)
Author:
gronemeier
Message:

bugfix: set user-defined statistic regions within new routine user_init_arrays and initialize rmask before this routine is called. This ensures that the correct number of grid points is calculated for each statistic region within init_3d_model.
(init_3d_model, module_interface, user_module)
bugfix: update former revisions section (modules, parin)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/init_3d_model.f90

    r3711 r3747  
    2525! -----------------
    2626! $Id$
     27! Move initialization of rmask before initializing user_init_arrays
     28!
     29! 3711 2019-01-31 13:44:26Z knoop
    2730! Introduced module_interface_init_checks for post-init checks in modules
    2831!
     
    761764       ALLOCATE( pt_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    762765    ENDIF
    763 
     766!
     767!-- Pre-set masks for regional statistics. Default is the total model domain.
     768!-- Ghost points are excluded because counting values at the ghost boundaries
     769!-- would bias the statistics
     770    rmask = 1.0_wp
     771    rmask(:,nxlg:nxl-1,:) = 0.0_wp;  rmask(:,nxr+1:nxrg,:) = 0.0_wp
     772    rmask(nysg:nys-1,:,:) = 0.0_wp;  rmask(nyn+1:nyng,:,:) = 0.0_wp
    764773!
    765774!-- Following array is required for perturbation pressure within the iterative
     
    20212030
    20222031!
    2023 !-- Before initializing further modules, compute total sum of active mask
    2024 !-- grid points and the mean surface level height for each statistic region.
     2032!-- Compute total sum of grid points and the mean surface level height for each
     2033!-- statistic region. These are mainly used for horizontal averaging of
     2034!-- turbulence statistics.
    20252035!-- ngp_2dh: number of grid points of a horizontal cross section through the
    2026 !--          total domain
    2027 !-- ngp_3d:  number of grid points of the total domain
     2036!--          respective statistic region
     2037!-- ngp_3d:  number of grid points of the respective statistic region
    20282038    ngp_2dh_outer_l   = 0
    20292039    ngp_2dh_outer     = 0
     
    20392049    mean_surface_level_height   = 0.0_wp
    20402050    mean_surface_level_height_l = 0.0_wp
    2041 !
    2042 !-- Pre-set masks for regional statistics. Default is the total model domain.
    2043 !-- Ghost points are excluded because counting values at the ghost boundaries
    2044 !-- would bias the statistics
    2045     rmask = 1.0_wp
    2046     rmask(:,nxlg:nxl-1,:) = 0.0_wp;  rmask(:,nxr+1:nxrg,:) = 0.0_wp
    2047     rmask(nysg:nys-1,:,:) = 0.0_wp;  rmask(nyn+1:nyng,:,:) = 0.0_wp
    20482051!
    20492052!-- To do: New concept for these non-topography grid points!
     
    21032106       ENDDO
    21042107    ENDDO
    2105 !
    2106 !-- Initialize arrays encompassing number of grid-points in inner and outer
    2107 !-- domains, statistic regions, etc. Mainly used for horizontal averaging
    2108 !-- of turbulence statistics. Please note, user_init must be called before
    2109 !-- doing this.   
     2108
    21102109    sr = statistic_regions + 1
    21112110#if defined( __parallel )
Note: See TracChangeset for help on using the changeset viewer.