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

    r8974 r9012  
    235235      INTEGER  ::   ji                 ! dummy loop indices 
    236236      INTEGER  ::   ios, ilocal_comm   ! local integer 
     237      INTEGER  ::   iiarea, ijarea     ! local integers 
     238      INTEGER  ::   iirest, ijrest     ! local integers 
    237239      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam 
    238240      ! 
     
    278280      ENDIF 
    279281      ! 
    280       jpk = jpkglo 
    281       ! 
    282 #if defined key_agrif 
    283       IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
    284          jpiglo  = nbcellsx + 2 + 2*nbghostcells 
    285          jpjglo  = nbcellsy + 2 + 2*nbghostcells 
    286          jpi     = ( jpiglo-2*jpreci + (jpni-1+0) ) / jpni + 2*jpreci 
    287          jpj     = ( jpjglo-2*jprecj + (jpnj-1+0) ) / jpnj + 2*jprecj 
    288          nperio  = 0 
    289          jperio  = 0 
    290          ln_use_jattr = .false. 
    291       ENDIF 
    292 #endif 
    293282      ! 
    294283      !                             !--------------------------------------------! 
     
    349338#endif 
    350339      ENDIF 
     340      ! 
     341#if defined key_agrif 
     342      IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
     343         jpiglo  = nbcellsx + 2 + 2*nbghostcells 
     344         jpjglo  = nbcellsy + 2 + 2*nbghostcells 
     345         jpi     = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls 
     346         jpj     = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls 
     347         jpimax  = jpi 
     348         jpjmax  = jpj 
     349         nperio  = 0 
     350         jperio  = 0 
     351         ln_use_jattr = .false. 
     352      ENDIF 
     353#endif 
    351354 
    352355      IF( Agrif_Root() ) THEN       ! AGRIF mother: specific setting from jpni and jpnj 
     356         iiarea = 1 + MOD( narea - 1 , jpni ) 
     357         ijarea = 1 + ( narea - 1 ) / jpni 
     358         iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 
     359         ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 
    353360#if defined key_nemocice_decomp 
    354          jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci    ! first  dim. 
    355          jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj    ! second dim.  
     361         jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     362         jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim.  
     363         jpimax  = jpi 
     364         jpjmax  = jpj 
     365         IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 
     366         IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 
    356367#else 
    357          jpi = ( jpiglo     -2*jpreci + (jpni-1) ) / jpni + 2*jpreci    ! first  dim. 
    358          jpj = ( jpjglo     -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj    ! second dim. 
    359 #endif 
    360       ENDIF 
    361  
    362 !!gm ???    why here  it has already been done in line 301 ! 
     368         jpi = ( jpiglo     -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     369         jpj = ( jpjglo     -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim. 
     370         jpimax  = jpi 
     371         jpjmax  = jpj 
     372         IF( iiarea > iirest ) jpi = jpi - 1 
     373         IF( ijarea > ijrest ) jpj = jpj - 1 
     374#endif 
     375      ENDIF 
     376 
    363377      jpk = jpkglo                                             ! third dim 
    364 !!gm end 
    365378 
    366379#if defined key_agrif 
     
    409422 
    410423      !                                      ! Domain decomposition 
    411       IF( jpni*jpnj == jpnij ) THEN   ;   CALL mpp_init      ! standard cutting out 
    412       ELSE                            ;   CALL mpp_init2     ! eliminate land processors 
    413       ENDIF 
     424      CALL mpp_init 
     425      IF( ln_nnogather )    CALL nemo_northcomms! northfold neighbour lists (must be done after the masks are defined) 
    414426      ! 
    415427      IF( ln_timing    )   CALL timing_init 
     
    422434                           CALL     dom_init   ! Domain 
    423435      IF( ln_crs       )   CALL     crs_init   ! coarsened grid: domain initialization  
    424       IF( ln_nnogather )   CALL nemo_northcomms! northfold neighbour lists (must be done after the masks are defined) 
     436      !IF( ln_nnogather )    CALL nemo_northcomms! northfold neighbour lists (must be done after the masks are defined) 
    425437      IF( ln_ctl       )   CALL prt_ctl_init   ! Print control 
    426438       
Note: See TracChangeset for help on using the changeset viewer.