New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 8758 for branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90 – NEMO

Ignore:
Timestamp:
2017-11-20T17:29:54+01:00 (6 years ago)
Author:
acc
Message:

Branch 2017/dev_r8126_ROBUST08_no_ghost. Changes to eliminate ghost rows and columns. Currently the halo width is still fixed as 1 but a single variable (nn_hls) has been introduced for the halo-size in preparation for allowing this to vary. nn_hls replaces jpreci and jprecj. These changes have passed full SETTE tests but iceberg exchanges across the north-fold remain untested (SETTE tests only release bergs in the SO) and will require further attention. Note layout.dat now reports the jpi and jpj values for the reporting processor only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90

    r8186 r8758  
    535535      INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend 
    536536      !! 
    537       REAL(wp), DIMENSION(1-jpri:jpi+jpri,jprecj+jprj,2) :: r2dns 
    538       REAL(wp), DIMENSION(1-jpri:jpi+jpri,jprecj+jprj,2) :: r2dsn 
    539       REAL(wp), DIMENSION(1-jprj:jpj+jprj,jpreci+jpri,2) :: r2dwe 
    540       REAL(wp), DIMENSION(1-jprj:jpj+jprj,jpreci+jpri,2) :: r2dew 
    541       !!---------------------------------------------------------------------- 
    542  
    543       ipreci = jpreci + jpri      ! take into account outer extra 2D overlap area 
    544       iprecj = jprecj + jprj 
     537      REAL(wp), DIMENSION(1-jpri:jpi+jpri,nn_hls+jprj,2) :: r2dns 
     538      REAL(wp), DIMENSION(1-jpri:jpi+jpri,nn_hls+jprj,2) :: r2dsn 
     539      REAL(wp), DIMENSION(1-jprj:jpj+jprj,nn_hls+jpri,2) :: r2dwe 
     540      REAL(wp), DIMENSION(1-jprj:jpj+jprj,nn_hls+jpri,2) :: r2dew 
     541      !!---------------------------------------------------------------------- 
     542 
     543      ipreci = nn_hls + jpri      ! take into account outer extra 2D overlap area 
     544      iprecj = nn_hls + jprj 
    545545 
    546546 
     
    553553         pt2d(:, jpj   :jpj+jprj) = pt2d ( :, 2         :2+jprj) 
    554554      ELSE                                   !* closed 
    555          IF( .NOT. cd_type == 'F' )   pt2d(:,  1-jprj   :  jprecj  ) = 0._wp     ! south except at F-point 
    556                                       pt2d(:,nlcj-jprecj+1:jpj+jprj) = 0._wp     ! north 
     555         IF( .NOT. cd_type == 'F' )   pt2d(:,  1-jprj   :  nn_hls  ) = 0._wp     ! south except at F-point 
     556                                      pt2d(:,nlcj-nn_hls+1:jpj+jprj) = 0._wp     ! north 
    557557      ENDIF 
    558558      !                                !== East-West boundaries 
     
    562562         pt2d(   jpi  :jpi+jpri,:) = pt2d(     2      :2+jpri,:)              ! west 
    563563      ELSE                                   !* closed 
    564          IF( .NOT. cd_type == 'F' )   pt2d(  1-jpri   :jpreci    ,:) = 0._wp  ! south except at F-point 
    565                                       pt2d(nlci-jpreci+1:jpi+jpri,:) = 0._wp  ! north 
     564         IF( .NOT. cd_type == 'F' )   pt2d(  1-jpri   :nn_hls    ,:) = 0._wp  ! south except at F-point 
     565                                      pt2d(nlci-nn_hls+1:jpi+jpri,:) = 0._wp  ! north 
    566566      ENDIF 
    567567      ! 
     
    585585         iihom = nlci-nreci-jpri 
    586586         DO jl = 1, ipreci 
    587             r2dew(:,jl,1) = pt2d(jpreci+jl,:) 
     587            r2dew(:,jl,1) = pt2d(nn_hls+jl,:) 
    588588            r2dwe(:,jl,1) = pt2d(iihom +jl,:) 
    589589         END DO 
     
    612612      ! 
    613613      !                           ! Write Dirichlet lateral conditions 
    614       iihom = nlci - jpreci 
     614      iihom = nlci - nn_hls 
    615615      ! 
    616616      SELECT CASE ( nbondi ) 
     
    638638         DO jl = 1, iprecj 
    639639            r2dsn(:,jl,1) = pt2d(:,ijhom +jl) 
    640             r2dns(:,jl,1) = pt2d(:,jprecj+jl) 
     640            r2dns(:,jl,1) = pt2d(:,nn_hls+jl) 
    641641         END DO 
    642642      ENDIF 
     
    664664      ! 
    665665      !                           ! Write Dirichlet lateral conditions 
    666       ijhom = nlcj - jprecj 
     666      ijhom = nlcj - nn_hls 
    667667      ! 
    668668      SELECT CASE ( nbondj ) 
     
    17391739      INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend 
    17401740      !! 
    1741       REAL(wp), DIMENSION(1-jpri:jpi+jpri,jprecj+jprj,2) ::   r2dns, r2dsn 
    1742       REAL(wp), DIMENSION(1-jprj:jpj+jprj,jpreci+jpri,2) ::   r2dwe, r2dew 
    1743       !!---------------------------------------------------------------------- 
    1744  
    1745       ipreci = jpreci + jpri      ! take into account outer extra 2D overlap area 
    1746       iprecj = jprecj + jprj 
     1741      REAL(wp), DIMENSION(1-jpri:jpi+jpri,nn_hls+jprj,2) ::   r2dns, r2dsn 
     1742      REAL(wp), DIMENSION(1-jprj:jpj+jprj,nn_hls+jpri,2) ::   r2dwe, r2dew 
     1743      !!---------------------------------------------------------------------- 
     1744 
     1745      ipreci = nn_hls + jpri      ! take into account outer extra 2D overlap area 
     1746      iprecj = nn_hls + jprj 
    17471747 
    17481748 
     
    17581758         ! 
    17591759      ELSE                                        !* closed 
    1760          IF( .NOT. cd_type == 'F' )   pt2d(  1-jpri   :jpreci    ,:) = 0._wp    ! south except at F-point 
    1761                                       pt2d(nlci-jpreci+1:jpi+jpri,:) = 0._wp    ! north 
     1760         IF( .NOT. cd_type == 'F' )   pt2d(  1-jpri   :nn_hls    ,:) = 0._wp    ! south except at F-point 
     1761                                      pt2d(nlci-nn_hls+1:jpi+jpri,:) = 0._wp    ! north 
    17621762      ENDIF 
    17631763      ! 
     
    17821782         iihom = nlci-nreci-jpri 
    17831783         DO jl = 1, ipreci 
    1784             r2dew(:,jl,1) = pt2d(jpreci+jl,:) 
     1784            r2dew(:,jl,1) = pt2d(nn_hls+jl,:) 
    17851785            r2dwe(:,jl,1) = pt2d(iihom +jl,:) 
    17861786         END DO 
     
    18091809      ! 
    18101810      !                           ! Write Dirichlet lateral conditions 
    1811       iihom = nlci - jpreci 
     1811      iihom = nlci - nn_hls 
    18121812      ! 
    18131813      SELECT CASE ( nbondi ) 
     
    18361836         DO jl = 1, iprecj 
    18371837            r2dsn(:,jl,1) = pt2d(:,ijhom +jl) 
    1838             r2dns(:,jl,1) = pt2d(:,jprecj+jl) 
     1838            r2dns(:,jl,1) = pt2d(:,nn_hls+jl) 
    18391839         END DO 
    18401840      ENDIF 
     
    18621862      ! 
    18631863      !                           ! Write Dirichlet lateral conditions 
    1864       ijhom = nlcj - jprecj 
     1864      ijhom = nlcj - nn_hls 
    18651865      ! 
    18661866      SELECT CASE ( nbondj ) 
Note: See TracChangeset for help on using the changeset viewer.