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 6258 for branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/EXTERNAL/AGRIF/AGRIF_FILES/modarrays.F90 – NEMO

Ignore:
Timestamp:
2016-01-15T13:11:56+01:00 (8 years ago)
Author:
timgraham
Message:

First inclusion of Laurent Debreu's modified code for vertical refinement.
Still a lot of outstanding issues:
1) conv preprocessor fails for limrhg.F90 at the moment (for now I've run without ice model)
2) conv preprocessor fails for STO code - removed this code from testing for now
3) conv preprocessor fails for cpl_oasis.F90 - can work round this by modifying code but the preprocessor should be fixed to deal with this.

After that code compiles and can be run for horizontal grid refinement. Not yet working for vertical refinement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5803_UKMO_AGRIF_Vert_interp/NEMOGCM/EXTERNAL/AGRIF/AGRIF_FILES/modarrays.F90

    r5819 r6258  
    11! 
    2 ! $Id$ 
     2! $Id: modarrays.F 662 2007-05-25 15:58:52Z opalod $ 
    33! 
    44!     AGRIF (Adaptive Grid Refinement In Fortran) 
     
    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) 
     
    8490        lb_tab_true(i) = max(lb_tab(i), lb_glob_index) 
    8591        ub_tab_true(i) = min(ub_tab(i), ub_glob_index) 
     92 
    8693    enddo 
    8794! 
     
    123130! 
    124131    iminmaxg(1:nbdim,2) = - iminmaxg(1:nbdim,2) 
    125     call MPI_ALLREDUCE(iminmaxg, lubglob, 2*nbdim, MPI_INTEGER, MPI_MIN, Agrif_mpi_comm, code) 
     132    call MPI_ALLREDUCE(iminmaxg, lubglob, 2*nbdim, MPI_INTEGER, MPI_MIN, & 
     133                       Agrif_mpi_comm, code) 
    126134    lubglob(1:nbdim,2)  = - lubglob(1:nbdim,2) 
    127135#endif 
     
    803811    do i = 1,nbdim 
    804812! 
     813     if (coords(i) == 0) then 
     814       nbloc(i) = 1 
     815       locbounds(i,1,1) = lb_glob(i) 
     816       locbounds(i,2,1) = ub_glob(i) 
     817       locbounds(i,1,2) = lb_glob(i) 
     818       locbounds(i,2,2) = ub_glob(i) 
     819     else 
    805820        call Agrif_InvLoc(lb_var(i), rank, coords(i), i1) 
    806821! 
     
    816831            endif 
    817832        enddo 
     833     endif 
    818834    enddo 
    819835 
Note: See TracChangeset for help on using the changeset viewer.