Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/cfgs/C1D_PAPA/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/cfgs/C1D_PAPA/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/cfgs/C1D_PAPA/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -39,5 +39,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -51,8 +51,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -74,5 +76,6 @@
       kpk = 75 
       !                             ! Set the lateral boundary condition of the global domain
-      kperio =  7                   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition
+      ldIperio =  .TRUE.   ;   ldJperio = .TRUE.   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
       !                             ! control print
@@ -90,6 +93,5 @@
          WRITE(numout,*) '                                               jpjglo = ', kpj
          WRITE(numout,*) '                                               jpkglo = ', kpk
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      C1D : closed basin                       jperio = ', kperio
+         WRITE(numout,*) '   '
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/NEMO_manual_state.txt
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/NEMO_manual_state.txt	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/NEMO_manual_state.txt	(revision 14336)
@@ -15,6 +15,6 @@
 chap_misc.tex: key{mpp\_mpi} key{nosignedzero} key{vectopt\_loop} np{iom\_get} np{jpjdta} np{jpjglo} np{nn\_bench} np{nn\_bit\_cmp} np{open\_ocean\_jstart} 
 chap_LDF.tex: hf{dynldf\_cNd} hf{ldfdyn\_substitute} hf{ldftra\_substitute} hf{traldf\_c1d} hf{traldf\_cNd} key{dynldf\_c1d} key{dynldf\_c2d} key{dynldf\_c3d} key{traldf\_c1d} key{traldf\_c2d} key{traldf\_c3d} key{traldf\_cNd} key{traldf\_eiv} mdl{ldfdyn\_c2d} mdl{ldfeiv} mdl{traadv\_eiv} np{ln\_dynldf\_bilap} np{ln\_sco} np{nn\_eos} np{rn\_aeih\_0} np{rn\_aeiv} np{rn\_aeiv\_0} np{rn\_ahm0} np{rn\_ahmb0} np{rn\_aht0} np{rn\_ahtb0} np{traldf\_grif} np{traldf\_grif\_iso} rou{ldf\_dyn\_c2d\_orca} rou{ldfslp\_init} 
-chap_LBC.tex: jp{jpreci} key{mpp\_mpi} np{jperio} np{jpiglo} np{jpindt} np{jpinft} np{jpjglo} np{jpjnob} np{nbdysegn} np{nn\_bdy\_jpk} np{nn\_msh} np{nn\_tra} rou{inimpp2} 
-chap_DOM.tex: key{mpp\_mpi} ngn{namzgr} ngn{namzgr\_sco} nlst{namzgr} nlst{namzgr_sco} np{jperio} np{jpiglo} np{jpjglo} np{jpkglo} np{ln\_sco} np{ln\_sigcrit} np{ln\_s\_SF12} np{ln\_s\_SH94} np{ln\_tsd\_ini} np{ln\_zco} np{ln\_zps} np{nn\_bathy} np{nn\_msh} np{ppa0} np{ppa1} np{ppacr} np{ppdzmin} np{pphmax} np{ppkth} np{ppsur} np{rn\_alpha} np{rn\_bb} np{rn\_e3zps\_min} np{rn\_e3zps\_rat} np{rn\_hc} np{rn\_rmax} np{rn\_sbot\_max} np{rn\_sbot\_min} np{rn\_theta} np{rn\_zb\_a} np{rn\_zb\_b} np{rn\_zs} rou{istate\_t\_s} 
+chap_LBC.tex: jp{jpreci} key{mpp\_mpi} np{jpiglo} np{jpindt} np{jpinft} np{jpjglo} np{jpjnob} np{nbdysegn} np{nn\_bdy\_jpk} np{nn\_msh} np{nn\_tra} rou{inimpp2} 
+chap_DOM.tex: key{mpp\_mpi} ngn{namzgr} ngn{namzgr\_sco} nlst{namzgr} nlst{namzgr_sco} np{jpiglo} np{jpjglo} np{jpkglo} np{ln\_sco} np{ln\_sigcrit} np{ln\_s\_SF12} np{ln\_s\_SH94} np{ln\_tsd\_ini} np{ln\_zco} np{ln\_zps} np{nn\_bathy} np{nn\_msh} np{ppa0} np{ppa1} np{ppacr} np{ppdzmin} np{pphmax} np{ppkth} np{ppsur} np{rn\_alpha} np{rn\_bb} np{rn\_e3zps\_min} np{rn\_e3zps\_rat} np{rn\_hc} np{rn\_rmax} np{rn\_sbot\_max} np{rn\_sbot\_min} np{rn\_theta} np{rn\_zb\_a} np{rn\_zb\_b} np{rn\_zs} rou{istate\_t\_s} 
 chap_conservation.tex: key{\_} 
 annex_iso.tex: key{trabbl} key{traldf\_eiv} np{ln\_traldf\_eiv} np{ln\_traldf\_gdia} 
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/latex/NEMO/subfiles/chap_DOM.tex
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/latex/NEMO/subfiles/chap_DOM.tex	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/latex/NEMO/subfiles/chap_DOM.tex	(revision 14336)
@@ -377,7 +377,7 @@
 in which case \np{cn_cfg}{cn\_cfg} and \np{nn_cfg}{nn\_cfg} are set from these values accordingly).
 
-The global lateral boundary condition type is selected from 8 options using parameter \texttt{jperio}.
+The global lateral boundary condition type is selected from 8 options using parameters \texttt{l\_Iperio}, \texttt{l\_Jperio}, \texttt{l\_NFold} and \texttt{c\_NFtype}.
 See \autoref{sec:LBC_jperio} for details on the available options and
-the corresponding values for \texttt{jperio}.
+the corresponding values for \texttt{l\_Iperio}, \texttt{l\_Jperio}, \texttt{l\_NFold} and \texttt{c\_NFtype}.
 
 %% =================================================================================================
@@ -394,10 +394,12 @@
 
 \begin{clines}
-int    jpiglo, jpjglo, jpkglo     /* global domain sizes                                    */
-int    jperio                     /* lateral global domain b.c.                             */
-double glamt, glamu, glamv, glamf /* geographic longitude (t,u,v and f points respectively) */
-double gphit, gphiu, gphiv, gphif /* geographic latitude                                    */
-double e1t, e1u, e1v, e1f         /* horizontal scale factors                               */
-double e2t, e2u, e2v, e2f         /* horizontal scale factors                               */
+integer   Ni0glo, NjOglo, jpkglo       /* global domain sizes (without MPI halos)                */
+logical   l\_Iperio, l\_Jperio         /* lateral global domain b.c.: i- j-periodicity           */
+logical   l\_NFold                     /* lateral global domain b.c.: North Pole folding         */
+char(1)   c\_NFtype                    /*    type of North pole Folding: T or F point            */
+real      glamt, glamu, glamv, glamf   /* geographic longitude (t,u,v and f points respectively) */
+real      gphit, gphiu, gphiv, gphif   /* geographic latitude                                    */
+real      e1t, e1u, e1v, e1f           /* horizontal scale factors                               */
+real      e2t, e2u, e2v, e2f           /* horizontal scale factors                               */
 \end{clines}
 
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/latex/NEMO/subfiles/chap_LBC.tex
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/latex/NEMO/subfiles/chap_LBC.tex	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/doc/latex/NEMO/subfiles/chap_LBC.tex	(revision 14336)
@@ -159,5 +159,5 @@
 
 %% =================================================================================================
-\section{Model domain boundary condition (\forcode{jperio})}
+\section{Model domain boundary condition}
 \label{sec:LBC_jperio}
 
@@ -168,9 +168,9 @@
 
 %% =================================================================================================
-\subsection{Closed, cyclic (\forcode{jperio={0,1,2,7}})}
+\subsection{Closed, cyclic (\forcode{l\_Iperio,l\_jperio})}
 \label{subsec:LBC_jperio012}
 
 The choice of closed or cyclic model domain boundary condition is made by
-setting \forcode{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}{cfg}.
+setting \forcode{l\_Iperio,l\_jperio} to true or false in namelist \nam{cfg}{cfg}.
 Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}.
 The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$,
@@ -181,18 +181,18 @@
 \begin{description}
 
-\item [For closed boundary (\forcode{jperio=0})], solid walls are imposed at all model boundaries:
+\item [For closed boundary (\forcode{l\_Iperio = .false.,l\_jperio = .false.})], solid walls are imposed at all model boundaries:
   first and last rows and columns are set to zero.
 
-\item [For cyclic east-west boundary (\forcode{jperio=1})], first and last rows are set to zero (closed) whilst the first column is set to
+\item [For cyclic east-west boundary (\forcode{l\_Iperio = .true.,l\_jperio = .false.})], first and last rows are set to zero (closed) whilst the first column is set to
   the value of the last-but-one column and the last column to the value of the second one
   (\autoref{fig:LBC_jperio}-a).
   Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end.
 
-\item [For cyclic north-south boundary (\forcode{jperio=2})], first and last columns are set to zero (closed) whilst the first row is set to
+\item [For cyclic north-south boundary (\forcode{l\_Iperio = .false.,l\_jperio = .true.})], first and last columns are set to zero (closed) whilst the first row is set to
   the value of the last-but-one row and the last row to the value of the second one
   (\autoref{fig:LBC_jperio}-a).
   Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end.
 
-\item [Bi-cyclic east-west and north-south boundary (\forcode{jperio=7})] combines cases 1 and 2.
+\item [Bi-cyclic east-west and north-south boundary (\forcode{l\_Iperio = .true.,l\_jperio = .true.})] combines cases 1 and 2.
 
 \end{description}
@@ -207,5 +207,5 @@
 
 %% =================================================================================================
-\subsection{North-fold (\forcode{jperio={3,6}})}
+\subsection{North-fold (\forcode{l\_NFold = .true.})}
 \label{subsec:LBC_north_fold}
 
@@ -220,5 +220,5 @@
   \includegraphics[width=0.66\textwidth]{LBC_North_Fold_T}
   \caption[North fold boundary in ORCA 2\deg, 1/4\deg and 1/12\deg]{
-    North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$),
+    North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($c\_NFtype='T'$),
     as used in ORCA 2\deg, 1/4\deg and 1/12\deg.
     Pink shaded area corresponds to the inner domain mask (see text).}
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/NST/agrif_user.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/NST/agrif_user.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/NST/agrif_user.F90	(revision 14336)
@@ -63,5 +63,5 @@
 ! In case of East-West periodicity, prevent AGRIF interpolation at east and west boundaries
 ! The procnames will not be called at these boundaries
-      IF (jperio == 1) THEN
+      IF (l_Iperio) THEN
          CALL Agrif_Set_NearCommonBorderX(.TRUE.)
          CALL Agrif_Set_DistantCommonBorderX(.TRUE.)
@@ -872,5 +872,5 @@
       nbghostcells_y_n = nbghostcells
       !
-      IF(   jperio == 1  )   nbghostcells_x   = 0
+      IF(    l_Iperio    )   nbghostcells_x   = 0
       IF( .NOT. lk_south )   nbghostcells_y_s = 0
       IF( .NOT. lk_north )   nbghostcells_y_n = 0
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/BDY/bdyini.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/BDY/bdyini.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/BDY/bdyini.F90	(revision 14336)
@@ -166,7 +166,5 @@
       ! Check and write out namelist parameters
       ! -----------------------------------------
-      IF( jperio /= 0 )   CALL ctl_stop( 'bdy_segs: Cyclic or symmetric,',   &
-         &                               ' and general open boundary condition are not compatible' )
-
+      
       IF(lwp) WRITE(numout,*) 'Number of open boundary sets : ', nb_bdy
 
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/CRS/crsdom.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/CRS/crsdom.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/CRS/crsdom.F90	(revision 14336)
@@ -30,5 +30,5 @@
    !!       Original.   May 2012.  (J. Simeon, C. Calone, G. Madec, C. Ethe)
    !!===================================================================
-   USE dom_oce        ! ocean space and time domain and to get jperio
+   USE dom_oce        ! ocean space and time domain
    USE crs            ! domain for coarse grid
    !
@@ -2117,64 +2117,64 @@
       CASE ( 0 ) 
 
-         SELECT CASE ( jperio )
-     
- 
-        CASE ( 0, 1, 3, 4 )    !   3, 4 : T-Pivot at North Fold
-        
-            DO ji = 2, jpiglo_crsm1
-               ijie = ( ji * nn_factx ) - nn_factx   !cc
-               ijis = ijie - nn_factx + 1
-               mis2_crs(ji) = ijis
-               mie2_crs(ji) = ijie
-            ENDDO
-            IF ( jpiglo - 1 - mie2_crs(jpiglo_crsm1) <= nn_factx ) mie2_crs(jpiglo_crsm1) = jpiglo - 2  
-
-            ! Handle first the northernmost bin
-            IF ( nn_facty == 2 ) THEN   ;    ijjgloT = jpjglo - 1 
-            ELSE                        ;    ijjgloT = jpjglo
-            ENDIF
-
-            DO jj = 2, jpjglo_crs
-                ijje = ijjgloT - nn_facty * ( jj - 3 )
-                ijjs = ijje - nn_facty + 1                   
-                mjs2_crs(jpjglo_crs-jj+2) = ijjs
-                mje2_crs(jpjglo_crs-jj+2) = ijje
-            ENDDO
-
-         CASE ( 2 ) 
-            WRITE(numout,*)  'crs_init, jperio=2 not supported' 
-        
-         CASE ( 5, 6 )    ! F-pivot at North Fold
-
-            DO ji = 2, jpiglo_crsm1
-               ijie = ( ji * nn_factx ) - nn_factx 
-               ijis = ijie - nn_factx + 1
-               mis2_crs(ji) = ijis
-               mie2_crs(ji) = ijie
-            ENDDO
-            IF ( jpiglo - 1 - mie2_crs(jpiglo_crsm1) <= nn_factx ) mie_crs(jpiglo_crsm1)  = jpiglo - 2 
-
-            ! Treat the northernmost bin separately.
-            jj = 2
-            ijje = jpj - nn_facty * ( jj - 2 )
-            IF ( nn_facty == 3 ) THEN   ;  ijjs = ijje - 1 
-            ELSE                        ;  ijjs = ijje - nn_facty + 1
-            ENDIF
-            mjs2_crs(jpj_crs-jj+1) = ijjs
-            mje2_crs(jpj_crs-jj+1) = ijje
-
-            ! Now bin the rest, any remainder at the south is lumped in the southern bin
-            DO jj = 3, jpjglo_crsm1
-                ijje = jpjglo - nn_facty * ( jj - 2 )
-                ijjs = ijje - nn_facty + 1                  
-                IF ( ijjs <= nn_facty )  ijjs = 2
-                mjs2_crs(jpj_crs-jj+1)   = ijjs
-                mje2_crs(jpj_crs-jj+1)   = ijje
-            ENDDO
-
-         CASE DEFAULT
-            WRITE(numout,*) 'crs_init. Only jperio = 0, 1, 3, 4, 5, 6 supported' 
- 
-         END SELECT
+!!$         SELECT CASE ( jperio )
+!!$     
+!!$ 
+!!$        CASE ( 0, 1, 3, 4 )    !   3, 4 : T-Pivot at North Fold
+!!$        
+!!$            DO ji = 2, jpiglo_crsm1
+!!$               ijie = ( ji * nn_factx ) - nn_factx   !cc
+!!$               ijis = ijie - nn_factx + 1
+!!$               mis2_crs(ji) = ijis
+!!$               mie2_crs(ji) = ijie
+!!$            ENDDO
+!!$            IF ( jpiglo - 1 - mie2_crs(jpiglo_crsm1) <= nn_factx ) mie2_crs(jpiglo_crsm1) = jpiglo - 2  
+!!$
+!!$            ! Handle first the northernmost bin
+!!$            IF ( nn_facty == 2 ) THEN   ;    ijjgloT = jpjglo - 1 
+!!$            ELSE                        ;    ijjgloT = jpjglo
+!!$            ENDIF
+!!$
+!!$            DO jj = 2, jpjglo_crs
+!!$                ijje = ijjgloT - nn_facty * ( jj - 3 )
+!!$                ijjs = ijje - nn_facty + 1                   
+!!$                mjs2_crs(jpjglo_crs-jj+2) = ijjs
+!!$                mje2_crs(jpjglo_crs-jj+2) = ijje
+!!$            ENDDO
+!!$
+!!$         CASE ( 2 ) 
+!!$            WRITE(numout,*)  'crs_init, jperio=2 not supported' 
+!!$        
+!!$         CASE ( 5, 6 )    ! F-pivot at North Fold
+!!$
+!!$            DO ji = 2, jpiglo_crsm1
+!!$               ijie = ( ji * nn_factx ) - nn_factx 
+!!$               ijis = ijie - nn_factx + 1
+!!$               mis2_crs(ji) = ijis
+!!$               mie2_crs(ji) = ijie
+!!$            ENDDO
+!!$            IF ( jpiglo - 1 - mie2_crs(jpiglo_crsm1) <= nn_factx ) mie_crs(jpiglo_crsm1)  = jpiglo - 2 
+!!$
+!!$            ! Treat the northernmost bin separately.
+!!$            jj = 2
+!!$            ijje = jpj - nn_facty * ( jj - 2 )
+!!$            IF ( nn_facty == 3 ) THEN   ;  ijjs = ijje - 1 
+!!$            ELSE                        ;  ijjs = ijje - nn_facty + 1
+!!$            ENDIF
+!!$            mjs2_crs(jpj_crs-jj+1) = ijjs
+!!$            mje2_crs(jpj_crs-jj+1) = ijje
+!!$
+!!$            ! Now bin the rest, any remainder at the south is lumped in the southern bin
+!!$            DO jj = 3, jpjglo_crsm1
+!!$                ijje = jpjglo - nn_facty * ( jj - 2 )
+!!$                ijjs = ijje - nn_facty + 1                  
+!!$                IF ( ijjs <= nn_facty )  ijjs = 2
+!!$                mjs2_crs(jpj_crs-jj+1)   = ijjs
+!!$                mje2_crs(jpj_crs-jj+1)   = ijje
+!!$            ENDDO
+!!$
+!!$         CASE DEFAULT
+!!$            WRITE(numout,*) 'crs_init. Only jperio = 0, 1, 3, 4, 5, 6 supported' 
+!!$ 
+!!$         END SELECT
 
       CASE (1 )
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/dom_oce.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/dom_oce.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/dom_oce.F90	(revision 14336)
@@ -65,13 +65,7 @@
    !! space domain parameters
    !!----------------------------------------------------------------------
-   INTEGER, PUBLIC ::   jperio   !: Global domain lateral boundary type (between 0 and 7)
-   !                                !  = 0 closed                 ;   = 1 cyclic East-West
-   !                                !  = 2 cyclic North-South     ;   = 3 North fold T-point pivot
-   !                                !  = 4 cyclic East-West AND North fold T-point pivot
-   !                                !  = 5 North fold F-point pivot
-   !                                !  = 6 cyclic East-West AND North fold F-point pivot
-   !                                !  = 7 bi-cyclic East-West AND North-South
-   LOGICAL, PUBLIC ::   l_Iperio, l_Jperio   !   should we explicitely take care I/J periodicity
-   LOGICAL, PUBLIC ::   l_NFoldT, l_NFoldF
+   LOGICAL         , PUBLIC ::   l_Iperio, l_Jperio   ! i- j-periodicity
+   LOGICAL         , PUBLIC ::   l_NFold              ! North Pole folding
+   CHARACTER(len=3), PUBLIC ::   c_NFtype             ! type of North pole Folding: T or F point
 
    ! Tiling namelist
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domain.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domain.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domain.F90	(revision 14336)
@@ -113,19 +113,11 @@
          WRITE(numout,*)     '              jpnj    : ', jpnj, '   nn_hls  : ', nn_hls
          WRITE(numout,*)     '              jpnij   : ', jpnij
-         WRITE(numout,*)     '      lateral boundary of the Global domain : jperio  = ', jperio
-         SELECT CASE ( jperio )
-         CASE( 0 )   ;   WRITE(numout,*) '         (i.e. closed)'
-         CASE( 1 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west)'
-         CASE( 2 )   ;   WRITE(numout,*) '         (i.e. cyclic north-south)'
-         CASE( 3 )   ;   WRITE(numout,*) '         (i.e. north fold with T-point pivot)'
-         CASE( 4 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west and north fold with T-point pivot)'
-         CASE( 5 )   ;   WRITE(numout,*) '         (i.e. north fold with F-point pivot)'
-         CASE( 6 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west and north fold with F-point pivot)'
-         CASE( 7 )   ;   WRITE(numout,*) '         (i.e. cyclic east-west and north-south)'
-         CASE DEFAULT
-            CALL ctl_stop( 'dom_init:   jperio is out of range' )
-         END SELECT
+         WRITE(numout,*)     '      lateral boundary of the Global domain:'
+         WRITE(numout,*)     '              cyclic east-west             :', l_Iperio
+         WRITE(numout,*)     '              cyclic north-south           :', l_Jperio
+         WRITE(numout,*)     '              North Pole folding           :', l_NFold
+         WRITE(numout,*)     '                 type of North pole Folding:', c_NFtype
          WRITE(numout,*)     '      Ocean model configuration used:'
-         WRITE(numout,*)     '         cn_cfg = ', TRIM( cn_cfg ), '   nn_cfg = ', nn_cfg
+         WRITE(numout,*)     '              cn_cfg = ', TRIM( cn_cfg ), '   nn_cfg = ', nn_cfg
       ENDIF
 
@@ -622,5 +614,5 @@
 
 
-   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE domain_cfg( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE domain_cfg  ***
@@ -630,12 +622,14 @@
       !! ** Method  :   read the cn_domcfg NetCDF file
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c.
-      !
-      INTEGER ::   inum   ! local integer
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
+      !
+      INTEGER ::   inum, iperio                   ! local integer
       REAL(wp) ::   zorca_res                     ! local scalars
-      REAL(wp) ::   zperio                        !   -      -
+      REAL(wp) ::   zperio, z01                   !   -      -
       INTEGER, DIMENSION(4) ::   idvar, idimsz    ! size   of dimensions
       !!----------------------------------------------------------------------
@@ -678,5 +672,26 @@
       kpj = idimsz(2)
       kpk = idimsz(3)
-      CALL iom_get( inum, 'jperio', zperio )   ;   kperio = NINT( zperio )
+      !
+      IF( iom_varid( inum, 'jperio', ldstop = .FALSE. ) > 0 ) THEN                   ! keep compatibility with old version...
+         CALL iom_get( inum, 'jperio', zperio )   ;   iperio = NINT( zperio )
+         ldIperio = iperio == 1 .OR. iperio == 4 .OR. iperio == 6 .OR. iperio == 7   ! i-periodicity
+         ldJperio = iperio == 2 .OR. iperio == 7                                     ! j-periodicity
+         ldNFold  = iperio >= 3 .OR. iperio <= 6                                     ! North pole folding
+         IF(     iperio == 3 .OR. iperio == 4 ) THEN   ;   cdNFtype = 'T'            !    folding at T point
+         ELSEIF( iperio == 5 .OR. iperio == 6 ) THEN   ;   cdNFtype = 'F'            !    folding at F point
+         ELSE                                          ;   cdNFtype = '-'  
+         ENDIF
+      ELSE   
+         z01 = 0._wp   ;   IF( iom_varid( inum, 'Iperio', ldstop = .FALSE. ) > 0 )   CALL iom_get( inum, 'Iperio', z01 )
+         ldIperio = NINT(z01) == 1               ! i-periodicity
+         z01 = 0._wp   ;   IF( iom_varid( inum, 'Jperio', ldstop = .FALSE. ) > 0 )   CALL iom_get( inum, 'Jperio', z01 )
+         ldJperio = NINT(z01) == 1               ! j-periodicity
+         cdNFtype = '-'                          ! default definition
+         z01 = 0._wp   ;   IF( iom_varid( inum, 'NFoldT', ldstop = .FALSE. ) > 0 )   CALL iom_get( inum, 'NFoldT', z01 )
+         IF( NINT(z01) == 1 )   cdNFtype = 'T'   ! folding at T point
+         z01 = 0._wp   ;   IF( iom_varid( inum, 'NFoldF', ldstop = .FALSE. ) > 0 )   CALL iom_get( inum, 'NFoldF', z01 )
+         IF( NINT(z01) == 1 )   cdNFtype = 'F'   ! folding at T point
+         ldNFold = cdNFtype /= '-'               ! North pole folding   
+      ENDIF
       CALL iom_close( inum )
       !
@@ -686,5 +701,4 @@
          WRITE(numout,*) '      Nj0glo = ', kpj
          WRITE(numout,*) '      jpkglo = ', kpk
-         WRITE(numout,*) '      type of global domain lateral boundary   jperio = ', kperio
       ENDIF
       !
@@ -733,5 +747,8 @@
       !
       !                                   ! lateral boundary of the global domain
-      CALL iom_rstput( 0, 0, inum, 'jperio', REAL( jperio, wp), ktype = jp_i4 )
+      CALL iom_rstput( 0, 0, inum, 'Iperio', REAL( COUNT( (/l_Iperio/) ), wp), ktype = jp_i1 )
+      CALL iom_rstput( 0, 0, inum, 'Jperio', REAL( COUNT( (/l_Jperio/) ), wp), ktype = jp_i1 )
+      CALL iom_rstput( 0, 0, inum, 'NFoldT', REAL( COUNT( (/c_NFtype == 'T'/) ), wp), ktype = jp_i1 )
+      CALL iom_rstput( 0, 0, inum, 'NFoldF', REAL( COUNT( (/c_NFtype == 'F'/) ), wp), ktype = jp_i1 )
       !
       !                                   ! type of vertical coordinate
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domwri.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domwri.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domwri.F90	(revision 14336)
@@ -75,5 +75,8 @@
       CALL iom_open( TRIM(clnam), inum, ldwrt = .TRUE. )
       !                                                         ! domain characteristics
-      CALL iom_rstput( 0, 0, inum, 'jperio', REAL( jperio, wp), ktype = jp_i4 )
+      CALL iom_rstput( 0, 0, inum, 'Iperio', REAL( COUNT( (/l_Iperio/) ), wp), ktype = jp_i1 )
+      CALL iom_rstput( 0, 0, inum, 'Jperio', REAL( COUNT( (/l_Jperio/) ), wp), ktype = jp_i1 )
+      CALL iom_rstput( 0, 0, inum, 'NFoldT', REAL( COUNT( (/c_NFtype == 'T'/) ), wp), ktype = jp_i1 )
+      CALL iom_rstput( 0, 0, inum, 'NFoldF', REAL( COUNT( (/c_NFtype == 'F'/) ), wp), ktype = jp_i1 )
       !                                                         ! type of vertical coordinate
       IF( ln_zco    ) THEN   ;   izco = 1   ;   ELSE   ;   izco = 0   ;   ENDIF
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domzgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domzgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/DOM/domzgr.F90	(revision 14336)
@@ -115,12 +115,12 @@
       !
       zmsk(:,:) = 1._wp                                       ! default: no closed boundaries
-      IF( jperio == 0 .OR. jperio == 2 .OR. jperio == 3 .OR. jperio == 5 ) THEN   ! E-W closed
+      IF( .NOT. l_Iperio ) THEN                                    ! E-W closed:
          zmsk(  mi0(     1+nn_hls):mi1(     1+nn_hls),:) = 0._wp   ! first column of inner global domain at 0
          zmsk(  mi0(jpiglo-nn_hls):mi1(jpiglo-nn_hls),:) = 0._wp   ! last  column of inner global domain at 0 
       ENDIF
-      IF( .NOT. ( jperio == 2 .OR. jperio == 7 ) ) THEN                           ! S closed
+      IF( .NOT. l_Jperio ) THEN                                    ! S closed:
          zmsk(:,mj0(     1+nn_hls):mj1(     1+nn_hls)  ) = 0._wp   ! first   line of inner global domain at 0
       ENDIF
-      IF( jperio == 0 .OR. jperio == 1 ) THEN                                     ! N closed
+      IF( .NOT. ( l_Jperio .OR. l_NFold ) ) THEN                   ! N closed:
          zmsk(:,mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls)  ) = 0._wp   ! last    line of inner global domain at 0
       ENDIF
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_ext_generic.h90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_ext_generic.h90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_ext_generic.h90	(revision 14336)
@@ -43,5 +43,5 @@
       DO jf = 1, ipf                      ! Loop on the number of arrays to be treated
          !
-         IF( l_NFoldT ) THEN                   ! *  North fold  T-point pivot
+         IF( c_NFtype == 'T' ) THEN            ! *  North fold  T-point pivot
             !
             SELECT CASE ( NAT_IN(jf)  )
@@ -94,7 +94,7 @@
             END SELECT
             !
-         ENDIF   ! l_NFoldT
+         ENDIF   ! c_NFtype == 'T'
          !
-         IF( l_NFoldF ) THEN                   ! *  North fold  F-point pivot
+         IF( c_NFtype == 'F' ) THEN            ! *  North fold  F-point pivot
             !
             SELECT CASE ( NAT_IN(jf)  )
@@ -139,5 +139,5 @@
             END SELECT
             !
-         ENDIF   ! l_NFoldF
+         ENDIF   ! c_NFtype == 'F'
          !
       END DO
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_generic.h90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_generic.h90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_generic.h90	(revision 14336)
@@ -94,5 +94,5 @@
       DO jf = 1, ipf                      ! Loop on the number of arrays to be treated
          !
-         IF( l_NFoldT ) THEN                   ! *  North fold  T-point pivot
+         IF( c_NFtype == 'T' ) THEN            ! *  North fold  T-point pivot
             !
             SELECT CASE ( NAT_IN(jf)  )
@@ -261,7 +261,7 @@
             END SELECT   ! NAT_IN(jf)
             !
-         ENDIF   ! l_NFoldT
+         ENDIF   ! c_NFtype == 'T'
          !
-         IF( l_NFoldF ) THEN                   ! *  North fold  F-point pivot
+         IF( c_NFtype == 'F' ) THEN            ! *  North fold  F-point pivot
             !
             SELECT CASE ( NAT_IN(jf)  )
@@ -453,5 +453,5 @@
             END SELECT   ! NAT_IN(jf)
             !
-         ENDIF   ! l_NFoldF
+         ENDIF   ! c_NFtype == 'F'
          !
       END DO   ! ipf
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_nogather_generic.h90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_nogather_generic.h90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_nogather_generic.h90	(revision 14336)
@@ -109,5 +109,5 @@
       DO jf = 1, ipf                      ! Loop over the number of arrays to be processed
          !
-         IF( l_NFoldT ) THEN                 ! *  North fold  T-point pivot
+         IF( c_NFtype == 'T' ) THEN          ! *  North fold  T-point pivot
             !
             SELECT CASE ( NAT_IN(jf) )
@@ -305,7 +305,7 @@
             END SELECT
             !
-         ENDIF   ! l_NFoldT
+         ENDIF   ! c_NFtype == 'T'
          !
-         IF( l_NFoldF ) THEN                  ! *  North fold  F-point pivot
+         IF( c_NFtype == 'F' ) THEN           ! *  North fold  F-point pivot
             !
             SELECT CASE ( NAT_IN(jf) )
@@ -429,5 +429,5 @@
             END SELECT
             !
-         ENDIF   ! l_NFoldF
+         ENDIF   ! c_NFtype == 'F'
          !
       END DO            ! End jf loop
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mpp_nfd_generic.h90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mpp_nfd_generic.h90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mpp_nfd_generic.h90	(revision 14336)
@@ -118,12 +118,12 @@
          !
          ! However, some other points are duplicated in the north pole folding:
-         !  - jperio=[34], grid=T : half of the last line (jpiglo/2+2:jpiglo-nn_hls)
-         !  - jperio=[34], grid=U : half of the last line (jpiglo/2+1:jpiglo-nn_hls)
-         !  - jperio=[34], grid=V : all the last line nn_hls+1 and (nn_hls+2:jpiglo-nn_hls)
-         !  - jperio=[34], grid=F : all the last line (nn_hls+1:jpiglo-nn_hls)
-         !  - jperio=[56], grid=T : 2 points of the last line (jpiglo/2+1 and jpglo-nn_hls)
-         !  - jperio=[56], grid=U : no points are duplicated
-         !  - jperio=[56], grid=V : half of the last line (jpiglo/2+1:jpiglo-nn_hls)
-         !  - jperio=[56], grid=F : half of the last line (jpiglo/2+1:jpiglo-nn_hls-1)
+         !  - c_NFtype='T', grid=T : half of the last line (jpiglo/2+2:jpiglo-nn_hls)
+         !  - c_NFtype='T', grid=U : half of the last line (jpiglo/2+1:jpiglo-nn_hls)
+         !  - c_NFtype='T', grid=V : all the last line nn_hls+1 and (nn_hls+2:jpiglo-nn_hls)
+         !  - c_NFtype='T', grid=F : all the last line (nn_hls+1:jpiglo-nn_hls)
+         !  - c_NFtype='F', grid=T : 2 points of the last line (jpiglo/2+1 and jpglo-nn_hls)
+         !  - c_NFtype='F', grid=U : no points are duplicated
+         !  - c_NFtype='F', grid=V : half of the last line (jpiglo/2+1:jpiglo-nn_hls)
+         !  - c_NFtype='F', grid=F : half of the last line (jpiglo/2+1:jpiglo-nn_hls-1)
          ! The order of the calculations may differ for these duplicated points (as, for example jj+1 becomes jj-1)
          ! This explain why these duplicated points may have different values even if they are at the exact same location.
@@ -141,5 +141,5 @@
          IF( ll_add_line ) THEN
             DO jf = 1, ipf                      ! Loop over the number of arrays to be processed
-               ipj_s(jf) = nn_hls + COUNT( (/ l_NFoldT .OR. NAT_IN(jf) == 'V' .OR. NAT_IN(jf) == 'F' /) ) 
+               ipj_s(jf) = nn_hls + COUNT( (/ c_NFtype == 'T' .OR. NAT_IN(jf) == 'V' .OR. NAT_IN(jf) == 'F' /) ) 
             END DO
          ELSE
@@ -155,5 +155,5 @@
          DO jf = 1, ipf                      ! Loop over the number of arrays to be processed
             !
-            IF( l_NFoldT ) THEN          ! *  North fold  T-point pivot
+            IF( c_NFtype == 'T' ) THEN          ! *  North fold  T-point pivot
                SELECT CASE ( NAT_IN(jf) )
                CASE ( 'T', 'W', 'U' )   ;   i012 = 1   ! T-, U-, W-point
@@ -161,5 +161,5 @@
                END SELECT
             ENDIF
-            IF( l_NFoldF ) THEN          ! *  North fold  F-point pivot
+            IF( c_NFtype == 'F' ) THEN          ! *  North fold  F-point pivot
                SELECT CASE ( NAT_IN(jf) )
                CASE ( 'T', 'W', 'U' )   ;   i012 = 0   ! T-, U-, W-point
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mppini.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mppini.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/mppini.F90	(revision 14336)
@@ -113,7 +113,5 @@
       !! ** Method  :   Global domain is distributed in smaller local domains.
       !!      Periodic condition is a function of the local domain position
-      !!      (global boundary or neighbouring domain) and of the global
-      !!      periodic
-      !!      Type :         jperio global periodic condition
+      !!      (global boundary or neighbouring domain) and of the global periodic
       !!
       !! ** Action : - set domain parameters
@@ -137,5 +135,5 @@
       LOGICAL ::   llbest, llauto
       LOGICAL ::   llwrtlay
-      LOGICAL ::   llmpi_Iperio, llmpi_Jperio, llmpiNfold
+      LOGICAL ::   llmpi_Iperio, llmpi_Jperio, llmpiNFold
       LOGICAL ::   ln_listonly
       LOGICAL, ALLOCATABLE, DIMENSION(:,:  ) ::   llisOce  ! is not land-domain only?
@@ -494,8 +492,8 @@
       !                          ! Prepare mpp north fold
       !
-      llmpiNfold =          jpni  > 1 .AND. ( l_NFoldT .OR. l_NFoldF )   ! is the North fold done with an MPI communication?
-      l_IdoNFold = ijn(narea) == jpnj .AND. ( l_NFoldT .OR. l_NFoldF )   ! is this process doing North fold?
-      !
-      IF( llmpiNfold ) THEN
+      llmpiNFold =          jpni  > 1 .AND. l_NFold   ! is the North fold done with an MPI communication?
+      l_IdoNFold = ijn(narea) == jpnj .AND. l_NFold   ! is this process doing North fold?
+      !
+      IF( llmpiNFold ) THEN
          CALL mpp_ini_north
          IF (lwp) THEN
@@ -596,11 +594,11 @@
         CALL ctl_stop( 'STOP', ctmp1, ctmp2 )
       ENDIF
-      IF( jperio == 3 .OR. jperio == 4 .OR. jperio == 5 .OR. jperio == 6 ) THEN
+      IF( l_NFold ) THEN
          ! minimize the size of the last row to compensate for the north pole folding coast
-         IF( jperio == 3 .OR. jperio == 4 )   ijpjmin = 2+3*khls   ! V and F folding must be outside of southern halos
-         IF( jperio == 5 .OR. jperio == 6 )   ijpjmin = 1+3*khls   ! V and F folding must be outside of southern halos
-         irm = knbj - irestj                                       ! total number of lines to be removed
-         klcj(:,knbj) = MAX( ijpjmin, kjmax-irm )                  ! we must have jpj >= ijpjmin in the last row
-         irm = irm - ( kjmax - klcj(1,knbj) )                      ! remaining number of lines to remove
+         IF( c_NFtype == 'T' )   ijpjmin = 2+3*khls   ! V and F folding must be outside of southern halos
+         IF( c_NFtype == 'F' )   ijpjmin = 1+3*khls   ! V and F folding must be outside of southern halos
+         irm = knbj - irestj                          ! total number of lines to be removed
+         klcj(:,knbj) = MAX( ijpjmin, kjmax-irm )     ! we must have jpj >= ijpjmin in the last row
+         irm = irm - ( kjmax - klcj(1,knbj) )         ! remaining number of lines to remove
          irestj = knbj - 1 - irm
          klcj(:, irestj+1:knbj-1) = kjmax-1
@@ -690,6 +688,6 @@
       iszimin = 4*nn_hls          ! minimum size of the MPI subdomain so halos are always adressing neighbor inner domain
       iszjmin = 4*nn_hls
-      IF( jperio == 3 .OR. jperio == 4 )   iszjmin = MAX(iszjmin, 2+3*nn_hls)   ! V and F folding must be outside of southern halos
-      IF( jperio == 5 .OR. jperio == 6 )   iszjmin = MAX(iszjmin, 1+3*nn_hls)   ! V and F folding must be outside of southern halos
+      IF( c_NFtype == 'T' )   iszjmin = MAX(iszjmin, 2+3*nn_hls)   ! V and F folding must be outside of southern halos
+      IF( c_NFtype == 'F' )   iszjmin = MAX(iszjmin, 1+3*nn_hls)   ! V and F folding must be outside of southern halos
       !
       ! get the list of knbi that gives a smaller jpimax than knbi-1
@@ -953,5 +951,5 @@
             !
             IF( iarea == 1    ) THEN                                   ! the first line was not read
-               IF( jperio == 2 .OR. jperio == 7 ) THEN                 !   north-south periodocity
+               IF( l_Jperio ) THEN                                     !   north-south periodocity
                   CALL readbot_strip( Nj0glo, 1, lloce(2:inx-1, 1) )   !   read the last line -> first line of lloce
                ELSE
@@ -960,7 +958,7 @@
             ENDIF
             IF( iarea == inbj ) THEN                                   ! the last line was not read
-               IF( jperio == 2 .OR. jperio == 7 ) THEN                 !   north-south periodocity
+               IF( l_Jperio ) THEN                                     !   north-south periodocity
                   CALL readbot_strip( 1, 1, lloce(2:inx-1,iny) )       !      read the first line -> last line of lloce
-               ELSEIF( jperio == 3 .OR. jperio == 4 ) THEN             !   north-pole folding T-pivot, T-point
+               ELSEIF( c_NFtype == 'T' ) THEN                          !   north-pole folding T-pivot, T-point
                   lloce(2,iny) = lloce(2,iny-2)                        !      here we have 1 halo (even if nn_hls>1)
                   DO ji = 3,inx-1
@@ -970,5 +968,5 @@
                      lloce(ji,iny-1) = lloce(inx-ji+2,iny-1)
                   END DO
-               ELSEIF( jperio == 5 .OR. jperio == 6 ) THEN             !   north-pole folding F-pivot, T-point, 1 halo
+               ELSEIF( c_NFtype == 'F' ) THEN                          !   north-pole folding F-pivot, T-point, 1 halo
                   lloce(inx/2+1,iny-1) = lloce(inx/2,iny-1)            !      here we have 1 halo (even if nn_hls>1)
                   lloce(inx  -1,iny-1) = lloce(2    ,iny-1)
@@ -981,5 +979,5 @@
             ENDIF
             !                                                          ! first and last column were not read
-            IF( jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 ) THEN
+            IF( l_Iperio ) THEN
                lloce(1,:) = lloce(inx-1,:)   ;   lloce(inx,:) = lloce(2,:)   ! east-west periodocity
             ELSE
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/USR/README.rst
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/USR/README.rst	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/USR/README.rst	(revision 14336)
@@ -111,8 +111,6 @@
    /* configuration name, configuration resolution                 */
    int    ORCA, ORCA_index
-   /* global domain sizes                                          */
-   int    jpiglo, jpjglo, jpkglo
    /* lateral global domain b.c.                                   */
-   int    jperio
+   int    Iperio, Jperio, NFoldT, NFoldF
    /* flags for z-coord, z-coord with partial steps and s-coord    */
    int    ln_zco, ln_zps, ln_sco
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/USR/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/USR/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/USR/usrdef_nam.F90	(revision 14336)
@@ -37,5 +37,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -49,8 +49,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes
-      INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c.
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -82,5 +84,6 @@
       kpk = jpkglo
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! GYRE configuration : closed domain
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! GYRE configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
       !                             ! control print
@@ -102,5 +105,4 @@
          WRITE(numout,*) '      number of model levels                           jpkglo = ', kpk
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral b.c. of the global domain set to closed     jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/nemogcm.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/nemogcm.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/nemogcm.F90	(revision 14336)
@@ -378,12 +378,8 @@
       !
       IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file
-         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ELSE                              ! user-defined namelist
-         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
-      ENDIF
-      l_Iperio = jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7   ! i-periodicity?
-      l_Jperio = jperio == 2 .OR. jperio == 7                                     ! j-periodicity ?
-      l_NFoldT = jperio == 3 .OR. jperio == 4                                ! 
-      l_NFoldF = jperio == 5 .OR. jperio == 6                               ! 
+         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
+      ENDIF
       !
       IF(lwm)   WRITE( numond, namcfg )
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OFF/nemogcm.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OFF/nemogcm.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/OFF/nemogcm.F90	(revision 14336)
@@ -309,12 +309,8 @@
       !
       IF( ln_read_cfg ) THEN              ! Read sizes in domain configuration file
-         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ELSE                                ! user-defined namelist
-         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
-      ENDIF
-      l_Iperio = jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7   ! i-periodicity?
-      l_Jperio = jperio == 2 .OR. jperio == 7                                     ! j-periodicity ?
-      l_NFoldT = jperio == 3 .OR. jperio == 4                                     ! 
-      l_NFoldF = jperio == 5 .OR. jperio == 6                                     ! 
+         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
+      ENDIF
       !
       IF(lwm)   WRITE( numond, namcfg )
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SAO/nemogcm.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SAO/nemogcm.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SAO/nemogcm.F90	(revision 14336)
@@ -207,7 +207,7 @@
       !
       IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file
-         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ELSE                              ! user-defined namelist
-         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SAS/nemogcm.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SAS/nemogcm.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SAS/nemogcm.F90	(revision 14336)
@@ -340,12 +340,8 @@
       !
       IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file
-         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ELSE                              ! user-defined namelist
-         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
-      ENDIF
-      l_Iperio = jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7   ! i-periodicity?
-      l_Jperio = jperio == 2 .OR. jperio == 7                                     ! j-periodicity ?
-      l_NFoldT = jperio == 3 .OR. jperio == 4                                     ! 
-      l_NFoldF = jperio == 5 .OR. jperio == 6                                     ! 
+         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
+      ENDIF
       !
       IF(lwm)   WRITE( numond, namcfg )
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SWE/nemogcm.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SWE/nemogcm.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/src/SWE/nemogcm.F90	(revision 14336)
@@ -261,7 +261,7 @@
       !
       IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file
-         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ELSE                              ! user-defined namelist
-         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca025_like
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca025_like	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca025_like	(revision 14336)
@@ -18,5 +18,8 @@
    nn_jsize   =   1206  !!  1049    ! number of point in j-direction of global(local) domain if >0 (<0)  
    nn_ksize   =   75       ! total number of point in k-direction
-   nn_perio   =   4        ! periodicity
+   ln_Iperio  =   .true.   ! i-periodicity
+   ln_Jperio  =  .false.   ! j-periodicity
+   ln_NFold   =   .true.   ! North pole folding
+      cn_NFtype   =   'T'  ! Folding type: T or F
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca12_like
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca12_like	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca12_like	(revision 14336)
@@ -18,5 +18,8 @@
    nn_jsize   =   3146     ! number of point in j-direction of global(local) domain if >0 (<0)  
    nn_ksize   =   75       ! total number of point in k-direction
-   nn_perio   =   4        ! periodicity
+   ln_Iperio  =   .true.   ! i-periodicity
+   ln_Jperio  =  .false.   ! j-periodicity
+   ln_NFold   =   .true.   ! North pole folding
+      cn_NFtype   =   'T'  ! Folding type: T or F
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca1_like
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca1_like	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/EXPREF/namelist_cfg_orca1_like	(revision 14336)
@@ -18,5 +18,8 @@
    nn_jsize   =   331      ! number of point in j-direction of global(local) domain if >0 (<0)  
    nn_ksize   =   75       ! total number of point in k-direction
-   nn_perio   =   6        ! periodicity
+   ln_Iperio  =   .true.   ! i-periodicity
+   ln_Jperio  =  .false.   ! j-periodicity
+   ln_NFold   =   .true.   ! North pole folding
+      cn_NFtype   =   'F'  ! Folding type: T or F
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -29,5 +29,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -41,9 +41,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
-      !
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios         ! Local integer
@@ -52,10 +53,12 @@
       INTEGER ::   nn_jsize    ! number of point in j-direction of global(local) domain if >0 (<0)  
       INTEGER ::   nn_ksize    ! total number of point in k-direction
-      INTEGER ::   nn_perio    ! periodicity
       !                              !!* nammpp namelist *!!
       INTEGER          ::   jpni, jpnj
       LOGICAL          ::   ln_nnogather, ln_listonly
+      LOGICAL          ::   ln_Iperio, ln_Jperio
+      LOGICAL          ::   ln_NFold
+      character(len=1) ::   cn_NFtype
       !!
-      NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, nn_perio
+      NAMELIST/namusr_def/ nn_isize, nn_jsize, nn_ksize, ln_Iperio, ln_Jperio, ln_NFold, cn_NFtype
       NAMELIST/nammpp/ jpni, jpnj, nn_hls, ln_nnogather, ln_listonly
       !!----------------------------------------------------------------------     
@@ -83,7 +86,9 @@
          kpj = nn_jsize
       ENDIF
+      kpk = nn_ksize
       !
-      kpk = nn_ksize
-      kperio = nn_perio
+      ldIperio = ln_Iperio   ;   ldJperio = ln_Jperio
+      ldNFold  = ln_NFold    ;   cdNFtype = cn_NFtype
+      !
       !                             ! control print
       IF(lwp) THEN
@@ -107,5 +112,5 @@
          ENDIF
          WRITE(numout,*) '      global domain size-z            nn_ksize = ', nn_ksize
-         WRITE(numout,*) '      LBC of the global domain          kperio = ', kperio
+         WRITE(numout,*) '   '
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/MY_SRC/usrdef_zgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/BENCH/MY_SRC/usrdef_zgr.F90	(revision 14336)
@@ -197,5 +197,5 @@
       !
       
-!!$      IF( jperio == 3 .OR. jperio == 4 ) THEN   ! add a small island in the upper corners to avoid model instabilities...
+!!$      IF( c_NFtype == 'T' ) THEN   ! add a small island in the upper corners to avoid model instabilities...
 !!$         z2d(mi0(       nn_hls):mi1(                  nn_hls+2 ),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0.
 !!$         z2d(mi0(jpiglo-nn_hls):mi1(MIN(jpiglo,jpiglo-nn_hls+2)),mj0(jpjglo-nn_hls-1):mj1(jpjglo-nn_hls+1)) = 0.
@@ -203,5 +203,5 @@
 !!$      ENDIF
 !!$      !
-!!$      IF( jperio == 5 .OR. jperio == 6 ) THEN   ! add a small island in the upper corners to avoid model instabilities...
+!!$      IF( c_NFtype == 'F' ) THEN   ! add a small island in the upper corners to avoid model instabilities...
 !!$         z2d(mi0(       nn_hls):mi1(       nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0.
 !!$         z2d(mi0(jpiglo-nn_hls):mi1(jpiglo-nn_hls+1),mj0(jpjglo-nn_hls):mj1(jpjglo-nn_hls+1)) = 0.
@@ -210,5 +210,5 @@
 
       !
-      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed)
+      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries)
       !
       k_bot(:,:) = INT( z2d(:,:) )           ! =jpkm1 over the ocean point, =0 elsewhere
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/C1D_ASICS/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/C1D_ASICS/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/C1D_ASICS/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -39,5 +39,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -51,8 +51,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -72,7 +74,8 @@
       kpi = 3
       kpj = 3
-      kpk = 75 
+      kpk = 75
       !                             ! Set the lateral boundary condition of the global domain
-      kperio =  7                   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition
+      ldIperio = .TRUE.    ;   ldJperio = .true.   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
       !                             ! control print
@@ -90,6 +93,5 @@
          WRITE(numout,*) '                                               jpjglo = ', kpj
          WRITE(numout,*) '                                               jpkglo = ', kpk
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      C1D : closed basin                       jperio = ', kperio
+      WRITE(numout,*) '   '
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/EXPREF/namelist_cfg
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/EXPREF/namelist_cfg	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/EXPREF/namelist_cfg	(revision 14336)
@@ -49,5 +49,6 @@
    ln_sshnoise =  .FALSE.  !  add random noise on initial ssh
    rn_lambda   =     50.   !  gaussian lambda
-   nn_perio    = 1
+   ln_Iperio   =   .true.  ! i-periodicity
+   ln_Jperio   =  .false.  ! j-periodicity
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -50,5 +50,6 @@
    LOGICAL , PUBLIC ::   ln_sshnoise=.false. ! add random noise on initial ssh
    REAL(wp), PUBLIC ::   rn_lambda  = 50.    ! gaussian lambda
-   INTEGER , PUBLIC ::   nn_perio   =    0   ! periodicity of the channel (0=closed, 1=E-W)
+   LOGICAL , PUBLIC ::   ln_Iperio  =.false. ! i-periodicity
+   LOGICAL , PUBLIC ::   ln_Jperio  =.false. ! j-periodicity
 
    !!----------------------------------------------------------------------
@@ -59,5 +60,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -71,8 +72,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios      ! Local integer
@@ -82,5 +85,5 @@
          &                 , nn_fcase, rn_ppgphi0, rn_u10, rn_windszx, rn_windszy & !!, rn_uofac   &
          &                 , rn_vtxmax, rn_uzonal, rn_ujetszx, rn_ujetszy  &
-         &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, nn_perio
+         &                 , nn_botcase, nn_initcase, ln_sshnoise, rn_lambda, ln_Iperio, ln_Jperio
       !!----------------------------------------------------------------------
       !
@@ -117,6 +120,4 @@
       !
       zh  = (kpk-1)*rn_dz
-      !                             ! Set the lateral boundary condition of the global domain
-      kperio = 1                    ! EW_CANAL configuration : closed basin
       !                             ! control print
       IF(lwp) THEN
@@ -149,8 +150,10 @@
          WRITE(numout,*) '      add random noise on initial ssh   ln_sshnoise= ', ln_sshnoise
          WRITE(numout,*) '      Gaussian lambda parameter          rn_lambda = ', rn_lambda
-         WRITE(numout,*) '      Periodicity of the basin            nn_perio = ', nn_perio
+         WRITE(numout,*) '      i and j Periodicity     ln_Iperio, ln_Jperio = ', ln_Iperio, ln_Jperio
+         WRITE(numout,*) '   '
       ENDIF
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = nn_perio                    ! EW_CANAL configuration : closed basin
+      ldIperio = ln_Iperio   ;   ldJperio = ln_Jperio   ! CANAL configuration
+      ldNFold  =  .FALSE.    ;   cdNFtype = '-'
       !
    END SUBROUTINE usr_def_nam
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/MY_SRC/usrdef_zgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/CANAL/MY_SRC/usrdef_zgr.F90	(revision 14336)
@@ -202,5 +202,5 @@
       END SELECT
       !
-      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed)
+      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries)
       !
       k_bot(:,:) = NINT( z2d(:,:) )          ! =jpkm1 over the ocean point, =0 elsewhere
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/DOME/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/DOME/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/DOME/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -40,5 +40,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -52,8 +52,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios          ! Local integer
@@ -97,5 +99,7 @@
       zh  = (kpk-1)*rn_dz
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! DOME configuration : closed basin
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! DOME configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
+      !
       !                             ! control print
       IF(lwp) THEN
@@ -118,6 +122,4 @@
          WRITE(numout,*) '      Coriolis frequency                rn_f0 = ', rn_f0, ' s-1'
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      DOME : closed basin            jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/DOME/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/DOME/MY_SRC/usrdef_zgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/DOME/MY_SRC/usrdef_zgr.F90	(revision 14336)
@@ -106,10 +106,10 @@
       !
       ! no ocean cavities : top ocean level is ONE, except over land
-      ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0 
+      ! the ocean basin surrounded by land (1+nn_hls grid-point) set through lbc_lnk call
       z2d(:,:) = 1._wp                    ! surface ocean is the 1st level
       WHERE (gphit(:,:)>0._wp) z2d(:,:) = 0._wp
       ! Dig inlet:
       WHERE ((gphit(:,:)>0._wp).AND.(glamt(:,:)>-50._wp).AND.(glamt(:,:)<50._wp)) z2d(:,:) = 1._wp
-      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90)
+      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90
       k_top(:,:) = NINT( z2d(:,:) )
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICB/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICB/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICB/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -42,5 +42,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -54,8 +54,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -78,5 +80,6 @@
       !
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! ICB configuration : box
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ICB configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
       !                             ! control print
@@ -99,6 +102,4 @@
          WRITE(numout,*) '                                               jpkglo   = ', kpk
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      ICB : closed basin                    jperio   = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_ADV1D/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -39,5 +39,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -51,8 +51,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios       ! Local integer
@@ -78,5 +80,7 @@
       zly = kpj*rn_dy*1.e-3
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! ICE_ADV1D configuration : bi-periodic basin
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ICE_ADV1D configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
+      !
       !                             ! control print
       IF(lwp) THEN
@@ -95,6 +99,4 @@
          WRITE(numout,*) '         Coriolis:', ln_corio
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      ICE_ADV1D : closed basin                 jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_ADV2D/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -40,5 +40,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -52,8 +52,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios       ! Local integer
@@ -96,7 +98,9 @@
       zly = kpj*rn_dy*1.e-3
       !
-      IF( Agrif_Root() ) THEN   ;   kperio = 7     ! ICE_AGRIF configuration : bi-periodic basin
-      ELSE                      ;   kperio = 0     ! closed periodicity for the zoom
+      IF( Agrif_Root() ) THEN   ;   ldIperio =  .TRUE.   ;   ldJperio =  .TRUE.     ! ICE_ADV2D configuration : bi-periodic basin
+      ELSE                      ;   ldIperio = .FALSE.   ;   ldJperio = .FALSE.     ! closed periodicity for the zoom
       ENDIF
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
+      !
       !                             ! control print
       IF(lwp) THEN
@@ -115,6 +119,4 @@
          WRITE(numout,*) '         Coriolis:', ln_corio
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      ICE_ADV2D : bi-periodic basin            jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_AGRIF/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -40,5 +40,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -52,8 +52,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes 
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios       ! Local integer
@@ -98,7 +100,9 @@
       zly = kpj*rn_dy*1.e-3
       !
-      IF( Agrif_Root() ) THEN   ;   kperio = 7     ! ICE_AGRIF configuration : bi-periodic basin
-      ELSE                      ;   kperio = 0     ! closed periodicity for the zoom
+      IF( Agrif_Root() ) THEN   ;   ldIperio =  .TRUE.   ;   ldJperio =  .TRUE.     ! ICE_AGRIF configuration : bi-periodic basin
+      ELSE                      ;   ldIperio = .FALSE.   ;   ldJperio = .FALSE.     ! closed periodicity for the zoom
       ENDIF
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
+      !
       !                             ! control print
       IF(lwp) THEN
@@ -117,6 +121,4 @@
          WRITE(numout,*) '         Coriolis:', ln_corio
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      ICE_AGRIF : bi-periodic basin            jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_RHEO/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_RHEO/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ICE_RHEO/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -40,5 +40,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -52,8 +52,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios       ! Local integer
@@ -81,5 +83,7 @@
       zly = kpj*rn_dy*1.e-3
       !
-      kperio = 0     ! closed periodicity for the zoom
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ICE_RHEO configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
+      !
       !                             ! control print
       IF(lwp) THEN
@@ -98,6 +102,4 @@
          WRITE(numout,*) '         Coriolis:', ln_corio
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      ICE_RHEO closed basin                    jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ISOMIP/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ISOMIP/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/ISOMIP/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -41,5 +41,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -53,8 +53,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -77,5 +79,6 @@
       !
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! ISOMIP configuration : close basin
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! ISOMIP configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
       !                             ! control print
@@ -98,6 +101,4 @@
          WRITE(numout,*) '                                               jpkglo   = ', kpk
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      ISOMIP : closed basin                    jperio   = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/LOCK_EXCHANGE/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -37,5 +37,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -49,8 +49,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -73,5 +75,6 @@
       kpk = INT(  20.  / rn_dz ) + 1
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! LOCK_EXCHANGE configuration : closed domain
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! LOCK_EXCHANGE configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
       !                             ! control print
@@ -88,6 +91,4 @@
          WRITE(numout,*) '                                               jpkglo = ', kpk
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      closed                                   jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90	(revision 14336)
@@ -84,7 +84,7 @@
       !
       ! no ocean cavities : top ocean level is ONE, except over land
-      ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0 
+      ! the ocean basin surrounded by land (1+nn_hls grid-points) set through lbc_lnk call
       z2d(:,:) = 1._wp                    ! surface ocean is the 1st level
-      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90)
+      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90
       k_top(:,:) = NINT( z2d(:,:) )
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/OVERFLOW/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/OVERFLOW/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/OVERFLOW/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -38,5 +38,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -50,8 +50,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -88,11 +90,9 @@
       WRITE(numout,*) '                                               Nj0glo = ', kpj
       WRITE(numout,*) '                                               jpkglo = ', kpk
+      WRITE(numout,*) '   '
       !
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! OVERFLOW configuration : close basin
-      !
-      WRITE(numout,*) '   '
-      WRITE(numout,*) '   Lateral boundary condition of the global domain'
-      WRITE(numout,*) '      OVERFLOW : closed basin                  jperio = ', kperio
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! OVERFLOW configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
    END SUBROUTINE usr_def_nam
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90	(revision 14336)
@@ -110,7 +110,7 @@
       !
       ! no ocean cavities : top ocean level is ONE, except over land
-      ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0 
+      ! the ocean basin surrounded by land (1+nn_hls grid-points) set through lbc_lnk call
       z2d(:,:) = 1._wp                    ! surface ocean is the 1st level
-      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90)
+      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90
       k_top(:,:) = NINT( z2d(:,:) )
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/STATION_ASF/MY_SRC/nemogcm.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/STATION_ASF/MY_SRC/nemogcm.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/STATION_ASF/MY_SRC/nemogcm.F90	(revision 14336)
@@ -243,7 +243,7 @@
       !
       IF( ln_read_cfg ) THEN            ! Read sizes in domain configuration file
-         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ELSE                              ! user-defined namelist
-         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio )
+         CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype )
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/STATION_ASF/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/STATION_ASF/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/STATION_ASF/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -37,5 +37,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -49,8 +49,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes
-      INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c.
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -73,5 +75,6 @@
       !
       !                             ! Set the lateral boundary condition of the global domain
-      kperio =  7                   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition
+      ldIperio = .TRUE.    ;   ldJperio = .true.   ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
       !                             ! control print
@@ -85,5 +88,4 @@
          WRITE(numout,*) '      number of model levels                              kpk = ', kpk
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral b.c. of the domain set to       jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/SWG/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/SWG/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/SWG/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -57,5 +57,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -69,8 +69,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*), INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER         , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER         , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER         , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER  ::   ios             ! Local integer
@@ -110,5 +112,6 @@
       kpk = jpkglo
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! SWG configuration : closed domain
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! SWG configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       !
 # if defined key_bvp
@@ -131,5 +134,4 @@
          WRITE(numout,*) '      number of model levels                              jpkglo = ', kpk
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral b.c. of the global domain set to closed        jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/SWG/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/SWG/MY_SRC/usrdef_zgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/SWG/MY_SRC/usrdef_zgr.F90	(revision 14336)
@@ -190,7 +190,6 @@
       z2d(:,:) = REAL( jpkm1 , wp )          ! flat bottom
       !
-      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed)
-      !
-      ! 
+      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries)
+      !
       zylim0 =   10000._wp    ! +10km 
       zylim1 = 2010000._wp    ! 2010km
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/TSUNAMI/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/TSUNAMI/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/TSUNAMI/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -46,5 +46,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -58,8 +58,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios      ! Local integer
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/VORTEX/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/VORTEX/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/VORTEX/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -40,5 +40,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -52,8 +52,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios          ! Local integer
@@ -96,5 +98,7 @@
       zh  = (kpk-1)*rn_dz
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! VORTEX configuration : closed basin
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.   ! VORTEX configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
+      !
       !                             ! control print
       IF(lwp) THEN
@@ -115,6 +119,4 @@
          WRITE(numout,*) '      Reference latitude            rn_ppgphi0 = ', rn_ppgphi0
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      VORTEX : closed basin            jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/VORTEX/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/VORTEX/MY_SRC/usrdef_zgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/VORTEX/MY_SRC/usrdef_zgr.F90	(revision 14336)
@@ -190,5 +190,5 @@
       z2d(:,:) = REAL( jpkm1 , wp )          ! flat bottom
       !
-      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (here jperio=0 ==>> closed)
+      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )           ! set surrounding land to zero (closed boundaries)
       !
       k_bot(:,:) = NINT( z2d(:,:) )          ! =jpkm1 over the ocean point, =0 elsewhere
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/WAD/MY_SRC/usrdef_nam.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/WAD/MY_SRC/usrdef_nam.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/WAD/MY_SRC/usrdef_nam.F90	(revision 14336)
@@ -38,5 +38,5 @@
 CONTAINS
 
-   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio )
+   SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE dom_nam  ***
@@ -50,8 +50,10 @@
       !! ** input   : - namusr_def namelist found in namelist_cfg
       !!----------------------------------------------------------------------
-      CHARACTER(len=*)              , INTENT(out) ::   cd_cfg          ! configuration name
-      INTEGER                       , INTENT(out) ::   kk_cfg          ! configuration resolution
-      INTEGER                       , INTENT(out) ::   kpi, kpj, kpk   ! global domain sizes 
-      INTEGER                       , INTENT(out) ::   kperio          ! lateral global domain b.c. 
+      CHARACTER(len=*), INTENT(out) ::   cd_cfg               ! configuration name
+      INTEGER         , INTENT(out) ::   kk_cfg               ! configuration resolution
+      INTEGER         , INTENT(out) ::   kpi, kpj, kpk        ! global domain sizes
+      LOGICAL         , INTENT(out) ::   ldIperio, ldJperio   ! i- and j- periodicity
+      LOGICAL         , INTENT(out) ::   ldNFold              ! North pole folding
+      CHARACTER(len=1), INTENT(out) ::   cdNFtype             ! Folding type: T or F
       !
       INTEGER ::   ios   ! Local integer
@@ -75,7 +77,8 @@
       kpk = INT(  10.  / rn_dz ) + 1
       !                             ! Set the lateral boundary condition of the global domain
-      kperio = 0                    ! WAD_TEST_CASES configuration : closed domain
+      ldIperio = .FALSE.   ;   ldJperio = .FALSE.    ! WAD_TEST_CASES configuration : closed domain
+      ldNFold  = .FALSE.   ;   cdNFtype = '-'
       IF( nn_wad_test == 8 ) THEN
-         kperio = 7         ! North-South cyclic test
+         ldIperio = .TRUE.   ;   ldJperio = .TRUE.   ! WAD_TEST_CASES configuration : bi-periodic
          kpi = kpi - 2      ! no closed boundary
          kpj = kpj - 2      ! no closed boundary
@@ -95,6 +98,4 @@
          WRITE(numout,*) '                                               jpkglo = ', kpk
          WRITE(numout,*) '   '
-         WRITE(numout,*) '   Lateral boundary condition of the global domain'
-         WRITE(numout,*) '      closed                                   jperio = ', kperio
       ENDIF
       !
Index: /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/WAD/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/WAD/MY_SRC/usrdef_zgr.F90	(revision 14335)
+++ /NEMO/branches/2021/dev_r14312_MPI_Interface/tests/WAD/MY_SRC/usrdef_zgr.F90	(revision 14336)
@@ -260,5 +260,5 @@
       !
       ! no ocean cavities : top ocean level is ONE, except over land
-      ! the ocean basin surrounnded by land (1 grid-point) set through lbc_lnk call as jperio=0 
+      ! the ocean basin surrounnded by land (1+nn_hls grid-points) set through lbc_lnk call
       z2d(:,:) = 1._wp                    ! surface ocean is the 1st level
       z2d(mi0(1):mi1(1),:) = 0._wp
@@ -267,9 +267,5 @@
       z2d(:,mj0(jpjglo):mj1(jpjglo)) = 0._wp
 
-
-
-
-
-      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90)
+      CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1. )        ! closed basin, see userdef_nam.F90
       k_top(:,:) = NINT( z2d(:,:) )
       !
