Changeset 10436
- Timestamp:
- 2018-12-21T09:21:40+01:00 (5 years ago)
- Location:
- NEMO/trunk/src/OCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/LBC/mpp_nfd_generic.h90
r10425 r10436 90 90 ! to correct possible incoherent values on North fold lines from restart 91 91 92 !!!!!!!!! temporary switch off this optimisation ==> force TRUE !!!!!!!! 92 #if defined key_agrif 93 !!!!!!!!! temporary switch off this optimisation ==> force TRUE !!!!!!!! 94 !!!!!!!!! needed to get the same results without agrif and with agrif and no zoom !!!!!!!! 95 !!!!!!!!! I don't know why we must do that... !!!!!!!! 93 96 l_full_nf_update = .TRUE. 97 #endif 94 98 95 99 ! Two lines update (slower but necessary to avoid different values ion identical grid points -
NEMO/trunk/src/OCE/LBC/mppini.F90
r10425 r10436 924 924 !! ** Method : read iproc strips (of length jpiglo) of the land-sea mask 925 925 !!---------------------------------------------------------------------- 926 REAL(wp), INTENT( out) :: propland ! proportion of land points (between 0 and 1)926 REAL(wp), INTENT( out) :: propland ! proportion of land points in the global domain (between 0 and 1) 927 927 ! 928 928 INTEGER, DIMENSION(jpni*jpnj) :: kusedom_1d 929 INTEGER :: inboce 929 INTEGER :: inboce, iarea 930 930 INTEGER :: iproc, idiv, ijsz 931 INTEGER :: ijstr , ijend, ijcnt931 INTEGER :: ijstr 932 932 LOGICAL, ALLOCATABLE, DIMENSION(:,:) :: lloce 933 933 !!---------------------------------------------------------------------- … … 941 941 iproc = MINVAL( (/mppsize, jpjglo/2, 100/) ) ! read a least 2 lines, no more that 100 processes reading at the same time 942 942 943 ! we want to read iproc strips of the land-sea mask. -> pick up iproc processes among mppsize processes943 ! we want to read iproc strips of the land-sea mask. -> pick up iproc processes every idiv processes starting at 1 944 944 IF( iproc == 1 ) THEN ; idiv = mppsize 945 945 ELSE ; idiv = ( mppsize - 1 ) / ( iproc - 1 ) 946 946 ENDIF 947 ijsz = jpjglo / iproc 948 IF( narea <= MOD(jpjglo,iproc) ) ijsz = ijsz + 1 949 950 IF( MOD( narea-1, idiv ) == 0 .AND. (idiv /= 1 .OR. narea <= iproc ) ) THEN 951 ! 952 ijstr = (narea-1)*(jpjglo/iproc) + MIN(narea-1, MOD(jpjglo,iproc)) + 1 953 ijend = ijstr + ijsz - 1 954 ijcnt = ijend - ijstr + 1 955 ! 956 ALLOCATE( lloce(jpiglo, ijcnt) ) ! allocate the strip 957 CALL mpp_init_readbot_strip( ijstr, ijcnt, lloce ) 958 inboce = COUNT(lloce) 947 948 iarea = (narea-1)/idiv ! involed process number (starting counting at 0) 949 IF( MOD( narea-1, idiv ) == 0 .AND. iarea < iproc ) THEN ! beware idiv can be = to 1 950 ! 951 ijsz = jpjglo / iproc ! width of the stripe to read 952 IF( iarea < MOD(jpjglo,iproc) ) ijsz = ijsz + 1 953 ijstr = iarea*(jpjglo/iproc) + MIN(iarea, MOD(jpjglo,iproc)) + 1 ! starting j position of the reading 954 ! 955 ALLOCATE( lloce(jpiglo, ijsz) ) ! allocate the strip 956 CALL mpp_init_readbot_strip( ijstr, ijsz, lloce ) 957 inboce = COUNT(lloce) ! number of ocean point in the stripe 959 958 DEALLOCATE(lloce) 960 959 ! … … 962 961 inboce = 0 963 962 ENDIF 964 CALL mpp_sum( 'mppini', inboce ) 963 CALL mpp_sum( 'mppini', inboce ) ! total number of ocean points over the global domain 965 964 ! 966 965 propland = REAL( jpiglo*jpjglo - inboce, wp ) / REAL( jpiglo*jpjglo, wp ) … … 978 977 !! ** Method : read knbj strips (of length jpiglo) of the land-sea mask 979 978 !!---------------------------------------------------------------------- 980 INTEGER, INTENT(in ) :: knbi, knbj 981 LOGICAL, DIMENSION(knbi,knbj), INTENT( out) :: ldisoce !982 ! 983 INTEGER, DIMENSION(knbi,knbj) :: inboce 979 INTEGER, INTENT(in ) :: knbi, knbj ! domain decomposition 980 LOGICAL, DIMENSION(knbi,knbj), INTENT( out) :: ldisoce ! .true. if a sub domain constains 1 ocean point 981 ! 982 INTEGER, DIMENSION(knbi,knbj) :: inboce ! number oce oce pint in each mpi subdomain 984 983 INTEGER, DIMENSION(knbi*knbj) :: inboce_1d 985 INTEGER :: idiv, i2read, inj 986 INTEGER :: iimax, ijmax 987 INTEGER :: ji,jj 988 LOGICAL, ALLOCATABLE, DIMENSION(:,:) :: lloce 984 INTEGER :: idiv, iimax, ijmax, iarea 985 INTEGER :: ji 986 LOGICAL, ALLOCATABLE, DIMENSION(:,:) :: lloce ! lloce(i,j) = .true. if the point (i,j) is ocean 989 987 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: iimppt, ilci 990 988 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ijmppt, ilcj … … 996 994 ENDIF 997 995 998 ! we want to read knbj strips of the land-sea mask. -> pick up knbj processes among mppsize processes996 ! we want to read knbj strips of the land-sea mask. -> pick up knbj processes every idiv processes starting at 1 999 997 IF( knbj == 1 ) THEN ; idiv = mppsize 1000 998 ELSE ; idiv = ( mppsize - 1 ) / ( knbj - 1 ) 1001 999 ENDIF 1002 inboce(:,:) = 0 1003 IF( MOD( narea-1, idiv ) == 0 .AND. (idiv /= 1 .OR. narea <= knbj ) ) THEN 1000 inboce(:,:) = 0 ! default no ocean point found 1001 iarea = (narea-1)/idiv ! involed process number (starting counting at 0) 1002 IF( MOD( narea-1, idiv ) == 0 .AND. iarea < knbj ) THEN ! beware idiv can be = to 1 1004 1003 ! 1005 1004 ALLOCATE( iimppt(knbi,knbj), ijmppt(knbi,knbj), ilci(knbi,knbj), ilcj(knbi,knbj) ) 1006 1005 CALL mpp_basic_decomposition( knbi, knbj, iimax, ijmax, iimppt, ijmppt, ilci, ilcj ) 1007 1006 ! 1008 i2read = knbj / mppsize ! strip number to be read by this process 1009 IF( ( narea - 1 ) / idiv < MOD(knbj,mppsize) ) i2read = i2read + 1 1010 DO jj = 1, i2read 1011 ! strip number to be read (from 1 to knbj) 1012 inj = ( narea - 1 ) * ( knbj / mppsize ) + MIN( MOD(knbj,mppsize), ( narea - 1 ) / idiv ) + jj 1013 ALLOCATE( lloce(jpiglo, ilcj(1,inj)) ) ! allocate the strip 1014 CALL mpp_init_readbot_strip( ijmppt(1,inj), ilcj(1,inj), lloce ) ! read the strip 1015 DO ji = 1, knbi 1016 inboce(ji,inj) = COUNT( lloce(iimppt(ji,1):iimppt(ji,1)+ilci(ji,1)-1,:) ) 1017 END DO 1018 DEALLOCATE(lloce) 1007 ALLOCATE( lloce(jpiglo, ilcj(1,iarea+1)) ) ! allocate the strip 1008 CALL mpp_init_readbot_strip( ijmppt(1,iarea+1), ilcj(1,iarea+1), lloce ) ! read the strip 1009 DO ji = 1, knbi 1010 inboce(ji,iarea+1) = COUNT( lloce(iimppt(ji,1):iimppt(ji,1)+ilci(ji,1)-1,:) ) ! number of ocean point in a subdomain 1019 1011 END DO 1020 1012 ! 1013 DEALLOCATE(lloce) 1021 1014 DEALLOCATE(iimppt, ijmppt, ilci, ilcj) 1022 1015 ! … … 1026 1019 CALL mpp_sum( 'mppini', inboce_1d ) 1027 1020 inboce = RESHAPE(inboce_1d, (/knbi, knbj/)) 1028 ldisoce = inboce/= 01021 ldisoce(:,:) = inboce(:,:) /= 0 1029 1022 ! 1030 1023 END SUBROUTINE mpp_init_isoce … … 1041 1034 !! ** Method : read stipe of size (jpiglo,...) 1042 1035 !!---------------------------------------------------------------------- 1043 INTEGER , INTENT(in ) :: kjstr ! 1044 INTEGER , INTENT(in ) :: kjcnt ! 1045 LOGICAL, DIMENSION(jpiglo,kjcnt), INTENT( out) :: ldoce ! 1046 ! 1047 INTEGER :: inumsave 1036 INTEGER , INTENT(in ) :: kjstr ! starting j position of the reading 1037 INTEGER , INTENT(in ) :: kjcnt ! number of lines to read 1038 LOGICAL, DIMENSION(jpiglo,kjcnt), INTENT( out) :: ldoce ! ldoce(i,j) = .true. if the point (i,j) is ocean 1039 ! 1040 INTEGER :: inumsave ! local logical unit 1048 1041 REAL(wp), DIMENSION(jpiglo,kjcnt) :: zbot, zbdy 1049 1042 !!---------------------------------------------------------------------- … … 1054 1047 CALL iom_get( numbot, jpdom_unknown, 'bottom_level', zbot, kstart = (/1,kjstr/), kcount = (/jpiglo, kjcnt/) ) 1055 1048 ELSE 1056 zbot(:,:) = 1. ! put a non-null value1057 ENDIF 1058 1059 IF( numbdy /= -1 ) THEN ! Adjustwith bdy_msk if it exists1049 zbot(:,:) = 1. ! put a non-null value 1050 ENDIF 1051 1052 IF( numbdy /= -1 ) THEN ! Adjust with bdy_msk if it exists 1060 1053 CALL iom_get ( numbdy, jpdom_unknown, 'bdy_msk', zbdy, kstart = (/1,kjstr/), kcount = (/jpiglo, kjcnt/) ) 1061 1054 zbot(:,:) = zbot(:,:) * zbdy(:,:) 1062 1055 ENDIF 1063 1056 ! 1064 ldoce = zbot> 0.1057 ldoce(:,:) = zbot(:,:) > 0. 1065 1058 numout = inumsave 1066 1059 ! -
NEMO/trunk/src/OCE/nemogcm.F90
r10425 r10436 238 238 #endif 239 239 ! 240 IF( nstop == 0 ) THEN ; STOP 0 241 ELSE ; STOP 999 240 IF(lwm) THEN 241 IF( nstop == 0 ) THEN ; STOP 0 242 ELSE ; STOP 999 243 ENDIF 242 244 ENDIF 243 245 !
Note: See TracChangeset
for help on using the changeset viewer.