Changeset 13490 for NEMO/trunk/src
- Timestamp:
- 2020-09-18T08:48:31+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/LBC/mppini.F90
r13438 r13490 786 786 !! ** Method : 787 787 !!---------------------------------------------------------------------- 788 INTEGER, INTENT(in ) :: knbij ! total number if subdomains(knbi*knbj)788 INTEGER, INTENT(in ) :: knbij ! total number of subdomains (knbi*knbj) 789 789 INTEGER, OPTIONAL, INTENT( out) :: knbi, knbj ! number if subdomains along i and j (knbi and knbj) 790 790 INTEGER, OPTIONAL, INTENT( out) :: knbcnt ! number of land subdomains … … 794 794 INTEGER :: iszitst, iszjtst 795 795 INTEGER :: isziref, iszjref 796 INTEGER :: iszimin, iszjmin 796 797 INTEGER :: inbij, iszij 797 798 INTEGER :: inbimax, inbjmax, inbijmax, inbijold … … 822 823 inbimax = 0 823 824 inbjmax = 0 824 isziref = Ni0glo*Nj0glo+1 825 iszjref = Ni0glo*Nj0glo+1 825 isziref = jpiglo*jpjglo+1 ! define a value that is larger than the largest possible 826 iszjref = jpiglo*jpjglo+1 827 ! 828 iszimin = 4*nn_hls ! minimum size of the MPI subdomain so halos are always adressing neighbor inner domain 829 iszjmin = 4*nn_hls 830 IF( jperio == 3 .OR. jperio == 4 ) iszjmin = MAX(iszjmin, 2+3*nn_hls) ! V and F folding must be outside of southern halos 831 IF( jperio == 5 .OR. jperio == 6 ) iszjmin = MAX(iszjmin, 1+3*nn_hls) ! V and F folding must be outside of southern halos 826 832 ! 827 833 ! get the list of knbi that gives a smaller jpimax than knbi-1 … … 831 837 iszitst = ( nx_global+2-2*nn_hls + (ji-1) ) / ji + 2*nn_hls ! first dim. 832 838 #else 833 iszitst = ( Ni0glo + (ji-1) ) / ji 839 iszitst = ( Ni0glo + (ji-1) ) / ji + 2*nn_hls ! max subdomain i-size 834 840 #endif 835 IF( iszitst < isziref ) THEN841 IF( iszitst < isziref .AND. iszitst >= iszimin ) THEN 836 842 isziref = iszitst 837 843 inbimax = inbimax + 1 … … 842 848 iszjtst = ( ny_global+2-2*nn_hls + (ji-1) ) / ji + 2*nn_hls ! first dim. 843 849 #else 844 iszjtst = ( Nj0glo + (ji-1) ) / ji 850 iszjtst = ( Nj0glo + (ji-1) ) / ji + 2*nn_hls ! max subdomain j-size 845 851 #endif 846 IF( iszjtst < iszjref ) THEN852 IF( iszjtst < iszjref .AND. iszjtst >= iszjmin ) THEN 847 853 iszjref = iszjtst 848 854 inbjmax = inbjmax + 1 … … 897 903 isz0 = 0 ! number of best partitions 898 904 inbij = 1 ! start with the min value of inbij1 => 1 899 iszij = Ni0glo*Nj0glo+1 ! default: larger than global domain905 iszij = jpiglo*jpjglo+1 ! default: larger than global domain 900 906 DO WHILE( inbij <= inbijmax ) ! if we did not reach the max of inbij1 901 907 ii = MINLOC(iszij1, mask = inbij1 == inbij, dim = 1) ! warning: send back the first occurence if multiple results 902 908 IF ( iszij1(ii) < iszij ) THEN 909 ii = MINLOC( iszi1+iszj1, mask = iszij1 == iszij1(ii) .AND. inbij1 == inbij, dim = 1) ! select the smaller perimeter if multiple min 903 910 isz0 = isz0 + 1 904 911 indexok(isz0) = ii
Note: See TracChangeset
for help on using the changeset viewer.