Changeset 4883 for palm/trunk/SOURCE/pmc_interface_mod.f90
- Timestamp:
- Feb 23, 2021 4:32:41 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/pmc_interface_mod.f90
r4828 r4883 25 25 ! ----------------- 26 26 ! $Id$ 27 ! User switch for particle coupling added. Some code reformatting according to follow PALM coding standard. 28 ! Some missing doxygen comments added. 29 ! 30 ! 4828 2021-01-05 11:21:41Z Giersch 27 31 ! Bugfix in setting up the nesting configuration for chemical and aerosol species in case of more 28 32 ! than one child domain … … 456 460 457 461 INTEGER(iwp), SAVE :: comm_world_nesting !< Global nesting communicator 458 INTEGER(iwp), SAVE :: cpl_id = 1 !< 462 INTEGER(iwp), SAVE :: cpl_id = 1 !< Model (domain) id (1 for root, 2,... for nested domains). 459 463 INTEGER(iwp), SAVE :: cpl_npe_total !< 460 464 INTEGER(iwp), SAVE :: cpl_parent_id !< … … 470 474 471 475 LOGICAL, SAVE :: nested_run = .FALSE. !< general switch 476 LOGICAL, SAVE :: particle_coupling = .TRUE. !< switch for particle coupling (meaningful only when lpm is used) 472 477 LOGICAL, SAVE :: rans_mode_parent = .FALSE. !< mode of parent model (.F. - LES mode, .T. - RANS mode) 473 478 ! … … 561 566 ! 562 567 !-- Work arrays for interpolation and user-defined type definitions for horizontal work-array exchange 563 INTEGER(iwp) :: workarr_lr_exchange_type !< 564 INTEGER(iwp) :: workarr_sn_exchange_type !< 565 INTEGER(iwp) :: workarr_t_exchange_type_x !< 566 INTEGER(iwp) :: workarr_t_exchange_type_y !< 568 INTEGER(iwp) :: workarr_lr_exchange_type !< type definition for work-array exchange on left and right boundaries 569 INTEGER(iwp) :: workarr_sn_exchange_type !< type definition for work-array exchange on south and north boundaries 570 INTEGER(iwp) :: workarr_t_exchange_type_x !< type definition for work-array exchange on top boundary between left-right 571 !< neighbouring subdomains 572 INTEGER(iwp) :: workarr_t_exchange_type_y !< type definition for work-array exchange on top boundary between south-north 573 !< neighbouring subdomains 567 574 568 575 INTEGER(iwp), DIMENSION(3) :: parent_grid_info_int !< Array for communicating the parent-grid dimensions to its children. … … 572 579 !< children. 573 580 574 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: workarr_lr !< 575 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: workarr_sn !< 576 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: workarr_t !< 581 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: workarr_lr !< work array for interpolation on left and right boundaries 582 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: workarr_sn !< work array for interpolation on south and north boundaries 583 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: workarr_t !< work array for interpolation on top boundary 577 584 578 585 TYPE parentgrid_def … … 599 606 !-- Variables for particle coupling 600 607 TYPE, PUBLIC :: childgrid_def 601 INTEGER(iwp) :: nx !< 602 INTEGER(iwp) :: ny !< 603 INTEGER(iwp) :: nz !< 604 REAL(wp) :: dx !< 605 REAL(wp) :: dy !< 606 REAL(wp) :: dz !< 607 REAL(wp) :: lx_coord, lx_coord_b !< ! split onto separate lines 608 REAL(wp) :: rx_coord, rx_coord_b !< 609 REAL(wp) :: sy_coord, sy_coord_b !< 610 REAL(wp) :: ny_coord, ny_coord_b !< 611 REAL(wp) :: uz_coord, uz_coord_b !< 608 INTEGER(iwp) :: nx !< 609 INTEGER(iwp) :: ny !< 610 INTEGER(iwp) :: nz !< 611 REAL(wp) :: dx !< 612 REAL(wp) :: dy !< 613 REAL(wp) :: dz !< 614 REAL(wp) :: lx_coord !< 615 REAL(wp) :: rx_coord !< 616 REAL(wp) :: sy_coord !< 617 REAL(wp) :: ny_coord !< 618 REAL(wp) :: uz_coord !< 619 REAL(wp) :: lx_coord_b !< 620 REAL(wp) :: rx_coord_b !< 621 REAL(wp) :: sy_coord_b !< 622 REAL(wp) :: ny_coord_b !< 623 REAL(wp) :: uz_coord_b !< 612 624 END TYPE childgrid_def 613 625 … … 685 697 nesting_mode, & 686 698 parent_to_child, & 699 particle_coupling, & 687 700 rans_mode_parent 688 701 … … 711 724 IMPLICIT NONE 712 725 713 INTEGER(iwp), INTENT(OUT) :: world_comm !< 726 INTEGER(iwp), INTENT(OUT) :: world_comm !< global communicator 714 727 715 728 #if defined( __parallel ) 716 729 717 INTEGER(iwp) :: pmc_status !< 730 INTEGER(iwp) :: pmc_status !< status parameter indicating if the nesting_parameters namelist 731 !< was succesfully input or not 718 732 719 733 720 734 CALL pmc_init_model( world_comm, nesting_datatransfer_mode, nesting_mode, & 721 anterpolation_buffer_width, anterpolation_starting_height, pmc_status )722 735 anterpolation_buffer_width, anterpolation_starting_height, & 736 particle_coupling, pmc_status ) 723 737 IF ( pmc_status == pmc_no_namelist_found ) THEN 724 738 ! … … 1745 1759 IMPLICIT NONE 1746 1760 1747 INTEGER(iwp) :: i !< Child-grid index in the x-direction1748 INTEGER(iwp) :: ii !< Parent-grid index in the x-direction1749 INTEGER(iwp) :: istart !< 1750 INTEGER(iwp) :: ir !< 1751 INTEGER(iwp) :: iw !< Child-grid index limited to -1 <= iw <= nx+1 for wall_flags_total_01752 INTEGER(iwp) :: j !< Child-grid index in the y-direction1753 INTEGER(iwp) :: jj !< Parent-grid index in the y-direction1754 INTEGER(iwp) :: jstart !< 1755 INTEGER(iwp) :: jr !< 1756 INTEGER(iwp) :: jw !< Child-grid index limited to -1 <= jw <= ny+1 for wall_flags_total_01757 INTEGER(iwp) :: k !< Child-grid index in the z-direction1758 INTEGER(iwp) :: kk !< Parent-grid index in the z-direction1759 INTEGER(iwp) :: kstart !< 1760 INTEGER(iwp) :: kw !< Child-grid index limited to kw <= nzt+1 for wall_flags_total_01761 1762 REAL(wp) :: tolex !< Tolerance for grid-line matching in x-direction1763 REAL(wp) :: toley !< Tolerance for grid-line matching in y-direction1764 REAL(wp) :: tolez !< Tolerance for grid-line matching in z-direction1761 INTEGER(iwp) :: i !< child-grid index in the x-direction 1762 INTEGER(iwp) :: ii !< parent-grid index in the x-direction 1763 INTEGER(iwp) :: istart !< starting index for the index-mapping search loop in the x-direction 1764 INTEGER(iwp) :: ir !< search-loop running index in the x-direction 1765 INTEGER(iwp) :: iw !< child-grid index limited to -1 <= iw <= nx+1 for wall_flags_total_0 1766 INTEGER(iwp) :: j !< child-grid index in the y-direction 1767 INTEGER(iwp) :: jj !< parent-grid index in the y-direction 1768 INTEGER(iwp) :: jstart !< starting index for the index-mapping search loop in the y-direction 1769 INTEGER(iwp) :: jr !< search-loop running index in the y-direction 1770 INTEGER(iwp) :: jw !< child-grid index limited to -1 <= jw <= ny+1 for wall_flags_total_0 1771 INTEGER(iwp) :: k !< child-grid index in the z-direction 1772 INTEGER(iwp) :: kk !< parent-grid index in the z-direction 1773 INTEGER(iwp) :: kstart !< starting index for the index-mapping search loop in the z-direction 1774 INTEGER(iwp) :: kw !< child-grid index limited to kw <= nzt+1 for wall_flags_total_0 1775 1776 REAL(wp) :: tolex !< tolerance for grid-line matching in x-direction 1777 REAL(wp) :: toley !< tolerance for grid-line matching in y-direction 1778 REAL(wp) :: tolez !< tolerance for grid-line matching in z-direction 1765 1779 1766 1780 ! … … 2638 2652 IMPLICIT NONE 2639 2653 2640 INTEGER(iwp) :: i !< 2641 INTEGER(iwp) :: j !< 2654 INTEGER(iwp) :: i !< grid index in the x-direction 2655 INTEGER(iwp) :: j !< grid index in the y-direction 2642 2656 2643 2657 ! … … 3713 3727 IMPLICIT NONE 3714 3728 3715 INTEGER(iwp), INTENT(IN) :: direction !< Transfer direction: parent_to_child or child_to_parent3729 INTEGER(iwp), INTENT(IN) :: direction !< transfer direction: parent_to_child or child_to_parent 3716 3730 3717 3731 #if defined( __parallel ) 3718 3732 3719 REAL(wp), DIMENSION(1) :: dtl !< Time step size3733 REAL(wp), DIMENSION(1) :: dtl !< time step size 3720 3734 3721 3735 … … 4126 4140 4127 4141 IMPLICIT NONE 4128 INTEGER(iwp) :: lb !< Running index for aerosol size bins4129 INTEGER(iwp) :: lc !< Running index for aerosol mass bins4130 INTEGER(iwp) :: lg !< Running index for salsa gases4131 INTEGER(iwp) :: n !< Running index for number of chemical species4142 INTEGER(iwp) :: lb !< running index for aerosol size bins 4143 INTEGER(iwp) :: lc !< running index for aerosol mass bins 4144 INTEGER(iwp) :: lg !< running index for salsa gases 4145 INTEGER(iwp) :: n !< running index for number of chemical species 4132 4146 4133 4147 … … 4216 4230 IMPLICIT NONE 4217 4231 4218 CHARACTER(LEN=1), INTENT(IN) :: edge !< Edge symbol: 'l' or 'r'4219 CHARACTER(LEN=1), INTENT(IN) :: var !< Variable symbol: 'u', 'v', 'w' or 's'4220 4221 INTEGER(iwp), INTENT(IN) :: kct !< The parent-grid index in z-direction just below the boundary value node4222 4223 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfl !< Indicates start index of child cells belonging to certain4232 CHARACTER(LEN=1), INTENT(IN) :: edge !< edge symbol: 'l' or 'r' 4233 CHARACTER(LEN=1), INTENT(IN) :: var !< variable symbol: 'u', 'v', 'w' or 's' 4234 4235 INTEGER(iwp), INTENT(IN) :: kct !< the parent-grid index in z-direction just below the boundary value node 4236 4237 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfl !< indicates start index of child cells belonging to certain 4224 4238 !< parent cell - y direction 4225 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfu !< Indicates end index of child cells belonging to certain4239 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfu !< indicates end index of child cells belonging to certain 4226 4240 !< parent cell - y direction 4227 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfl !< Indicates start index of child cells belonging to certain4241 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfl !< indicates start index of child cells belonging to certain 4228 4242 !< parent cell - z direction 4229 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfu !< Indicates end index of child cells belonging to certain4243 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfu !< indicates end index of child cells belonging to certain 4230 4244 !< parent cell - z direction 4231 4245 … … 4236 4250 ! 4237 4251 !-- Local variables: 4238 INTEGER(iwp) :: icb !< Fixed child-grid index in the x-direction pointing to the node just behind the4252 INTEGER(iwp) :: icb !< fixed child-grid index in the x-direction pointing to the node just behind the 4239 4253 !< boundary-value node 4240 INTEGER(iwp) :: icbc !< Fixed child-grid index in the x-direction pointing to the boundary-value nodes4241 INTEGER(iwp) :: icbgp !< Index running over the redundant boundary ghost points in the x-direction4254 INTEGER(iwp) :: icbc !< fixed child-grid index in the x-direction pointing to the boundary-value nodes 4255 INTEGER(iwp) :: icbgp !< index running over the redundant boundary ghost points in the x-direction 4242 4256 INTEGER(iwp) :: ierr !< MPI error code 4243 INTEGER(iwp) :: ipbeg !< Parent-grid index in the x-direction pointing to the starting point of workarr_lr4257 INTEGER(iwp) :: ipbeg !< parent-grid index in the x-direction pointing to the starting point of workarr_lr 4244 4258 !< in the parent-grid array 4245 INTEGER(iwp) :: ipw !< Reduced parent-grid index in the x-direction for workarr_lr pointing to4259 INTEGER(iwp) :: ipw !< reduced parent-grid index in the x-direction for workarr_lr pointing to 4246 4260 !< the boundary ghost node 4247 INTEGER(iwp) :: ipwp !< Reduced parent-grid index in the x-direction for workarr_lr pointing to4261 INTEGER(iwp) :: ipwp !< reduced parent-grid index in the x-direction for workarr_lr pointing to 4248 4262 !< the first prognostic node 4249 INTEGER(iwp) :: jc !< Running child-grid index in the y-direction 4250 INTEGER(iwp) :: jp !< Running parent-grid index in the y-direction 4251 INTEGER(iwp) :: kc !< Running child-grid index in the z-direction 4252 INTEGER(iwp) :: kp !< Running parent-grid index in the z-direction 4253 4254 REAL(wp) :: cb !< Interpolation coefficient for the boundary ghost node 4255 REAL(wp) :: cp !< Interpolation coefficient for the first prognostic node 4256 REAL(wp) :: c_interp_1 !< Value interpolated to the flux point in x direction from the parent-grid data 4257 REAL(wp) :: c_interp_2 !< Auxiliary value interpolated to the flux point in x direction from the parent-grid data 4263 INTEGER(iwp) :: jc !< running child-grid index in the y-direction 4264 INTEGER(iwp) :: jp !< running parent-grid index in the y-direction 4265 INTEGER(iwp) :: kc !< running child-grid index in the z-direction 4266 INTEGER(iwp) :: kp !< running parent-grid index in the z-direction 4267 4268 REAL(wp) :: cb !< interpolation coefficient for the boundary ghost node 4269 REAL(wp) :: cp !< interpolation coefficient for the first prognostic node 4270 REAL(wp) :: c_interp_1 !< value interpolated to the flux point in x direction from the parent-grid data 4271 REAL(wp) :: c_interp_2 !< auxiliary value interpolated to the flux point in x direction from the parent-grid data 4272 4258 4273 ! 4259 4274 !-- Check which edge is to be handled … … 4453 4468 IMPLICIT NONE 4454 4469 4455 CHARACTER(LEN=1), INTENT(IN) :: edge !< Edge symbol: 's' or 'n'4456 CHARACTER(LEN=1), INTENT(IN) :: var !< Variable symbol: 'u', 'v', 'w' or 's'4457 4458 INTEGER(iwp), INTENT(IN) :: kct !< The parent-grid index in z-direction just below the boundary value node4459 4460 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifl !< Indicates start index of child cells belonging to certain4470 CHARACTER(LEN=1), INTENT(IN) :: edge !< edge symbol: 's' or 'n' 4471 CHARACTER(LEN=1), INTENT(IN) :: var !< variable symbol: 'u', 'v', 'w' or 's' 4472 4473 INTEGER(iwp), INTENT(IN) :: kct !< the parent-grid index in z-direction just below the boundary value node 4474 4475 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifl !< indicates start index of child cells belonging to certain 4461 4476 !< parent cell - x direction 4462 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifu !< Indicates end index of child cells belonging to certain4477 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifu !< indicates end index of child cells belonging to certain 4463 4478 !< parent cell - x direction 4464 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfl !< Indicates start index of child cells belonging to certain4479 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfl !< indicates start index of child cells belonging to certain 4465 4480 !< parent cell - z direction 4466 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfu !< Indicates end index of child cells belonging to certain4481 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfu !< indicates end index of child cells belonging to certain 4467 4482 !< parent cell - z direction 4468 4483 … … 4472 4487 ! 4473 4488 !-- Local variables: 4474 INTEGER(iwp) :: ic !< Running child-grid index in the x-direction4489 INTEGER(iwp) :: ic !< running child-grid index in the x-direction 4475 4490 INTEGER(iwp) :: ierr !< MPI error code 4476 INTEGER(iwp) :: ip !< Running parent-grid index in the x-direction4477 INTEGER(iwp) :: jcb !< Fixed child-grid index in the y-direction pointing to the node just behind the4491 INTEGER(iwp) :: ip !< running parent-grid index in the x-direction 4492 INTEGER(iwp) :: jcb !< fixed child-grid index in the y-direction pointing to the node just behind the 4478 4493 !< boundary-value node 4479 INTEGER(iwp) :: jcbc !< Fixed child-grid index in the y-direction pointing to the boundary-value nodes4480 INTEGER(iwp) :: jcbgp !< Index running over the redundant boundary ghost points in y-direction4481 INTEGER(iwp) :: jpbeg !< Parent-grid index in the y-direction pointing to the starting point of workarr_sn4494 INTEGER(iwp) :: jcbc !< fixed child-grid index in the y-direction pointing to the boundary-value nodes 4495 INTEGER(iwp) :: jcbgp !< index running over the redundant boundary ghost points in y-direction 4496 INTEGER(iwp) :: jpbeg !< parent-grid index in the y-direction pointing to the starting point of workarr_sn 4482 4497 !< in the parent-grid array 4483 INTEGER(iwp) :: jpw !< Reduced parent-grid index in the y-direction for workarr_sn pointing to4498 INTEGER(iwp) :: jpw !< reduced parent-grid index in the y-direction for workarr_sn pointing to 4484 4499 !< the boundary ghost node 4485 INTEGER(iwp) :: jpwp !< Reduced parent-grid index in the y-direction for workarr_sn pointing to4500 INTEGER(iwp) :: jpwp !< reduced parent-grid index in the y-direction for workarr_sn pointing to 4486 4501 !< the first prognostic node 4487 INTEGER(iwp) :: kc !< Running child-grid index in the z-direction 4488 INTEGER(iwp) :: kp !< Running parent-grid index in the z-direction 4489 4490 REAL(wp) :: cb !< Interpolation coefficient for the boundary ghost node 4491 REAL(wp) :: cp !< Interpolation coefficient for the first prognostic node 4492 REAL(wp) :: c_interp_1 !< Value interpolated to the flux point in x direction from the parent-grid data 4493 REAL(wp) :: c_interp_2 !< Auxiliary value interpolated to the flux point in x direction from the parent-grid data 4494 4502 INTEGER(iwp) :: kc !< running child-grid index in the z-direction 4503 INTEGER(iwp) :: kp !< running parent-grid index in the z-direction 4504 4505 REAL(wp) :: cb !< interpolation coefficient for the boundary ghost node 4506 REAL(wp) :: cp !< interpolation coefficient for the first prognostic node 4507 REAL(wp) :: c_interp_1 !< value interpolated to the flux point in x direction from the parent-grid data 4508 REAL(wp) :: c_interp_2 !< auxiliary value interpolated to the flux point in x direction from the parent-grid data 4495 4509 4496 4510 ! … … 4692 4706 IMPLICIT NONE 4693 4707 4694 CHARACTER(LEN=1), INTENT(IN) :: var !< Variable symbol: 'u', 'v', 'w' or 's'4695 4696 INTEGER(iwp), INTENT(IN) :: kct !< The parent-grid index in z-direction just below the boundary value node4697 4698 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifl !< Indicates start index of child cells belonging to certain4708 CHARACTER(LEN=1), INTENT(IN) :: var !< variable symbol: 'u', 'v', 'w' or 's' 4709 4710 INTEGER(iwp), INTENT(IN) :: kct !< the parent-grid index in z-direction just below the boundary value node 4711 4712 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifl !< indicates start index of child cells belonging to certain 4699 4713 !< parent cell - x direction 4700 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifu !< Indicates end index of child cells belonging to certain4714 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifu !< indicates end index of child cells belonging to certain 4701 4715 !< parent cell - x direction 4702 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfl !< Indicates start index of child cells belonging to certain4716 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfl !< indicates start index of child cells belonging to certain 4703 4717 !< parent cell - y direction 4704 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfu !< Indicates end index of child cells belonging to certain4718 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfu !< indicates end index of child cells belonging to certain 4705 4719 !< parent cell - y direction 4706 4720 … … 4709 4723 REAL(wp), DIMENSION(0:pg%nz+1,jps:jpn,ipl:ipr), INTENT(IN) :: parent_array !< Parent-grid array 4710 4724 4711 4712 4725 ! 4713 4726 !-- Local variables: 4714 INTEGER(iwp) :: ic !< Running child-grid index in the x-direction4727 INTEGER(iwp) :: ic !< running child-grid index in the x-direction 4715 4728 INTEGER(iwp) :: ierr !< MPI error code 4716 INTEGER(iwp) :: iplc !< Lower parent-grid index limit in the x-direction for copying parent-grid4729 INTEGER(iwp) :: iplc !< lower parent-grid index limit in the x-direction for copying parent-grid 4717 4730 !< array data to workarr_t 4718 INTEGER(iwp) :: iprc !< Upper parent-grid index limit in the x-direction for copying parent-grid4731 INTEGER(iwp) :: iprc !< upper parent-grid index limit in the x-direction for copying parent-grid 4719 4732 !< array data to workarr_t 4720 INTEGER(iwp) :: jc !< Running child-grid index in the y-direction4721 INTEGER(iwp) :: jpsc !< Lower parent-grid index limit in the y-direction for copying parent-grid4733 INTEGER(iwp) :: jc !< running child-grid index in the y-direction 4734 INTEGER(iwp) :: jpsc !< lower parent-grid index limit in the y-direction for copying parent-grid 4722 4735 !< array data to workarr_t 4723 INTEGER(iwp) :: jpnc !< Upper parent-grid-index limit in the y-direction for copying parent-grid4736 INTEGER(iwp) :: jpnc !< upper parent-grid-index limit in the y-direction for copying parent-grid 4724 4737 !< array data to workarr_t 4725 INTEGER(iwp) :: kc !< Vertical child-grid index fixed to the boundary-value level4726 INTEGER(iwp) :: ip !< Running parent-grid index in the x-direction4727 INTEGER(iwp) :: jp !< Running parent-grid index in the y-direction4728 INTEGER(iwp) :: kpw !< Reduced parent-grid index in the z-direction for workarr_t pointing to4738 INTEGER(iwp) :: kc !< vertical child-grid index fixed to the boundary-value level 4739 INTEGER(iwp) :: ip !< running parent-grid index in the x-direction 4740 INTEGER(iwp) :: jp !< running parent-grid index in the y-direction 4741 INTEGER(iwp) :: kpw !< reduced parent-grid index in the z-direction for workarr_t pointing to 4729 4742 !< the boundary ghost node 4730 4743 4731 REAL(wp) :: c31 !< Interpolation coefficient for the 3rd-order WS scheme4732 REAL(wp) :: c32 !< Interpolation coefficient for the 3rd-order WS scheme4733 REAL(wp) :: c33 !< Interpolation coefficient for the 3rd-order WS scheme4734 REAL(wp) :: c_interp_1 !< Value interpolated to the flux point in z direction from the parent-grid data4735 REAL(wp) :: c_interp_2 !< Auxiliary value interpolated to the flux point in z direction from the parent-grid data4744 REAL(wp) :: c31 !< interpolation coefficient for the 3rd-order WS scheme 4745 REAL(wp) :: c32 !< interpolation coefficient for the 3rd-order WS scheme 4746 REAL(wp) :: c33 !< interpolation coefficient for the 3rd-order WS scheme 4747 REAL(wp) :: c_interp_1 !< value interpolated to the flux point in z direction from the parent-grid data 4748 REAL(wp) :: c_interp_2 !< auxiliary value interpolated to the flux point in z direction from the parent-grid data 4736 4749 4737 4750 … … 4964 4977 IMPLICIT NONE 4965 4978 4966 CHARACTER(LEN=*), INTENT(IN) :: var !< Variable symbol: 'u', 'v', 'w' or 's'4967 4968 INTEGER(iwp), INTENT(IN) :: kct !< Top boundary index for anterpolation along z4979 CHARACTER(LEN=*), INTENT(IN) :: var !< variable symbol: 'u', 'v', 'w' or 's' 4980 4981 INTEGER(iwp), INTENT(IN) :: kct !< top boundary index for anterpolation along z 4969 4982 4970 4983 INTEGER(iwp), DIMENSION(0:pg%nz+1,jpsa:jpna,ipla:ipra), INTENT(IN) :: ijkfc !< number of child grid points contributing 4971 4984 !< to a parent grid box 4972 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifl !< Indicates start index of child cells belonging to certain4985 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifl !< indicates start index of child cells belonging to certain 4973 4986 !< parent cell - x direction 4974 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifu !< Indicates end index of child cells belonging to certain4987 INTEGER(iwp), DIMENSION(ipla:ipra), INTENT(IN) :: ifu !< indicates end index of child cells belonging to certain 4975 4988 !< parent cell - x direction 4976 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfl !< Indicates start index of child cells belonging to certain4989 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfl !< indicates start index of child cells belonging to certain 4977 4990 !< parent cell - y direction 4978 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfu !< Indicates end index of child cells belonging to certain4991 INTEGER(iwp), DIMENSION(jpsa:jpna), INTENT(IN) :: jfu !< indicates end index of child cells belonging to certain 4979 4992 !< parent cell - y direction 4980 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfl !< Indicates start index of child cells belonging to certain4993 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfl !< indicates start index of child cells belonging to certain 4981 4994 !< parent cell - z direction 4982 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfu !< Indicates end index of child cells belonging to certain4995 INTEGER(iwp), DIMENSION(0:pg%nz+1), INTENT(IN) :: kfu !< indicates end index of child cells belonging to certain 4983 4996 !< parent cell - z direction 4984 4997 4985 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(IN) :: child_array !< Child-grid array4986 4987 REAL(wp), DIMENSION(0:pg%nz+1,jps:jpn,ipl:ipr), INTENT(INOUT) :: parent_array !< Parent-grid array4998 REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(IN) :: child_array !< child-grid array 4999 5000 REAL(wp), DIMENSION(0:pg%nz+1,jps:jpn,ipl:ipr), INTENT(INOUT) :: parent_array !< parent-grid array 4988 5001 4989 5002 ! 4990 5003 !-- Local variables: 4991 INTEGER(iwp) :: ic !< Running index x-direction - child grid4992 INTEGER(iwp) :: ip !< Running index x-direction - parent grid4993 INTEGER(iwp) :: ipl_anterp !< Left boundary index for anterpolation along x4994 INTEGER(iwp) :: ipr_anterp !< Right boundary index for anterpolation along x4995 INTEGER(iwp) :: jc !< Running index y-direction - child grid4996 INTEGER(iwp) :: jp !< Running index y-direction - parent grid4997 INTEGER(iwp) :: jpn_anterp !< North boundary index for anterpolation along y4998 INTEGER(iwp) :: jps_anterp !< South boundary index for anterpolation along y4999 INTEGER(iwp) :: kc !< Running index z-direction - child grid5000 INTEGER(iwp) :: kp !< Running index z-direction - parent grid5001 INTEGER(iwp) :: kpt_anterp !< Top boundary index for anterpolation along z5004 INTEGER(iwp) :: ic !< running index x-direction - child grid 5005 INTEGER(iwp) :: ip !< running index x-direction - parent grid 5006 INTEGER(iwp) :: ipl_anterp !< left boundary index for anterpolation along x 5007 INTEGER(iwp) :: ipr_anterp !< right boundary index for anterpolation along x 5008 INTEGER(iwp) :: jc !< running index y-direction - child grid 5009 INTEGER(iwp) :: jp !< running index y-direction - parent grid 5010 INTEGER(iwp) :: jpn_anterp !< north boundary index for anterpolation along y 5011 INTEGER(iwp) :: jps_anterp !< south boundary index for anterpolation along y 5012 INTEGER(iwp) :: kc !< running index z-direction - child grid 5013 INTEGER(iwp) :: kp !< running index z-direction - parent grid 5014 INTEGER(iwp) :: kpt_anterp !< top boundary index for anterpolation along z 5002 5015 INTEGER(iwp) :: var_flag !< bit number used to flag topography on respective grid 5003 5016 5004 REAL(wp) :: cellsum !< Sum of respective child cells belonging to parent cell5017 REAL(wp) :: cellsum !< sum of respective child cells belonging to parent cell 5005 5018 5006 5019 ! … … 5092 5105 IMPLICIT NONE 5093 5106 5094 INTEGER(iwp) :: ic !< Index along x-direction5095 INTEGER(iwp) :: jc !< Index along y-direction5096 INTEGER(iwp) :: kc !< Index along z-direction5097 INTEGER(iwp) :: lb !< Running index for aerosol size bins5098 INTEGER(iwp) :: lc !< Running index for aerosol mass bins5099 INTEGER(iwp) :: lg !< Running index for salsa gases5100 INTEGER(iwp) :: m !< Running index for surface type5101 INTEGER(iwp) :: n !< Running index for number of chemical species5107 INTEGER(iwp) :: ic !< index along x-direction 5108 INTEGER(iwp) :: jc !< index along y-direction 5109 INTEGER(iwp) :: kc !< index along z-direction 5110 INTEGER(iwp) :: lb !< running index for aerosol size bins 5111 INTEGER(iwp) :: lc !< running index for aerosol mass bins 5112 INTEGER(iwp) :: lg !< running index for salsa gases 5113 INTEGER(iwp) :: m !< running index for surface type 5114 INTEGER(iwp) :: n !< running index for number of chemical species 5102 5115 5103 5116 … … 5307 5320 IMPLICIT NONE 5308 5321 5309 INTEGER(iwp) :: i !< Running index in the x-direction5322 INTEGER(iwp) :: i !< running index in the x-direction 5310 5323 INTEGER(iwp) :: ierr !< MPI error code 5311 INTEGER(iwp) :: j !< Running index in the y-direction 5312 INTEGER(iwp) :: k !< Running index in the z-direction 5313 INTEGER(iwp) :: n !< Running index over the boundary faces: l, r, s, n and t 5314 5315 REAL(wp) :: dxdy !< Surface area of grid cell top face 5316 REAL(wp) :: innor !< Inner normal vector of the grid cell face 5317 REAL(wp) :: sub_sum !< Intermediate sum for reducing the loss of signifigant digits in 2-D summations 5318 REAL(wp) :: u_corr_left !< Correction added to the left boundary value of u 5319 REAL(wp) :: u_corr_right !< Correction added to the right boundary value of u 5320 REAL(wp) :: v_corr_south !< Correction added to the south boundary value of v 5321 REAL(wp) :: v_corr_north !< Correction added to the north boundary value of v 5322 REAL(wp) :: volume_flux_integral !< Surface integral of volume flux over the domain boundaries 5323 REAL(wp) :: volume_flux_local !< Surface integral of volume flux over the subdomain boundary face 5324 REAL(wp) :: w_corr_top !< Correction added to the top boundary value of w 5325 5326 REAL(wp), DIMENSION(5) :: volume_flux !< Surface integral of volume flux over each boundary face of the domain 5327 5324 INTEGER(iwp) :: j !< running index in the y-direction 5325 INTEGER(iwp) :: k !< running index in the z-direction 5326 INTEGER(iwp) :: n !< running index over the boundary faces: l, r, s, n and t 5327 5328 REAL(wp) :: dxdy !< surface area of grid cell top face 5329 REAL(wp) :: innor !< inner normal vector of the grid cell face 5330 REAL(wp) :: sub_sum !< intermediate sum for reducing the loss of signifigant digits in 2-D summations 5331 REAL(wp) :: u_corr_left !< correction added to the left boundary value of u 5332 REAL(wp) :: u_corr_right !< correction added to the right boundary value of u 5333 REAL(wp) :: v_corr_south !< correction added to the south boundary value of v 5334 REAL(wp) :: v_corr_north !< correction added to the north boundary value of v 5335 REAL(wp) :: volume_flux_integral !< surface integral of volume flux over the domain boundaries 5336 REAL(wp) :: volume_flux_local !< surface integral of volume flux over the subdomain boundary face 5337 REAL(wp) :: w_corr_top !< correction added to the top boundary value of w 5338 5339 REAL(wp), DIMENSION(5) :: volume_flux !< surface integral of volume flux over each boundary face of the domain 5328 5340 5329 5341 ! … … 5534 5546 IMPLICIT NONE 5535 5547 5536 INTEGER(iwp) :: i !< Running index in the x-direction5548 INTEGER(iwp) :: i !< running index in the x-direction 5537 5549 INTEGER(iwp) :: ierr !< MPI error code 5538 INTEGER(iwp) :: j !< Running index in the y-direction5539 INTEGER(iwp) :: k !< Running index in the z-direction5540 5541 REAL(wp) :: dxdy !< Surface area of grid cell top face5542 REAL(wp) :: sub_sum !< Intermediate sum for reducing the loss of signifigant digits in 2-D summations5543 REAL(wp) :: top_area !< Top boundary face area5544 REAL(wp) :: volume_flux !< Surface integral of volume flux over the top boundary face5545 REAL(wp) :: volume_flux_local !< Surface integral of volume flux over the subdomain boundary face5546 REAL(wp) :: w_corr_top !< Correction added to the top boundary value of w5550 INTEGER(iwp) :: j !< running index in the y-direction 5551 INTEGER(iwp) :: k !< running index in the z-direction 5552 5553 REAL(wp) :: dxdy !< surface area of grid cell top face 5554 REAL(wp) :: sub_sum !< intermediate sum for reducing the loss of signifigant digits in 2-D summations 5555 REAL(wp) :: top_area !< top boundary face area 5556 REAL(wp) :: volume_flux !< surface integral of volume flux over the top boundary face 5557 REAL(wp) :: volume_flux_local !< surface integral of volume flux over the subdomain boundary face 5558 REAL(wp) :: w_corr_top !< correction added to the top boundary value of w 5547 5559 5548 5560
Note: See TracChangeset
for help on using the changeset viewer.