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

Changeset 15119


Ignore:
Timestamp:
2021-07-13T16:43:22+02:00 (3 years ago)
Author:
jchanut
Message:

#2638, changes to accomodate nn_hls=2 and AGRIF zooms crossing cyclic boundaries. E-W case ok, update for North-Fold still needed.

Location:
NEMO/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/NST/agrif_all_update.F90

    r12377 r15119  
    6161      CALL agrif_update_ice()                      ! Update sea ice 
    6262#endif 
    63       IF (lwp.AND.lk_agrif_debug) Write(*,*) ' <-- END AGRIF UPDATE from grid Number',Agrif_Fixed() 
    6463      ! 
    6564      Agrif_UseSpecialValueInUpdate = .FALSE. 
    66     END SUBROUTINE agrif_Update_All 
     65      ! 
     66      ! If zooms are crossing or are coincident with cyclic boundaries 
     67      ! need to update ghost points on parent edges: 
     68      IF ( (Agrif_Parent(l_Iperio).OR.Agrif_Parent(l_NFold)).AND. & 
     69         & (( Agrif_Ix() <= 1  ).OR.( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() >=  Agrif_Parent(Nj0glo) - 1 ))) THEN 
     70         CALL Agrif_ChildGrid_To_ParentGrid() 
     71         CALL finalize_lbc_for_agrif  
     72         CALL Agrif_ParentGrid_To_ChildGrid() 
     73      ENDIF 
     74 
     75      IF (lwp.AND.lk_agrif_debug) Write(*,*) ' <-- END AGRIF UPDATE from grid Number',Agrif_Fixed() 
     76 
     77   END SUBROUTINE agrif_Update_All 
     78 
     79   SUBROUTINE finalize_lbc_for_agrif 
     80      !!--------------------------------------------- 
     81      !!  *** ROUTINE finalize lbc_for-agrif *** 
     82      !!--------------------------------------------- 
     83      USE lbclnk  
     84#if defined key_qco 
     85      USE domqco 
     86#endif 
     87      ! 
     88      CALL lbc_lnk( 'finalize_lbc_for_agrif', uu(:,:,:,       Kmm_a), 'U', -1._wp,  & 
     89           &                                  vv(:,:,:,       Kmm_a), 'V', -1._wp,  & 
     90           &                                  uu(:,:,:,       Kbb_a), 'U', -1._wp,  & 
     91           &                                  vv(:,:,:,       Kbb_a), 'V', -1._wp,  & 
     92           &                                  ts(:,:,:,jp_tem,Kmm_a), 'T',  1._wp,  &  
     93           &                                  ts(:,:,:,jp_sal,Kmm_a), 'T',  1._wp,  &  
     94           &                                  ts(:,:,:,jp_tem,Kbb_a), 'T',  1._wp,  &  
     95           &                                  ts(:,:,:,jp_sal,Kbb_a), 'T', 1._wp    ) 
     96      CALL lbc_lnk( 'finalize_lbc_for_agrif', ssh(:,:,  Kmm_a), 'T', 1._wp, & 
     97           &                                  ssh(:,:,  Kbb_a), 'T', 1._wp, & 
     98           &                                  uu_b(:,:, Kmm_a), 'U',-1._wp, & 
     99           &                                  uu_b(:,:, Kbb_a), 'U',-1._wp, & 
     100           &                                  vv_b(:,:, Kmm_a), 'V',-1._wp, & 
     101           &                                  vv_b(:,:, Kbb_a), 'V',-1._wp, & 
     102           &                                  ub2_b(:,:),   'U',-1._wp,     & 
     103           &                                  ub2_i_b(:,:), 'U',-1._wp,     & 
     104           &                                  vb2_b(:,:),   'V',-1._wp,     & 
     105           &                                  vb2_i_b(:,:), 'V',-1._wp      )  
     106 
     107#if defined key_qco 
     108      CALL dom_qco_zgr( Kbb_a, Kmm_a )  
     109#endif 
     110#if defined key_si3 
     111      CALL lbc_lnk( 'finalize_lbc_for_agrif',  a_i, 'T',1._wp,  v_i,'T',1._wp,                 & 
     112           &                                   v_s, 'T',1._wp, sv_i,'T',1._wp, oa_i,'T',1._wp, & 
     113           &                                   a_ip,'T',1._wp, v_ip,'T',1._wp, v_il,'T',1._wp ) 
     114      CALL lbc_lnk( 'finalize_lbc_for_agrif', t_su,'T',1._wp ) 
     115      CALL lbc_lnk( 'finalize_lbc_for_agrif',  e_s,'T',1._wp ) 
     116      CALL lbc_lnk( 'finalize_lbc_for_agrif',  e_i,'T',1._wp ) 
     117      CALL lbc_lnk( 'finalize_lbc_for_agrif', u_ice, 'U', -1._wp, v_ice, 'V', -1._wp ) 
     118#endif 
     119#if defined key_top 
     120      CALL lbc_lnk( 'finalize_lbc_for_agrif', tr(:,:,:,:,Kmm_a), 'T',1._wp ) 
     121      CALL lbc_lnk( 'finalize_lbc_for_agrif', tr(:,:,:,:,Kbb_a), 'T',1._wp ) 
     122#endif 
     123      ! 
     124   END SUBROUTINE finalize_lbc_for_agrif  
    67125 
    68126#else 
  • NEMO/trunk/src/NST/agrif_oce_interp.F90

    r15113 r15119  
    13991399      ! 
    14001400      INTEGER  :: ji, jj 
     1401      INTEGER  :: imin, imax, jmin, jmax 
    14011402      REAL(wp) :: zrhox, zrhoy, zx 
    14021403      !!----------------------------------------------------------------------   
    14031404      IF( before ) THEN 
    14041405         ptab(:,:) = 0._wp 
    1405          DO ji=i1+1,i2-1 
    1406             DO jj=j1+1,j2-1 
     1406         imin = MAX(i1, 2) ; imax = MIN(i2, jpi-1) 
     1407         jmin = MAX(j1, 2) ; jmax = MIN(j2, jpj-1) 
     1408         DO ji=imin,imax 
     1409            DO jj=jmin,jmax 
    14071410               ptab(ji,jj) = 0.25_wp*( ( vb2_b(ji+1,jj  )*e1v(ji+1,jj  )   &  
    14081411                           &            -vb2_b(ji-1,jj  )*e1v(ji-1,jj  ) ) & 
     
    14181421            DO jj=j1,j2 
    14191422               IF (utint_stage(ji,jj)==0) THEN  
    1420                   zx = 2._wp*MOD(ABS(mig0(ji)-nbghostcells_x), INT(Agrif_Rhox()))/zrhox - 1._wp   
     1423                  zx = 2._wp*MOD(ABS(mig0(ji)-nbghostcells_x_w), INT(Agrif_Rhox()))/zrhox - 1._wp   
    14211424                  ubdy(ji,jj) = ubdy(ji,jj) + 0.25_wp*(1._wp-zx*zx) * ptab(ji,jj) &  
    14221425                              &         / zrhoy *r1_e2u(ji,jj) * umask(ji,jj,1)  
     
    15031506      ! 
    15041507      INTEGER  :: ji, jj 
     1508      INTEGER  :: imin, imax, jmin, jmax 
    15051509      REAL(wp) :: zrhox, zrhoy, zy 
    15061510      !!----------------------------------------------------------------------   
    15071511      IF( before ) THEN 
    15081512         ptab(:,:) = 0._wp 
    1509          DO ji=i1+1,i2-1 
    1510             DO jj=j1+1,j2-1 
     1513         imin = MAX(i1, 2) ; imax = MIN(i2, jpi-1) 
     1514         jmin = MAX(j1, 2) ; jmax = MIN(j2, jpj-1) 
     1515         DO ji=imin,imax 
     1516            DO jj=jmin,jmax 
    15111517               ptab(ji,jj) = 0.25_wp*( ( ub2_b(ji  ,jj+1)*e2u(ji  ,jj+1)   &  
    15121518                           &            -ub2_b(ji  ,jj-1)*e2u(ji  ,jj-1) ) & 
  • NEMO/trunk/src/NST/agrif_user.F90

    r15029 r15119  
    6464! In case of East-West periodicity, prevent AGRIF interpolation at east and west boundaries 
    6565! The procnames will not be called at these boundaries 
    66       IF (l_Iperio) THEN 
     66      IF ( .NOT. lk_west ) THEN 
    6767         CALL Agrif_Set_NearCommonBorderX(.TRUE.) 
     68      ENDIF 
     69 
     70      IF ( .NOT. lk_east ) THEN 
    6871         CALL Agrif_Set_DistantCommonBorderX(.TRUE.) 
    6972      ENDIF 
     
    8083      !--------------------------------------------------------------------- 
    8184!      ind1 =              nbghostcells  
    82       ind2 = nn_hls + 1 + nbghostcells_x 
     85      ind2 = nn_hls + 1 + nbghostcells_x_w 
    8386      ind3 = nn_hls + 1 + nbghostcells_y_s 
    84       nbghostcellsfine_tot_x = nbghostcells_x+1 
     87      nbghostcellsfine_tot_x = MAX(nbghostcells_x_w,nbghostcells_x_e)+1 
    8588      nbghostcellsfine_tot_y = MAX(nbghostcells_y_s,nbghostcells_y_n)+1 
    8689      ind1 = MAX(nbghostcellsfine_tot_x, nbghostcellsfine_tot_y) 
     
    432435      !--------------------------------------------------------------------- 
    433436      ind1 =              nbghostcells 
    434       ind2 = nn_hls + 1 + nbghostcells_x 
     437      ind2 = nn_hls + 1 + nbghostcells_x_w 
    435438      ind3 = nn_hls + 1 + nbghostcells_y_s 
    436439      imaxrho = MAX(Agrif_irhox(), Agrif_irhoy()) 
     
    616619      USE Agrif_Util 
    617620      USE ice 
    618       USE par_oce, ONLY : nbghostcells, nbghostcells_x, nbghostcells_y_s 
     621      USE par_oce, ONLY : nbghostcells, nbghostcells_x_w, nbghostcells_y_s 
    619622      ! 
    620623      IMPLICIT NONE 
     
    632635      !------------------------------------------------------------------------------------- 
    633636      ind1 =              nbghostcells 
    634       ind2 = nn_hls + 1 + nbghostcells_x 
     637      ind2 = nn_hls + 1 + nbghostcells_x_w 
    635638      ind3 = nn_hls + 1 + nbghostcells_y_s 
    636639      ipl = jpl*(9+nlay_s+nlay_i) 
     
    780783      !--------------------------------------------------------------------- 
    781784      ind1 =              nbghostcells 
    782       ind2 = nn_hls + 1 + nbghostcells_x 
     785      ind2 = nn_hls + 1 + nbghostcells_x_w 
    783786      ind3 = nn_hls + 1 + nbghostcells_y_s 
    784787      imaxrho = MAX(Agrif_irhox(), Agrif_irhoy()) 
     
    863866! JC => side effects of lines below to be checked: 
    864867      IF (.not.agrif_root()) THEN 
    865          nbghostcells_x   = nbghostcells 
     868         nbghostcells_x_w = nbghostcells 
     869         nbghostcells_x_e = nbghostcells 
    866870         nbghostcells_y_s = nbghostcells 
    867871         nbghostcells_y_n = nbghostcells 
     
    875879         ! Correct number of ghost cells according to periodicity 
    876880         ! 
    877          IF( l_Iperio         ) THEN ; lk_west  = .FALSE. ; lk_east = .FALSE. ; nbghostcells_x = 0 ; ENDIF 
     881         IF( l_Iperio         ) THEN ; lk_west  = .FALSE. ; lk_east = .FALSE. ; nbghostcells_x_w = 0 ; nbghostcells_x_e = 0 ; ENDIF 
     882         IF( l_NFold          ) THEN  
     883            lk_west   = .FALSE. ; lk_east  = .FALSE. ; nbghostcells_x_w = 0 ; nbghostcells_x_e = 0  
     884            lk_north  = .FALSE. ; lk_south = .FALSE. ; nbghostcells_y_s = 0 ; nbghostcells_y_n = 0  
     885         ENDIF 
    878886         IF( Agrif_Iy() == 1  ) THEN ; lk_south = .FALSE. ; nbghostcells_y_s = 1 ; ENDIF 
    879887         IF( Agrif_Iy() + nbcellsy/AGRIF_Irhoy() ==  Agrif_Parent(Nj0glo) - 1 ) THEN ; lk_north = .FALSE. ; nbghostcells_y_n = 1 ; ENDIF 
     888         IF( Agrif_Ix() == 1  ) THEN ; lk_west  = .FALSE. ; nbghostcells_x_w = 1 ; ENDIF 
     889         IF( Agrif_Ix() + nbcellsx/AGRIF_Irhox() ==  Agrif_Parent(Ni0glo) - 1 ) THEN ; lk_east  = .FALSE. ; nbghostcells_x_e = 1 ; ENDIF 
    880890         ! 
    881891         ! Some checks 
    882892         IF( (.NOT.ln_vert_remap).AND.(jpkglo>Agrif_Parent(jpkglo)) )                    CALL ctl_stop( 'STOP',    & 
    883893           &   'agrif_nemo_init: Agrif children must have less or equal number of vertical levels without ln_vert_remap defined' )  
    884          IF( Ni0glo /= nbcellsx + nbghostcells_x + nbghostcells_x   )   CALL ctl_stop( 'STOP',    & 
    885            &   'agrif_nemo_init: Agrif children requires jpiglo == nbcellsx + 2*nbghostcells_x' ) 
     894         IF( Ni0glo /= nbcellsx + nbghostcells_x_w + nbghostcells_x_e   )   CALL ctl_stop( 'STOP',    & 
     895           &   'agrif_nemo_init: Agrif children requires jpiglo == nbcellsx + nbghostcells_x_w + nbghostcells_x_e' ) 
    886896         IF( Nj0glo /= nbcellsy + nbghostcells_y_s + nbghostcells_y_n )   CALL ctl_stop( 'STOP',    & 
    887897           &   'agrif_nemo_init: Agrif children requires jpjglo == nbcellsy + nbghostcells_y_s + nbghostcells_y_n' ) 
     
    889899      ELSE 
    890900         ! Root grid 
    891          nbghostcells_x   = 1  
     901         nbghostcells_x_w = 1  
     902         nbghostcells_x_e = 1  
    892903         nbghostcells_y_s = 1  
    893904         nbghostcells_y_n = 1  
    894905         IF ( l_Iperio.OR.l_NFold ) THEN 
    895            nbghostcells_x = 0 
     906           nbghostcells_x_w = 0 
     907           nbghostcells_x_e = 0 
    896908         ENDIF 
    897909         IF ( l_NFold ) THEN 
     
    10331045 
    10341046            IF( pty == 2) THEN ! T, U points 
    1035                bounds_chunks(2,2,1,2) = jpjglo-2-(bounds(2,2,2) -jpjglo) 
    1036                bounds_chunks(2,2,2,2) = jpjglo-2-(jpjglo-2      -jpjglo) 
     1047               bounds_chunks(2,2,1,2) = jpjglo-2*nn_hls-(bounds(2,2,2) -jpjglo) 
     1048               bounds_chunks(2,2,2,2) = jpjglo-2*nn_hls-(jpjglo-2      -jpjglo) 
    10371049            ELSE ! V, F points 
    1038                bounds_chunks(2,2,1,2) = jpjglo-3-(bounds(2,2,2) -jpjglo) 
    1039                bounds_chunks(2,2,2,2) = jpjglo-3-(jpjglo-2      -jpjglo) 
     1050               bounds_chunks(2,2,1,2) = jpjglo-2*nn_hls-1-(bounds(2,2,2) -jpjglo) 
     1051               bounds_chunks(2,2,2,2) = jpjglo-2*nn_hls-1-(jpjglo-2      -jpjglo) 
    10401052            ENDIF 
    10411053      ! Correction required or not 
     
    10581070            bounds_chunks(1,1,2,2) = jpiglo-bounds(1,1,2)+2 
    10591071 
    1060             bounds_chunks(1,2,1,2) = jpjglo-2-(bounds(2,2,2)-jpjglo) 
    1061             bounds_chunks(1,2,2,2) = jpjglo-2-(bounds(2,1,2)-jpjglo) 
     1072            bounds_chunks(1,2,1,2) = jpjglo-2*nn_hls-(bounds(2,2,2)-jpjglo) 
     1073            bounds_chunks(1,2,2,2) = jpjglo-2*nn_hls-(bounds(2,1,2)-jpjglo) 
    10621074 
    10631075            IF( ptx == 2) THEN ! T, V points 
     
    10701082 
    10711083            IF (pty == 2) THEN ! T, U points 
    1072                bounds_chunks(1,2,1,2) = jpjglo-2-(bounds(2,2,2) -jpjglo) 
    1073                bounds_chunks(1,2,2,2) = jpjglo-2-(bounds(2,1,2) -jpjglo) 
     1084               bounds_chunks(1,2,1,2) = jpjglo-2*nn_hls-(bounds(2,2,2) -jpjglo) 
     1085               bounds_chunks(1,2,2,2) = jpjglo-2*nn_hls-(bounds(2,1,2) -jpjglo) 
    10741086            ELSE ! V, F points 
    1075                bounds_chunks(1,2,1,2) = jpjglo-3-(bounds(2,2,2) -jpjglo) 
    1076                bounds_chunks(1,2,2,2) = jpjglo-3-(bounds(2,1,2) -jpjglo) 
     1087               bounds_chunks(1,2,1,2) = jpjglo-2*nn_hls-1-(bounds(2,2,2) -jpjglo) 
     1088               bounds_chunks(1,2,2,2) = jpjglo-2*nn_hls-1-(bounds(2,1,2) -jpjglo) 
    10771089            ENDIF 
    10781090 
     
    10901102            END DO 
    10911103               
    1092             bounds_chunks(1,1,1,2) = bounds(1,1,2)+jpiglo-2 
    1093             bounds_chunks(1,1,2,2) = 1+jpiglo-2 
     1104            bounds_chunks(1,1,1,2) = bounds(1,1,2)+jpiglo-2*nn_hls 
     1105            bounds_chunks(1,1,2,2) = jpiglo-nn_hls 
    10941106           
    10951107            bounds_chunks(1,1,1,1) = bounds(1,1,2) 
    1096             bounds_chunks(1,1,2,1) = 1 
     1108            bounds_chunks(1,1,2,1) = nn_hls+1 
    10971109        
    1098             bounds_chunks(2,1,1,2) = 2 
     1110            bounds_chunks(2,1,1,2) = nn_hls+1  
    10991111            bounds_chunks(2,1,2,2) = bounds(1,2,2) 
    11001112           
    1101             bounds_chunks(2,1,1,1) = 2 
     1113            bounds_chunks(2,1,1,1) = nn_hls+1  
    11021114            bounds_chunks(2,1,2,1) = bounds(1,2,2) 
    1103  
     1115            
    11041116         ELSE 
    11051117            nb_chunks = 1 
     
    11101122               bounds_chunks(i,:,:,:) = bounds 
    11111123            END DO     
    1112             bounds_chunks(1,1,1,2) = bounds(1,1,2)+jpiglo-2 
    1113             bounds_chunks(1,1,2,2) = bounds(1,2,2)+jpiglo-2 
     1124            bounds_chunks(1,1,1,2) = bounds(1,1,2)+jpiglo-2*nn_hls 
     1125            bounds_chunks(1,1,2,2) = bounds(1,2,2)+jpiglo-2*nn_hls 
    11141126           
    11151127            bounds_chunks(1,1,1,1) = bounds(1,1,2) 
    1116            bounds_chunks(1,1,2,1) = bounds(1,2,2) 
     1128            bounds_chunks(1,1,2,1) = bounds(1,2,2) 
    11171129         ENDIF 
    11181130      ELSE 
     
    11491161      IF( isens == 1 ) THEN 
    11501162         IF( ptx == 2 ) THEN ! T, V points 
    1151             agrif_external_switch_index = jpiglo-i1+2 
     1163            agrif_external_switch_index = jpiglo-i1+2*nn_hls 
    11521164         ELSE ! U, F points 
    1153             agrif_external_switch_index = jpiglo-i1+1       
     1165            agrif_external_switch_index = jpiglo-i1+2*nn_hls-1       
    11541166         ENDIF 
    11551167      ELSE IF( isens ==2 ) THEN 
    11561168         IF ( pty == 2 ) THEN ! T, U points 
    1157             agrif_external_switch_index = jpjglo-2-(i1 -jpjglo) 
     1169            agrif_external_switch_index = jpjglo-2*nn_hls-(i1 -jpjglo) 
    11581170         ELSE ! V, F points 
    1159             agrif_external_switch_index = jpjglo-3-(i1 -jpjglo) 
     1171            agrif_external_switch_index = jpjglo-2*nn_hls-1-(i1 -jpjglo) 
    11601172         ENDIF 
    11611173      ENDIF 
  • NEMO/trunk/src/OCE/par_oce.F90

    r15033 r15119  
    4848   INTEGER, PUBLIC            ::   nbug_in_agrif_conv_do_not_remove_or_modify = 1 - 1 
    4949   INTEGER, PUBLIC, PARAMETER ::   nbghostcells = 4   !: number of ghost cells: default value 
    50    INTEGER, PUBLIC            ::   nbghostcells_x     !: number of ghost cells in i-direction 
     50   INTEGER, PUBLIC            ::   nbghostcells_x_w   !: number of ghost cells in i-direction at west 
     51   INTEGER, PUBLIC            ::   nbghostcells_x_e   !: number of ghost cells in i-direction at east 
    5152   INTEGER, PUBLIC            ::   nbghostcells_y_s   !: number of ghost cells in j-direction at south 
    5253   INTEGER, PUBLIC            ::   nbghostcells_y_n   !: number of ghost cells in j-direction at north 
  • NEMO/trunk/tests/CANAL/MY_SRC/usrdef_nam.F90

    r14433 r15119  
    111111         kpj = NINT( rn_domszy / rn_dy ) + 1 
    112112      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    113          kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x  + 2 
     113         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 
    114114         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    115115      ENDIF 
  • NEMO/trunk/tests/DOME/MY_SRC/usrdef_hgr.F90

    r14976 r15119  
    8585         ! deduce offset from parent: 
    8686         roffsetx = Agrif_Parent(roffsetx) & 
    87               & + (-(nbghostcells_x   - 1) + (Agrif_Parent(nbghostcells_x  ) & 
     87              & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) & 
    8888              & + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 
    8989         roffsety = Agrif_Parent(roffsety) & 
  • NEMO/trunk/tests/DOME/MY_SRC/usrdef_nam.F90

    r14976 r15119  
    104104         kpj  = nbcellsy + ighost_s + ighost_n 
    105105!! JC: number of ghosts are unknown at this stage ! 
    106 !!$         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x    
     106!!$         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e 
    107107!!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n  
    108108      ENDIF 
  • NEMO/trunk/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90

    r14433 r15119  
    8888         kpj = NINT( 300.e3 / rn_dy ) - 1 
    8989      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    90          kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x  + 2 
     90         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 
    9191         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    9292      ENDIF 
  • NEMO/trunk/tests/ICE_AGRIF/MY_SRC/usrdef_hgr.F90

    r14976 r15119  
    8989         ! deduce offset from parent: 
    9090         roffsetx = Agrif_Parent(roffsetx) & 
    91             & + (-(nbghostcells_x   - 1) + (Agrif_Parent(nbghostcells_x  ) & 
     91            & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) & 
    9292            & + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 
    9393         roffsety = Agrif_Parent(roffsety) & 
  • NEMO/trunk/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90

    r14976 r15119  
    9191         kpj  = nbcellsy + 2 * nbghostcells 
    9292!! JC: number of ghosts unknown at this tage 
    93 !!$         kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x  + 2 
     93!!$         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 
    9494!!$         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    9595      ENDIF 
  • NEMO/trunk/tests/TSUNAMI/MY_SRC/usrdef_nam.F90

    r14433 r15119  
    9494         kpj = NINT( rn_domszy / rn_dy ) + 1 
    9595      ELSE                           ! Global Domain size: add nbghostcells + 1 "land" point on each side 
    96          kpi  = nbcellsx + nbghostcells_x   + nbghostcells_x  + 2 
     96         kpi  = nbcellsx + nbghostcells_x_w + nbghostcells_x_e + 2 
    9797         kpj  = nbcellsy + nbghostcells_y_s + nbghostcells_y_n + 2 
    9898      ENDIF 
  • NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_hgr.F90

    r14976 r15119  
    8888         ! deduce offset from parent: 
    8989         roffsetx = Agrif_Parent(roffsetx) & 
    90                   & + (-(nbghostcells_x   - 1) + (Agrif_Parent(nbghostcells_x  ) + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 
     90                  & + (-(nbghostcells_x_w - 1) + (Agrif_Parent(nbghostcells_x_w) + Agrif_Ix()-2)*Agrif_Rhox()) * 1.e-3 * rn_dx 
    9191         roffsety = Agrif_Parent(roffsety) & 
    9292                  & + (-(nbghostcells_y_s - 1) + (Agrif_Parent(nbghostcells_y_s) + Agrif_Iy()-2)*Agrif_Rhoy()) * 1.e-3 * rn_dy 
Note: See TracChangeset for help on using the changeset viewer.