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/OFF_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/OFF_SRC/nemogcm.F90

    r8314 r8758  
    150150      !! ** Purpose :   initialization of the nemo model in off-line mode 
    151151      !!---------------------------------------------------------------------- 
    152       INTEGER ::   ji            ! dummy loop indices 
    153       INTEGER ::   ilocal_comm   ! local integer 
    154       INTEGER ::   ios, inum 
     152      INTEGER  ::   ji                 ! dummy loop indices 
     153      INTEGER  ::   ilocal_comm        ! local integer 
     154      INTEGER  ::   ios, inum          ! local integers 
     155      INTEGER  ::   iiarea, ijarea     ! local integers 
     156      INTEGER  ::   iirest, ijrest     ! local integers 
    155157      REAL(wp) ::   ziglo, zjglo, zkglo, zperio   ! local scalars 
    156158      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam 
     
    198200         CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
    199201      ENDIF 
    200       jpk    = jpkglo 
    201202      ! 
    202203      ! 
     
    246247      END IF 
    247248 
    248       ! Calculate domain dimensions given calculated jpni and jpnj 
    249       ! This used to be done in par_oce.F90 when they were parameters rather 
    250       ! than variables 
    251       jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci   ! first  dim. 
    252       jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj   ! second dim. 
     249      iiarea = 1 + MOD( narea - 1 , jpni ) 
     250      ijarea = 1 + ( narea - 1 ) / jpni 
     251      iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 
     252      ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 
     253#if defined key_nemocice_decomp 
     254      jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     255      jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim.  
     256      jpimax  = jpi 
     257      jpjmax  = jpj 
     258      IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 
     259      IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 
     260#else 
     261      jpi = ( jpiglo     -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     262      jpj = ( jpjglo     -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim. 
     263      jpimax  = jpi 
     264      jpjmax  = jpj 
     265      IF( iiarea > iirest ) jpi = jpi - 1 
     266      IF( ijarea > ijrest ) jpj = jpj - 1 
     267#endif 
     268 
     269      jpk   = jpkglo                                           ! third dim 
     270 
    253271      jpim1 = jpi-1                                            ! inner domain indices 
    254272      jpjm1 = jpj-1                                            !   "           " 
    255       jpkm1 = jpk-1                                            !   "           " 
     273      jpkm1 = MAX( 1, jpk-1 )                                  !   "           " 
    256274      jpij  = jpi*jpj                                          !  jpi x j 
     275 
    257276 
    258277 
Note: See TracChangeset for help on using the changeset viewer.