Changeset 10357
- Timestamp:
- 2018-11-23T09:23:26+01:00 (6 years ago)
- Location:
- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/lib_mpp.F90
r10337 r10357 163 163 INTEGER, PUBLIC :: n_sequence_glb = 0 !: # of global communications 164 164 INTEGER, PUBLIC :: numcom = -1 !: logical unit for communicaton report 165 INTEGER, PUBLIC :: l_full_nf_update = .FALSE. !: logical for a full (2lines) update of bc at North fold report165 LOGICAL, PUBLIC :: l_full_nf_update = .FALSE. !: logical for a full (2lines) update of bc at North fold report 166 166 167 167 ! timing summary report -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mpp_loc_generic.h90
r10314 r10357 1 1 !== IN: ptab is an array ==! 2 # define ARRAY_TYPE(i,j,k) REAL(wp) 3 # define MASK_TYPE(i,j,k) REAL(wp) 2 # define ARRAY_TYPE(i,j,k) REAL(wp) , INTENT(in ) :: ARRAY_IN(i,j,k) 3 # define MASK_TYPE(i,j,k) REAL(wp) , INTENT(in ) :: MASK_IN(i,j,k) 4 4 # if defined DIM_2d 5 5 # define ARRAY_IN(i,j,k) ptab(i,j) 6 6 # define MASK_IN(i,j,k) pmask(i,j) 7 # define INDEX_TYPE(k) INTEGER 7 # define INDEX_TYPE(k) INTEGER , INTENT( out) :: kindex(2) 8 8 # define K_SIZE(ptab) 1 9 9 # endif … … 11 11 # define ARRAY_IN(i,j,k) ptab(i,j,k) 12 12 # define MASK_IN(i,j,k) pmask(i,j,k) 13 # define INDEX_TYPE(k) INTEGER 13 # define INDEX_TYPE(k) INTEGER , INTENT( out) :: kindex(3) 14 14 # define K_SIZE(ptab) SIZE(ptab,3) 15 15 # endif 16 16 # if defined OPERATION_MAXLOC 17 17 # define MPI_OPERATION mpi_maxloc 18 # define LOC_OPERATION MAXLOC 18 19 # endif 19 20 # if defined OPERATION_MINLOC 20 21 # define MPI_OPERATION mpi_minloc 22 # define LOC_OPERATION MINLOC 21 23 # endif 22 24 … … 24 26 !!---------------------------------------------------------------------- 25 27 CHARACTER(len=*), INTENT(in ) :: cdname ! name of the calling subroutine 26 ARRAY_TYPE(:,:,:) 27 MASK_TYPE(:,:,:) 28 ARRAY_TYPE(:,:,:) ! array on which loctrans operation is applied 29 MASK_TYPE(:,:,:) ! local mask 28 30 REAL(wp) , INTENT( out) :: pmin ! Global minimum of ptab 29 31 INDEX_TYPE(:) ! index of minimum in global frame … … 31 33 ! 32 34 INTEGER :: ierror, ii, idim 35 INTEGER :: index0 33 36 REAL(wp) :: zmin ! local minimum 34 37 INTEGER , DIMENSION(:), ALLOCATABLE :: ilocs … … 41 44 ALLOCATE ( ilocs(idim) ) 42 45 ! 43 zmin = MINVAL( ARRAY_IN(:,:,:) , mask= MASK_IN(:,:,:) == 1._wp )44 ilocs = MINLOC( ARRAY_IN(:,:,:) , mask= MASK_IN(:,:,:) == 1._wp)46 ilocs = LOC_OPERATION( ARRAY_IN(:,:,:) , mask= MASK_IN(:,:,:) == 1._wp ) 47 zmin = ARRAY_IN(ilocs(1),ilocs(2),ilocs(3)) 45 48 ! 46 DO ii = 1, idim 47 IF (ii == 1) kindex(1) = ilocs(1) + nimpp - 1 48 IF (ii == 2) kindex(2) = ilocs(2) + njmpp - 1 49 IF (ii == 3) kindex(3) = ilocs(3) 50 ENDDO 49 kindex(1) = ilocs(1) + nimpp - 1 50 # if defined DIM_2d || defined DIM_3d /* avoid warning when kindex has 1 element */ 51 kindex(2) = ilocs(2) + njmpp - 1 52 # endif 53 # if defined DIM_3d /* avoid warning when kindex has 2 elements */ 54 kindex(3) = ilocs(3) 55 # endif 51 56 ! 52 57 DEALLOCATE (ilocs) 53 58 ! 59 index0 = kindex(1)-1 ! 1d index starting at 0 60 # if defined DIM_2d || defined DIM_3d /* avoid warning when kindex has 1 element */ 61 index0 = index0 + jpiglo * (kindex(2)-1) 62 # endif 63 # if defined DIM_3d /* avoid warning when kindex has 2 elements */ 64 index0 = index0 + jpiglo * jpjglo * (kindex(3)-1) 65 # endif 54 66 zain(1,:) = zmin 55 zain(2,:) = kindex(1) + 10000.* kindex(2) 56 IF ( idim == 3) zain(2,:) = zain(2,:) + 100000000.*kindex(3) 67 zain(2,:) = REAL(index0, wp) 57 68 ! 58 69 IF( ln_timing ) CALL tic_tac(.TRUE., ld_global = .TRUE.) … … 60 71 IF( ln_timing ) CALL tic_tac(.FALSE., ld_global = .TRUE.) 61 72 ! 62 pmin = zaout(1,1) 63 IF ( idim == 3) THEN 64 kindex(3) = INT( zaout(2,1) / 100000000. ) 65 kindex(2) = INT( zaout(2,1) - kindex(3) * 100000000. ) / 10000 66 kindex(1) = INT( zaout(2,1) - kindex(3) * 100000000. -kindex(2) * 10000. ) 67 ELSE 68 kindex(2) = INT( zaout(2,1) / 10000 ) 69 kindex(1) = INT( zaout(2,1) -kindex(2) * 10000. ) 70 ENDIF 73 pmin = zaout(1,1) 74 index0 = NINT( zaout(2,1) ) 75 # if defined DIM_3d /* avoid warning when kindex has 2 elements */ 76 kindex(3) = index0 / (jpiglo*jpjglo) 77 index0 = index0 - kindex(3) * (jpiglo*jpjglo) 78 # endif 79 # if defined DIM_2d || defined DIM_3d /* avoid warning when kindex has 1 element */ 80 kindex(2) = index0 / jpiglo 81 index0 = index0 - kindex(2) * jpiglo 82 # endif 83 kindex(1) = index0 84 kindex(:) = kindex(:) + 1 ! start indices at 1 71 85 #else 72 86 kindex = 0 ; pmin = 0. … … 82 96 #undef K_SIZE 83 97 #undef MPI_OPERATION 98 #undef LOC_OPERATION 84 99 #undef INDEX_TYPE -
NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/OCE/LBC/mppini.F90
r10345 r10357 794 794 DO jj = 1, inbjmax 795 795 DO ji = 1, inbimax 796 IF( llmsk2d(ji,jj) ==.TRUE. ) THEN796 IF( llmsk2d(ji,jj) .EQV. .TRUE. ) THEN 797 797 ii = ii + 1 798 798 inbi1(ii) = inbi0(ji)
Note: See TracChangeset
for help on using the changeset viewer.