Changeset 14037 for NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/LBC/mppini.F90
- Timestamp:
- 2020-12-03T12:20:38+01:00 (3 years ago)
- Location:
- NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG
- Property svn:externals
-
old new 8 8 9 9 # SETTE 10 ^/utils/CI/sette @13292sette10 ^/utils/CI/sette_wave@13990 sette
-
- Property svn:externals
-
NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/LBC/mppini.F90
r13305 r14037 62 62 !!---------------------------------------------------------------------- 63 63 ! 64 jpiglo = Ni0glo 65 jpjglo = Nj0glo 64 nn_hls = 1 65 jpiglo = Ni0glo + 2 * nn_hls 66 jpjglo = Nj0glo + 2 * nn_hls 66 67 jpimax = jpiglo 67 68 jpjmax = jpjglo … … 72 73 jpjm1 = jpj-1 ! " " 73 74 jpkm1 = MAX( 1, jpk-1 ) ! " " 74 !75 CALL init_doloop ! set start/end indices or do-loop depending on the halo width value (nn_hls)76 !77 75 jpij = jpi*jpj 78 76 jpni = 1 79 77 jpnj = 1 80 78 jpnij = jpni*jpnj 81 nn_hls = 182 79 nimpp = 1 83 80 njmpp = 1 … … 91 88 l_Jperio = jpnj == 1 .AND. (jperio == 2 .OR. jperio == 7) 92 89 ! 90 CALL init_doloop ! set start/end indices or do-loop depending on the halo width value (nn_hls) 91 ! 93 92 IF(lwp) THEN 94 93 WRITE(numout,*) … … 99 98 ENDIF 100 99 ! 101 IF( jpni /= 1 .OR. jpnj /= 1 .OR. jpnij /= 1 ) &102 CALL ctl_stop( 'mpp_init: equality jpni = jpnj = jpnij = 1 is not satisfied', &103 & 'the domain is lay out for distributed memory computing!' )104 !105 100 #if defined key_agrif 106 101 IF (.NOT.agrif_root()) THEN … … 547 542 ij = ijn(narea) 548 543 ! 549 ! set default neighbours550 noso = ii_noso(narea)551 nowe = ii_nowe(narea)552 noea = ii_noea(narea)553 nono = ii_nono(narea)554 544 jpi = ijpi(ii,ij) 555 545 !!$ Nis0 = iis0(ii,ij) … … 563 553 njmpp = ijmppt(ii,ij) 564 554 jpk = jpkglo ! third dim 555 556 ! set default neighbours 557 noso = ii_noso(narea) 558 nowe = ii_nowe(narea) 559 noea = ii_noea(narea) 560 nono = ii_nono(narea) 561 562 nones = -1 563 nonws = -1 564 noses = -1 565 nosws = -1 566 567 noner = -1 568 nonwr = -1 569 noser = -1 570 noswr = -1 571 572 IF((nbondi .eq. -1) .or. (nbondi .eq. 0)) THEN ! east neighbour exists 573 IF(ibondj(iin(noea+1),ijn(noea+1)) .eq. 0) THEN 574 nones = ii_nono(noea+1) ! east neighbour has north and south neighbours 575 noses = ii_noso(noea+1) 576 ELSEIF(ibondj(iin(noea+1),ijn(noea+1)) .eq. -1) THEN 577 nones = ii_nono(noea+1) ! east neighbour has north neighbour 578 ELSEIF(ibondj(iin(noea+1),ijn(noea+1)) .eq. 1) THEN 579 noses = ii_noso(noea+1) ! east neighbour has south neighbour 580 END IF 581 END IF 582 IF((nbondi .eq. 1) .or. (nbondi .eq. 0)) THEN ! west neighbour exists 583 IF(ibondj(iin(nowe+1),ijn(nowe+1)) .eq. 0) THEN 584 nonws = ii_nono(nowe+1) ! west neighbour has north and south neighbours 585 nosws = ii_noso(nowe+1) 586 ELSEIF(ibondj(iin(nowe+1),ijn(nowe+1)) .eq. -1) THEN 587 nonws = ii_nono(nowe+1) ! west neighbour has north neighbour 588 ELSEIF(ibondj(iin(nowe+1),ijn(nowe+1)) .eq. 1) THEN 589 nosws = ii_noso(nowe+1) ! west neighbour has north neighbour 590 END IF 591 END IF 592 593 IF((nbondj .eq. -1) .or. (nbondj .eq. 0)) THEN ! north neighbour exists 594 IF(ibondi(iin(nono+1),ijn(nono+1)) .eq. 0) THEN 595 noner = ii_noea(nono+1) ! north neighbour has east and west neighbours 596 nonwr = ii_nowe(nono+1) 597 ELSEIF(ibondi(iin(nono+1),ijn(nono+1)) .eq. -1) THEN 598 noner = ii_noea(nono+1) ! north neighbour has east neighbour 599 ELSEIF(ibondi(iin(nono+1),ijn(nono+1)) .eq. 1) THEN 600 nonwr = ii_nowe(nono+1) ! north neighbour has west neighbour 601 END IF 602 END IF 603 IF((nbondj .eq. 1) .or. (nbondj .eq. 0)) THEN ! south neighbour exists 604 IF(ibondi(iin(noso+1),ijn(noso+1)) .eq. 0) THEN 605 noser = ii_noea(noso+1) ! south neighbour has east and west neighbours 606 noswr = ii_nowe(noso+1) 607 ELSEIF(ibondi(iin(noso+1),ijn(noso+1)) .eq. -1) THEN 608 noser = ii_noea(noso+1) ! south neighbour has east neighbour 609 ELSEIF(ibondi(iin(noso+1),ijn(noso+1)) .eq. 1) THEN 610 noswr = ii_nowe(noso+1) ! south neighbour has west neighbour 611 END IF 612 END IF 613 565 614 ! 566 615 CALL init_doloop ! set start/end indices of do-loop, depending on the halo width value (nn_hls) … … 653 702 ENDIF 654 703 ENDIF 704 705 ! 706 CALL mpp_ini_nc ! Initialize communicator for neighbourhood collective communications 655 707 ! 656 708 CALL init_ioipsl ! Prepare NetCDF output file (if necessary) … … 676 728 END SUBROUTINE mpp_init 677 729 730 #endif 678 731 679 732 SUBROUTINE mpp_basesplit( kiglo, kjglo, khls, knbi, knbj, kimax, kjmax, kimppt, kjmppt, klci, klcj) … … 790 843 !! ** Method : 791 844 !!---------------------------------------------------------------------- 792 INTEGER, INTENT(in ) :: knbij ! total number if subdomains(knbi*knbj)845 INTEGER, INTENT(in ) :: knbij ! total number of subdomains (knbi*knbj) 793 846 INTEGER, OPTIONAL, INTENT( out) :: knbi, knbj ! number if subdomains along i and j (knbi and knbj) 794 847 INTEGER, OPTIONAL, INTENT( out) :: knbcnt ! number of land subdomains … … 798 851 INTEGER :: iszitst, iszjtst 799 852 INTEGER :: isziref, iszjref 853 INTEGER :: iszimin, iszjmin 800 854 INTEGER :: inbij, iszij 801 855 INTEGER :: inbimax, inbjmax, inbijmax, inbijold … … 826 880 inbimax = 0 827 881 inbjmax = 0 828 isziref = Ni0glo*Nj0glo+1 829 iszjref = Ni0glo*Nj0glo+1 882 isziref = jpiglo*jpjglo+1 ! define a value that is larger than the largest possible 883 iszjref = jpiglo*jpjglo+1 884 ! 885 iszimin = 4*nn_hls ! minimum size of the MPI subdomain so halos are always adressing neighbor inner domain 886 iszjmin = 4*nn_hls 887 IF( jperio == 3 .OR. jperio == 4 ) iszjmin = MAX(iszjmin, 2+3*nn_hls) ! V and F folding must be outside of southern halos 888 IF( jperio == 5 .OR. jperio == 6 ) iszjmin = MAX(iszjmin, 1+3*nn_hls) ! V and F folding must be outside of southern halos 830 889 ! 831 890 ! get the list of knbi that gives a smaller jpimax than knbi-1 … … 835 894 iszitst = ( nx_global+2-2*nn_hls + (ji-1) ) / ji + 2*nn_hls ! first dim. 836 895 #else 837 iszitst = ( Ni0glo + (ji-1) ) / ji 896 iszitst = ( Ni0glo + (ji-1) ) / ji + 2*nn_hls ! max subdomain i-size 838 897 #endif 839 IF( iszitst < isziref ) THEN898 IF( iszitst < isziref .AND. iszitst >= iszimin ) THEN 840 899 isziref = iszitst 841 900 inbimax = inbimax + 1 … … 846 905 iszjtst = ( ny_global+2-2*nn_hls + (ji-1) ) / ji + 2*nn_hls ! first dim. 847 906 #else 848 iszjtst = ( Nj0glo + (ji-1) ) / ji 907 iszjtst = ( Nj0glo + (ji-1) ) / ji + 2*nn_hls ! max subdomain j-size 849 908 #endif 850 IF( iszjtst < iszjref ) THEN909 IF( iszjtst < iszjref .AND. iszjtst >= iszjmin ) THEN 851 910 iszjref = iszjtst 852 911 inbjmax = inbjmax + 1 … … 901 960 isz0 = 0 ! number of best partitions 902 961 inbij = 1 ! start with the min value of inbij1 => 1 903 iszij = Ni0glo*Nj0glo+1 ! default: larger than global domain962 iszij = jpiglo*jpjglo+1 ! default: larger than global domain 904 963 DO WHILE( inbij <= inbijmax ) ! if we did not reach the max of inbij1 905 964 ii = MINLOC(iszij1, mask = inbij1 == inbij, dim = 1) ! warning: send back the first occurence if multiple results 906 965 IF ( iszij1(ii) < iszij ) THEN 966 ii = MINLOC( iszi1+iszj1, mask = iszij1 == iszij1(ii) .AND. inbij1 == inbij, dim = 1) ! select the smaller perimeter if multiple min 907 967 isz0 = isz0 + 1 908 968 indexok(isz0) = ii … … 1322 1382 END SUBROUTINE init_nfdcom 1323 1383 1324 #endif1325 1384 1326 1385 SUBROUTINE init_doloop
Note: See TracChangeset
for help on using the changeset viewer.