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 8138 for branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/AGRIF_FILES/modarrays.F90 – NEMO

Ignore:
Timestamp:
2017-06-05T12:01:03+02:00 (7 years ago)
Author:
timgraham
Message:

Modifications to AGRIF_FILES as received from Laurent (need to check that these are definitely needed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/AGRIF_FILES/modarrays.F90

    r5656 r8138  
    5555                               proc_id,         & 
    5656                               coords,          & 
    57                                lb_tab_true, ub_tab_true, memberin ) 
     57                               lb_tab_true, ub_tab_true, memberin,  & 
     58                               indminglob3,indmaxglob3) 
    5859!--------------------------------------------------------------------------------------------------- 
    5960    integer,                   intent(in)  :: nbdim         !< Number of dimensions 
     
    6162    integer, dimension(nbdim), intent(in)  :: ub_var        !< Local upper boundary on the current processor 
    6263    integer, dimension(nbdim), intent(in)  :: lb_tab        !< Global lower boundary of the variable 
     64    integer, dimension(nbdim),OPTIONAL     :: indminglob3,indmaxglob3 !< True bounds for MPI USE 
    6365    integer, dimension(nbdim), intent(in)  :: ub_tab        !< Global upper boundary of the variable 
    6466    integer,                   intent(in)  :: proc_id       !< Current processor 
     
    7880        call Agrif_InvLoc( lb_var(i), proc_id, coord_i, lb_glob_index ) 
    7981        call Agrif_InvLoc( ub_var(i), proc_id, coord_i, ub_glob_index ) 
     82        if (present(indminglob3)) then 
     83          indminglob3(i)=lb_glob_index 
     84          indmaxglob3(i)=ub_glob_index 
     85        endif 
    8086#else 
    8187        lb_glob_index = lb_var(i) 
     
    123129! 
    124130    iminmaxg(1:nbdim,2) = - iminmaxg(1:nbdim,2) 
    125     call MPI_ALLREDUCE(iminmaxg, lubglob, 2*nbdim, MPI_INTEGER, MPI_MIN, Agrif_mpi_comm, code) 
     131    call MPI_ALLREDUCE(iminmaxg, lubglob, 2*nbdim, MPI_INTEGER, MPI_MIN, & 
     132                       Agrif_mpi_comm, code) 
    126133    lubglob(1:nbdim,2)  = - lubglob(1:nbdim,2) 
    127134#endif 
     
    803810    do i = 1,nbdim 
    804811! 
     812     if (coords(i) == 0) then 
     813       nbloc(i) = 1 
     814       locbounds(i,1,1) = lb_glob(i) 
     815       locbounds(i,2,1) = ub_glob(i) 
     816       locbounds(i,1,2) = lb_glob(i) 
     817       locbounds(i,2,2) = ub_glob(i) 
     818     else 
    805819        call Agrif_InvLoc(lb_var(i), rank, coords(i), i1) 
    806820! 
     
    816830            endif 
    817831        enddo 
     832     endif 
    818833    enddo 
    819834 
Note: See TracChangeset for help on using the changeset viewer.