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

Changeset 14656


Ignore:
Timestamp:
2021-03-30T16:44:41+02:00 (3 years ago)
Author:
jchanut
Message:

Revise VORTEX child grid position by taking into account Parent grid ghosts. No need to change AGRIF_FixedGrids.in file anymore if changing the number of ghostcells, #2638

Location:
NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/VORTEX
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/VORTEX/EXPREF/AGRIF_FixedGrids.in

    r9787 r14656  
    111 
    2 19 38 19 38 3 3 3  
     222 41 22 41 3 3 3  
    330 
  • NEMO/branches/2021/dev_r14608_AGRIF_domcfg/tests/VORTEX/MY_SRC/usrdef_hgr.F90

    r14223 r14656  
    8080      IF( Agrif_Root() ) THEN 
    8181#endif 
    82          zlam0 = -REAL(Ni0glo, wp) * 0.5 * 1.e-3 * rn_dx 
    83          zphi0 = -REAL(Nj0glo, wp) * 0.5 * 1.e-3 * rn_dy 
     82         zlam0 = -REAL(Ni0glo-1, wp) * 0.5 * 1.e-3 * rn_dx 
     83         zphi0 = -REAL(Nj0glo-1, wp) * 0.5 * 1.e-3 * rn_dy 
    8484#if defined key_agrif 
    8585      ELSE 
    8686         ! ! let lower left longitude and latitude from parent 
    87          zlam0 = ( 0.5_wp - REAL(Ni0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
    88             &  + ( Agrif_Ix() + nbghostcells - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dx * 1.e-3 
    89          zphi0 = ( 0.5_wp - REAL(Nj0glo, wp) * 0.5 ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
    90             &  + ( Agrif_Iy() + nbghostcells - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells ) * rn_dy * 1.e-3 
     87         zlam0 = (  0.5_wp - REAL(Agrif_Parent(Ni0glo)-1, wp) * 0.5 ) * 1.e-3 * Agrif_irhox() * rn_dx  & 
     88            &  + ( Agrif_Ix() + Agrif_Parent(nbghostcells_x  ) - 1 ) * Agrif_irhox() * rn_dx * 1.e-3 - ( 0.5_wp + nbghostcells_x  ) * rn_dx * 1.e-3 
     89         zphi0 = (  0.5_wp - REAL(Agrif_Parent(Nj0glo)-1, wp) * 0.5 ) * 1.e-3 * Agrif_irhoy() * rn_dy  & 
     90            &  + ( Agrif_Iy() + Agrif_Parent(nbghostcells_y_s) - 1 ) * Agrif_irhoy() * rn_dy * 1.e-3 - ( 0.5_wp + nbghostcells_y_s ) * rn_dy * 1.e-3 
    9191      ENDIF  
    9292#endif 
    9393          
    9494      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    95          zti = REAL( mig0(ji), wp ) - 0.5_wp  ! start at i=0.5 in the global grid without halos 
    96          ztj = REAL( mjg0(jj), wp ) - 0.5_wp  ! start at j=0.5 in the global grid without halos 
     95         zti = REAL( mig0(ji)-1, wp )  ! start at i=0 in the global grid without halos 
     96         ztj = REAL( mjg0(jj)-1, wp )  ! start at j=0 in the global grid without halos 
    9797          
    9898         plamt(ji,jj) = zlam0 + rn_dx * 1.e-3 *   zti 
Note: See TracChangeset for help on using the changeset viewer.