Changeset 1925 for palm/trunk/SOURCE/pmc_interface_mod.f90
- Timestamp:
- Jun 7, 2016 11:34:42 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/pmc_interface_mod.f90
r1901 r1925 539 539 INTEGER(iwp) :: k !: 540 540 INTEGER(iwp) :: m !: 541 INTEGER(iwp) :: mm !: 542 INTEGER(iwp) :: nest_overlap !: 541 543 INTEGER(iwp) :: nomatch !: 542 544 INTEGER(iwp) :: nx_cl !: … … 546 548 INTEGER(iwp), DIMENSION(5) :: val !: 547 549 550 551 REAL(wp), DIMENSION(:), ALLOCATABLE :: ch_xl !: 552 REAL(wp), DIMENSION(:), ALLOCATABLE :: ch_xr !: 553 REAL(wp), DIMENSION(:), ALLOCATABLE :: ch_ys !: 554 REAL(wp), DIMENSION(:), ALLOCATABLE :: ch_yn !: 548 555 REAL(wp) :: dx_cl !: 549 556 REAL(wp) :: dy_cl !: … … 562 569 563 570 ! 564 !-- Get coordinates from all clients 571 !-- Corners of all children of the present parent 572 IF ( ( SIZE( pmc_server_for_client ) - 1 > 0 ) .AND. myid == 0 ) THEN 573 ALLOCATE( ch_xl(1:SIZE( pmc_server_for_client ) - 1) ) 574 ALLOCATE( ch_xr(1:SIZE( pmc_server_for_client ) - 1) ) 575 ALLOCATE( ch_ys(1:SIZE( pmc_server_for_client ) - 1) ) 576 ALLOCATE( ch_yn(1:SIZE( pmc_server_for_client ) - 1) ) 577 ENDIF 578 579 ! 580 !-- Get coordinates from all children 565 581 DO m = 1, SIZE( pmc_server_for_client ) - 1 566 582 … … 589 605 590 606 ! 591 !-- Get absolute coordinates from the c lient607 !-- Get absolute coordinates from the child 592 608 ALLOCATE( cl_coord_x(-nbgp:nx_cl+nbgp) ) 593 609 ALLOCATE( cl_coord_y(-nbgp:ny_cl+nbgp) ) … … 624 640 ENDIF 625 641 642 ! 643 !-- Check that parallel nest domains, if any, do not overlap. 644 nest_overlap = 0 645 IF ( SIZE( pmc_server_for_client ) - 1 > 0 ) THEN 646 ch_xl(m) = cl_coord_x(-nbgp) 647 ch_xr(m) = cl_coord_x(nx_cl+nbgp) 648 ch_ys(m) = cl_coord_y(-nbgp) 649 ch_yn(m) = cl_coord_y(ny_cl+nbgp) 650 651 IF ( m > 1 ) THEN 652 DO mm = 1, m-1 653 IF ( ( ch_xl(m) < ch_xr(mm) .OR. ch_xr(m) > ch_xl(mm) ) .AND. & 654 ( ch_ys(m) < ch_yn(mm) .OR. ch_yn(m) > ch_ys(mm) ) ) THEN 655 nest_overlap = 1 656 ENDIF 657 ENDDO 658 ENDIF 659 ENDIF 660 626 661 DEALLOCATE( cl_coord_x ) 627 662 DEALLOCATE( cl_coord_y ) 628 663 629 664 ! 630 !-- Send coarse grid information to c lient665 !-- Send coarse grid information to child 631 666 CALL pmc_send_to_client( client_id, define_coarse_grid_real, & 632 667 SIZE( define_coarse_grid_real ), 0, 21, & … … 636 671 637 672 ! 638 !-- Send local grid to c lient673 !-- Send local grid to child 639 674 CALL pmc_send_to_client( client_id, coord_x, nx+1+2*nbgp, 0, 24, & 640 675 ierr ) … … 653 688 CALL MPI_BCAST( nomatch, 1, MPI_INTEGER, 0, comm2d, ierr ) 654 689 IF ( nomatch /= 0 ) THEN 655 WRITE ( message_string, * ) 'Error: nested client domain does ', & 656 'not fit into its server domain' 657 CALL message( 'pmc_palm_setup_server', 'PA0XYZ', 1, 2, 0, 6, 0 ) 690 WRITE ( message_string, * ) 'Error: nested child domain does ', & 691 'not fit into its parent domain' 692 CALL message( 'pmc_palm_setup_server', 'PA0425', 3, 2, 0, 6, 0 ) 693 ENDIF 694 695 CALL MPI_BCAST( nest_overlap, 1, MPI_INTEGER, 0, comm2d, ierr ) 696 IF ( nest_overlap /= 0 ) THEN 697 WRITE ( message_string, * ) 'Nested parallel child ', & 698 'domains overlap' 699 CALL message( 'pmc_palm_setup_server', 'PA0426', 3, 2, 0, 6, 0 ) 658 700 ENDIF 659 701 … … 674 716 CALL pmc_s_setind_and_allocmem( client_id ) 675 717 ENDDO 718 719 IF ( ( SIZE( pmc_server_for_client ) - 1 > 0 ) .AND. myid == 0 ) THEN 720 DEALLOCATE( ch_xl ) 721 DEALLOCATE( ch_xr ) 722 DEALLOCATE( ch_ys ) 723 DEALLOCATE( ch_yn ) 724 ENDIF 676 725 677 726 CONTAINS … … 3088 3137 ELSE 3089 3138 3090 IF ( nesting_datatransfer_mode == 'cascade' ) THEN3139 IF ( nesting_datatransfer_mode == 'cascade' ) THEN 3091 3140 3092 3141 CALL pmci_client_datatrans( server_to_client ) … … 3096 3145 CALL pmci_client_datatrans( client_to_server ) 3097 3146 3098 ELSEIF ( nesting_datatransfer_mode == 'overlap') THEN3147 ELSEIF ( nesting_datatransfer_mode == 'overlap' ) THEN 3099 3148 3100 3149 CALL pmci_server_datatrans( server_to_client ) … … 3104 3153 CALL pmci_server_datatrans( client_to_server ) 3105 3154 3106 ELSEIF ( TRIM( nesting_datatransfer_mode ) == 'mixed' ) THEN3155 ELSEIF ( TRIM( nesting_datatransfer_mode ) == 'mixed' ) THEN 3107 3156 3108 3157 CALL pmci_server_datatrans( server_to_client ) … … 3917 3966 REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN) :: r2z !: 3918 3967 3919 INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN) :: ic 3920 INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN) :: jc 3921 INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN) :: kc 3968 INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN) :: ic !: 3969 INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN) :: jc !: 3970 INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN) :: kc !: 3922 3971 3923 3972 CHARACTER(LEN=1), INTENT(IN) :: var !:
Note: See TracChangeset
for help on using the changeset viewer.