- Timestamp:
- Feb 16, 2019 3:15:23 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_3d_model.f90
r3711 r3747 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Move initialization of rmask before initializing user_init_arrays 28 ! 29 ! 3711 2019-01-31 13:44:26Z knoop 27 30 ! Introduced module_interface_init_checks for post-init checks in modules 28 31 ! … … 761 764 ALLOCATE( pt_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 762 765 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 764 773 ! 765 774 !-- Following array is required for perturbation pressure within the iterative … … 2021 2030 2022 2031 ! 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. 2025 2035 !-- ngp_2dh: number of grid points of a horizontal cross section through the 2026 !-- total domain2027 !-- ngp_3d: number of grid points of the total domain2036 !-- respective statistic region 2037 !-- ngp_3d: number of grid points of the respective statistic region 2028 2038 ngp_2dh_outer_l = 0 2029 2039 ngp_2dh_outer = 0 … … 2039 2049 mean_surface_level_height = 0.0_wp 2040 2050 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 boundaries2044 !-- would bias the statistics2045 rmask = 1.0_wp2046 rmask(:,nxlg:nxl-1,:) = 0.0_wp; rmask(:,nxr+1:nxrg,:) = 0.0_wp2047 rmask(nysg:nys-1,:,:) = 0.0_wp; rmask(nyn+1:nyng,:,:) = 0.0_wp2048 2051 ! 2049 2052 !-- To do: New concept for these non-topography grid points! … … 2103 2106 ENDDO 2104 2107 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 2110 2109 sr = statistic_regions + 1 2111 2110 #if defined( __parallel ) -
palm/trunk/SOURCE/module_interface.f90
r3745 r3747 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Call user_init_arrays 28 ! 29 ! 3745 2019-02-15 18:57:56Z suehring 27 30 ! Add indoor model 28 31 ! … … 306 309 user_check_data_output, & 307 310 user_init, & 311 user_init_arrays, & 308 312 user_header, & 309 313 user_actions, & … … 749 753 IF ( surface_output ) CALL surface_data_output_init_arrays 750 754 IF ( wind_turbine ) CALL wtm_init_arrays 755 IF ( user_module_enabled ) CALL user_init_arrays 751 756 752 757 -
palm/trunk/SOURCE/modules.f90
r3746 r3747 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! Initialized parameter region22 ! 23 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Initialized parameter region 28 ! 29 ! 3746 2019-02-16 12:41:27Z gronemeier 27 30 ! Removed most_method 28 31 ! -
palm/trunk/SOURCE/parin.f90
r3746 r3747 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! removed setting of parameter region22 ! 23 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! removed setting of parameter region 28 ! 29 ! 3746 2019-02-16 12:41:27Z gronemeier 27 30 ! Removed most_method 28 31 ! -
palm/trunk/SOURCE/user_module.f90
r3703 r3747 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Add routine user_init_arrays 28 ! 29 ! 3703 2019-01-29 16:43:53Z knoop 27 30 ! An example for a user defined global variable has been added (Giersch) 28 31 ! … … 120 123 user_define_netcdf_grid, & 121 124 user_init, & 125 user_init_arrays, & 122 126 user_header, & 123 127 user_actions, & … … 160 164 MODULE PROCEDURE user_define_netcdf_grid 161 165 END INTERFACE user_define_netcdf_grid 162 163 166 164 167 INTERFACE user_init 165 168 MODULE PROCEDURE user_init 166 169 END INTERFACE user_init 170 171 INTERFACE user_init_arrays 172 MODULE PROCEDURE user_init_arrays 173 END INTERFACE user_init_arrays 167 174 168 175 INTERFACE user_header … … 433 440 ! Description: 434 441 ! ------------ 442 !> Initialize user-defined arrays 443 !------------------------------------------------------------------------------! 444 SUBROUTINE user_init_arrays 445 446 447 INTEGER(iwp) :: i !< loop index 448 INTEGER(iwp) :: j !< loop index 449 INTEGER(iwp) :: region !< index for loop over statistic regions 450 451 ! 452 !-- Allocate user-defined arrays and set flags for statistic regions. 453 !-- Sample for user-defined output 454 ! ALLOCATE( u2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 455 ! ALLOCATE( ustvst(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 456 457 ! 458 !-- Example for defining a statistic region: 459 ! IF ( statistic_regions >= 1 ) THEN 460 ! region = 1 461 ! 462 ! rmask(:,:,region) = 0.0_wp 463 ! DO i = nxl, nxr 464 ! IF ( i >= INT( 0.25 * nx ) .AND. i <= INT( 0.75 * nx ) ) THEN 465 ! DO j = nys, nyn 466 ! IF ( i >= INT( 0.25 * ny ) .AND. i <= INT( 0.75 * ny ) ) THEN 467 ! rmask(j,i,region) = 1.0_wp 468 ! ENDIF 469 ! ENDDO 470 ! ENDIF 471 ! ENDDO 472 ! 473 ! ENDIF 474 475 END SUBROUTINE user_init_arrays 476 477 478 !------------------------------------------------------------------------------! 479 ! Description: 480 ! ------------ 435 481 !> Execution of user-defined initializing actions 436 482 !------------------------------------------------------------------------------! … … 442 488 !-- Here the user-defined initializing actions follow: 443 489 !-- Sample for user-defined output 444 ! ALLOCATE( u2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 445 ! ALLOCATE( ustvst(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ); ustvst = 0.0_wp 490 ! ustvst = 0.0_wp 446 491 447 492
Note: See TracChangeset
for help on using the changeset viewer.