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 14675 for NEMO – NEMO

Changeset 14675 for NEMO


Ignore:
Timestamp:
2021-04-06T14:44:31+02:00 (3 years ago)
Author:
ldebreu
Message:

AGFdomcfg: corrections for east-west cyclic grids, #2368

File:
1 edited

Legend:

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

    r14655 r14675  
    7979      !--------------------------------------------------------------------- 
    8080      ind1 =              nbghostcells  
    81       ind2 = nn_hls + 2 + nbghostcells_x 
    82       ind3 = nn_hls + 2 + nbghostcells_y_s 
     81      ind2 = nn_hls + 1 + nbghostcells_x 
     82      ind3 = nn_hls + 1 + nbghostcells_y_s 
    8383      imaxrho = MAX(Agrif_irhox(), Agrif_irhoy()) 
    8484 
     
    429429      !--------------------------------------------------------------------- 
    430430      ind1 =              nbghostcells 
    431       ind2 = nn_hls + 2 + nbghostcells_x 
    432       ind3 = nn_hls + 2 + nbghostcells_y_s 
     431      ind2 = nn_hls + 1 + nbghostcells_x 
     432      ind3 = nn_hls + 1 + nbghostcells_y_s 
    433433      imaxrho = MAX(Agrif_irhox(), Agrif_irhoy()) 
    434434 
     
    629629      !------------------------------------------------------------------------------------- 
    630630      ind1 =              nbghostcells 
    631       ind2 = nn_hls + 2 + nbghostcells_x 
    632       ind3 = nn_hls + 2 + nbghostcells_y_s 
     631      ind2 = nn_hls + 1 + nbghostcells_x 
     632      ind3 = nn_hls + 1 + nbghostcells_y_s 
    633633      ipl = jpl*(9+nlay_s+nlay_i) 
    634634      CALL agrif_declare_variable((/2,2,0/),(/ind2,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,ipl/),tra_ice_id) 
     
    769769      !--------------------------------------------------------------------- 
    770770      ind1 =              nbghostcells 
    771       ind2 = nn_hls + 2 + nbghostcells_x 
    772       ind3 = nn_hls + 2 + nbghostcells_y_s 
     771      ind2 = nn_hls + 1 + nbghostcells_x 
     772      ind3 = nn_hls + 1 + nbghostcells_y_s 
    773773      imaxrho = MAX(Agrif_irhox(), Agrif_irhoy()) 
    774774 
     
    857857 
    858858         lk_west  = .NOT. ( Agrif_Ix() == 1 ) 
    859          lk_east  = .NOT. ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo) -1 ) 
     859         lk_east  = .NOT. ( Agrif_Ix() + nbcellsx/AGRIF_Irhox() == Agrif_Parent(Ni0glo) + 1 ) 
    860860         lk_south = .NOT. ( Agrif_Iy() == 1 ) 
    861          lk_north = .NOT. ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo) -1 ) 
     861         lk_north = .NOT. ( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() == Agrif_Parent(Nj0glo) + 1 ) 
    862862         ! 
    863863         ! Correct number of ghost cells according to periodicity 
     
    870870         IF( (.NOT.ln_vert_remap).AND.(jpkglo>Agrif_Parent(jpkglo)) )                    CALL ctl_stop( 'STOP',    & 
    871871           &   'agrif_nemo_init: Agrif children must have less or equal number of vertical levels without ln_vert_remap defined' )  
    872          IF( jpiglo /= nbcellsx + 2 + 2*nn_hls + nbghostcells_x  + nbghostcells_x   )   CALL ctl_stop( 'STOP',    & 
    873            &   'agrif_nemo_init: Agrif children requires jpiglo == nbcellsx + 2 + 2*nn_hls + 2*nbghostcells_x' ) 
    874          IF( jpjglo /= nbcellsy + 2 + 2*nn_hls + nbghostcells_y_s + nbghostcells_y_n )   CALL ctl_stop( 'STOP',    & 
    875            &   'agrif_nemo_init: Agrif children requires jpjglo == nbcellsy + 2 + 2*nn_hls + nbghostcells_y_s + nbghostcells_y_n' ) 
     872         IF( Ni0glo /= nbcellsx + nbghostcells_x + nbghostcells_x   )   CALL ctl_stop( 'STOP',    & 
     873           &   'agrif_nemo_init: Agrif children requires jpiglo == nbcellsx + 2*nbghostcells_x' ) 
     874         IF( Nj0glo /= nbcellsy + nbghostcells_y_s + nbghostcells_y_n )   CALL ctl_stop( 'STOP',    & 
     875           &   'agrif_nemo_init: Agrif children requires jpjglo == nbcellsy + nbghostcells_y_s + nbghostcells_y_n' ) 
    876876         IF( ln_use_jattr )   CALL ctl_stop( 'STOP', 'agrif_nemo_init:Agrif children requires ln_use_jattr = .false. ' ) 
    877877      ELSE 
Note: See TracChangeset for help on using the changeset viewer.