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 14951 – NEMO

Changeset 14951


Ignore:
Timestamp:
2021-06-04T17:35:08+02:00 (3 years ago)
Author:
jchanut
Message:

#2638, change grid positioning convention (again) in case of closed boundaries over parent grid. Accounting for 1 extra land cell in that case, child grids have to be shifted by 1 point to the South East.

Location:
NEMO/branches/2021/dev_r14608_AGRIF_domcfg
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/src/NST/agrif_user.F90

    r14702 r14951  
    5757      ! 
    5858      INTEGER :: ind1, ind2, ind3, imaxrho 
     59      INTEGER :: nbghostcellsfine_tot_x, nbghostcellsfine_tot_y 
    5960      INTEGER :: its 
    6061      External :: nemo_mapping 
     
    7879      ! 1. Declaration of the type of variable which have to be interpolated 
    7980      !--------------------------------------------------------------------- 
    80       ind1 =              nbghostcells  
     81!      ind1 =              nbghostcells  
    8182      ind2 = nn_hls + 1 + nbghostcells_x 
    8283      ind3 = nn_hls + 1 + nbghostcells_y_s 
     84      nbghostcellsfine_tot_x = nbghostcells_x+1 
     85      nbghostcellsfine_tot_y = MAX(nbghostcells_y_s,nbghostcells_y_n)+1 
     86      ind1 = MAX(nbghostcellsfine_tot_x, nbghostcellsfine_tot_y) 
    8387      imaxrho = MAX(Agrif_irhox(), Agrif_irhoy()) 
    8488 
     
    855859         nbghostcells_y_s = nbghostcells 
    856860         nbghostcells_y_n = nbghostcells 
    857  
    858          lk_west  = .NOT. ( Agrif_Ix() == 1 ) 
    859          lk_east  = .NOT. ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo) + 1 ) 
    860          lk_south = .NOT. ( Agrif_Iy() == 1 ) 
    861          lk_north = .NOT. ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo) + 1 ) 
     861  
     862 
     863         lk_west  = .TRUE. 
     864         lk_east  = .TRUE. 
     865         lk_south = .TRUE. 
     866         lk_north = .TRUE. 
    862867         ! 
    863868         ! Correct number of ghost cells according to periodicity 
    864869         ! 
    865          IF(    l_Iperio    )   nbghostcells_x   = 0 
    866          IF( .NOT. lk_south )   nbghostcells_y_s = 0 
    867          IF( .NOT. lk_north )   nbghostcells_y_n = 0 
     870         IF( l_Iperio         ) THEN ; lk_west  = .FALSE. ; lk_east = .FALSE. ; nbghostcells_x = 0 ; ENDIF 
     871         IF( Agrif_Iy() == 1  ) THEN ; lk_south = .FALSE. ; nbghostcells_y_s = 1 ; ENDIF 
     872         IF( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() ==  Agrif_Parent(Nj0glo) - 1 ) THEN ; lk_north = .FALSE. ; nbghostcells_y_n = 1 ; ENDIF 
    868873         ! 
    869874         ! Some checks 
     
    877882      ELSE 
    878883         ! Root grid 
    879          nbghostcells_x   = 0 
    880          nbghostcells_y_s = 0 
    881          nbghostcells_y_n = 0 
     884         nbghostcells_x   = 1  
     885         nbghostcells_y_s = 1  
     886         nbghostcells_y_n = 1  
     887         IF ( l_Iperio.OR.l_NFold ) THEN 
     888           nbghostcells_x = 0 
     889         ENDIF 
     890         IF ( l_NFold ) THEN 
     891           nbghostcells_y_n = 0 ! for completeness 
     892         ENDIF 
    882893      ENDIF 
    883894      ! 
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/DOME/EXPREF/AGRIF_FixedGrids.in

    r14688 r14951  
    111 
    2 282 362 92 170 2 2 2    
     2281 361 91 169 2 2 2    
    330 
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/DOME/MY_SRC/usrdef_nam.F90

    r14688 r14951  
    9797         ighost_n = nbghostcells 
    9898 
    99          IF  ( Agrif_Ix() == 1 ) ighost_w = 0 
    100          IF  ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo)+1 ) ighost_e = 0 
    101          IF  ( Agrif_Iy() == 1 ) ighost_s = 0 
    102          IF  ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo)+1 ) ighost_n = 0 
     99         IF  ( Agrif_Ix() == 1 ) ighost_w = 1  
     100         IF  ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo)-1 ) ighost_e = 1  
     101         IF  ( Agrif_Iy() == 1 ) ighost_s = 1  
     102         IF  ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo)-1 ) ighost_n = 1  
    103103         kpi  = nbcellsx + ighost_w + ighost_e 
    104104         kpj  = nbcellsy + ighost_s + ighost_n 
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/ICE_AGRIF/EXPREF/AGRIF_FixedGrids.in

    r14688 r14951  
    111 
    2 35 64 35 64 3 3 3 
     234 63 34 63 3 3 3 
    330 
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/OVERFLOW/EXPREF/AGRIF/AGRIF_FixedGrids.in

    r14688 r14951  
    111 
    2 11 42 1 6 1 1 1  
     210 41 1 4 1 1 1  
    330 
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/VORTEX/EXPREF/AGRIF_FixedGrids.in

    r14688 r14951  
    111 
    2 23 42 23 42 3 3 3  
     222 41 22 41 3 3 3  
    330 
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/VORTEX/MY_SRC/usrdef_nam.F90

    r14688 r14951  
    9797         ighost_n = nbghostcells 
    9898 
    99          IF  ( Agrif_Ix() == 1 ) ighost_w = 0  
    100          IF  ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo)+1 ) ighost_e = 0  
    101          IF  ( Agrif_Iy() == 1 ) ighost_s = 0  
    102          IF  ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo)+1 ) ighost_n = 0  
     99         IF  ( Agrif_Ix() == 1 ) ighost_w = 1  
     100         IF  ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo) - 1 ) ighost_e = 1  
     101         IF  ( Agrif_Iy() == 1 ) ighost_s = 1  
     102         IF  ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo) - 1 ) ighost_n = 1  
    103103!         kpi  = nbcellsx + 2 * ( nbghostcells + 1 ) 
    104104!         kpj  = nbcellsy + 2 * ( nbghostcells + 1 ) 
Note: See TracChangeset for help on using the changeset viewer.