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 13065 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/USR/usrdef_hgr.F90 – NEMO

Ignore:
Timestamp:
2020-06-08T18:11:57+02:00 (4 years ago)
Author:
smasson
Message:

Extra_Halo: toward AGRIF compatibility, see #2366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/USR/usrdef_hgr.F90

    r12939 r13065  
    9090      zcos_alpha =   SQRT( 2._wp ) * 0.5_wp 
    9191      ze1deg = ze1 / (ra * rad) 
    92       zlam0 = zlam1 + zcos_alpha * ze1deg * REAL( Ni0glo - nn_hls , wp )   ! -nn_hls to keep same results -> to be removed... 
    93       zphi0 = zphi1 + zsin_alpha * ze1deg * REAL( Nj0glo - nn_hls , wp )   ! -nn_hls to keep same results -> to be removed... 
     92      zlam0 = zlam1 + zcos_alpha * ze1deg * REAL( Ni0glo - 2, wp ) 
     93      zphi0 = zphi1 + zsin_alpha * ze1deg * REAL( Nj0glo - 2, wp ) 
    9494 
    9595#if defined key_agrif 
    9696      ! ! Upper left longitude and latitude from parent: 
    9797      IF (.NOT.Agrif_root()) THEN 
    98          zlam0 = zlam1 + Agrif_irhox() * REAL(Agrif_Parent(jpjglo)-2 , wp) * ze1deg * zcos_alpha  & 
     98         zlam0 = zlam1 + Agrif_irhox() * REAL(Agrif_Parent(Ni0glo) -2, wp) * ze1deg * zcos_alpha  & 
    9999                   &   + ( Agrif_Ix()*Agrif_irhox()-(0.5_wp+nbghostcells)) * ze1deg * zcos_alpha  & 
    100100                   &   + ( Agrif_Iy()*Agrif_irhoy()-(0.5_wp+nbghostcells)) * ze1deg * zsin_alpha 
    101          zphi0 = zphi1 + Agrif_irhoy() * REAL(Agrif_Parent(jpjglo)-2 , wp) * ze1deg * zsin_alpha  & 
     101         zphi0 = zphi1 + Agrif_irhoy() * REAL(Agrif_Parent(Nj0glo) -2, wp) * ze1deg * zsin_alpha  & 
    102102                   &   - ( Agrif_Ix()*Agrif_irhox()-nbghostcells )         * ze1deg * zsin_alpha  & 
    103103                   &   + ( Agrif_Iy()*Agrif_irhoy()-nbghostcells )         * ze1deg * zcos_alpha 
     
    115115      !    
    116116      DO_2D_11_11 
    117          zim1 = REAL( mig(ji)-1, wp ) - 1.   ;   zim05 = REAL( mig(ji)-1, wp ) - 1.5   ! -1 to keep same results -> to be removed... 
    118          zjm1 = REAL( mjg(jj)-1, wp ) - 1.   ;   zjm05 = REAL( mjg(jj)-1, wp ) - 1.5   ! -1 to keep same results -> to be removed... 
     117         zim1 = REAL( mig0_oldcmp(ji), wp ) - 1.   ;   zim05 = REAL( mig0_oldcmp(ji), wp ) - 1.5 
     118         zjm1 = REAL( mjg0_oldcmp(jj), wp ) - 1.   ;   zjm05 = REAL( mjg0_oldcmp(jj), wp ) - 1.5 
    119119         !    
    120120         !glamt(i,j) longitude at T-point 
Note: See TracChangeset for help on using the changeset viewer.