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

    r8882 r9012  
    149149      !! ** Purpose :   initialization of the nemo model in off-line mode 
    150150      !!---------------------------------------------------------------------- 
    151       INTEGER ::   ji            ! dummy loop indices 
    152       INTEGER ::   ilocal_comm   ! local integer 
    153       INTEGER ::   ios, inum 
     151      INTEGER  ::   ji                 ! dummy loop indices 
     152      INTEGER  ::   ilocal_comm        ! local integer 
     153      INTEGER  ::   ios, inum          ! local integers 
     154      INTEGER  ::   iiarea, ijarea     ! local integers 
     155      INTEGER  ::   iirest, ijrest     ! local integers 
    154156      REAL(wp) ::   ziglo, zjglo, zkglo, zperio   ! local scalars 
    155157      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam 
     
    197199         CALL usr_def_nam( cltxt2, clnam, cn_cfg, nn_cfg, jpiglo, jpjglo, jpkglo, jperio ) 
    198200      ENDIF 
    199       jpk    = jpkglo 
    200201      ! 
    201202      ! 
     
    245246      END IF 
    246247 
    247       ! Calculate domain dimensions given calculated jpni and jpnj 
    248       ! This used to be done in par_oce.F90 when they were parameters rather 
    249       ! than variables 
    250       jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci   ! first  dim. 
    251       jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj   ! second dim. 
     248      iiarea = 1 + MOD( narea - 1 , jpni ) 
     249      ijarea = 1 + ( narea - 1 ) / jpni 
     250      iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 
     251      ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 
     252#if defined key_nemocice_decomp 
     253      jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     254      jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim.  
     255      jpimax  = jpi 
     256      jpjmax  = jpj 
     257      IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 
     258      IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 
     259#else 
     260      jpi = ( jpiglo     -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls    ! first  dim. 
     261      jpj = ( jpjglo     -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls    ! second dim. 
     262      jpimax  = jpi 
     263      jpjmax  = jpj 
     264      IF( iiarea > iirest ) jpi = jpi - 1 
     265      IF( ijarea > ijrest ) jpj = jpj - 1 
     266#endif 
     267 
     268      jpk   = jpkglo                                           ! third dim 
     269 
    252270      jpim1 = jpi-1                                            ! inner domain indices 
    253271      jpjm1 = jpj-1                                            !   "           " 
    254       jpkm1 = jpk-1                                            !   "           " 
     272      jpkm1 = MAX( 1, jpk-1 )                                  !   "           " 
    255273      jpij  = jpi*jpj                                          !  jpi x j 
    256274 
     
    285303 
    286304      !                                      ! Domain decomposition 
    287       IF( jpni*jpnj == jpnij ) THEN   ;   CALL mpp_init      ! standard cutting out 
    288       ELSE                            ;   CALL mpp_init2     ! eliminate land processors 
    289       ENDIF 
     305      CALL mpp_init 
    290306      ! 
    291307      IF( ln_timing    )   CALL timing_init 
Note: See TracChangeset for help on using the changeset viewer.