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 8758 for branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/SAS_SRC – NEMO

Ignore:
Timestamp:
2017-11-20T17:29:54+01:00 (6 years ago)
Author:
acc
Message:

Branch 2017/dev_r8126_ROBUST08_no_ghost. Changes to eliminate ghost rows and columns. Currently the halo width is still fixed as 1 but a single variable (nn_hls) has been introduced for the halo-size in preparation for allowing this to vary. nn_hls replaces jpreci and jprecj. These changes have passed full SETTE tests but iceberg exchanges across the north-fold remain untested (SETTE tests only release bergs in the SO) and will require further attention. Note layout.dat now reports the jpi and jpj values for the reporting processor only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90

    r8314 r8758  
    7474      ! 
    7575#if defined key_agrif 
    76      CALL Agrif_Init_Grids()      ! AGRIF: set the meshes 
     76      CALL Agrif_Init_Grids()      ! AGRIF: set the meshes 
    7777#endif 
    7878      ! 
     
    167167      INTEGER  ::   ilocal_comm   ! local integer 
    168168      INTEGER  ::   ios, inum     !   -      - 
     169      INTEGER  ::   iiarea, ijarea     ! local integers 
     170      INTEGER  ::   iirest, ijrest     ! local integers 
    169171      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam 
    170172      CHARACTER(len=80)                 ::   clname 
     
    220222      ENDIF 
    221223      ! 
    222       jpk = jpkglo 
    223       ! 
    224 #if defined key_agrif 
    225       IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
    226          jpiglo  = nbcellsx + 2 + 2*nbghostcells 
    227          jpjglo  = nbcellsy + 2 + 2*nbghostcells 
    228          jpi     = ( jpiglo-2*jpreci + (jpni-1+0) ) / jpni + 2*jpreci 
    229          jpj     = ( jpjglo-2*jprecj + (jpnj-1+0) ) / jpnj + 2*jprecj 
    230          nperio  = 0 
    231          jperio  = 0 
    232          ln_use_jattr = .false. 
    233       ENDIF 
    234 #endif 
    235224      ! 
    236225      !                             !--------------------------------------------! 
     
    289278#endif 
    290279      ENDIF 
     280      ! 
     281#if defined key_agrif 
     282      IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
     283         jpiglo  = nbcellsx + 2 + 2*nbghostcells 
     284         jpjglo  = nbcellsy + 2 + 2*nbghostcells 
     285         jpi     = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls 
     286         jpj     = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls 
     287         jpimax  = jpi 
     288         jpjmax  = jpj 
     289         nperio  = 0 
     290         jperio  = 0 
     291         ln_use_jattr = .false. 
     292      ENDIF 
     293#endif 
    291294 
    292295      IF( Agrif_Root() ) THEN       ! AGRIF mother: specific setting from jpni and jpnj 
     296         iiarea = 1 + MOD( narea - 1 , jpni ) 
     297         ijarea = 1 + ( narea - 1 ) / jpni 
     298         iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 
     299         ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 
    293300#if defined key_nemocice_decomp 
    294          jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci    ! first  dim. 
    295          jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj    ! second dim.  
     301         jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     302         jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim.  
     303         jpimax  = jpi 
     304         jpjmax  = jpj 
     305         IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 
     306         IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 
    296307#else 
    297          jpi = ( jpiglo     -2*jpreci + (jpni-1) ) / jpni + 2*jpreci    ! first  dim. 
    298          jpj = ( jpjglo     -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj    ! second dim. 
    299 #endif 
    300       ENDIF 
     308         jpi = ( jpiglo     -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     309         jpj = ( jpjglo     -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim. 
     310         jpimax  = jpi 
     311         jpjmax  = jpj 
     312         IF( iiarea > iirest ) jpi = jpi - 1 
     313         IF( ijarea > ijrest ) jpj = jpj - 1 
     314#endif 
     315      ENDIF 
     316 
     317      jpk = jpkglo                                             ! third dim 
    301318 
    302319#if defined key_agrif 
     
    676693                IF ((sxM .gt. sxT) .AND. (sxM .lt. dxT)) THEN 
    677694                   nsndto = nsndto + 1 
    678                      isendto(nsndto) = jn 
     695                   isendto(nsndto) = jn 
    679696                ELSEIF ((sxM .le. sxT) .AND. (dxM .ge. dxT)) THEN 
    680697                   nsndto = nsndto + 1 
Note: See TracChangeset for help on using the changeset viewer.