Changeset 15368 for NEMO/trunk/src/OCE
- Timestamp:
- 2021-10-14T10:25:34+02:00 (3 years ago)
- Location:
- NEMO/trunk/src/OCE/BDY
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/BDY/bdydta.F90
r15360 r15368 258 258 END DO 259 259 ENDIF ! ltotvel 260 IF( bf_alias(jp_bdyv3d)%ltotvel ) THEN ! if we read 3D total velocity (can be true only if u3d was read)260 IF( bf_alias(jp_bdyv3d)%ltotvel ) THEN ! if we read 3D total velocity (can be true only if v3d was read) 261 261 igrd = 3 ! meridional velocity 262 262 DO ib = 1, idx_bdy(jbdy)%nblen(igrd) -
NEMO/trunk/src/OCE/BDY/bdydyn2d.F90
r15363 r15368 50 50 !! 51 51 INTEGER :: ib_bdy, ir ! BDY set index, rim index 52 INTEGER, DIMENSION(3) :: idir3 53 INTEGER, DIMENSION(6) :: idir6 52 54 LOGICAL :: llrim0 ! indicate if rim 0 is treated 53 55 LOGICAL, DIMENSION(8) :: llsend2, llrecv2, llsend3, llrecv3 ! indicate how communications are to be carried out … … 87 89 SELECT CASE( cn_dyn2d(ib_bdy) ) 88 90 CASE('flather') 89 llsend2(:) = llsend2(:) .OR. lsend_bdyext(ib_bdy,2,:,ir) .OR. lsend_bdyint(ib_bdy,2,:,ir) 90 llrecv2(:) = llrecv2(:) .OR. lrecv_bdyext(ib_bdy,2,:,ir) .OR. lrecv_bdyint(ib_bdy,2,:,ir) 91 llsend3(:) = llsend3(:) .OR. lsend_bdyext(ib_bdy,3,:,ir) .OR. lsend_bdyint(ib_bdy,3,:,ir) 92 llrecv3(:) = llrecv3(:) .OR. lrecv_bdyext(ib_bdy,3,:,ir) .OR. lrecv_bdyint(ib_bdy,3,:,ir) 91 idir6 = (/ jpwe, jpea, jpsw, jpse, jpnw, jpne /) 92 llsend2(idir6) = llsend2(idir6) .OR. lsend_bdyint(ib_bdy,2,idir6,ir) ! west/east, U points 93 idir3 = (/ jpwe, jpsw, jpnw /) 94 llsend2(idir3) = llsend2(idir3) .OR. lsend_bdyext(ib_bdy,2,idir3,ir) ! nei might search point towards its east bdy 95 llrecv2(idir6) = llrecv2(idir6) .OR. lrecv_bdyint(ib_bdy,2,idir6,ir) ! west/east, U points 96 idir3 = (/ jpea, jpse, jpne /) 97 llrecv2(idir3) = llrecv2(idir3) .OR. lrecv_bdyext(ib_bdy,2,idir3,ir) ! might search point towards bdy on the east 98 idir6 = (/ jpso, jpno, jpsw, jpse, jpnw, jpne /) 99 llsend3(idir6) = llsend3(idir6) .OR. lsend_bdyint(ib_bdy,3,idir6,ir) ! north/south, V points 100 idir3 = (/ jpso, jpsw, jpse /) 101 llsend3(idir3) = llsend3(idir3) .OR. lsend_bdyext(ib_bdy,3,idir3,ir) ! nei might search point towards its north bdy 102 llrecv3(idir6) = llrecv3(idir6) .OR. lrecv_bdyint(ib_bdy,3,idir6,ir) ! north/south, V points 103 idir3 = (/ jpno, jpnw, jpne /) 104 llrecv3(idir3) = llrecv3(idir3) .OR. lrecv_bdyext(ib_bdy,3,idir3,ir) ! might search point towards bdy on the north 93 105 CASE('orlanski', 'orlanski_npo') 94 106 llsend2(:) = llsend2(:) .OR. lsend_bdyolr(ib_bdy,2,:,ir) ! possibly every direction, U points -
NEMO/trunk/src/OCE/BDY/bdydyn3d.F90
r15363 r15368 45 45 ! 46 46 INTEGER :: ib_bdy, ir ! BDY set index, rim index 47 INTEGER, DIMENSION(6) :: idir6 47 48 LOGICAL :: llrim0 ! indicate if rim 0 is treated 48 49 LOGICAL, DIMENSION(8) :: llsend2, llrecv2, llsend3, llrecv3 ! indicate how communications are to be carried out … … 85 86 llsend3(:) = llsend3(:) .OR. lsend_bdyolr(ib_bdy,3,:,ir) ! possibly every direction, V points 86 87 llrecv3(:) = llrecv3(:) .OR. lrecv_bdyolr(ib_bdy,3,:,ir) ! possibly every direction, V points 87 CASE('zerograd', 'neumann') 88 llsend2(:) = llsend2(:) .OR. lsend_bdyint(ib_bdy,2,:,ir) 89 llrecv2(:) = llrecv2(:) .OR. lrecv_bdyint(ib_bdy,2,:,ir) 90 llsend3(:) = llsend3(:) .OR. lsend_bdyint(ib_bdy,3,:,ir) 91 llrecv3(:) = llrecv3(:) .OR. lrecv_bdyint(ib_bdy,3,:,ir) 88 CASE('zerograd') 89 idir6 = (/ jpso, jpno, jpsw, jpse, jpnw, jpne /) 90 llsend2(idir6) = llsend2(idir6) .OR. lsend_bdyint(ib_bdy,2,idir6,ir) ! north/south, U points 91 llrecv2(idir6) = llrecv2(idir6) .OR. lrecv_bdyint(ib_bdy,2,idir6,ir) ! north/south, U points 92 idir6 = (/ jpwe, jpea, jpsw, jpse, jpnw, jpne /) 93 llsend3(idir6) = llsend3(idir6) .OR. lsend_bdyint(ib_bdy,3,idir6,ir) ! west/east, V points 94 llrecv3(idir6) = llrecv3(idir6) .OR. lrecv_bdyint(ib_bdy,3,idir6,ir) ! west/east, V points 95 CASE('neumann') 96 llsend2(:) = llsend2(:) .OR. lsend_bdyint(ib_bdy,2,:,ir) ! possibly every direction, U points 97 llrecv2(:) = llrecv2(:) .OR. lrecv_bdyint(ib_bdy,2,:,ir) ! possibly every direction, U points 98 llsend3(:) = llsend3(:) .OR. lsend_bdyint(ib_bdy,3,:,ir) ! possibly every direction, V points 99 llrecv3(:) = llrecv3(:) .OR. lrecv_bdyint(ib_bdy,3,:,ir) ! possibly every direction, V points 92 100 END SELECT 93 101 END DO -
NEMO/trunk/src/OCE/BDY/bdyice.F90
r15360 r15368 331 331 INTEGER :: jbdy, ir ! BDY set index, rim index 332 332 INTEGER :: ibeg, iend ! length of rim to be treated (rim 0 or rim 1) 333 INTEGER, DIMENSION(3) :: idir3 333 334 REAL(wp) :: zmsk1, zmsk2, zflag 334 335 LOGICAL, DIMENSION(8) :: llsend2, llrecv2, llsend3, llrecv3 ! indicate how communications are to be carried out … … 430 431 DO jbdy = 1, nb_bdy 431 432 IF( cn_ice(jbdy) == 'frs' .AND. nn_ice_dta(jbdy) /= 0 ) THEN 432 llsend2(:) = llsend2(:) .OR. lsend_bdyext(ib_bdy,2,:,ir) .OR. lsend_bdyint(ib_bdy,2,:,ir) 433 llrecv2(:) = llrecv2(:) .OR. lrecv_bdyext(ib_bdy,2,:,ir) .OR. lrecv_bdyint(ib_bdy,2,:,ir) 433 llsend2( : ) = llsend2( : ) .OR. lsend_bdyint(jbdy,2, : ,ir) ! possibly every direction, U points 434 idir3 = (/ jpwe, jpsw, jpnw /) 435 llsend2(idir3) = llsend2(idir3) .OR. lsend_bdyext(jbdy,2,idir3,ir) ! nei might search point towards its ea bdy 436 llrecv2( : ) = llrecv2( : ) .OR. lrecv_bdyint(jbdy,2, : ,ir) ! possibly every direction, U points 437 idir3 = (/ jpea, jpse, jpne /) 438 llrecv2(idir3) = llrecv2(idir3) .OR. lrecv_bdyext(jbdy,2,idir3,ir) ! might search point towards east bdy 434 439 END IF 435 440 END DO … … 442 447 DO jbdy = 1, nb_bdy 443 448 IF( cn_ice(jbdy) == 'frs' .AND. nn_ice_dta(jbdy) /= 0 ) THEN 444 llsend3(:) = llsend3(:) .OR. lsend_bdyext(ib_bdy,3,:,ir) .OR. lsend_bdyint(ib_bdy,3,:,ir) 445 llrecv3(:) = llrecv3(:) .OR. lrecv_bdyext(ib_bdy,3,:,ir) .OR. lrecv_bdyint(ib_bdy,3,:,ir) 449 llsend3( : ) = llsend3( : ) .OR. lsend_bdyint(jbdy,3, : ,ir) ! possibly every direction, V points 450 idir3 = (/ jpso, jpsw, jpse /) 451 llsend3(idir3) = llsend3(idir3) .OR. lsend_bdyext(jbdy,3,idir3,ir) ! nei might search point towards its no bdy 452 llrecv3( : ) = llrecv3( : ) .OR. lrecv_bdyint(jbdy,3, : ,ir) ! possibly every direction, V points 453 idir3 = (/ jpno, jpnw, jpne /) 454 llrecv3(idir3) = llrecv3(idir3) .OR. lrecv_bdyext(jbdy,3,idir3,ir) ! might search point towards north bdy 446 455 END IF 447 456 END DO -
NEMO/trunk/src/OCE/BDY/bdyini.F90
r15363 r15368 147 147 INTEGER :: icount, icountr, icountr0, ibr_max ! local integers 148 148 INTEGER :: ilen1 ! - - 149 INTEGER :: iiRst, iiRnd, iiSst, iiSnd, ii Rcorn, iiSdiag, iiSsono150 INTEGER :: ijRst, ijRnd, ijSst, ijSnd, ij Rcorn, ijSdiag, ijSsono149 INTEGER :: iiRst, iiRnd, iiSst, iiSnd, iiSstdiag, iiSnddiag, iiSstsono, iiSndsono 150 INTEGER :: ijRst, ijRnd, ijSst, ijSnd, ijSstdiag, ijSnddiag, ijSstsono, ijSndsono 151 151 INTEGER :: iiout, ijout, iioutdir, ijoutdir, icnt 152 152 INTEGER :: iRnei, iRdiag, iRsono … … 807 807 ! outside of the MPI domain ..o|__:__ 808 808 iRnei = jpwe ; iSnei = jpea 809 iiRst = 1 ; ijRst = 2! Rcv we-side starting point, excluding sw-corner810 iiRnd = 1 ; ijRnd = jpj-1! Rcv we-side ending point, excluding nw-corner811 iiSst = jpi-2*nn_hls+1 ; ijSst = 2! Snd ea-side starting point, excluding se-corner812 iiSnd = jpi-2*nn_hls+1 ; ijSnd = jpj-1! Snd ea-side ending point, excluding ne-corner809 iiRst = 1 ; ijRst = Njs0 ! Rcv we-side starting point, excluding sw-corner 810 iiRnd = nn_hls ; ijRnd = Nje0 ! Rcv we-side ending point, excluding nw-corner 811 iiSst = Nie0-nn_hls+1 ; ijSst = Njs0 ! Snd ea-side starting point, excluding se-corner 812 iiSnd = Nie0 ; ijSnd = Nje0 ! Snd ea-side ending point, excluding ne-corner 813 813 iioutdir = -1 ; ijoutdir = -999 ! outside MPI domain: westward 814 814 ! ______.... … … 817 817 ! outside of the MPI domain ___:__|o.. 818 818 iRnei = jpea ; iSnei = jpwe 819 iiRst = jpi ; ijRst = 2! Rcv ea-side starting point, excluding se-corner820 iiRnd = jpi ; ijRnd = jpj-1! Rcv ea-side ending point, excluding ne-corner821 iiSst = 2*nn_hls ; ijSst = 2! Snd we-side starting point, excluding sw-corner822 iiSnd = 2*nn_hls ; ijSnd = jpj-1! Snd we-side ending point, excluding nw-corner819 iiRst = Nie0+1 ; ijRst = Njs0 ! Rcv ea-side starting point, excluding se-corner 820 iiRnd = jpi ; ijRnd = Nje0 ! Rcv ea-side ending point, excluding ne-corner 821 iiSst = Nis0 ; ijSst = Njs0 ! Snd we-side starting point, excluding sw-corner 822 iiSnd = Nis0+nn_hls-1 ; ijSnd = Nje0 ! Snd we-side ending point, excluding nw-corner 823 823 iioutdir = 1 ; ijoutdir = -999 ! outside MPI domain: eastward 824 824 ! … … 829 829 ! : : 830 830 iRnei = jpso ; iSnei = jpno 831 iiRst = 2; ijRst = 1 ! Rcv so-side starting point, excluding sw-corner832 iiRnd = jpi-1 ; ijRnd = 1! Rcv so-side ending point, excluding se-corner833 iiSst = 2 ; ijSst = jpj-2*nn_hls+1! Snd no-side starting point, excluding nw-corner834 iiSnd = jpi-1 ; ijSnd = jpj-2*nn_hls+1! Snd no-side ending point, excluding ne-corner831 iiRst = Nis0 ; ijRst = 1 ! Rcv so-side starting point, excluding sw-corner 832 iiRnd = Nie0 ; ijRnd = nn_hls ! Rcv so-side ending point, excluding se-corner 833 iiSst = Nis0 ; ijSst = Nje0-nn_hls+1 ! Snd no-side starting point, excluding nw-corner 834 iiSnd = Nie0 ; ijSnd = Nje0 ! Snd no-side ending point, excluding ne-corner 835 835 iioutdir = -999 ; ijoutdir = -1 ! outside MPI domain: southward 836 836 ! : : … … 840 840 ! |¨¨¨¨¨¨¨| 841 841 iRnei = jpno ; iSnei = jpso 842 iiRst = 2 ; ijRst = jpj! Rcv no-side starting point, excluding nw-corner843 iiRnd = jpi-1; ijRnd = jpj ! Rcv no-side ending point, excluding ne-corner844 iiSst = 2 ; ijSst = 2*nn_hls! Snd so-side starting point, excluding sw-corner845 iiSnd = jpi-1 ; ijSnd = 2*nn_hls! Snd so-side ending point, excluding se-corner842 iiRst = Nis0 ; ijRst = Nje0+1 ! Rcv no-side starting point, excluding nw-corner 843 iiRnd = Nie0 ; ijRnd = jpj ! Rcv no-side ending point, excluding ne-corner 844 iiSst = Nis0 ; ijSst = Njs0 ! Snd so-side starting point, excluding sw-corner 845 iiSnd = Nie0 ; ijSnd = Njs0+nn_hls-1 ! Snd so-side ending point, excluding se-corner 846 846 iioutdir = -999 ; ijoutdir = 1 ! outside MPI domain: northward 847 847 END SELECT … … 884 884 ! outside of the MPI domain o o o: 885 885 ! : 886 iRdiag = jpsw ; iRsono = jpso ! Recv: for sw or so 887 iSdiag = jpne ; iSsono = jpno ! Send: to ne or no 888 iiRcorn = 1 ; ijRcorn = 1 ! receiving sw-corner 889 iiSdiag = jpi-2*nn_hls+1 ; ijSdiag = jpj-2*nn_hls+1 ! send to sw-corner of ne neighbourg 890 iiSsono = 1 ; ijSsono = jpj-2*nn_hls+1 ! send to sw-corner of no neighbourg 891 iioutdir = -1 ; ijoutdir = -1 ! outside MPI domain: westward or southward 886 iRdiag = jpsw ; iRsono = jpso ! Recv: for sw or so 887 iSdiag = jpne ; iSsono = jpno ! Send: to ne or no 888 iiRst = 1 ; ijRst = 1 ! Rcv sw-corner starting point 889 iiRnd = nn_hls ; ijRnd = nn_hls ! Rcv sw-corner ending point 890 iiSstdiag = Nie0-nn_hls+1 ; ijSstdiag = Nje0-nn_hls+1 ! send to sw-corner of ne neighbourg 891 iiSnddiag = Nie0 ; ijSnddiag = Nje0 ! send to sw-corner of ne neighbourg 892 iiSstsono = 1 ; ijSstsono = Nje0-nn_hls+1 ! send to sw-corner of no neighbourg 893 iiSndsono = nn_hls ; ijSndsono = Nje0 ! send to sw-corner of no neighbourg 894 iioutdir = -1 ; ijoutdir = -1 ! outside MPI domain: westward or southward 892 895 ! ....|... 893 896 CASE( 2 ) ! x: rim on se-corner : |o … … 895 898 ! outside of the MPI domain :o o o 896 899 ! : 897 iRdiag = jpse ; iRsono = jpso ! Recv: for se or so 898 iSdiag = jpnw ; iSsono = jpno ! Send: to nw or no 899 iiRcorn = jpi ; ijRcorn = 1 ! receiving se-corner 900 iiSdiag = 2*nn_hls ; ijSdiag = jpj-2*nn_hls+1 ! send to se-corner of nw neighbourg 901 iiSsono = jpi ; ijSsono = jpj-2*nn_hls+1 ! send to se-corner of no neighbourg 902 iioutdir = 1 ; ijoutdir = -1 ! outside MPI domain: eastward or southward 900 iRdiag = jpse ; iRsono = jpso ! Recv: for se or so 901 iSdiag = jpnw ; iSsono = jpno ! Send: to nw or no 902 iiRst = Nie0+1 ; ijRst = 1 ! Rcv se-corner starting point 903 iiRnd = jpi ; ijRnd = nn_hls ! Rcv se-corner ending point 904 iiSstdiag = Nis0 ; ijSstdiag = Nje0-nn_hls+1 ! send to se-corner of nw neighbourg 905 iiSnddiag = Nis0+nn_hls-1 ; ijSnddiag = Nje0 ! send to se-corner of nw neighbourg 906 iiSstsono = Nie0+1 ; ijSstsono = Nje0-nn_hls+1 ! send to se-corner of no neighbourg 907 iiSndsono = jpi ; ijSndsono = Nje0 ! send to se-corner of no neighbourg 908 iioutdir = 1 ; ijoutdir = -1 ! outside MPI domain: eastward or southward 903 909 ! : 904 910 ! o o_o:___ … … 906 912 ! o: potential neighbour(s) ..o|...: 907 913 ! outside of the MPI domain | 908 iRdiag = jpnw ; iRsono = jpno ! Recv: for nw or no 909 iSdiag = jpse ; iSsono = jpso ! Send: to se or so 910 iiRcorn = 1 ; ijRcorn = jpj ! receiving nw-corner 911 iiSdiag = jpi-2*nn_hls+1 ; ijSdiag = 2*nn_hls ! send to nw-corner of se neighbourg 912 iiSsono = 1 ; ijSsono = 2*nn_hls ! send to nw-corner of so neighbourg 913 iioutdir = -1 ; ijoutdir = 1 ! outside MPI domain: westward or northward 914 iRdiag = jpnw ; iRsono = jpno ! Recv: for nw or no 915 iSdiag = jpse ; iSsono = jpso ! Send: to se or so 916 iiRst = 1 ; ijRst = Nje0+1 ! Rcv nw-corner starting point 917 iiRnd = nn_hls ; ijRnd = jpj ! Rcv nw-corner ending point 918 iiSstdiag = Nie0-nn_hls+1 ; ijSstdiag = Njs0 ! send to nw-corner of se neighbourg 919 iiSnddiag = Nie0 ; ijSnddiag = Njs0+nn_hls-1 ! send to nw-corner of se neighbourg 920 iiSstsono = 1 ; ijSstsono = Njs0 ! send to nw-corner of so neighbourg 921 iiSndsono = nn_hls ; ijSndsono = Njs0+nn_hls-1 ! send to nw-corner of so neighbourg 922 iioutdir = -1 ; ijoutdir = 1 ! outside MPI domain: westward or northward 914 923 ! : 915 924 ! ___:o_o o … … 917 926 ! o: potential neighbour(s) :...|o... 918 927 ! outside of the MPI domain | 919 iRdiag = jpne ; iRsono = jpno ! Recv: for ne or no 920 iSdiag = jpsw ; iSsono = jpso ! Send: to sw or so 921 iiRcorn = jpi ; ijRcorn = jpj ! receiving ne-corner 922 iiSdiag = 2*nn_hls ; ijSdiag = 2*nn_hls ! send to ne-corner of sw neighbourg 923 iiSsono = jpi ; ijSsono = 2*nn_hls ! send to ne-corner of so neighbourg 924 iioutdir = 1 ; ijoutdir = 1 ! outside MPI domain: eastward or southward 928 iRdiag = jpne ; iRsono = jpno ! Recv: for ne or no 929 iSdiag = jpsw ; iSsono = jpso ! Send: to sw or so 930 iiRst = Nie0+1 ; ijRst = Nje0+1 ! Rcv ne-corner starting point 931 iiRnd = jpi ; ijRnd = jpj ! Rcv ne-corner ending point 932 iiSstdiag = Nis0 ; ijSstdiag = Njs0 ! send to ne-corner of sw neighbourg 933 iiSnddiag = Nis0+nn_hls-1 ; ijSnddiag = Njs0+nn_hls-1 ! send to ne-corner of sw neighbourg 934 iiSstsono = Nie0+1 ; ijSstsono = Njs0 ! send to ne-corner of so neighbourg 935 iiSndsono = jpi ; ijSndsono = Njs0+nn_hls-1 ! send to ne-corner of so neighbourg 936 iioutdir = 1 ; ijoutdir = 1 ! outside MPI domain: eastward or southward 925 937 END SELECT 926 938 ! 927 939 ! Check if we need to receive data for this rim point 928 IF( ii == iiRcorn .AND. ij == ijRcorn ) THEN ! the rim point is located on the corner for the MPI domain940 IF( ii >= iiRst .AND. ii <= iiRnd .AND. ij >= ijRst .AND. ij <= ijRnd ) THEN ! rim point on the corner 929 941 iiout = ii+iioutdir ; ijout = ij+ijoutdir ! in which direction do we go outside of the MPI domain? 930 942 ! take care of neighbourg(s) in the interior of the computational domain … … 943 955 ! Check if this rim point corresponds to the corner of one neighbourg. if yes, do we need to send data? 944 956 ! Direct send to diag: Is this rim point the corner point of a diag neighbour with which we communicate? 945 IF( ii == iiSdiag .AND. ij == ijSdiag .AND. mpiSnei(nn_hls,iSdiag) > -1 ) THEN 957 IF( ii >= iiSstdiag .AND. ii <= iiSnddiag .AND. ij >= ijSstdiag .AND. ij <= ijSnddiag & 958 & .AND. mpiSnei(nn_hls,iSdiag) > -1 ) THEN 946 959 iiout = ii+iioutdir ; ijout = ij+ijoutdir ! in which direction do we go outside of the nei MPI domain? 947 960 ! take care of neighbourg(s) in the interior of the computational domain … … 954 967 ENDIF 955 968 ! Indirect send to diag (through so/no): rim point is the corner point of a so/no nei with which we communicate 956 IF( ii == iiSsono .AND. ij == ijSsono .AND. mpiSnei(nn_hls,iSsono) > -1 .AND. nn_comm == 1 ) THEN 969 IF( ii >= iiSstsono .AND. ii <= iiSndsono .AND. ij >= ijSstsono .AND. ij <= ijSndsono & 970 & .AND. mpiSnei(nn_hls,iSsono) > -1 .AND. nn_comm == 1 ) THEN 957 971 iiout = ii+iioutdir ; ijout = ij+ijoutdir ! in which direction do we go outside of the nei MPI domain? 958 972 ! take care of neighbourg(s) in the interior of the computational domain
Note: See TracChangeset
for help on using the changeset viewer.