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 9012 for branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2017-12-13T14:57:33+01:00 (6 years ago)
Author:
acc
Message:

Branch dev_CNRS_2017. Merge in no_ghost changes from dev_r8126_ROBUST08_no_ghost. These changes include lib_mpp refresh and rationalisation of mppini from dev_r8126_ROBUST10_MPPINI

File:
1 edited

Legend:

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

    r8885 r9012  
    163163      INTEGER  ::   ilocal_comm   ! local integer 
    164164      INTEGER  ::   ios, inum     !   -      - 
     165      INTEGER  ::   iiarea, ijarea     ! local integers 
     166      INTEGER  ::   iirest, ijrest     ! local integers 
    165167      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam 
    166168      CHARACTER(len=80)                 ::   clname 
     
    216218      ENDIF 
    217219      ! 
    218       jpk = jpkglo 
    219       ! 
    220 #if defined key_agrif 
    221       IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
    222          jpiglo  = nbcellsx + 2 + 2*nbghostcells 
    223          jpjglo  = nbcellsy + 2 + 2*nbghostcells 
    224          jpi     = ( jpiglo-2*jpreci + (jpni-1+0) ) / jpni + 2*jpreci 
    225          jpj     = ( jpjglo-2*jprecj + (jpnj-1+0) ) / jpnj + 2*jprecj 
    226          nperio  = 0 
    227          jperio  = 0 
    228          ln_use_jattr = .false. 
    229       ENDIF 
    230 #endif 
    231220      ! 
    232221      !                             !--------------------------------------------! 
     
    285274#endif 
    286275      ENDIF 
     276      ! 
     277#if defined key_agrif 
     278      IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
     279         jpiglo  = nbcellsx + 2 + 2*nbghostcells 
     280         jpjglo  = nbcellsy + 2 + 2*nbghostcells 
     281         jpi     = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls 
     282         jpj     = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls 
     283         jpimax  = jpi 
     284         jpjmax  = jpj 
     285         nperio  = 0 
     286         jperio  = 0 
     287         ln_use_jattr = .false. 
     288      ENDIF 
     289#endif 
    287290 
    288291      IF( Agrif_Root() ) THEN       ! AGRIF mother: specific setting from jpni and jpnj 
     292         iiarea = 1 + MOD( narea - 1 , jpni ) 
     293         ijarea = 1 + ( narea - 1 ) / jpni 
     294         iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 
     295         ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 
    289296#if defined key_nemocice_decomp 
    290          jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci    ! first  dim. 
    291          jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj    ! second dim.  
     297         jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     298         jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim.  
     299         jpimax  = jpi 
     300         jpjmax  = jpj 
     301         IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 
     302         IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 
    292303#else 
    293          jpi = ( jpiglo     -2*jpreci + (jpni-1) ) / jpni + 2*jpreci    ! first  dim. 
    294          jpj = ( jpjglo     -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj    ! second dim. 
    295 #endif 
    296       ENDIF 
     304         jpi = ( jpiglo     -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     305         jpj = ( jpjglo     -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim. 
     306         jpimax  = jpi 
     307         jpjmax  = jpj 
     308         IF( iiarea > iirest ) jpi = jpi - 1 
     309         IF( ijarea > ijrest ) jpj = jpj - 1 
     310#endif 
     311      ENDIF 
     312 
     313      jpk = jpkglo                                             ! third dim 
    297314 
    298315#if defined key_agrif 
     
    345362 
    346363      !                                      ! Domain decomposition 
    347       IF( jpni*jpnj == jpnij ) THEN   ;   CALL mpp_init      ! standard cutting out 
    348       ELSE                            ;   CALL mpp_init2     ! eliminate land processors 
    349       ENDIF 
     364      CALL mpp_init 
    350365      ! 
    351366      IF( ln_timing    )   CALL timing_init 
Note: See TracChangeset for help on using the changeset viewer.