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/OPA_SRC/nemogcm.F90 – 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/OPA_SRC/nemogcm.F90

    r8314 r8758  
    239239      INTEGER  ::   ji                 ! dummy loop indices 
    240240      INTEGER  ::   ios, ilocal_comm   ! local integer 
     241      INTEGER  ::   iiarea, ijarea     ! local integers 
     242      INTEGER  ::   iirest, ijrest     ! local integers 
    241243      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam 
    242244      ! 
     
    282284      ENDIF 
    283285      ! 
    284       jpk = jpkglo 
    285       ! 
    286 #if defined key_agrif 
    287       IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
    288          jpiglo  = nbcellsx + 2 + 2*nbghostcells 
    289          jpjglo  = nbcellsy + 2 + 2*nbghostcells 
    290          jpi     = ( jpiglo-2*jpreci + (jpni-1+0) ) / jpni + 2*jpreci 
    291          jpj     = ( jpjglo-2*jprecj + (jpnj-1+0) ) / jpnj + 2*jprecj 
    292          nperio  = 0 
    293          jperio  = 0 
    294          ln_use_jattr = .false. 
    295       ENDIF 
    296 #endif 
    297286      ! 
    298287      !                             !--------------------------------------------! 
     
    353342#endif 
    354343      ENDIF 
     344      ! 
     345#if defined key_agrif 
     346      IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
     347         jpiglo  = nbcellsx + 2 + 2*nbghostcells 
     348         jpjglo  = nbcellsy + 2 + 2*nbghostcells 
     349         jpi     = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls 
     350         jpj     = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls 
     351         jpimax  = jpi 
     352         jpjmax  = jpj 
     353         nperio  = 0 
     354         jperio  = 0 
     355         ln_use_jattr = .false. 
     356      ENDIF 
     357#endif 
    355358 
    356359      IF( Agrif_Root() ) THEN       ! AGRIF mother: specific setting from jpni and jpnj 
     360         iiarea = 1 + MOD( narea - 1 , jpni ) 
     361         ijarea = 1 + ( narea - 1 ) / jpni 
     362         iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 
     363         ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 
    357364#if defined key_nemocice_decomp 
    358          jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci    ! first  dim. 
    359          jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj    ! second dim.  
     365         jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     366         jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim.  
     367         jpimax  = jpi 
     368         jpjmax  = jpj 
     369         IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 
     370         IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 
    360371#else 
    361          jpi = ( jpiglo     -2*jpreci + (jpni-1) ) / jpni + 2*jpreci    ! first  dim. 
    362          jpj = ( jpjglo     -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj    ! second dim. 
    363 #endif 
    364       ENDIF 
    365  
    366 !!gm ???    why here  it has already been done in line 301 ! 
     372         jpi = ( jpiglo     -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     373         jpj = ( jpjglo     -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim. 
     374         jpimax  = jpi 
     375         jpjmax  = jpj 
     376         IF( iiarea > iirest ) jpi = jpi - 1 
     377         IF( ijarea > ijrest ) jpj = jpj - 1 
     378#endif 
     379      ENDIF 
     380 
    367381      jpk = jpkglo                                             ! third dim 
    368 !!gm end 
    369382 
    370383#if defined key_agrif 
     
    414427      !                                      ! Domain decomposition 
    415428      CALL mpp_init 
     429      IF( ln_nnogather )    CALL nemo_northcomms! northfold neighbour lists (must be done after the masks are defined) 
    416430      ! 
    417431      IF( nn_timing == 1 )  CALL timing_init 
     
    424438                            CALL     dom_init   ! Domain 
    425439      IF( ln_crs        )   CALL     crs_init   ! coarsened grid: domain initialization  
    426       IF( ln_nnogather )    CALL nemo_northcomms! northfold neighbour lists (must be done after the masks are defined) 
     440      !IF( ln_nnogather )    CALL nemo_northcomms! northfold neighbour lists (must be done after the masks are defined) 
    427441      IF( ln_ctl        )   CALL prt_ctl_init   ! Print control 
    428442       
Note: See TracChangeset for help on using the changeset viewer.