Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/cfg/variable.cfg	(revision 7153)
@@ -8,4 +8,5 @@
 nav_lev      | model_levels   | Z    | T | cubic           | Model levels                          |                                  
 deptht       | m              | Z    | T |                 | Vertical T levels                     | depth                            
+ncatice      | 1              | Z    | T |                 | Ice category                          | num_icecat_coordinate
 time_counter |                | T    |   |                 | Time axis                             | time                             
 Bathymetry   | m              | XY   | T | cubic           | Bathymetry                            | bathymetry                       
@@ -108,4 +109,9 @@
 kz           |                | XYZT | T |                 |                                       |                                  
 irondep      |                | XYZT | T |                 |                                       |                                  
+sivelu       | m/s            | XYT  | T |                 | Ice velocity along i-axis at I-point  | sea_ice_x_velocity
+sivelv       | m/s            | XYT  | T |                 | Ice velocity along j-axis at I-point  | sea_ice_y_velocity
+siconcat     | %              | XYZT | T |                 | Ice concentration for categories      | sea_ice_cat_concentration
+sithicat     | m              | XYZT | T |                 | Ice thickness for categories          | sea_ice_cat_icethickness
+snthicat     | m              | XYZT | T |                 | Snow thickness for categories         | sea_ice_cat_snowthickness
 kt_ice       |                |      |   |                 |                                       |                                  
 hicif        |                |      |   |                 |                                       |                                  
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/attribute.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/attribute.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/attribute.f90	(revision 7153)
@@ -141,5 +141,5 @@
    END TYPE TATT
 
-   CHARACTER(LEN=lc), DIMENSION(ip_maxdum), SAVE :: cm_dumatt !< dummy attribute
+   CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg), SAVE :: cm_dumatt !< dummy attribute
 
    INTERFACE att_init
@@ -1282,7 +1282,7 @@
       ! loop indices
       ! namelist
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumvar
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumdim
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumatt
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumvar
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumdim
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumatt
 
       !----------------------------------------------------------------
@@ -1345,5 +1345,5 @@
 
       att_is_dummy=.FALSE.
-      DO ji=1,ip_maxdum
+      DO ji=1,ip_maxdumcfg
          IF( fct_lower(td_att%c_name) == fct_lower(cm_dumatt(ji)) )THEN
             att_is_dummy=.TRUE.
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_bathy.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_bathy.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_bathy.f90	(revision 7153)
@@ -46,4 +46,6 @@
 !>       - cn_varcfg : variable configuration file 
 !> (see ./SIREN/cfg/variable.cfg)
+!>       - cn_dimcfg : dimension configuration file. define dimension allowed to
+!> be used (see ./SIREN/cfg/dimension.cfg).
 !>       - cn_dumcfg : useless (dummy) configuration file, for useless 
 !> dimension or variable (see ./SIREN/cfg/dummy.cfg).
@@ -134,4 +136,6 @@
 !> @date February, 2016
 !> - do not closed sea for east-west cyclic domain
+!> @date October, 2016
+!> - dimension to be used select from configuration file
 !
 !> @todo
@@ -219,4 +223,5 @@
    ! namcfg
    CHARACTER(LEN=lc)                       :: cn_varcfg = './cfg/variable.cfg' 
+   CHARACTER(LEN=lc)                       :: cn_dimcfg = './cfg/dimension.cfg' 
    CHARACTER(LEN=lc)                       :: cn_dumcfg = './cfg/dummy.cfg' 
 
@@ -249,4 +254,5 @@
    NAMELIST /namcfg/ &   !< configuration namelist
    &  cn_varcfg, &       !< variable configuration file
+   &  cn_dimcfg, &       !< dimension configuration file
    &  cn_dumcfg          !< dummy configuration file
 
@@ -308,4 +314,7 @@
       ! get variable extra information
       CALL var_def_extra(TRIM(cn_varcfg))
+
+      ! get dimension allowed
+      CALL dim_def_extra(TRIM(cn_dimcfg))
 
       ! get dummy variable
@@ -615,4 +624,5 @@
    CALL mpp_clean(tl_coord1)
    CALL mpp_clean(tl_coord0)
+   CALL var_clean_extra()
 
    ! close log file
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_boundary.F90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_boundary.F90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_boundary.F90	(revision 7153)
@@ -52,4 +52,6 @@
 !>       - cn_varcfg : variable configuration file
 !> (see ./SIREN/cfg/variable.cfg)
+!>       - cn_dimcfg : dimension configuration file. define dimension allowed to
+!> be used (see ./SIREN/cfg/dimension.cfg).
 !>       - cn_dumcfg : useless (dummy) configuration file, for useless 
 !> dimension or variable (see ./SIREN/cfg/dummy.cfg).
@@ -199,4 +201,6 @@
 !> @date January, 2016
 !> - same process use for variable extracted or interpolated from input file.
+!> @date October, 2016
+!> - dimension to be used select from configuration file
 !>
 !> @todo
@@ -387,6 +391,7 @@
 
    ! namcfg
-   CHARACTER(LEN=lc)                       :: cn_varcfg = 'variable.cfg' 
-   CHARACTER(LEN=lc)                       :: cn_dumcfg = 'dummy.cfg'
+   CHARACTER(LEN=lc)                       :: cn_varcfg = './cfg/variable.cfg' 
+   CHARACTER(LEN=lc)                       :: cn_dimcfg = './cfg/dimension.cfg'
+   CHARACTER(LEN=lc)                       :: cn_dumcfg = './cfg/dummy.cfg'
 
    ! namcrs
@@ -448,4 +453,5 @@
    NAMELIST /namcfg/ &  !< config namelist
    &  cn_varcfg, &       !< variable configuration file
+   &  cn_dimcfg, &       !< dimension configuration file
    &  cn_dumcfg          !< dummy configuration file
 
@@ -529,4 +535,7 @@
       CALL var_def_extra(TRIM(cn_varcfg))
 
+      ! get dimension allowed
+      CALL dim_def_extra(TRIM(cn_dimcfg))
+
       ! get dummy variable
       CALL var_get_dummy(TRIM(cn_dumcfg))
@@ -1153,4 +1162,5 @@
    CALL mpp_clean(tl_coord1)
    CALL mpp_clean(tl_coord0)
+   CALL var_clean_extra()
 
    CALL multi_clean(tl_multi)
@@ -1615,4 +1625,5 @@
 
       ENDIF
+
    END FUNCTION create_boundary_get_level
    !-------------------------------------------------------------------
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_coord.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_coord.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_coord.f90	(revision 7153)
@@ -44,4 +44,6 @@
 !>       - cn_varcfg : variable configuration file 
 !> (see ./SIREN/cfg/variable.cfg)
+!>       - cn_dimcfg : dimension configuration file. define dimension allowed to
+!> be used (see ./SIREN/cfg/dimension.cfg).
 !>       - cn_dumcfg : useless (dummy) configuration file, for useless 
 !> dimension or variable (see ./SIREN/cfg/dummy.cfg).
@@ -110,4 +112,6 @@
 !> @date September, 2016
 !> - allow to use coordinate to define subdomain
+!> @date October, 2016
+!> - dimension to be used select from configuration file
 !>
 !> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -181,4 +185,5 @@
    ! namcfg
    CHARACTER(LEN=lc) :: cn_varcfg = './cfg/variable.cfg' 
+   CHARACTER(LEN=lc) :: cn_dimcfg = './cfg/dimension.cfg' 
    CHARACTER(LEN=lc) :: cn_dumcfg = './cfg/dummy.cfg'
 
@@ -213,4 +218,5 @@
    NAMELIST /namcfg/ &  !  config namelist
    &  cn_varcfg, &       !< variable configuration file
+   &  cn_dimcfg, &       !< dimension configuration file
    &  cn_dumcfg          !< dummy configuration file
 
@@ -277,4 +283,7 @@
       CALL var_def_extra(TRIM(cn_varcfg))
 
+      ! get dimension allowed
+      CALL dim_def_extra(TRIM(cn_dimcfg))
+
       ! get dummy variable
       CALL var_get_dummy(TRIM(cn_dumcfg))
@@ -340,4 +349,5 @@
    IF( rn_lonmax0 >= -180. .AND. rn_lonmax0 <= 360 .AND. &
      & rn_latmax0 >= -90.  .AND. rn_latmax0 <= 90. )THEN
+
       il_index(:)=grid_get_closest(tl_coord0, &
          &                         REAL(rn_lonmax0,dp), REAL(rn_latmax0,dp), &
@@ -481,4 +491,7 @@
    IF( il_attid == 0 )THEN
       il_ind=var_get_index(tl_fileout%t_var(:),'longitude')
+      IF( il_ind == 0 )THEN
+         il_ind=var_get_index(tl_fileout%t_var(:),'longitude_T')
+      ENDIF
       il_ew=grid_get_ew_overlap(tl_fileout%t_var(il_ind))
       IF( il_ew >= 0 )THEN
@@ -503,4 +516,5 @@
 
    CALL file_clean(tl_fileout)
+   CALL var_clean_extra()
 
    ! close log file
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_meshmask.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_meshmask.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_meshmask.f90	(revision 7153)
@@ -9,5 +9,7 @@
 !> @brief 
 !>  This program creates the NetCDF file(s) which contain(s) all the
-!>  ocean domain informations (mesh and mask arrays).
+!>  ocean domain informations.
+!>  It allows to create the domain_cfg.nc file needed to run NEMO, or 
+!>  the mesh_mask file(s).
 !>
 !> @details
@@ -26,5 +28,5 @@
 !>
 !> @section sec2 how to
-!>    to create meshmask file:<br/>
+!>    to create domain_cfg or meshmask file:<br/>
 !> @code{.sh}
 !>    ./SIREN/bin/create_meshmask create_meshmask.nam
@@ -34,5 +36,5 @@
 !>    you could find a template of the namelist in templates directory.
 !>
-!>    create_meshmask.nam contains 15 namelists:<br/>
+!>    create_meshmask.nam contains 13 namelists:<br/>
 !>       - logger namelist (namlog)
 !>       - config namelist (namcfg)
@@ -44,9 +46,9 @@
 !>       - partial step namelist (namzps)
 !>       - sigma or hybrid namelist (namsco)
-!>       - cross land advection namelist (namcla)
+!       - cross land advection namelist (namcla)
 !>       - lateral boundary condition namelist (namlbc)
 !>       - wetting and dryong namelist (namwd)
 !>       - grid namelist (namgrd)
-!>       - zoom namelist (namzoom)
+!       - zoom namelist (namzoom)
 !>       - output namelist (namout)
 !>
@@ -138,7 +140,7 @@
 !>          - dn_zb_b      : Offset for Zb
 !>
-!>    * _cross land advection namelist (namcla)_:<br/>
-!>       - in_cla : =1 cross land advection for exchanges through some straits (only for ORCA2)
-!>
+!    * _cross land advection namelist (namcla)_:<br/>
+!       - in_cla : =1 cross land advection for exchanges through some straits (only for ORCA2)
+!
 !>    * _lateral boundary condition namelist (namlbc)_:<br/>
 !>       - rn_shlat : lateral boundary conditions at the coast (modify fmask)
@@ -156,22 +158,22 @@
 !>    
 !>    * _grid namelist (namgrd)_:<br/>
-!>       - cn_cfg    : name of the configuration
-!>       - in_cfg    : resolution of the configuration
-!>       - in_bench  : benchmark parameter (in_mshhgr = 5 ).<br/>
-!>                     if /= 0 : forced the resolution to be about 100 km
-!>       - ln_zoom   : use zoom (namzoom)
+!       - cn_cfg    : name of the configuration
+!>       - in_cfg    : inverse resolution of the configuration (1/4° => 4)
+!>       - ln_bench  : GYRE (in_mshhgr = 5 ) used as Benchmark.<br/>
+!>                     => forced the resolution to be about 100 km
+!       - ln_zoom   : use zoom (namzoom)
 !>       - ln_c1d    : use configuration 1D
-!>
-!>    * _zoom namelist (namzoom)_:<br/>
-!>       - cn_cfz       : name of the zoom of configuration
-!>       - in_izoom     : left bottom i-indices of the zoom in data domain indices
-!>       - in_jzoom     : left bottom j-indices of the zoom in data domain indices
-!>       - ln_zoom_s    : South zoom type flag
-!>       - ln_zoom_e    : East  zoom type flag
-!>       - ln_zoom_w    : West  zoom type flag
-!>       - ln_zoom_n    : North zoom type flag
-!>
+!
+!    * _zoom namelist (namzoom)_:<br/>
+!       - cn_cfz       : name of the zoom of configuration
+!       - in_izoom     : left bottom i-indices of the zoom in data domain indices
+!       - in_jzoom     : left bottom j-indices of the zoom in data domain indices
+!       - ln_zoom_s    : South zoom type flag
+!       - ln_zoom_e    : East  zoom type flag
+!       - ln_zoom_w    : West  zoom type flag
+!       - ln_zoom_n    : North zoom type flag
+!
 !>    * _output namelist (namout)_:<br/>
-!>       - in_msh       : number of output file and contain (1-9)
+!>       - in_msh       : number of output file and contain (0-9)
 !>       - in_nproc     : number of processor to be used
 !>       - in_niproc    : i-direction number of processor
@@ -179,7 +181,8 @@
 !>
 !>    @note
-!>        MOD(in_msh, 3) = 1  :   '<b>mesh_mask.nc</b>' file
-!>                       = 2  :   '<b>mesh.nc</b>' and '<b>mask.nc</b>' files
-!>                       = 0  :   '<b>mesh_hgr.nc</b>', '<b>mesh_zgr.nc</b>' and '<b>mask.nc</b>' files
+!>        if     in_msh == 0  : write '<b>domain_cfg.nc</b>' file
+!>        MOD(in_msh, 3) = 1  :       '<b>mesh_mask.nc</b>' file
+!>                       = 2  :       '<b>mesh.nc</b>' and '<b>mask.nc</b>' files
+!>                       = 0  :       '<b>mesh_hgr.nc</b>', '<b>mesh_zgr.nc</b>' and '<b>mask.nc</b>' files
 !>
 !>        For huge size domain, use option 2 or 3 depending on your vertical coordinate.
@@ -197,4 +200,8 @@
 !> @date October, 2016
 !> - update from trunk (revision 6961): add wetting and drying, ice sheet coupling..
+!> @date October, 2016
+!> - dimension to be used select from configuration file
+!> - do not use anymore special case for ORCA grid
+!> - allow to write domain_cfg file
 !>
 !> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -224,4 +231,6 @@
    CHARACTER(LEN=lc)                              :: cl_date
 
+   INTEGER(i1), DIMENSION(:)        , ALLOCATABLE :: bl_tmp
+
    INTEGER(i4)                                    :: il_narg
    INTEGER(i4)                                    :: il_status
@@ -232,7 +241,9 @@
    INTEGER(i4)                                    :: jpj
    INTEGER(i4)                                    :: jpk
+   INTEGER(i4), DIMENSION(:)        , ALLOCATABLE :: il_tmp
    INTEGER(i4), DIMENSION(:,:)      , ALLOCATABLE :: il_mask
 
    LOGICAL                                        :: ll_exist
+   LOGICAL                                        :: ll_domcfg
 
    REAL(dp)   , DIMENSION(:,:)      , ALLOCATABLE :: dl_tmp2D
@@ -241,4 +252,6 @@
    TYPE(TATT)                                     :: tl_att
    TYPE(TATT) , DIMENSION(:)        , ALLOCATABLE :: tl_gatt
+
+   TYPE(TDIM)                                     :: tl_dim
    
    TYPE(TVAR)                                     :: tl_bathy
@@ -249,4 +262,5 @@
    TYPE(TVAR)                                     :: tl_hdept
    TYPE(TVAR)                                     :: tl_hdepw
+   TYPE(TVAR)                                     :: tl_scalar
 
    TYPE(TNAMH)                                    :: tl_namh
@@ -278,6 +292,7 @@
 
    ! namcfg
-   CHARACTER(LEN=lc) :: cn_varcfg   = 'variable.cfg' 
-   CHARACTER(LEN=lc) :: cn_dumcfg   = 'dummy.cfg'
+   CHARACTER(LEN=lc) :: cn_varcfg   = './cfg/variable.cfg' 
+   CHARACTER(LEN=lc) :: cn_dimcfg   = './cfg/dimension.cfg'
+   CHARACTER(LEN=lc) :: cn_dumcfg   = './cfg/dummy.cfg'
 
    ! namin
@@ -301,5 +316,5 @@
 
    ! namout
-   INTEGER(i4)       :: in_msh      = 1 
+   INTEGER(i4)       :: in_msh      = 0 
    CHARACTER(LEN=lc) :: cn_type     = 'cdf'
    INTEGER(i4)       :: in_nproc    = 0
@@ -314,4 +329,5 @@
    NAMELIST /namcfg/ &  !< configuration namelist
    &  cn_varcfg, &       !< variable configuration file
+   &  cn_dimcfg, &       !< dimension configuration file
    &  cn_dumcfg          !< dummy configuration file
 
@@ -379,4 +395,7 @@
       CALL var_def_extra(TRIM(cn_varcfg))
 
+      ! get dimension allowed
+      CALL dim_def_extra(TRIM(cn_dimcfg))
+
       ! get dummy variable
       CALL var_get_dummy(TRIM(cn_dumcfg))
@@ -405,4 +424,8 @@
 
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+   ll_domcfg=.FALSE.
+   IF( in_msh == 0 )THEN
+      ll_domcfg=.TRUE.
+   ENDIF
 
    ! open file
@@ -443,5 +466,5 @@
         & tl_bathy%d_value(:,:,1,1) < 0._dp )
       tl_bathy%d_value(:,:,1,1) = 0._dp
-  END WHERE
+   END WHERE
  
    IF ( ln_isfcav ) THEN
@@ -495,9 +518,9 @@
 
    ! init Horizontal grid global variable
-   CALL grid_hgr_init(jpi,jpj,jpk)
+   CALL grid_hgr_init(jpi,jpj,jpk,ll_domcfg)
 
    ! compute horizontal mesh
    WRITE(*,*) "COMPUTE HORIZONTAL MESH"
-   CALL grid_hgr_fill(tl_namh,jpi,jpj)      
+   CALL grid_hgr_fill(tl_namh,jpi,jpj,ll_domcfg)      
 
    ! Vertyical  mesh (dom_zgr) -------------------------------------------------
@@ -505,5 +528,5 @@
 
    ! init Vertical grid global variable
-   CALL grid_zgr_init(jpi,jpj,jpk)
+   CALL grid_zgr_init(jpi,jpj,jpk,ln_sco)
    IF( ln_zps    ) CALL grid_zgr_zps_init(jpi,jpj)
    IF( ln_sco    ) CALL grid_zgr_sco_init(jpi,jpj) 
@@ -515,5 +538,5 @@
    ! compute masks
    WRITE(*,*) "COMPUTE MASK"
-   CALL create__mask(tl_namh,jpi,jpj,jpk)
+   CALL create__mask(tl_namh,jpi,jpj,jpk,ll_domcfg)
 
    ! Maximum stiffness ratio/hydrostatic consistency
@@ -534,72 +557,132 @@
 
    WRITE(*,*) "WRITE FILE(S)"
-   SELECT CASE ( MOD(in_msh, 3) )
-      !                                  ! ============================
-   CASE ( 1 )                            !  create 'mesh_mask.nc' file
-      !                                  ! ============================
-      tl_mppout0=mpp_init( 'mesh_mask', tg_tmask, &
-      &                    in_niproc, in_njproc, in_nproc, &
-      &                    cd_type=cn_type )
-
-      tl_mppmsk=>tl_mppout0
-      tl_mpphgr=>tl_mppout0
-      tl_mppzgr=>tl_mppout0
+   IF( ll_domcfg )THEN
+         !                                  ! ============================
+         !                                  ! create 'domain_cfg.nc' file
+         !                                  ! ============================
+         tl_mppout0=mpp_init( 'domain_cfg', tg_tmask, &
+         &                    in_niproc, in_njproc, in_nproc, &
+         &                    cd_type=cn_type )
+
+         tl_mppmsk=>tl_mppout0
+         tl_mpphgr=>tl_mppout0
+         tl_mppzgr=>tl_mppout0
+
+   ELSE
+      SELECT CASE ( MOD(in_msh, 3) )
+         !                                  ! ============================
+      CASE ( 1 )                            !  create 'mesh_mask.nc' file
+         !                                  ! ============================
+         tl_mppout0=mpp_init( 'mesh_mask', tg_tmask, &
+         &                    in_niproc, in_njproc, in_nproc, &
+         &                    cd_type=cn_type )
+
+         tl_mppmsk=>tl_mppout0
+         tl_mpphgr=>tl_mppout0
+         tl_mppzgr=>tl_mppout0
+         
+         !                                  ! ============================
+      CASE ( 2 )                            !  create 'mesh.nc' and 
+         !                                  !         'mask.nc' files
+         !                                  ! ============================
+         tl_mppout0=mpp_init( 'mask', tg_tmask, &
+         &                    in_niproc, in_njproc, in_nproc, &
+         &                    cd_type=cn_type )
+         tl_mppout1=mpp_init( 'mesh', tg_tmask, &
+         &                    in_niproc, in_njproc, in_nproc, &
+         &                    cd_type=cn_type )
+
+         tl_mppmsk=>tl_mppout0
+         tl_mpphgr=>tl_mppout1
+         tl_mppzgr=>tl_mppout1
+
+         !                                  ! ============================
+      CASE ( 0 )                            !  create 'mesh_hgr.nc'
+         !                                  !         'mesh_zgr.nc' and
+         !                                  !         'mask.nc'     files
+         !                                  ! ============================
+         tl_mppout0=mpp_init( 'mask', tg_tmask, &
+         &                    in_niproc, in_njproc, in_nproc, &
+         &                    cd_type=cn_type )
+         tl_mppout1=mpp_init( 'mesh_hgr', tg_tmask, &
+         &                    in_niproc, in_njproc, in_nproc, &
+         &                    cd_type=cn_type )
+         tl_mppout2=mpp_init( 'mesh_zgr', tg_tmask, &
+         &                    in_niproc, in_njproc, in_nproc, &
+         &                    cd_type=cn_type )
+         !
+
+         tl_mppmsk=>tl_mppout0
+         tl_mpphgr=>tl_mppout1
+         tl_mppzgr=>tl_mppout2
+
+      END SELECT
+   ENDIF
+
+   ! add variables
+   IF( ll_domcfg )THEN
+      ALLOCATE(il_tmp(1))
+      tl_dim%l_use=.FALSE.
+
+      il_tmp(:)=jpi
+      tl_scalar=var_init('jpiglo', il_tmp(:), id_type=NF90_INT, td_dim=tl_dim)
+      CALL mpp_add_var(tl_mppmsk, tl_scalar)
+
+      il_tmp(:)=jpj
+      tl_scalar=var_init('jpjglo', il_tmp(:), id_type=NF90_INT, td_dim=tl_dim)
+      CALL mpp_add_var(tl_mppmsk, tl_scalar)
+
+      il_tmp(:)=jpk
+      tl_scalar=var_init('jpkglo', il_tmp(:), id_type=NF90_INT, td_dim=tl_dim)
+      CALL mpp_add_var(tl_mppmsk, tl_scalar)
       
-      !                                  ! ============================
-   CASE ( 2 )                            !  create 'mesh.nc' and 
-      !                                  !         'mask.nc' files
-      !                                  ! ============================
-      tl_mppout0=mpp_init( 'mask', tg_tmask, &
-      &                    in_niproc, in_njproc, in_nproc, &
-      &                    cd_type=cn_type )
-      tl_mppout1=mpp_init( 'mesh', tg_tmask, &
-      &                    in_niproc, in_njproc, in_nproc, &
-      &                    cd_type=cn_type )
-
-      tl_mppmsk=>tl_mppout0
-      tl_mpphgr=>tl_mppout1
-      tl_mppzgr=>tl_mppout1
-
-      !                                  ! ============================
-   CASE ( 0 )                            !  create 'mesh_hgr.nc'
-      !                                  !         'mesh_zgr.nc' and
-      !                                  !         'mask.nc'     files
-      !                                  ! ============================
-      tl_mppout0=mpp_init( 'mask', tg_tmask, &
-      &                    in_niproc, in_njproc, in_nproc, &
-      &                    cd_type=cn_type )
-      tl_mppout1=mpp_init( 'mesh_hgr', tg_tmask, &
-      &                    in_niproc, in_njproc, in_nproc, &
-      &                    cd_type=cn_type )
-      tl_mppout2=mpp_init( 'mesh_zgr', tg_tmask, &
-      &                    in_niproc, in_njproc, in_nproc, &
-      &                    cd_type=cn_type )
-      !
-
-      tl_mppmsk=>tl_mppout0
-      tl_mpphgr=>tl_mppout1
-      tl_mppzgr=>tl_mppout2
-
-   END SELECT
-
-   ! add variables
+      il_tmp(:)=tl_mppout0%i_perio
+      tl_scalar=var_init('jperio', il_tmp(:), id_type=NF90_INT, td_dim=tl_dim)
+      CALL mpp_add_var(tl_mppmsk, tl_scalar)
+
+      DEALLOCATE(il_tmp)
+      ALLOCATE(bl_tmp(1))
+
+      bl_tmp(:)=0
+      IF( ln_zco ) bl_tmp(:)=1
+      tl_scalar=var_init('ln_zco',bl_tmp(:), id_type=NF90_BYTE, td_dim=tl_dim)
+      CALL mpp_add_var(tl_mppmsk, tl_scalar)
+
+      bl_tmp(:)=0
+      IF( ln_zps ) bl_tmp(:)=1
+      tl_scalar=var_init('ln_zps',bl_tmp(:), id_type=NF90_BYTE, td_dim=tl_dim)
+      CALL mpp_add_var(tl_mppmsk, tl_scalar)
+
+      bl_tmp(:)=0
+      IF( ln_sco ) bl_tmp(:)=1
+      tl_scalar=var_init('ln_sco',bl_tmp(:), id_type=NF90_BYTE, td_dim=tl_dim)
+      CALL mpp_add_var(tl_mppmsk, tl_scalar)
+
+      bl_tmp(:)=0
+      IF( ln_isfcav ) bl_tmp(:)=1
+      tl_scalar=var_init('ln_isfcav',bl_tmp(:), id_type=NF90_BYTE, td_dim=tl_dim)
+      CALL mpp_add_var(tl_mppmsk, tl_scalar)
+
+      DEALLOCATE(bl_tmp)
+      CALL var_clean(tl_scalar)
+   ENDIF
+
    !!! mask (msk)
    !!!----------------------
-
-   ! tmask
-   CALL mpp_add_var(tl_mppmsk, tg_tmask)
-   CALL var_clean(tg_tmask)
-   ! umask
-   CALL mpp_add_var(tl_mppmsk, tg_umask)
-   CALL var_clean(tg_umask)
-   ! vmask
-   CALL mpp_add_var(tl_mppmsk, tg_vmask)
-   CALL var_clean(tg_vmask)
-   ! fmask
-   CALL mpp_add_var(tl_mppmsk, tg_fmask)
-   CALL var_clean(tg_fmask)
-
-   !!! VOIR CAS TMASKUTIL ???
-   
+   IF( .NOT. ll_domcfg )THEN
+      ! tmask
+      CALL mpp_add_var(tl_mppmsk, tg_tmask)
+      CALL var_clean(tg_tmask)
+      ! umask
+      CALL mpp_add_var(tl_mppmsk, tg_umask)
+      CALL var_clean(tg_umask)
+      ! vmask
+      CALL mpp_add_var(tl_mppmsk, tg_vmask)
+      CALL var_clean(tg_vmask)
+      ! fmask
+      CALL mpp_add_var(tl_mppmsk, tg_fmask)
+      CALL var_clean(tg_fmask)
+   ENDIF
+
    !!! horizontal mesh (hgr)
    !!!----------------------
@@ -662,44 +745,49 @@
 
    ! coriolis factor
-   ! ff
-   CALL mpp_add_var(tl_mpphgr, tg_ff)
-   CALL var_clean(tg_ff)
+   ! ff_t
+   CALL mpp_add_var(tl_mpphgr, tg_ff_t)
+   CALL var_clean(tg_ff_t)
+   ! ff_f
+   CALL mpp_add_var(tl_mpphgr, tg_ff_f)
+   CALL var_clean(tg_ff_f)
 
    ! angles
-   ! cost
-   CALL mpp_add_var(tl_mpphgr, tg_gcost)
-   CALL var_clean(tg_gcost)
-   ! cosu
-   CALL mpp_add_var(tl_mpphgr, tg_gcosu)
-   CALL var_clean(tg_gcosu)
-   ! cosv
-   CALL mpp_add_var(tl_mpphgr, tg_gcosv)
-   CALL var_clean(tg_gcosv)
-   ! cosf
-   CALL mpp_add_var(tl_mpphgr, tg_gcosf)
-   CALL var_clean(tg_gcosf)
-   
-   ! sint
-   CALL mpp_add_var(tl_mpphgr, tg_gsint)
-   CALL var_clean(tg_gsint)
-   ! sinu
-   CALL mpp_add_var(tl_mpphgr, tg_gsinu)
-   CALL var_clean(tg_gsinu)
-   ! sinv
-   CALL mpp_add_var(tl_mpphgr, tg_gsinv)
-   CALL var_clean(tg_gsinv)
-   ! sinf
-   CALL mpp_add_var(tl_mpphgr, tg_gsinf)
-   CALL var_clean(tg_gsinf)
+   IF( .NOT. ll_domcfg )THEN
+      ! cost
+      CALL mpp_add_var(tl_mpphgr, tg_gcost)
+      CALL var_clean(tg_gcost)
+      ! cosu
+      CALL mpp_add_var(tl_mpphgr, tg_gcosu)
+      CALL var_clean(tg_gcosu)
+      ! cosv
+      CALL mpp_add_var(tl_mpphgr, tg_gcosv)
+      CALL var_clean(tg_gcosv)
+      ! cosf
+      CALL mpp_add_var(tl_mpphgr, tg_gcosf)
+      CALL var_clean(tg_gcosf)
+      
+      ! sint
+      CALL mpp_add_var(tl_mpphgr, tg_gsint)
+      CALL var_clean(tg_gsint)
+      ! sinu
+      CALL mpp_add_var(tl_mpphgr, tg_gsinu)
+      CALL var_clean(tg_gsinu)
+      ! sinv
+      CALL mpp_add_var(tl_mpphgr, tg_gsinv)
+      CALL var_clean(tg_gsinv)
+      ! sinf
+      CALL mpp_add_var(tl_mpphgr, tg_gsinf)
+      CALL var_clean(tg_gsinf)
+   ENDIF
    
    !!! vertical mesh (zgr)
    !!!----------------------
-
    ! note that mbkt is set to 1 over land ==> use surface tmask
    ! 
    ! mbathy
    tg_mbathy%d_value(:,:,:,:) = tg_ssmask%d_value(:,:,:,:) * &
-      &                         tg_mbkt%d_value(:,:,:,:)
+   &                            tg_mbkt%d_value(:,:,:,:)
    !
+   IF( ll_domcfg ) tg_mbathy%c_name='bottom_level'
    CALL mpp_add_var(tl_mppzgr, tg_mbathy)
    CALL var_clean(tg_mbathy)
@@ -709,51 +797,57 @@
    dl_tmp2D(:,:)=dp_fill
 
-   tl_misf =var_init('misf    ',dl_tmp2D(:,:), id_type=NF90_INT)
+   tl_misf =var_init('misf     ',dl_tmp2D(:,:), id_type=NF90_INT)
 
    DEALLOCATE(dl_tmp2D)
    tl_misf%d_value(:,:,1,1) = tg_ssmask%d_value(:,:,1,1) * &
-      &                       tg_mikt%d_value(:,:,1,1)
+   &                          tg_mikt%d_value(:,:,1,1)
    !
+   IF( ll_domcfg ) tl_misf%c_name='top_level'
    CALL mpp_add_var(tl_mppzgr, tl_misf)
    CALL var_clean(tl_misf)
 
-   ! isfdraft
-   tl_risfdep%d_value(:,:,:,:) = tl_risfdep%d_value(:,:,:,:) * &
-      &                          tg_mikt%d_value(:,:,:,:)
-   CALL mpp_add_var(tl_mppzgr, tl_risfdep)
-   CALL var_clean(tl_risfdep)
+   IF( .NOT. ll_domcfg )THEN
+      ! isfdraft
+      tl_risfdep%d_value(:,:,:,:) = tl_risfdep%d_value(:,:,:,:) * &
+      &                             tg_mikt%d_value(:,:,:,:)
+ 
+      CALL mpp_add_var(tl_mppzgr, tl_risfdep)
+      CALL var_clean(tl_risfdep)
+   ENDIF
 
    IF( ln_sco ) THEN ! s-coordinate
 
-      ! hbatt
-      CALL mpp_add_var(tl_mppzgr, tg_hbatt)
-      CALL var_clean(tg_hbatt)
-      ! hbatu
-      CALL mpp_add_var(tl_mppzgr, tg_hbatu)
-      CALL var_clean(tg_hbatu)
-      ! hbatv
-      CALL mpp_add_var(tl_mppzgr, tg_hbatv)
-      CALL var_clean(tg_hbatv)
-      ! hbatf
-      CALL mpp_add_var(tl_mppzgr, tg_hbatf)
-      CALL var_clean(tg_hbatf)
-
-      ! scaling coef.
-      IF( .NOT. (tl_namz%l_s_sh94 .OR. tl_namz%l_s_sf12) )THEN
-         ! gsigt
-         CALL mpp_add_var(tl_mppzgr, tg_gsigt)
-         CALL var_clean(tg_gsigt)
-         ! gsigw
-         CALL mpp_add_var(tl_mppzgr, tg_gsigw)
-         CALL var_clean(tg_gsigw)
-         ! gsi3w
-         CALL mpp_add_var(tl_mppzgr, tg_gsi3w)
-         CALL var_clean(tg_gsi3w)
-         ! esigt
-         CALL mpp_add_var(tl_mppzgr, tg_esigt)
-         CALL var_clean(tg_esigt)
-         ! esigw
-         CALL mpp_add_var(tl_mppzgr, tg_esigw)
-         CALL var_clean(tg_esigw)
+      IF( .NOT. ll_domcfg )THEN
+         ! hbatt
+         CALL mpp_add_var(tl_mppzgr, tg_hbatt)
+         CALL var_clean(tg_hbatt)
+         ! hbatu
+         CALL mpp_add_var(tl_mppzgr, tg_hbatu)
+         CALL var_clean(tg_hbatu)
+         ! hbatv
+         CALL mpp_add_var(tl_mppzgr, tg_hbatv)
+         CALL var_clean(tg_hbatv)
+         ! hbatf
+         CALL mpp_add_var(tl_mppzgr, tg_hbatf)
+         CALL var_clean(tg_hbatf)
+
+         ! scaling coef.
+         IF( .NOT. (tl_namz%l_s_sh94 .OR. tl_namz%l_s_sf12) )THEN
+            ! gsigt
+            CALL mpp_add_var(tl_mppzgr, tg_gsigt)
+            CALL var_clean(tg_gsigt)
+            ! gsigw
+            CALL mpp_add_var(tl_mppzgr, tg_gsigw)
+            CALL var_clean(tg_gsigw)
+            ! gsi3w
+            CALL mpp_add_var(tl_mppzgr, tg_gsi3w)
+            CALL var_clean(tg_gsi3w)
+            ! esigt
+            CALL mpp_add_var(tl_mppzgr, tg_esigt)
+            CALL var_clean(tg_esigt)
+            ! esigw
+            CALL mpp_add_var(tl_mppzgr, tg_esigw)
+            CALL var_clean(tg_esigw)
+         ENDIF
       ENDIF
 
@@ -774,4 +868,5 @@
       ! Max. grid stiffness ratio
       ! rx1
+      IF( ll_domcfg ) tg_rx1%c_name='stiffness'
       CALL mpp_add_var(tl_mppzgr, tg_rx1)
       CALL var_clean(tg_rx1)
@@ -796,5 +891,5 @@
    IF( ln_zps ) THEN ! z-coordinate - partial steps
 
-      IF( in_msh <= 6 ) THEN ! 3D vertical scale factors
+      IF( ll_domcfg .OR. in_msh <= 6 ) THEN ! 3D vertical scale factors
 
          ! e3t_0
@@ -831,5 +926,5 @@
       ENDIF ! 3D vertical scale factors
 
-      IF( in_msh <= 3 ) THEN ! 3D depth
+      IF( ll_domcfg .OR. in_msh <= 3 ) THEN ! 3D depth
          
          ! gdept_0
@@ -837,31 +932,33 @@
       
          ! gdepu, gdepv
-         ALLOCATE(dl_tmp3D(jpi,jpj,jpk))
-         dl_tmp3D(:,:,:)=dp_fill
-
-         tl_gdepu=var_init('gdepu',dl_tmp3D(:,:,:), id_type=NF90_FLOAT)
-         tl_gdepv=var_init('gdepv',dl_tmp3D(:,:,:), id_type=NF90_FLOAT)
-
-         DEALLOCATE(dl_tmp3D)
-         DO jk = 1,jpk   
-            DO jj = 1, jpj-1   
-               DO ji = 1, jpi-1   ! vector opt.
-                  tl_gdepu%d_value(ji,jj,jk,1) = MIN( tg_gdept_0%d_value(ji  ,jj  ,jk,1) , &
-                     &                                tg_gdept_0%d_value(ji+1,jj  ,jk,1) )
-
-                  tl_gdepv%d_value(ji,jj,jk,1) = MIN( tg_gdept_0%d_value(ji  ,jj  ,jk,1) , &
-                     &                                tg_gdept_0%d_value(ji  ,jj+1,jk,1) )
+         IF( .NOT. ll_domcfg )THEN
+            ALLOCATE(dl_tmp3D(jpi,jpj,jpk))
+            dl_tmp3D(:,:,:)=dp_fill
+
+            tl_gdepu=var_init('gdepu',dl_tmp3D(:,:,:), id_type=NF90_FLOAT)
+            tl_gdepv=var_init('gdepv',dl_tmp3D(:,:,:), id_type=NF90_FLOAT)
+
+            DEALLOCATE(dl_tmp3D)
+            DO jk = 1,jpk   
+               DO jj = 1, jpj-1   
+                  DO ji = 1, jpi-1   ! vector opt.
+                     tl_gdepu%d_value(ji,jj,jk,1) = MIN( tg_gdept_0%d_value(ji  ,jj  ,jk,1) , &
+                        &                                tg_gdept_0%d_value(ji+1,jj  ,jk,1) )
+
+                     tl_gdepv%d_value(ji,jj,jk,1) = MIN( tg_gdept_0%d_value(ji  ,jj  ,jk,1) , &
+                        &                                tg_gdept_0%d_value(ji  ,jj+1,jk,1) )
+                  END DO   
                END DO   
-            END DO   
-         END DO         
-         CALL lbc_lnk( tl_gdepu%d_value(:,:,:,1), 'U', in_perio, 1._dp )
-         CALL lbc_lnk( tl_gdepv%d_value(:,:,:,1), 'V', in_perio, 1._dp )
-
-         ! gdepu
-         CALL mpp_add_var(tl_mppzgr, tl_gdepu)
-         CALL var_clean(tl_gdepu)
-         ! gdepv
-         CALL mpp_add_var(tl_mppzgr, tl_gdepv)
-         CALL var_clean(tl_gdepv)
+            END DO         
+            CALL lbc_lnk( tl_gdepu%d_value(:,:,:,1), 'U', in_perio, 1._dp )
+            CALL lbc_lnk( tl_gdepv%d_value(:,:,:,1), 'V', in_perio, 1._dp )
+
+            ! gdepu
+            CALL mpp_add_var(tl_mppzgr, tl_gdepu)
+            CALL var_clean(tl_gdepu)
+            ! gdepv
+            CALL mpp_add_var(tl_mppzgr, tl_gdepv)
+            CALL var_clean(tl_gdepv)
+         ENDIF
 
          ! clean
@@ -1133,8 +1230,9 @@
    DEALLOCATE(tl_gatt)
 
-   CALL grid_hgr_clean()
-   CALL grid_zgr_clean()
+   CALL grid_hgr_clean(ll_domcfg)
+   CALL grid_zgr_clean(ln_sco)
    IF( ln_zps    ) CALL grid_zgr_zps_clean()
    IF( ln_sco    ) CALL grid_zgr_sco_clean()
+   CALL var_clean_extra()
 
    ! close log file
@@ -1198,4 +1296,6 @@
    !> @author J.Paul
    !> @date September, 2015 - rewrite from dom_msk
+   !> @date October, 2016
+   !> - do not use anymore special case for ORCA grid
    !>
    !> @param[in] td_nam
@@ -1204,16 +1304,17 @@
    !> @param[in] jpk
    !-------------------------------------------------------------------
-   SUBROUTINE create__mask(td_nam,jpi,jpj,jpk) 
+   SUBROUTINE create__mask(td_nam,jpi,jpj,jpk,ld_domcfg) 
       IMPLICIT NONE
       ! Argument      
-      TYPE(TNAMH), INTENT(IN   ) :: td_nam
-      INTEGER(i4), INTENT(IN   ) :: jpi
-      INTEGER(i4), INTENT(IN   ) :: jpj
-      INTEGER(i4), INTENT(IN   ) :: jpk
+      TYPE(TNAMH), INTENT(IN) :: td_nam
+      INTEGER(i4), INTENT(IN) :: jpi
+      INTEGER(i4), INTENT(IN) :: jpj
+      INTEGER(i4), INTENT(IN) :: jpk
+      LOGICAL    , INTENT(IN) :: ld_domcfg
 
       ! local variable
-      INTEGER(i4)  ::   ii0, ii1  ! local integers
-      INTEGER(i4)  ::   ij0, ij1
-      INTEGER(i4)  ::   isrow
+!      INTEGER(i4)  ::   ii0, ii1  ! local integers
+!      INTEGER(i4)  ::   ij0, ij1
+!      INTEGER(i4)  ::   isrow
 
 !      INTEGER(i4), DIMENSION(:,:), ALLOCATABLE ::  imsk
@@ -1230,5 +1331,4 @@
 
 !      ALLOCATE( imsk(jpi,jpj) )
-      ALLOCATE( zwf(jpi,jpj) )
 
 !      ALLOCATE( dl_tpol(jpi) )
@@ -1304,4 +1404,5 @@
 !      ENDIF
 
+      IF( .NOT. ld_domcfg )THEN
       ! 2. Ocean/land mask at u-,  v-, and z-points (computed from tmask)
       ! -------------------------------------------
@@ -1366,4 +1467,5 @@
       ! Lateral boundary conditions on velocity (modify fmask)
       ! ---------------------------------------     
+      ALLOCATE( zwf(jpi,jpj) )
       DO jk = 1, jpk
          zwf(:,:) = tg_fmask%d_value(:,:,jk,1)         
@@ -1398,83 +1500,84 @@
          END DO
       END DO
-
-      IF( td_nam%c_cfg == "orca" .AND. td_nam%i_cfg == 2 )THEN   ! ORCA_R2 configuration
-         !                                                 ! Increased lateral friction near of some straits
-         IF( td_nam%i_cla == 0 ) THEN
-            ! Gibraltar strait  : partial slip (fmask=0.5)
-            ij0 = 101   ;   ij1 = 101
-            ii0 = 139   ;   ii1 = 140   
-            tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) =  0.5_dp
-
-            ij0 = 102   ;   ij1 = 102
-            ii0 = 139   ;   ii1 = 140
-            tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) =  0.5_dp
-            !
-            !Bab el Mandeb : partial slip (fmask=1)
-            ij0 =  87   ;   ij1 =  88
-            ii0 = 160   ;   ii1 = 160
-            tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) =  1._dp
-
-            ij0 =  88   ;   ij1 =  88
-            ii0 = 159   ;   ii1 = 159
-            tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) =  1._dp
-            !
-         ENDIF
-      ENDIF
-      !
-      IF( td_nam%c_cfg == "orca" .AND. td_nam%i_cfg == 1 )THEN   ! ORCA R1 configuration
-         ! Increased lateral friction near of some straits
-         ! This dirty section will be suppressed by simplification process:
-         ! all this will come back in input files
-         ! Currently these hard-wired indices relate to configuration with
-         ! extend grid (jpjglo=332)
-         !
-         isrow = 332 - jpj
-         ! Gibraltar Strait
-         ii0 = 282           ;   ii1 = 283 
-         ij0 = 201 + isrow   ;   ij1 = 241 - isrow
-         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) = 2._dp  
-
-         ! Bhosporus Strait
-         ii0 = 314           ;   ii1 = 315
-         ij0 = 208 + isrow   ;   ij1 = 248 - isrow 
-         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 2._dp  
-
-         ! Makassar Strait (Top) 
-         ii0 =  48           ;   ii1 =  48
-         ij0 = 149 + isrow   ;   ij1 = 190 - isrow
-         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 3._dp  
-
-         ! Lombok Strait
-         ii0 =  44           ;   ii1 =  44
-         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
-         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 2._dp  
-
-         ! Ombai Strait
-         ii0 =  53           ;   ii1 =  53
-         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
-         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 2._dp  
-
-         ! Timor Passage
-         ii0 =  56           ;   ii1 =  56
-         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
-         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 2._dp  
-
-         ! West Halmahera Strait
-         ii0 =  58           ;   ii1 =  58
-         ij0 = 141 + isrow   ;   ij1 = 182 - isrow
-         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 3._dp  
-
-         ! East Halmahera Strait
-         ii0 =  55           ;   ii1 =  55
-         ij0 = 141 + isrow   ;   ij1 = 182 - isrow
-         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 3._dp  
-         !
-      ENDIF
+      DEALLOCATE( zwf )
+
+!      IF( td_nam%c_cfg == "orca" .AND. td_nam%i_cfg == 2 )THEN   ! ORCA_R2 configuration
+!         !                                                 ! Increased lateral friction near of some straits
+!         IF( td_nam%i_cla == 0 ) THEN
+!            ! Gibraltar strait  : partial slip (fmask=0.5)
+!            ij0 = 101   ;   ij1 = 101
+!            ii0 = 139   ;   ii1 = 140   
+!            tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) =  0.5_dp
+!
+!            ij0 = 102   ;   ij1 = 102
+!            ii0 = 139   ;   ii1 = 140
+!            tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) =  0.5_dp
+!            !
+!            !Bab el Mandeb : partial slip (fmask=1)
+!            ij0 =  87   ;   ij1 =  88
+!            ii0 = 160   ;   ii1 = 160
+!            tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) =  1._dp
+!
+!            ij0 =  88   ;   ij1 =  88
+!            ii0 = 159   ;   ii1 = 159
+!            tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) =  1._dp
+!            !
+!         ENDIF
+!      ENDIF
+!      !
+!      IF( td_nam%c_cfg == "orca" .AND. td_nam%i_cfg == 1 )THEN   ! ORCA R1 configuration
+!         ! Increased lateral friction near of some straits
+!         ! This dirty section will be suppressed by simplification process:
+!         ! all this will come back in input files
+!         ! Currently these hard-wired indices relate to configuration with
+!         ! extend grid (jpjglo=332)
+!         !
+!         isrow = 332 - jpj
+!         ! Gibraltar Strait
+!         ii0 = 282           ;   ii1 = 283 
+!         ij0 = 201 + isrow   ;   ij1 = 241 - isrow
+!         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1) = 2._dp  
+!
+!         ! Bhosporus Strait
+!         ii0 = 314           ;   ii1 = 315
+!         ij0 = 208 + isrow   ;   ij1 = 248 - isrow 
+!         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 2._dp  
+!
+!         ! Makassar Strait (Top) 
+!         ii0 =  48           ;   ii1 =  48
+!         ij0 = 149 + isrow   ;   ij1 = 190 - isrow
+!         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 3._dp  
+!
+!         ! Lombok Strait
+!         ii0 =  44           ;   ii1 =  44
+!         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
+!         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 2._dp  
+!
+!         ! Ombai Strait
+!         ii0 =  53           ;   ii1 =  53
+!         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
+!         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 2._dp  
+!
+!         ! Timor Passage
+!         ii0 =  56           ;   ii1 =  56
+!         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
+!         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 2._dp  
+!
+!         ! West Halmahera Strait
+!         ii0 =  58           ;   ii1 =  58
+!         ij0 = 141 + isrow   ;   ij1 = 182 - isrow
+!         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 3._dp  
+!
+!         ! East Halmahera Strait
+!         ii0 =  55           ;   ii1 =  55
+!         ij0 = 141 + isrow   ;   ij1 = 182 - isrow
+!         tg_fmask%d_value(ii0:ii1,ij0:ij1,1:jpk,1 ) = 3._dp  
+!         !
+!      ENDIF
       !
       CALL lbc_lnk( tg_fmask%d_value(:,:,:,1), 'F', td_nam%i_perio, 1._dp )      ! Lateral boundary conditions on fmask
 
 !      DEALLOCATE( imsk )
-      DEALLOCATE( zwf )
+      ENDIF ! ld_domcfg
 
 !      DEALLOCATE( dl_tpol )
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_restart.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_restart.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/create_restart.f90	(revision 7153)
@@ -48,4 +48,6 @@
 !>       - cn_varcfg : variable configuration file
 !> (see ./SIREN/cfg/variable.cfg)
+!>       - cn_dimcfg : dimension configuration file. define dimension allowed to
+!> be used (see ./SIREN/cfg/dimension.cfg).
 !>       - cn_dumcfg : useless (dummy) configuration file, for useless 
 !> dimension or variable (see ./SIREN/cfg/dummy.cfg).
@@ -160,4 +162,6 @@
 !> @date September, 2015
 !> - manage useless (dummy) variable, attributes, and dimension
+!> @date October, 2016
+!> - dimension to be used select from configuration file
 !>
 !> @todo
@@ -201,6 +205,6 @@
    INTEGER(i4)                                        :: il_status
    INTEGER(i4)                                        :: il_fileid
+   INTEGER(i4)                                        :: il_attid
    INTEGER(i4)                                        :: il_nvar
-   INTEGER(i4)                                        :: il_attid
    INTEGER(i4)                                        :: il_imin1
    INTEGER(i4)                                        :: il_imax1
@@ -254,6 +258,7 @@
 
    ! namcfg
-   CHARACTER(LEN=lc)                       :: cn_varcfg = 'variable.cfg' 
-   CHARACTER(LEN=lc)                       :: cn_dumcfg = 'dummy.cfg'
+   CHARACTER(LEN=lc)                       :: cn_varcfg = './cfg/variable.cfg' 
+   CHARACTER(LEN=lc)                       :: cn_dimcfg = './cfg/dimension.cfg'
+   CHARACTER(LEN=lc)                       :: cn_dumcfg = './cfg/dummy.cfg'
 
    ! namcrs
@@ -308,4 +313,5 @@
    NAMELIST /namcfg/ &  !< configuration namelist
    &  cn_varcfg, &      !< variable configuration file
+   &  cn_dimcfg, &      !< dimension configuration file
    &  cn_dumcfg         !< dummy configuration file
 
@@ -313,5 +319,5 @@
    &  cn_coord0,  &     !< coordinate file
    &  in_perio0         !< periodicity index
-   
+
    NAMELIST /namfin/ &  !< fine grid namelist
    &  cn_coord1,   &    !< coordinate file
@@ -339,5 +345,5 @@
    &  cn_varfile, &     !< list of variable file
    &  cn_varinfo        !< list of variable and interpolation method to be used.
-   
+
    NAMELIST /namnst/ &  !< nesting namelist
    &  in_rhoi,    &     !< refinement factor in i-direction
@@ -389,4 +395,7 @@
       ! get variable extra information
       CALL var_def_extra(TRIM(cn_varcfg))
+
+      ! get dimension allowed
+      CALL dim_def_extra(TRIM(cn_dimcfg))
 
       ! get dummy variable
@@ -900,4 +909,5 @@
    CALL mpp_clean(tl_mppout)
    CALL mpp_clean(tl_coord1)
+   CALL var_clean_extra()
 
    ! close log file
@@ -1204,5 +1214,5 @@
             &        tl_depth%d_value(:,:,:,:) ) )THEN
 
-               CALL logger_warn("CREATE BOUNDARY: depth value from "//&
+               CALL logger_warn("CREATE RESTART: depth value from "//&
                &  TRIM(td_mpp%c_name)//" not conform "//&
                &  " to those from former file(s).")
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/dimension.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/dimension.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/dimension.f90	(revision 7153)
@@ -156,4 +156,6 @@
 !> @date Spetember, 2015
 !> - manage useless (dummy) dimension
+!> @date October, 2016
+!> - dimension allowed read in configuration file
 !>
 !> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -171,4 +173,8 @@
 
    PRIVATE :: cm_dumdim        !< dummy dimension array
+   PRIVATE :: cm_dimX          !< x dimension array
+   PRIVATE :: cm_dimY          !< y dimension array
+   PRIVATE :: cm_dimZ          !< z dimension array
+   PRIVATE :: cm_dimT          !< t dimension array
 
    ! function and subroutine
@@ -188,4 +194,5 @@
    PUBLIC :: dim_get_dummy     !< fill dummy dimension array
    PUBLIC :: dim_is_dummy      !< check if dimension is defined as dummy dimension
+   PUBLIC :: dim_def_extra     !< read dimension configuration file, and save dimension allowed.
 
    PRIVATE :: dim__reshape_2xyzt_dp ! reshape real(8) 4D array to ('x','y','z','t')
@@ -203,4 +210,5 @@
    PRIVATE :: dim__copy_unit        ! copy dimension structure
    PRIVATE :: dim__copy_arr         ! copy array of dimension structure
+   PRIVATE :: dim__is_allowed
 
    TYPE TDIM !< dimension structure
@@ -215,5 +223,9 @@
    END TYPE
 
-   CHARACTER(LEN=lc), DIMENSION(ip_maxdum), SAVE :: cm_dumdim !< dummy dimension
+   CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg), SAVE :: cm_dumdim !< dummy dimension
+   CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg), SAVE :: cm_dimX   !< x dimension
+   CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg), SAVE :: cm_dimY   !< y dimension
+   CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg), SAVE :: cm_dimZ   !< z dimension
+   CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg), SAVE :: cm_dimT   !< t dimension
 
    INTERFACE dim_print
@@ -587,15 +599,16 @@
          cl_name=fct_lower(cd_name)
 
-         IF( TRIM(cl_name) == 'x' )THEN
+         IF(     dim__is_allowed(TRIM(cl_name), cm_dimX(:)) )THEN
             dim_init%c_sname='x'
-         ELSEIF( TRIM(cl_name) == 'y' )THEN
+         ELSEIF( dim__is_allowed(TRIM(cl_name), cm_dimY(:)) )THEN
             dim_init%c_sname='y'
-         ELSEIF( TRIM(cl_name)== 'z' .OR. &
-         &       INDEX(cl_name,'depth')/=0 )THEN
+         ELSEIF( dim__is_allowed(TRIM(cl_name), cm_dimZ(:)) )THEN
             dim_init%c_sname='z'
-         ELSEIF( TRIM(cl_name)== 't' .OR. &
-         &       INDEX(cl_name,'time')/=0 )THEN
+         ELSEIF( dim__is_allowed(TRIM(cl_name), cm_dimT(:)) )THEN
             dim_init%c_sname='t'
-         ENDIF      
+         ELSE
+            CALL logger_warn("DIM INIT: "//TRIM(cd_name)//&
+            " not allowed.")
+         ENDIF
 
       ENDIF
@@ -1430,7 +1443,7 @@
       ! loop indices
       ! namelist
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumvar
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumdim
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumatt
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumvar
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumdim
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumatt
 
       !----------------------------------------------------------------
@@ -1493,5 +1506,5 @@
 
       dim_is_dummy=.FALSE.
-      DO ji=1,ip_maxdum
+      DO ji=1,ip_maxdumcfg
          IF( fct_lower(td_dim%c_name) == fct_lower(cm_dumdim(ji)) )THEN
             dim_is_dummy=.TRUE.
@@ -1501,4 +1514,117 @@
 
    END FUNCTION dim_is_dummy
+   !-------------------------------------------------------------------
+   !> @brief This subroutine read dimension configuration file, 
+   !> and fill array of dimension allowed.
+   !>
+   !> @author J.Paul
+   !> @date Ocotber, 2016 - Initial Version
+   !
+   !> @param[in] cd_file input file (dimension configuration file)
+   !-------------------------------------------------------------------
+   SUBROUTINE dim_def_extra( cd_file )
+      IMPLICIT NONE
+
+      ! Argument      
+      CHARACTER(LEN=*), INTENT(IN) :: cd_file
+
+      ! local variable
+      INTEGER(i4)   :: il_fileid
+      INTEGER(i4)   :: il_status
+
+      LOGICAL       :: ll_exist
+      
+      ! loop indices
+      ! namelist
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg) :: cn_dimX = '' 
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg) :: cn_dimY = ''
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg) :: cn_dimZ = ''
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdimcfg) :: cn_dimT = ''
+
+      !----------------------------------------------------------------
+      NAMELIST /namdim/ &   !< dimension namelist
+      &  cn_dimX, &       !< x dimension name allowed
+      &  cn_dimY, &       !< y dimension name allowed
+      &  cn_dimZ, &       !< z dimension name allowed
+      &  cn_dimT          !< t dimension name allowed
+
+      !----------------------------------------------------------------
+
+      ! init
+      cm_dimX(:)=''
+      cm_dimY(:)=''
+      cm_dimZ(:)=''
+      cm_dimT(:)=''
+
+      ! read config variable file
+      INQUIRE(FILE=TRIM(cd_file), EXIST=ll_exist)
+      IF( ll_exist )THEN
+
+         il_fileid=fct_getunit()
+   
+         OPEN( il_fileid, FILE=TRIM(cd_file), &
+         &                FORM='FORMATTED',       &
+         &                ACCESS='SEQUENTIAL',    &
+         &                STATUS='OLD',           &
+         &                ACTION='READ',          &
+         &                IOSTAT=il_status)
+         CALL fct_err(il_status)
+         IF( il_status /= 0 )THEN
+            CALL logger_fatal("DIM GET DUMMY: opening "//TRIM(cd_file))
+         ENDIF
+   
+         READ( il_fileid, NML = namdim )
+         cm_dimX(:)=cn_dimX(:)
+         cm_dimY(:)=cn_dimY(:)
+         cm_dimZ(:)=cn_dimZ(:)
+         cm_dimT(:)=cn_dimT(:)
+
+         CLOSE( il_fileid )
+
+      ELSE
+
+         CALL logger_fatal("DIM DEF EXTRA: can't find configuration"//&
+            &              " file "//TRIM(cd_file))
+
+      ENDIF         
+
+   END SUBROUTINE dim_def_extra
+   !-------------------------------------------------------------------
+   !> @brief This function check if dimension is allowed, i.e defined 
+   !> in dimension configuraton file
+   !>
+   !> @author J.Paul
+   !> @date OCTOber, 2016 - Initial Version
+   !
+   !> @param[in] cd_name dimension name
+   !> @param[in] cd_dim  array dimension name allowed
+   !> @return true if dimension is allowed 
+   !-------------------------------------------------------------------
+   FUNCTION dim__is_allowed(cd_name, cd_dim)
+      IMPLICIT NONE
+
+      ! Argument
+      CHARACTER(LEN=*),               INTENT(IN) :: cd_name
+      CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: cd_dim
+      
+      ! function
+      LOGICAL :: dim__is_allowed
+      
+      ! loop indices
+      INTEGER(i4) :: ji
+      !----------------------------------------------------------------
+
+      dim__is_allowed=.FALSE.
+      ji=1
+      DO WHILE( TRIM(cd_dim(ji)) /= '' )
+         IF( TRIM(fct_lower(cd_name)) == TRIM(fct_lower(cd_dim(ji))) )THEN
+            dim__is_allowed=.TRUE.
+            EXIT
+         ENDIF
+         ji=ji+1
+      ENDDO
+
+   END FUNCTION dim__is_allowed
+
 END MODULE dim
 
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/docsrc/5_changeLog.md
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/docsrc/5_changeLog.md	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/docsrc/5_changeLog.md	(revision 7153)
@@ -7,11 +7,20 @@
 ## New Features
 - create_meshmask.f90 program to create meshmask from coordinates and bathymetry files.
+- create_meshmask.f90 allows to write domain_cfg file
 - merge_bathy.f90: allow to choose the number of boundary point with coarse grid value.
+- dimension.f90: dimension allowed read in configuration file.
 ## Changes
 - create_coord.f90: allow to define sub domain with coarse grid indices or coordinates.
 - grid.f90:grid__get_closest_str: add function to get closest grid point using coarse grid coordinates strucutre.
-- iom.f90:iom_open: open cdf4 file as cdf
+- iom_cdf.f90:iom_cdf__get_info: define cdf4 as cdf
+- variable.f90: add subroutine to clean global array of extra information, and define logical for variable to be used.
+- create_coord.f90: dimension to be used select from configuration file
+- create_bathy.f90: dimension to be used select from configuration file
+- merge_bathy.f90: dimension to be used select from configuration file
+- create_boundary.f90: dimension to be used select from configuration file
+- create_restart.f90: dimension to be used select from configuration file
 ## Bug fixes
 - boundary.f90:boundary_check: take into account that boundaries are compute on T point, but expressed on U,V point
+- grid.f90:grid__get_closest_str: use max of zero and east-west overlap instead of east-west overlap
 
 # Initial Release 2016-03-17
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/global.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/global.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/global.f90	(revision 7153)
@@ -67,6 +67,6 @@
 
    INTEGER(i4)                             , PARAMETER :: ip_maxvar =200   !< maximum number of variable
-   INTEGER(i4)                             , PARAMETER :: ip_maxmtx =100   !< matrix variable maximum dimension (cf create_bathy)
-   INTEGER(i4)                             , PARAMETER :: ip_maxseg =50    !< maximum number of segment for each boundary
+   INTEGER(i4)                             , PARAMETER :: ip_maxmtx =50    !< matrix variable maximum dimension (cf create_bathy)
+   INTEGER(i4)                             , PARAMETER :: ip_maxseg =10    !< maximum number of segment for each boundary
 
    INTEGER(i4)                             , PARAMETER :: ip_nsep=2        !< number of separator listed
@@ -112,4 +112,5 @@
 
 
+   INTEGER(i4)                             , PARAMETER :: ip_maxdimcfg=10 !< maximum allowed dimension in configuration file
    INTEGER(i4)                             , PARAMETER :: ip_maxdim=4
    INTEGER(i4)                             , PARAMETER :: jp_I=1
@@ -131,5 +132,6 @@
    INTEGER(i4), PARAMETER :: jp_west =4
 
-   INTEGER(i4)                             , PARAMETER :: ip_maxdum = 10 !< maximum dummy variable, dimension, attribute
+   INTEGER(i4)                             , PARAMETER :: ip_maxdumcfg = 10 !< maximum dummy variable, dimension, or attribute 
+                                                                            !< in configuration file
 
 END MODULE global
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid.f90	(revision 7153)
@@ -478,5 +478,5 @@
    !-------------------------------------------------------------------
    !> @brief This subroutine get information about global domain, given mpp
-   !> strucutre.
+   !> structure.
    !>
    !> @details
@@ -547,10 +547,10 @@
 
       SELECT CASE(il_perio)
-      CASE(3,4)
-         il_pivot=1
-      CASE(5,6)
-         il_pivot=0
-      CASE(0,1,2)
-         il_pivot=1
+         CASE(3,4)
+            il_pivot=1
+         CASE(5,6)
+            il_pivot=0
+         CASE(0,1,2)
+            il_pivot=1
       END SELECT
 
@@ -1668,5 +1668,5 @@
    !> else return the size of the ovarlap band.
    !> East-West overlap is computed comparing longitude value of the  
-   !> South" part of the domain, to avoid  north fold boundary.
+   !> South part of the domain, to avoid  north fold boundary.
    !>
    !
@@ -1675,4 +1675,6 @@
    !> @date October, 2014
    !> - work on mpp file structure instead of file structure
+   !> @date October, 2016
+   !> - check longitude as longname
    !>
    !> @param[in] td_lon longitude variable structure 
@@ -1724,12 +1726,13 @@
             ALLOCATE( dl_vare(il_jmax-il_jmin+1) )
             ALLOCATE( dl_varw(il_jmax-il_jmin+1) )
-            
+
             dl_vare(:)=dl_value(il_east,il_jmin:il_jmax)
             dl_varw(:)=dl_value(il_west,il_jmin:il_jmax)
-            
-            IF( .NOT.(  ALL(dl_vare(:)==td_var%d_fill) .AND. &
-            &           ALL(dl_varw(:)==td_var%d_fill) ) )THEN
-         
-               IF( TRIM(td_var%c_stdname) == 'longitude' )THEN
+
+            IF( .NOT.( ALL(dl_vare(:)==td_var%d_fill) .AND. &
+            &          ALL(dl_varw(:)==td_var%d_fill) ) )THEN
+
+               IF( TRIM(td_var%c_stdname) == 'longitude' .OR. &
+                 & SCAN(TRIM(td_var%c_longname), 'longitude') == 0 )THEN
                   WHERE( dl_value(:,:) > 180._dp .AND. &
                   &      dl_value(:,:) /= td_var%d_fill ) 
@@ -1755,5 +1758,5 @@
                      ELSE
                         dl_vare(:)=dl_value(il_east-ji,il_jmin:il_jmax)
-                        
+
                         IF( ALL( dl_varw(:) == dl_vare(:) ) )THEN
                            grid__get_ew_overlap_var=ji+1
@@ -1781,8 +1784,10 @@
    !> else return the size of the ovarlap band.
    !> East-West overlap is computed comparing longitude value of the  
-   !> South" part of the domain, to avoid  north fold boundary.
+   !> South part of the domain, to avoid  north fold boundary.
    !>
    !> @author J.Paul
    !> @date October, 2014 - Initial Version
+   !> @date October, 2016
+   !> - check varid for longitude_T
    !>
    !> @param[in] td_file file structure 
@@ -1805,8 +1810,8 @@
       !----------------------------------------------------------------
 
-      il_varid=var_get_index(td_file%t_var(:), 'longitude')
+      il_varid=var_get_id(td_file%t_var(:), 'longitude', 'longitude_T')
       IF( il_varid /= 0 )THEN
          ! read longitude on boundary
-         tl_var=iom_read_var(td_file, 'longitude')
+         tl_var=iom_read_var(td_file, il_varid)
       ELSE
          DO ji=1,td_file%i_nvar
@@ -1831,5 +1836,5 @@
    !> else return the size of the ovarlap band.
    !> East-West overlap is computed comparing longitude value of the  
-   !> South" part of the domain, to avoid  north fold boundary.
+   !> South part of the domain, to avoid  north fold boundary.
    !>
    !
@@ -1838,4 +1843,6 @@
    !> @date October, 2014
    !> - work on mpp file structure instead of file structure
+   !> @date October, 2016
+   !> - check varid for longitude_T
    !>
    !> @param[in] td_mpp mpp structure 
@@ -1862,7 +1869,7 @@
 
       ! read longitude on boundary
-      il_varid=var_get_index(td_mpp%t_proc(1)%t_var(:),'longitude')
+      il_varid=var_get_id(td_mpp%t_proc(1)%t_var(:),'longitude', 'longitude_T')
       IF( il_varid /= 0 )THEN
-         tl_var=iom_mpp_read_var(td_mpp, 'longitude')
+         tl_var=iom_mpp_read_var(td_mpp, il_varid)
       ELSE
          DO ji=1,td_mpp%t_proc(1)%i_nvar
@@ -1878,5 +1885,4 @@
          grid__get_ew_overlap_mpp=il_ew
       ENDIF
-
 
       ! clean
@@ -3033,5 +3039,7 @@
    !> @author J.Paul
    !> @date April, 2016 - Initial Version
-   !
+   !> @date October, 2016
+   !> - use max of zero and east-west overlap instead of east-west overlap
+   !>
    !> @param[in] td_coord0 coarse grid coordinate mpp structure
    !> @param[in] dd_lon1   fine   grid longitude
@@ -3060,4 +3068,5 @@
 
       INTEGER(i4)                              :: il_ind
+      INTEGER(i4)                              :: il_ew
 
       REAL(dp)   , DIMENSION(:,:), ALLOCATABLE :: dl_lon0
@@ -3109,11 +3118,12 @@
          CALL iom_mpp_close(tl_coord0)
 
-         ALLOCATE(dl_lon0(tl_coord0%t_dim(jp_I)%i_len-tl_coord0%i_ew, &
+         il_ew=MAX(0,tl_coord0%i_ew)
+         ALLOCATE(dl_lon0(tl_coord0%t_dim(jp_I)%i_len-il_ew, &
             &             tl_coord0%t_dim(jp_J)%i_len) )             
-         ALLOCATE(dl_lat0(tl_coord0%t_dim(jp_I)%i_len-tl_coord0%i_ew, &
+         ALLOCATE(dl_lat0(tl_coord0%t_dim(jp_I)%i_len-il_ew, &
             &             tl_coord0%t_dim(jp_J)%i_len) )
 
-         dl_lon0(:,:)=tl_lon0%d_value(tl_coord0%i_ew+1:,:,1,1)
-         dl_lat0(:,:)=tl_lat0%d_value(tl_coord0%i_ew+1:,:,1,1)
+         dl_lon0(:,:)=tl_lon0%d_value(il_ew+1:,:,1,1)
+         dl_lat0(:,:)=tl_lat0%d_value(il_ew+1:,:,1,1)
 
          id_res(:)=grid_get_closest( dl_lon0, dl_lat0, dd_lon1, dd_lat1, cd_pos, dd_fill )
@@ -3602,5 +3612,5 @@
          ENDIF
          tl_lat0=iom_mpp_read_var(tl_coord0, TRIM(cl_name))
-         
+
          ! close mpp files
          CALL iom_mpp_close(tl_coord0)
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid_hgr.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid_hgr.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid_hgr.f90	(revision 7153)
@@ -85,6 +85,8 @@
 !> @date September, 2015 
 !> - J, Paul : rewrite to SIREN format from $Id: domhgr.F90 5506 2015-06-29 15:19:38Z clevy $
-!> @date October, 2015
+!> @date October, 2016
 !> - J, Paul : update from trunk (revision 6961): add wetting and drying, ice sheet coupling..
+!> - J, Paul : compute coriolis factor at f-point and at t-point 
+!> - J, Paul : do not use anymore special case for ORCA grid
 !>
 !> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -146,5 +148,6 @@
    PUBLIC :: tg_e2f
    
-   PUBLIC :: tg_ff
+   PUBLIC :: tg_ff_t
+   PUBLIC :: tg_ff_f
 
    PUBLIC :: tg_gcost
@@ -186,9 +189,9 @@
 !      REAL(dp)          :: d_ppe2_m     
 
-      INTEGER(i4)       :: i_cla     
+!      INTEGER(i4)       :: i_cla     
                 
-      CHARACTER(LEN=lc) :: c_cfg     
+!      CHARACTER(LEN=lc) :: c_cfg     
       INTEGER(i4)       :: i_cfg     
-      INTEGER(i4)       :: i_bench   
+      LOGICAL           :: l_bench   
                 
    END TYPE
@@ -227,5 +230,6 @@
    TYPE(TVAR), SAVE :: tg_e2f
 
-   TYPE(TVAR), SAVE :: tg_ff
+   TYPE(TVAR), SAVE :: tg_ff_t
+   TYPE(TVAR), SAVE :: tg_ff_f
 
    TYPE(TVAR), SAVE :: tg_gcost
@@ -249,5 +253,5 @@
    !> @param[in] jpj
    !-------------------------------------------------------------------
-   SUBROUTINE grid_hgr_init(jpi,jpj,jpk) 
+   SUBROUTINE grid_hgr_init(jpi,jpj,jpk,ld_domcfg) 
       IMPLICIT NONE
       ! Argument      
@@ -255,4 +259,5 @@
       INTEGER(i4), INTENT(IN) :: jpj
       INTEGER(i4), INTENT(IN) :: jpk
+      LOGICAL    , INTENT(IN) :: ld_domcfg
 
       REAL(dp), DIMENSION(jpi,jpj)     :: dl_tmp2D
@@ -292,15 +297,18 @@
       tg_e2f      = var_init('e2f'  ,dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
 
-      tg_ff       = var_init('ff'   ,dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-
-      tg_gcost     =var_init('gcost',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_gcosu     =var_init('gcosu',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_gcosv     =var_init('gcosv',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_gcosf     =var_init('gcosf',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-
-      tg_gsint     =var_init('gsint',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_gsinu     =var_init('gsinu',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_gsinv     =var_init('gsinv',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_gsinf     =var_init('gsinf',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+      tg_ff_t     = var_init('ff_t' ,dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+      tg_ff_f     = var_init('ff_f' ,dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+
+      IF( .NOT. ld_domcfg )THEN
+         tg_gcost     =var_init('gcost',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_gcosu     =var_init('gcosu',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_gcosv     =var_init('gcosv',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_gcosf     =var_init('gcosf',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+
+         tg_gsint     =var_init('gsint',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_gsinu     =var_init('gsinu',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_gsinv     =var_init('gsinv',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_gsinf     =var_init('gsinf',dl_tmp2D(:,:)   , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+      ENDIF
 
       ! variable 3D
@@ -308,7 +316,9 @@
 
       tg_tmask   = var_init('tmask'  ,dl_tmp3D(:,:,:), dd_fill=dp_fill_i1, id_type=NF90_BYTE)
-      tg_umask   = var_init('umask'  ,dl_tmp3D(:,:,:), dd_fill=dp_fill_i1, id_type=NF90_BYTE)
-      tg_vmask   = var_init('vmask'  ,dl_tmp3D(:,:,:), dd_fill=dp_fill_i1, id_type=NF90_BYTE)
-      tg_fmask   = var_init('fmask'  ,dl_tmp3D(:,:,:), dd_fill=dp_fill_i1, id_type=NF90_BYTE)
+      IF( .NOT. ld_domcfg )THEN
+         tg_umask   = var_init('umask'  ,dl_tmp3D(:,:,:), dd_fill=dp_fill_i1, id_type=NF90_BYTE)
+         tg_vmask   = var_init('vmask'  ,dl_tmp3D(:,:,:), dd_fill=dp_fill_i1, id_type=NF90_BYTE)
+         tg_fmask   = var_init('fmask'  ,dl_tmp3D(:,:,:), dd_fill=dp_fill_i1, id_type=NF90_BYTE)
+      ENDIF
       
 !      tg_wmask   = var_init('wmask'  ,dl_tmp3D(:,:,:), dd_fill=dp_fill_i1, id_type=NF90_BYTE)
@@ -324,7 +334,8 @@
    !>
    !-------------------------------------------------------------------
-   SUBROUTINE grid_hgr_clean() 
+   SUBROUTINE grid_hgr_clean(ld_domcfg) 
       IMPLICIT NONE
       ! Argument      
+      LOGICAL    , INTENT(IN) :: ld_domcfg
 
       ! local variable
@@ -332,8 +343,4 @@
       !----------------------------------------------------------------
       CALL var_clean(tg_ssmask  )
-      CALL var_clean(tg_tmask   )
-      CALL var_clean(tg_umask   )
-      CALL var_clean(tg_vmask   )
-      CALL var_clean(tg_fmask   )
 
       CALL var_clean(tg_glamt)
@@ -357,16 +364,25 @@
       CALL var_clean(tg_e2f  )
 
-      CALL var_clean(tg_ff   )
-
-      CALL var_clean(tg_gcost )
-      CALL var_clean(tg_gcosu )
-      CALL var_clean(tg_gcosv )
-      CALL var_clean(tg_gcosf )
-
-      CALL var_clean(tg_gsint )
-      CALL var_clean(tg_gsinu )
-      CALL var_clean(tg_gsinv )
-      CALL var_clean(tg_gsinf )
-
+      CALL var_clean(tg_ff_t )
+      CALL var_clean(tg_ff_f )
+
+      IF( .NOT. ld_domcfg )THEN
+         CALL var_clean(tg_gcost )
+         CALL var_clean(tg_gcosu )
+         CALL var_clean(tg_gcosv )
+         CALL var_clean(tg_gcosf )
+
+         CALL var_clean(tg_gsint )
+         CALL var_clean(tg_gsinu )
+         CALL var_clean(tg_gsinv )
+         CALL var_clean(tg_gsinf )
+      ENDIF
+
+      CALL var_clean(tg_tmask   )
+      IF( .NOT. ld_domcfg )THEN
+         CALL var_clean(tg_umask   )
+         CALL var_clean(tg_vmask   )
+         CALL var_clean(tg_fmask   )
+      ENDIF
    END SUBROUTINE grid_hgr_clean
    !-------------------------------------------------------------------
@@ -409,11 +425,11 @@
 !      REAL(dp)          :: dn_ppe2_m   = NF90_FILL_DOUBLE
 
-      ! namcla
-      INTEGER(i4)       :: in_cla      = 0
+!      ! namcla
+!      INTEGER(i4)       :: in_cla      = 0
 
       ! namgrd
-      CHARACTER(LEN=lc) :: cn_cfg      = ''
+!      CHARACTER(LEN=lc) :: cn_cfg      = ''
       INTEGER(i4)       :: in_cfg      = 0
-      INTEGER(i4)       :: in_bench    = 0
+      LOGICAL           :: ln_bench    = .FALSE.
 
       !----------------------------------------------------------------
@@ -433,11 +449,11 @@
 !      &  dn_ppe2_m         !< meridional grid-spacing (degrees)
 
-      NAMELIST /namcla/ &
-      &  in_cla            !< =1 cross land advection for exchanges through some straits (ORCA2)
+!      NAMELIST /namcla/ &
+!      &  in_cla            !< =1 cross land advection for exchanges through some straits (ORCA2)
 
       NAMELIST/namgrd/  &  !< orca grid namelist
-      &  cn_cfg,        &  !< name of the configuration (orca)
+!      &  cn_cfg,        &  !< name of the configuration (orca)
       &  in_cfg,        &  !< resolution of the configuration (2,1,025..)
-      &  in_bench          !< benchmark parameter (in_mshhgr = 5 ). 
+      &  ln_bench          !< benchmark parameter (in_mshhgr = 5 ). 
 
       !----------------------------------------------------------------
@@ -461,6 +477,6 @@
 
          READ( il_fileid, NML = namhgr  )
-         READ( il_fileid, NML = namcla  )
-         READ( il_fileid, NML = namgrd  )
+!         READ( il_fileid, NML = namcla  )
+!         READ( il_fileid, NML = namgrd  )
 
          CLOSE( il_fileid, IOSTAT=il_status )
@@ -482,9 +498,9 @@
 !         grid_hgr_nam%d_ppe2_m  = dn_ppe2_m
 
-         grid_hgr_nam%i_cla     = in_cla
-
-         grid_hgr_nam%c_cfg     = TRIM(cn_cfg)
+!         grid_hgr_nam%i_cla     = in_cla
+
+!         grid_hgr_nam%c_cfg     = TRIM(cn_cfg)
          grid_hgr_nam%i_cfg     = in_cfg
-         grid_hgr_nam%i_bench   = in_bench
+         grid_hgr_nam%l_bench   = ln_bench
 
       ELSE
@@ -505,5 +521,5 @@
    !> @param[in] jpj
    !-------------------------------------------------------------------
-   SUBROUTINE grid_hgr_fill(td_nam,jpi,jpj) 
+   SUBROUTINE grid_hgr_fill(td_nam,jpi,jpj,ld_domcfg) 
       IMPLICIT NONE
       ! Argument      
@@ -511,4 +527,5 @@
       INTEGER(i4), INTENT(IN) :: jpi
       INTEGER(i4), INTENT(IN) :: jpj
+      LOGICAL    , INTENT(IN) :: ld_domcfg
 
       ! local variable
@@ -516,5 +533,5 @@
       ! loop indices
       !----------------------------------------------------------------
-      CALL logger_info('GRIG HGR FILL : define the horizontal mesh from ithe'//&
+      CALL logger_info('GRID HGR FILL : define the horizontal mesh from ithe'//&
       &  ' type of horizontal mesh mshhgr = '//TRIM(fct_str(td_nam%i_mshhgr)))
       IF( td_nam%i_mshhgr == 1 )THEN
@@ -538,5 +555,5 @@
          CASE(0)   !  curvilinear coordinate on the sphere read in coordinate.nc file
 
-            CALL grid_hgr__fill_curv(td_nam,jpi,jpj)
+            CALL grid_hgr__fill_curv(td_nam)!,jpi,jpj)
 
          CASE(1)   ! geographical mesh on the sphere with regular grid-spacing
@@ -558,5 +575,5 @@
          CASE DEFAULT
 
-            CALL logger_fatal('GRIG HGR FILL : bad flag value for mshhgr = '//&
+            CALL logger_fatal('GRID HGR FILL : bad flag value for mshhgr = '//&
                &  TRIM(fct_str(td_nam%i_mshhgr)))
 
@@ -567,5 +584,5 @@
 
       ! create coriolis factor
-      CALL grid_hgr__fill_coriolis(td_nam,jpi,jpj)
+      CALL grid_hgr__fill_coriolis(td_nam,jpi)!,jpj)
      
       ! Control of domain for symetrical condition
@@ -582,5 +599,7 @@
       ! compute angles between model grid lines and the North direction
       ! ---------------------------------------------------------------
-      CALL grid_hgr__angle(td_nam,jpi,jpj) 
+      IF( .NOT. ld_domcfg )THEN
+         CALL grid_hgr__angle(td_nam,jpi,jpj) 
+      ENDIF
 
    END SUBROUTINE grid_hgr_fill
@@ -591,19 +610,21 @@
    !> @author J.Paul
    !> @date September, 2015 - Initial version
+   !> @date October, 2016
+   !> - do not use anymore special case for ORCA grid
    !>
    !> @param[in] td_nam
-   !> @param[in] jpi
-   !> @param[in] jpj   
-   !-------------------------------------------------------------------
-   SUBROUTINE grid_hgr__fill_curv( td_nam,jpi,jpj ) 
+   ! @param[in] jpi
+   ! @param[in] jpj   
+   !-------------------------------------------------------------------
+   SUBROUTINE grid_hgr__fill_curv( td_nam )!,jpi,jpj ) 
       IMPLICIT NONE
       ! Argument      
       TYPE(TNAMH), INTENT(IN) :: td_nam
-      INTEGER(i4), INTENT(IN) :: jpi
-      INTEGER(i4), INTENT(IN) :: jpj
+!      INTEGER(i4), INTENT(IN) :: jpi
+!      INTEGER(i4), INTENT(IN) :: jpj
 
       ! local variable
-      INTEGER(i4) :: ii0, ii1, ij0, ij1   ! temporary integers
-      INTEGER(i4) :: isrow                ! index for ORCA1 starting row
+!      INTEGER(i4) :: ii0, ii1, ij0, ij1   ! temporary integers
+!      INTEGER(i4) :: isrow                ! index for ORCA1 starting row
 
       TYPE(TMPP)  :: tl_coord
@@ -662,156 +683,156 @@
       !! WARNING extended grid have to be correctly fill
 
-      !! special case for ORCA grid
-      ! ORCA R2 configuration
-      IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 2 ) THEN
-            IF( td_nam%i_cla == 0 ) THEN
-               !
-               ! Gibraltar Strait (e2u = 20 km)
-               ii0 = 139   ;   ii1 = 140
-               ij0 = 102   ;   ij1 = 102   
-               ! e2u = 20 km
-               tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  20.e3
-               CALL logger_info('orca_r2: Gibraltar    : e2u reduced to 20 km')
-               !
-               ! Bab el Mandeb (e2u = 18 km)
-               ii0 = 160   ;   ii1 = 160 
-               ij0 =  88   ;   ij1 =  88   
-               ! e1v = 18 km
-               tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  18.e3
-               ! e2u = 30 km
-               tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  30.e3
-
-               CALL logger_info('orca_r2: Bab el Mandeb: e2u reduced to 30 km')
-               CALL logger_info('e1v reduced to 18 km')
-            ENDIF
-            ! Danish Straits
-            ii0 = 145   ;   ii1 = 146
-            ij0 = 116   ;   ij1 = 116   
-            ! e2u = 10 km
-            tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
-            CALL logger_info('orca_r2: Danish Straits : e2u reduced to 10 km')
-      ENDIF
-
-      ! ORCA R1 configuration
-      IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 1 ) THEN
-         ! This dirty section will be suppressed by simplification process: all this will come back in input files
-         ! Currently these hard-wired indices relate to configuration with
-         ! extend grid (jpjglo=332)
-         ! which had a grid-size of 362x292.
-
-         isrow = 332 - jpj
-
-         ! Gibraltar Strait (e2u = 20 km)
-         ii0 = 282           ;   ii1 = 283
-         ij0 = 201 + isrow   ;   ij1 = 241 - isrow 
-         ! e2u = 20 km
-         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  20.e3
-         CALL logger_info('orca_r1: Gibraltar : e2u reduced to 20 km')
-
-         ! Bhosporus Strait (e2u = 10 km)
-         ii0 = 314           ;   ii1 = 315        ! Bhosporus Strait (e2u = 10 km)
-         ij0 = 208 + isrow   ;   ij1 = 248 - isrow
-         ! Bhosporus Strait (e2u = 10 km)
-         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
-         CALL logger_info('orca_r1: Bhosporus : e2u reduced to 10 km')
-
-         ! Lombok Strait (e1v = 13 km)
-         ii0 =  44           ;   ii1 =  44        ! Lombok Strait (e1v = 13 km)
-         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
-         ! Lombok Strait (e1v = 13 km)
-         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  13.e3
-         CALL logger_info('orca_r1: Lombok : e1v reduced to 10 km')
-
-         ! Sumba Strait (e1v = 8 km) [closed from bathy_11 on]
-         ii0 =  48           ;   ii1 =  48        ! Sumba Strait (e1v = 8 km) [closed from bathy_11 on]
-         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
-         ! Sumba Strait (e1v = 8 km) [closed from bathy_11 on]
-         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  8.e3
-         CALL logger_info('orca_r1: Sumba : e1v reduced to 8 km')
-
-         ! Ombai Strait (e1v = 13 km)
-         ii0 =  53           ;   ii1 =  53        ! Ombai Strait (e1v = 13 km)
-         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
-         ! Ombai Strait (e1v = 13 km)
-         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) = 13.e3
-         CALL logger_info('orca_r1: Ombai : e1v reduced to 13 km')
-
-         ! Timor Passage (e1v = 20 km)
-         ii0 =  56           ;   ii1 =  56        ! Timor Passage (e1v = 20 km)
-         ij0 = 124 + isrow   ;   ij1 = 145 - isrow
-         ! Timor Passage (e1v = 20 km)
-         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) = 20.e3
-         CALL logger_info('orca_r1: Timor Passage : e1v reduced to 20 km')
-
-          ! West Halmahera Strait (e1v = 30 km)
-         ii0 =  55           ;   ii1 =  55        ! West Halmahera Strait (e1v = 30 km)
-         ij0 = 141 + isrow   ;   ij1 = 182 - isrow
-         ! West Halmahera Strait (e1v = 30 km)
-         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) = 30.e3
-         CALL logger_info('orca_r1: W Halmahera : e1v reduced to 30 km')
-
-         ! East Halmahera Strait (e1v = 50 km)
-         ii0 =  58           ;   ii1 =  58        ! East Halmahera Strait (e1v = 50 km)
-         ij0 = 141 + isrow   ;   ij1 = 182 - isrow
-         ! East Halmahera Strait (e1v = 50 km)
-         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) = 50.e3
-         CALL logger_info('orca_r1: E Halmahera : e1v reduced to 50 km')
-
-      ENDIF
-
-      ! ORCA R05 configuration
-      IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 05 ) THEN
-
-         ! Gibraltar Strait (e2u = 20 km)
-         ii0 = 563   ;   ii1 = 564        ! Gibraltar Strait (e2u = 20 km)
-         ij0 = 327   ;   ij1 = 327
-         ! Gibraltar Strait (e2u = 20 km)
-         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  20.e3
-         CALL logger_info('orca_r05: Reduced e2u at the Gibraltar Strait')
-         !
-         ! Bosphore Strait (e2u = 10 km)
-         ii0 = 627   ;   ii1 = 628        ! Bosphore Strait (e2u = 10 km)
-         ij0 = 343   ;   ij1 = 343
-         ! Bosphore Strait (e2u = 10 km)
-         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
-         CALL logger_info('orca_r05: Reduced e2u at the Bosphore Strait')
-         !
-         ! Sumba Strait (e2u = 40 km)
-         ii0 =  93   ;   ii1 =  94        ! Sumba Strait (e2u = 40 km)
-         ij0 = 232   ;   ij1 = 232
-         ! Sumba Strait (e2u = 40 km)
-         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  40.e3
-         CALL logger_info('orca_r05: Reduced e2u at the Sumba Strait')
-         !
-         ! Ombai Strait (e2u = 15 km)
-         ii0 = 103   ;   ii1 = 103        ! Ombai Strait (e2u = 15 km)
-         ij0 = 232   ;   ij1 = 232
-         ! Ombai Strait (e2u = 15 km)
-         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  15.e3
-         CALL logger_info('orca_r05: Reduced e2u at the Ombai Strait')
-         !
-         ! Palk Strait (e2u = 10 km)
-         ii0 =  15   ;   ii1 =  15        ! Palk Strait (e2u = 10 km)
-         ij0 = 270   ;   ij1 = 270
-         ! Palk Strait (e2u = 10 km)
-         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
-         CALL logger_info('orca_r05: Reduced e2u at the Palk Strait')
-         !
-         ! Lombok Strait (e1v = 10 km)
-         ii0 =  87   ;   ii1 =  87        ! Lombok Strait (e1v = 10 km)
-         ij0 = 232   ;   ij1 = 233
-         ! Lombok Strait (e1v = 10 km)
-         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
-         CALL logger_info('orca_r05: Reduced e1v at the Lombok Strait')
-         !
-         !
-         ! Bab el Mandeb (e1v = 25 km)
-         ii0 = 662   ;   ii1 = 662        ! Bab el Mandeb (e1v = 25 km)
-         ij0 = 276   ;   ij1 = 276
-         ! Bab el Mandeb (e1v = 25 km)
-         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  25.e3
-         CALL logger_info('orca_r05: Reduced e1v at the Bab el Mandeb')
-
-      ENDIF
+!      !! special case for ORCA grid
+!      ! ORCA R2 configuration
+!      IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 2 ) THEN
+!            IF( td_nam%i_cla == 0 ) THEN
+!               !
+!               ! Gibraltar Strait (e2u = 20 km)
+!               ii0 = 139   ;   ii1 = 140
+!               ij0 = 102   ;   ij1 = 102   
+!               ! e2u = 20 km
+!               tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  20.e3
+!               CALL logger_info('orca_r2: Gibraltar    : e2u reduced to 20 km')
+!               !
+!               ! Bab el Mandeb (e2u = 18 km)
+!               ii0 = 160   ;   ii1 = 160 
+!               ij0 =  88   ;   ij1 =  88   
+!               ! e1v = 18 km
+!               tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  18.e3
+!               ! e2u = 30 km
+!               tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  30.e3
+!
+!               CALL logger_info('orca_r2: Bab el Mandeb: e2u reduced to 30 km')
+!               CALL logger_info('e1v reduced to 18 km')
+!            ENDIF
+!            ! Danish Straits
+!            ii0 = 145   ;   ii1 = 146
+!            ij0 = 116   ;   ij1 = 116   
+!            ! e2u = 10 km
+!            tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
+!            CALL logger_info('orca_r2: Danish Straits : e2u reduced to 10 km')
+!      ENDIF
+!
+!      ! ORCA R1 configuration
+!      IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 1 ) THEN
+!         ! This dirty section will be suppressed by simplification process: all this will come back in input files
+!         ! Currently these hard-wired indices relate to configuration with
+!         ! extend grid (jpjglo=332)
+!         ! which had a grid-size of 362x292.
+!
+!         isrow = 332 - jpj
+!
+!         ! Gibraltar Strait (e2u = 20 km)
+!         ii0 = 282           ;   ii1 = 283
+!         ij0 = 201 + isrow   ;   ij1 = 241 - isrow 
+!         ! e2u = 20 km
+!         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  20.e3
+!         CALL logger_info('orca_r1: Gibraltar : e2u reduced to 20 km')
+!
+!         ! Bhosporus Strait (e2u = 10 km)
+!         ii0 = 314           ;   ii1 = 315        ! Bhosporus Strait (e2u = 10 km)
+!         ij0 = 208 + isrow   ;   ij1 = 248 - isrow
+!         ! Bhosporus Strait (e2u = 10 km)
+!         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
+!         CALL logger_info('orca_r1: Bhosporus : e2u reduced to 10 km')
+!
+!         ! Lombok Strait (e1v = 13 km)
+!         ii0 =  44           ;   ii1 =  44        ! Lombok Strait (e1v = 13 km)
+!         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
+!         ! Lombok Strait (e1v = 13 km)
+!         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  13.e3
+!         CALL logger_info('orca_r1: Lombok : e1v reduced to 10 km')
+!
+!         ! Sumba Strait (e1v = 8 km) [closed from bathy_11 on]
+!         ii0 =  48           ;   ii1 =  48        ! Sumba Strait (e1v = 8 km) [closed from bathy_11 on]
+!         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
+!         ! Sumba Strait (e1v = 8 km) [closed from bathy_11 on]
+!         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  8.e3
+!         CALL logger_info('orca_r1: Sumba : e1v reduced to 8 km')
+!
+!         ! Ombai Strait (e1v = 13 km)
+!         ii0 =  53           ;   ii1 =  53        ! Ombai Strait (e1v = 13 km)
+!         ij0 = 124 + isrow   ;   ij1 = 165 - isrow
+!         ! Ombai Strait (e1v = 13 km)
+!         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) = 13.e3
+!         CALL logger_info('orca_r1: Ombai : e1v reduced to 13 km')
+!
+!         ! Timor Passage (e1v = 20 km)
+!         ii0 =  56           ;   ii1 =  56        ! Timor Passage (e1v = 20 km)
+!         ij0 = 124 + isrow   ;   ij1 = 145 - isrow
+!         ! Timor Passage (e1v = 20 km)
+!         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) = 20.e3
+!         CALL logger_info('orca_r1: Timor Passage : e1v reduced to 20 km')
+!
+!          ! West Halmahera Strait (e1v = 30 km)
+!         ii0 =  55           ;   ii1 =  55        ! West Halmahera Strait (e1v = 30 km)
+!         ij0 = 141 + isrow   ;   ij1 = 182 - isrow
+!         ! West Halmahera Strait (e1v = 30 km)
+!         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) = 30.e3
+!         CALL logger_info('orca_r1: W Halmahera : e1v reduced to 30 km')
+!
+!         ! East Halmahera Strait (e1v = 50 km)
+!         ii0 =  58           ;   ii1 =  58        ! East Halmahera Strait (e1v = 50 km)
+!         ij0 = 141 + isrow   ;   ij1 = 182 - isrow
+!         ! East Halmahera Strait (e1v = 50 km)
+!         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) = 50.e3
+!         CALL logger_info('orca_r1: E Halmahera : e1v reduced to 50 km')
+!
+!      ENDIF
+!
+!      ! ORCA R05 configuration
+!      IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 05 ) THEN
+!
+!         ! Gibraltar Strait (e2u = 20 km)
+!         ii0 = 563   ;   ii1 = 564        ! Gibraltar Strait (e2u = 20 km)
+!         ij0 = 327   ;   ij1 = 327
+!         ! Gibraltar Strait (e2u = 20 km)
+!         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  20.e3
+!         CALL logger_info('orca_r05: Reduced e2u at the Gibraltar Strait')
+!         !
+!         ! Bosphore Strait (e2u = 10 km)
+!         ii0 = 627   ;   ii1 = 628        ! Bosphore Strait (e2u = 10 km)
+!         ij0 = 343   ;   ij1 = 343
+!         ! Bosphore Strait (e2u = 10 km)
+!         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
+!         CALL logger_info('orca_r05: Reduced e2u at the Bosphore Strait')
+!         !
+!         ! Sumba Strait (e2u = 40 km)
+!         ii0 =  93   ;   ii1 =  94        ! Sumba Strait (e2u = 40 km)
+!         ij0 = 232   ;   ij1 = 232
+!         ! Sumba Strait (e2u = 40 km)
+!         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  40.e3
+!         CALL logger_info('orca_r05: Reduced e2u at the Sumba Strait')
+!         !
+!         ! Ombai Strait (e2u = 15 km)
+!         ii0 = 103   ;   ii1 = 103        ! Ombai Strait (e2u = 15 km)
+!         ij0 = 232   ;   ij1 = 232
+!         ! Ombai Strait (e2u = 15 km)
+!         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  15.e3
+!         CALL logger_info('orca_r05: Reduced e2u at the Ombai Strait')
+!         !
+!         ! Palk Strait (e2u = 10 km)
+!         ii0 =  15   ;   ii1 =  15        ! Palk Strait (e2u = 10 km)
+!         ij0 = 270   ;   ij1 = 270
+!         ! Palk Strait (e2u = 10 km)
+!         tg_e2u%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
+!         CALL logger_info('orca_r05: Reduced e2u at the Palk Strait')
+!         !
+!         ! Lombok Strait (e1v = 10 km)
+!         ii0 =  87   ;   ii1 =  87        ! Lombok Strait (e1v = 10 km)
+!         ij0 = 232   ;   ij1 = 233
+!         ! Lombok Strait (e1v = 10 km)
+!         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  10.e3
+!         CALL logger_info('orca_r05: Reduced e1v at the Lombok Strait')
+!         !
+!         !
+!         ! Bab el Mandeb (e1v = 25 km)
+!         ii0 = 662   ;   ii1 = 662        ! Bab el Mandeb (e1v = 25 km)
+!         ij0 = 276   ;   ij1 = 276
+!         ! Bab el Mandeb (e1v = 25 km)
+!         tg_e1v%d_value(ii0:ii1,ij0:ij1,1,1) =  25.e3
+!         CALL logger_info('orca_r05: Reduced e1v at the Bab el Mandeb')
+!
+!      ENDIF
 
    END SUBROUTINE grid_hgr__fill_curv
@@ -1071,10 +1092,8 @@
       ze1 = 106000. / FLOAT(td_nam%i_cfg)            
       ! benchmark: forced the resolution to be about 100 km
-      IF( td_nam%i_bench /= 0 )   ze1 = 106000.e0     
+      IF( td_nam%l_bench )   ze1 = 106000.e0     
       zsin_alpha = - SQRT( 2. ) / 2.
       zcos_alpha =   SQRT( 2. ) / 2.
       ze1deg = ze1 / (dp_rearth * dp_deg2rad)
-      ! benchmark: keep the lat/+lon at the right in_cfg resolution
-      IF( td_nam%i_bench /= 0 )   ze1deg = ze1deg / FLOAT(td_nam%i_cfg)
       dl_glam0 = zlam1 + zcos_alpha * ze1deg * FLOAT( jpj-2 )
       dl_gphi0 = zphi1 + zsin_alpha * ze1deg * FLOAT( jpj-2 )
@@ -1134,15 +1153,17 @@
    !> @author J.Paul
    !> @date September, 2015 - Initial version
+   !> @date October, 2016
+   !> - compute coriolis factor at f-point and at t-point
    !>
    !> @param[in] td_nam
    !> @param[in] jpi
-   !> @param[in] jpj
-   !-------------------------------------------------------------------
-   SUBROUTINE grid_hgr__fill_coriolis(td_nam,jpi,jpj) 
+   ! @param[in] jpj
+   !-------------------------------------------------------------------
+   SUBROUTINE grid_hgr__fill_coriolis(td_nam,jpi)!,jpj) 
       IMPLICIT NONE
       ! Argument      
       TYPE(TNAMH), INTENT(IN) :: td_nam
       INTEGER(i4), INTENT(IN) :: jpi
-      INTEGER(i4), INTENT(IN) :: jpj
+!      INTEGER(i4), INTENT(IN) :: jpj
 
       ! local variable
@@ -1159,11 +1180,13 @@
          CASE ( 0, 1, 4 ) ! mesh on the sphere
 
-            tg_ff%d_value(:,:,1,1) = 2. * dp_omega * SIN(dp_deg2rad * tg_gphif%d_value(:,:,1,1))
+            tg_ff_f%d_value(:,:,1,1) = 2. * dp_omega * SIN(dp_deg2rad * tg_gphif%d_value(:,:,1,1))
+            tg_ff_t%d_value(:,:,1,1) = 2. * dp_omega * SIN(dp_deg2rad * tg_gphit%d_value(:,:,1,1)) ! at t-point
 
          CASE ( 2 )  ! f-plane at ppgphi0 
 
-            tg_ff%d_value(:,:,1,1) = 2. * dp_omega * SIN( dp_deg2rad * td_nam%d_ppgphi0 )
+            tg_ff_f%d_value(:,:,1,1) = 2. * dp_omega * SIN( dp_deg2rad * td_nam%d_ppgphi0 )
+            tg_ff_t%d_value(:,:,1,1) = 2. * dp_omega * SIN( dp_deg2rad * td_nam%d_ppgphi0 )
             CALL logger_info('f-plane: Coriolis parameter = constant = '//&
-               &  TRIM(fct_str(tg_ff%d_value(1,1,1,1))) )
+               &  TRIM(fct_str(tg_ff_f%d_value(1,1,1,1))) )
 
          CASE ( 3 )  ! beta-plane
@@ -1178,5 +1201,6 @@
             zf0 = 2. * dp_omega * SIN( dp_deg2rad * zphi0 )
             ! f = f0 +beta* y ( y=0 at south)
-            tg_ff%d_value(:,:,1,1) = zf0 + zbeta * tg_gphif%d_value(:,:,1,1) * 1.e3
+            tg_ff_f%d_value(:,:,1,1) = zf0 + zbeta * tg_gphif%d_value(:,:,1,1) * 1.e3
+            tg_ff_t%d_value(:,:,1,1) = zf0 + zbeta * tg_gphit%d_value(:,:,1,1) * 1.e3
 
          CASE ( 5 )  ! beta-plane and rotated domain (gyre configuration)
@@ -1190,5 +1214,8 @@
 
             ! f = f0 +beta* y ( y=0 at south)
-            tg_ff%d_value(:,:,1,1) = ( zf0 + zbeta * ABS( tg_gphif%d_value(:,:,1,1) - zphi0 ) * dp_deg2rad * dp_rearth )
+            tg_ff_f%d_value(:,:,1,1) = ( zf0 + zbeta * ABS( tg_gphif%d_value(:,:,1,1) - zphi0 ) &
+                                     & * dp_deg2rad * dp_rearth )
+            tg_ff_t%d_value(:,:,1,1) = ( zf0 + zbeta * ABS( tg_gphit%d_value(:,:,1,1) - zphi0 ) &
+                                     & * dp_deg2rad * dp_rearth )
 
       END SELECT
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid_zgr.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid_zgr.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/grid_zgr.f90	(revision 7153)
@@ -53,5 +53,6 @@
 !> - H. Liu : Modifications for Wetting/Drying
 !> @date October, 2016
-!> - update from trunk (revision 6961): add wetting and drying, ice sheet coupling..
+!> - J, Paul : update from trunk (revision 6961): add wetting and drying, ice sheet coupling..
+!> - J, Paul : do not use anymore special case for ORCA grid.
 !>
 !> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -136,5 +137,5 @@
    PRIVATE :: grid_zgr__bat 
    PRIVATE :: grid_zgr__zco 
-   PRIVATE :: grid_zgr__bat_zoom
+!   PRIVATE :: grid_zgr__bat_zoom
    PRIVATE :: grid_zgr__bat_ctl
    PRIVATE :: grid_zgr__bot_level
@@ -208,17 +209,17 @@
       REAL(dp)          :: d_wdld 
 
-      CHARACTER(LEN=lc) :: c_cfg     
-      INTEGER(i4)       :: i_cfg     
-      INTEGER(i4)       :: i_bench   
-      LOGICAL           :: l_zoom
+!      CHARACTER(LEN=lc) :: c_cfg     
+!      INTEGER(i4)       :: i_cfg     
+!      INTEGER(i4)       :: i_bench   
+!      LOGICAL           :: l_zoom
       LOGICAL           :: l_c1d
                 
-      CHARACTER(LEN=lc) :: c_cfz      
-      INTEGER(i4)       :: i_izoom    
-      INTEGER(i4)       :: i_jzoom    
-      LOGICAL           :: l_zoom_s   
-      LOGICAL           :: l_zoom_e   
-      LOGICAL           :: l_zoom_w   
-      LOGICAL           :: l_zoom_n
+!      CHARACTER(LEN=lc) :: c_cfz      
+!      INTEGER(i4)       :: i_izoom    
+!      INTEGER(i4)       :: i_jzoom    
+!      LOGICAL           :: l_zoom_s   
+!      LOGICAL           :: l_zoom_e   
+!      LOGICAL           :: l_zoom_w   
+!      LOGICAL           :: l_zoom_n
 
    END TYPE
@@ -277,6 +278,7 @@
    !> @param[in] jpj
    !> @param[in] jpk
+   !> @param[in] ld_sco
    !-------------------------------------------------------------------
-   SUBROUTINE grid_zgr_init( jpi,jpj,jpk ) 
+   SUBROUTINE grid_zgr_init( jpi,jpj,jpk, ld_sco ) 
       IMPLICIT NONE
       ! Argument      
@@ -284,4 +286,5 @@
       INTEGER(i4), INTENT(IN) :: jpj
       INTEGER(i4), INTENT(IN) :: jpk
+      LOGICAL    , INTENT(IN) :: ld_sco
 
       ! local variable
@@ -300,9 +303,12 @@
       tg_e3t_1d  =var_init('e3t_1d  ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
 
-      tg_gsigt   =var_init('gsigt   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_gsigw   =var_init('gsigw   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_gsi3w   =var_init('gsi3w   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_esigt   =var_init('esigt   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_esigw   =var_init('esigw   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+      !only sco
+      IF( ld_sco )THEN
+         tg_gsigt   =var_init('gsigt   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_gsigw   =var_init('gsigw   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_gsi3w   =var_init('gsi3w   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_esigt   =var_init('esigt   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_esigw   =var_init('esigw   ',dl_tmp1D(:)    , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+      ENDIF
 
       ! variable 2D
@@ -322,8 +328,11 @@
       dl_tmp2D(:,:)  =dp_fill
 
-      tg_hbatt   =var_init('hbatt   ',dl_tmp2D(:,:)  , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_hbatu   =var_init('hbatu   ',dl_tmp2D(:,:)  , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_hbatv   =var_init('hbatv   ',dl_tmp2D(:,:)  , dd_fill=dp_fill, id_type=NF90_DOUBLE)
-      tg_hbatf   =var_init('hbatf   ',dl_tmp2D(:,:)  , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+      ! only sco
+      IF( ld_sco )THEN
+         tg_hbatt   =var_init('hbatt   ',dl_tmp2D(:,:)  , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_hbatu   =var_init('hbatu   ',dl_tmp2D(:,:)  , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_hbatv   =var_init('hbatv   ',dl_tmp2D(:,:)  , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+         tg_hbatf   =var_init('hbatf   ',dl_tmp2D(:,:)  , dd_fill=dp_fill, id_type=NF90_DOUBLE)
+      ENDIF
 
       ! variable 3D
@@ -351,8 +360,10 @@
    !> @date September, 2015 - Initial version
    !>
+   !> @param[in] ld_sco
    !-------------------------------------------------------------------
-   SUBROUTINE grid_zgr_clean() 
+   SUBROUTINE grid_zgr_clean(ld_sco) 
       IMPLICIT NONE
       ! Argument      
+      LOGICAL    , INTENT(IN) :: ld_sco
 
       ! local variable
@@ -365,9 +376,11 @@
       CALL var_clean(tg_e3t_1d  )
 
-      CALL var_clean(tg_gsigt   )
-      CALL var_clean(tg_gsigw   )
-      CALL var_clean(tg_gsi3w   )
-      CALL var_clean(tg_esigt   )
-      CALL var_clean(tg_esigw   )
+      IF( ld_sco )THEN
+         CALL var_clean(tg_gsigt   )
+         CALL var_clean(tg_gsigw   )
+         CALL var_clean(tg_gsi3w   )
+         CALL var_clean(tg_esigt   )
+         CALL var_clean(tg_esigw   )
+      ENDIF
       
       CALL var_clean(tg_mbathy  )
@@ -382,8 +395,10 @@
       !CALL var_clean(tg_mikf    )
 
-      CALL var_clean(tg_hbatt   )
-      CALL var_clean(tg_hbatu   )
-      CALL var_clean(tg_hbatv   )
-      CALL var_clean(tg_hbatf   )
+      IF( ld_sco )THEN
+         CALL var_clean(tg_hbatt   )
+         CALL var_clean(tg_hbatu   )
+         CALL var_clean(tg_hbatv   )
+         CALL var_clean(tg_hbatf   )
+      ENDIF
 
       CALL var_clean(tg_gdept_0 )
@@ -487,18 +502,18 @@
 
       ! namgrd
-      CHARACTER(LEN=lc) :: cn_cfg      = ''
-      INTEGER(i4)       :: in_cfg      = 0
-      INTEGER(i4)       :: in_bench    = 0
-      LOGICAL           :: ln_zoom     = .FALSE.
+!      CHARACTER(LEN=lc) :: cn_cfg      = ''
+!      INTEGER(i4)       :: in_cfg      = 0
+!      INTEGER(i4)       :: in_bench    = 0
+!      LOGICAL           :: ln_zoom     = .FALSE.
       LOGICAL           :: ln_c1d      = .FALSE.
 
-      ! namzoom
-      CHARACTER(LEN=lc) :: cn_cfz      =''
-      INTEGER(i4)       :: in_izoom    = NF90_FILL_INT
-      INTEGER(i4)       :: in_jzoom    = NF90_FILL_INT
-      LOGICAL           :: ln_zoom_s   = .FALSE.
-      LOGICAL           :: ln_zoom_e   = .FALSE.
-      LOGICAL           :: ln_zoom_w   = .FALSE.
-      LOGICAL           :: ln_zoom_n   = .FALSE.
+!      ! namzoom
+!      CHARACTER(LEN=lc) :: cn_cfz      =''
+!      INTEGER(i4)       :: in_izoom    = NF90_FILL_INT
+!      INTEGER(i4)       :: in_jzoom    = NF90_FILL_INT
+!      LOGICAL           :: ln_zoom_s   = .FALSE.
+!      LOGICAL           :: ln_zoom_e   = .FALSE.
+!      LOGICAL           :: ln_zoom_w   = .FALSE.
+!      LOGICAL           :: ln_zoom_n   = .FALSE.
       !----------------------------------------------------------------
       NAMELIST /namzgr/ &
@@ -562,18 +577,18 @@
 
       NAMELIST/namgrd/  &  !< orca grid namelist
-      &  cn_cfg,        &  !< name of the configuration (orca)
-      &  in_cfg,        &  !< resolution of the configuration (2,1,025..)
-      &  in_bench,      &  !< benchmark parameter (in_mshhgr = 5 )
-      &  ln_zoom,       &  !< use zoom
+!      &  cn_cfg,        &  !< name of the configuration (orca)
+!      &  in_cfg,        &  !< resolution of the configuration (2,1,025..)
+!      &  in_bench,      &  !< benchmark parameter (in_mshhgr = 5 )
+!      &  ln_zoom,       &  !< use zoom
       &  ln_c1d            !< use configuration 1D
 
-      NAMELIST /namzoom/&
-      &  cn_cfz,        &  !< name of the zoom of configuration
-      &  in_izoom,      &  !< left bottom i-indices of the zoom in data domain indices
-      &  in_jzoom,      &  !< left bottom j-indices of the zoom in data domain indices
-      &  ln_zoom_s,     &  !< South zoom type flag
-      &  ln_zoom_e,     &  !< East  zoom type flag
-      &  ln_zoom_w,     &  !< West  zoom type flag
-      &  ln_zoom_n         !< North zoom type flag
+!      NAMELIST /namzoom/&
+!      &  cn_cfz,        &  !< name of the zoom of configuration
+!      &  in_izoom,      &  !< left bottom i-indices of the zoom in data domain indices
+!      &  in_jzoom,      &  !< left bottom j-indices of the zoom in data domain indices
+!      &  ln_zoom_s,     &  !< South zoom type flag
+!      &  ln_zoom_e,     &  !< East  zoom type flag
+!      &  ln_zoom_w,     &  !< West  zoom type flag
+!      &  ln_zoom_n         !< North zoom type flag
       !----------------------------------------------------------------
    !1-2 read namelist
@@ -604,5 +619,5 @@
       READ( il_fileid, NML = namwd   )
       READ( il_fileid, NML = namgrd  )
-      IF( ln_zoom   ) READ( il_fileid, NML = namzoom )
+!      IF( ln_zoom   ) READ( il_fileid, NML = namzoom )
 
       CLOSE( il_fileid, IOSTAT=il_status )
@@ -667,17 +682,17 @@
       grid_zgr_nam%d_wdld     = dn_wdld  
 
-      grid_zgr_nam%c_cfg      = TRIM(cn_cfg)
-      grid_zgr_nam%i_cfg      = in_cfg
-      grid_zgr_nam%i_bench    = in_bench
-      grid_zgr_nam%l_zoom     = ln_zoom
+!      grid_zgr_nam%c_cfg      = TRIM(cn_cfg)
+!      grid_zgr_nam%i_cfg      = in_cfg
+!      grid_zgr_nam%i_bench    = in_bench
+!      grid_zgr_nam%l_zoom     = ln_zoom
       grid_zgr_nam%l_c1d      = ln_c1d
 
-      grid_zgr_nam%c_cfz      = cn_cfz   
-      grid_zgr_nam%i_izoom    = in_izoom 
-      grid_zgr_nam%i_jzoom    = in_jzoom 
-      grid_zgr_nam%l_zoom_s   = ln_zoom_s
-      grid_zgr_nam%l_zoom_e   = ln_zoom_e
-      grid_zgr_nam%l_zoom_w   = ln_zoom_w
-      grid_zgr_nam%l_zoom_n   = ln_zoom_n
+!      grid_zgr_nam%c_cfz      = cn_cfz   
+!      grid_zgr_nam%i_izoom    = in_izoom 
+!      grid_zgr_nam%i_jzoom    = in_jzoom 
+!      grid_zgr_nam%l_zoom_s   = ln_zoom_s
+!      grid_zgr_nam%l_zoom_e   = ln_zoom_e
+!      grid_zgr_nam%l_zoom_w   = ln_zoom_w
+!      grid_zgr_nam%l_zoom_n   = ln_zoom_n
 
    ELSE
@@ -751,5 +766,5 @@
 
       ! Bathymetry fields (levels and meters)
-      CALL grid_zgr__bat( td_nam,jpi,jpj,td_bathy,td_risfdep )
+      CALL grid_zgr__bat( td_nam,td_bathy,td_risfdep ) !jpi,jpj,td_bathy,td_risfdep )
 
       ! 1D config.: same bathy value over the 3x3 domain
@@ -768,6 +783,6 @@
       ! ----------------------------------
 
-      ! correct mbathy in case of zoom subdomain
-      IF( td_nam%l_zoom )   CALL grid_zgr__bat_zoom( td_nam,jpi,jpj )
+!      ! correct mbathy in case of zoom subdomain
+!      IF( td_nam%l_zoom )   CALL grid_zgr__bat_zoom( td_nam,jpi,jpj )
 
       ! check bathymetry (mbathy) and suppress isolated ocean points
@@ -775,8 +790,8 @@
 
       ! deepest ocean level for t-, u- and v-points
-      CALL grid_zgr__bot_level( td_nam,jpi,jpj )
+      CALL grid_zgr__bot_level( ) !td_nam,jpi,jpj )
 
       ! shallowest ocean level for T-, U-, V- points
-      CALL grid_zgr__top_level( td_nam,jpi,jpj )
+      CALL grid_zgr__top_level( ) !td_nam,jpi,jpj )
 
       ! 1D config.: same mbathy value over the 3x3 domain
@@ -1038,23 +1053,25 @@
    !> @author J.Paul
    !> @date September, 2015 - rewrite from zgr_bat
+   !> @date October, 2016
+   !> - do not use anymore special case for ORCA grid.
    !>
    !> @param[in] td_nam
-   !> @param[in] jpi
-   !> @param[in] jpj
+   ! @param[in] jpi
+   ! @param[in] jpj
    !> @param[in] td_bathy
    !> @param[in] td_risfdep
    !-------------------------------------------------------------------
-   SUBROUTINE grid_zgr__bat( td_nam,jpi,jpj,td_bathy,td_risfdep ) 
+   SUBROUTINE grid_zgr__bat( td_nam,td_bathy,td_risfdep ) !jpi,jpj,td_bathy,td_risfdep ) 
       IMPLICIT NONE
       ! Argument      
       TYPE(TNAMZ), INTENT(IN   ) :: td_nam
-      INTEGER(i4), INTENT(IN   ) :: jpi
-      INTEGER(i4), INTENT(IN   ) :: jpj
+!      INTEGER(i4), INTENT(IN   ) :: jpi
+!      INTEGER(i4), INTENT(IN   ) :: jpj
       TYPE(TVAR) , INTENT(INOUT) :: td_bathy
       TYPE(TVAR) , INTENT(INOUT) :: td_risfdep
 
       ! local variable
-      INTEGER(i4) :: ii0, ii1
-      INTEGER(i4) :: ij0, ij1
+!      INTEGER(i4) :: ii0, ii1
+!      INTEGER(i4) :: ij0, ij1
 
       REAL(dp)                                  :: zhmin
@@ -1075,21 +1092,21 @@
          tg_misfdep%d_value(:,:,1,1)=1
          !                                                ! =====================
-         IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 2 ) THEN    ! ORCA R2 configuration
-            !                                             ! =====================
-            IF( td_nam%i_cla == 0 ) THEN
-               ii0 = 140   ;   ii1 = 140                  ! Gibraltar Strait open 
-               ij0 = 102   ;   ij1 = 102                  ! (Thomson, Ocean Modelling, 1995)
-               tg_mbathy%d_value(ii0:ii1,ij0:ij1,1,1) = 15
-               CALL logger_info('orca_r2: Gibraltar strait open at i='//&
-                  &  TRIM(fct_str(ii0))//' j='//TRIM(fct_str(ij0)) )
-               !
-               ii0 = 160   ;   ii1 = 160                  ! Bab el mandeb Strait open
-               ij0 = 88    ;   ij1 = 88                   ! (Thomson, Ocean Modelling, 1995)
-               tg_mbathy%d_value(ii0:ii1,ij0:ij1,1,1) = 12
-               CALL logger_info('orca_r2: Bab el Mandeb strait open at i='//&
-                  &  TRIM(fct_str(ii0))//' j='//TRIM(fct_str(ij0)) )
-            ENDIF
-            !
-         ENDIF
+!         IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 2 ) THEN    ! ORCA R2 configuration
+!            !                                             ! =====================
+!            IF( td_nam%i_cla == 0 ) THEN
+!               ii0 = 140   ;   ii1 = 140                  ! Gibraltar Strait open 
+!               ij0 = 102   ;   ij1 = 102                  ! (Thomson, Ocean Modelling, 1995)
+!               tg_mbathy%d_value(ii0:ii1,ij0:ij1,1,1) = 15
+!               CALL logger_info('orca_r2: Gibraltar strait open at i='//&
+!                  &  TRIM(fct_str(ii0))//' j='//TRIM(fct_str(ij0)) )
+!               !
+!               ii0 = 160   ;   ii1 = 160                  ! Bab el mandeb Strait open
+!               ij0 = 88    ;   ij1 = 88                   ! (Thomson, Ocean Modelling, 1995)
+!               tg_mbathy%d_value(ii0:ii1,ij0:ij1,1,1) = 12
+!               CALL logger_info('orca_r2: Bab el Mandeb strait open at i='//&
+!                  &  TRIM(fct_str(ii0))//' j='//TRIM(fct_str(ij0)) )
+!            ENDIF
+!            !
+!         ENDIF
 
       ENDIF
@@ -1115,21 +1132,21 @@
          END IF
          !       
-         IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 2 ) THEN    ! ORCA R2 configuration
-            !
-           IF( td_nam%i_cla == 0 ) THEN
-              ii0 = 140   ;   ii1 = 140                   ! Gibraltar Strait open 
-              ij0 = 102   ;   ij1 = 102                   ! (Thomson, Ocean Modelling, 1995)
-              td_bathy%d_value(ii0:ii1,ij0:ij1,1,1) = 284._dp 
-              CALL logger_info('orca_r2: Gibraltar strait open at i='//&
-                 &   TRIM(fct_str(ii0))//' j='//TRIM(fct_str(ij0)) )
-              !
-              ii0 = 160   ;   ii1 = 160                   ! Bab el mandeb Strait open
-              ij0 = 88    ;   ij1 = 88                    ! (Thomson, Ocean Modelling, 1995)
-              td_bathy%d_value(ii0:ii1,ij0:ij1,1,1) = 137._dp
-              CALL logger_info('orca_r2: Bab el Mandeb strait open at i='//&
-                 &   TRIM(fct_str(ii0))//' j='//TRIM(fct_str(ij0)) )
-           ENDIF
-           !
-        ENDIF
+!         IF( TRIM(td_nam%c_cfg) == "orca" .AND. td_nam%i_cfg == 2 ) THEN    ! ORCA R2 configuration
+!            !
+!           IF( td_nam%i_cla == 0 ) THEN
+!              ii0 = 140   ;   ii1 = 140                   ! Gibraltar Strait open 
+!              ij0 = 102   ;   ij1 = 102                   ! (Thomson, Ocean Modelling, 1995)
+!              td_bathy%d_value(ii0:ii1,ij0:ij1,1,1) = 284._dp 
+!              CALL logger_info('orca_r2: Gibraltar strait open at i='//&
+!                 &   TRIM(fct_str(ii0))//' j='//TRIM(fct_str(ij0)) )
+!              !
+!              ii0 = 160   ;   ii1 = 160                   ! Bab el mandeb Strait open
+!              ij0 = 88    ;   ij1 = 88                    ! (Thomson, Ocean Modelling, 1995)
+!              td_bathy%d_value(ii0:ii1,ij0:ij1,1,1) = 137._dp
+!              CALL logger_info('orca_r2: Bab el Mandeb strait open at i='//&
+!                 &   TRIM(fct_str(ii0))//' j='//TRIM(fct_str(ij0)) )
+!           ENDIF
+!           !
+!        ENDIF
          !
       ENDIF      
@@ -1201,68 +1218,68 @@
 
    END SUBROUTINE grid_zgr__zco
-   !-------------------------------------------------------------------
-   !> @brief This subroutine : 
-   !> - close zoom domain boundary if necessary
-   !> - suppress Med Sea from ORCA R2 and R05 arctic zoom
-   !> 
-   !> @author J.Paul
-   !> @date September, 2015 - Initial version
-   !>
-   !> @param[in] td_nam
-   !> @param[in] jpi
-   !> @param[in] jpj
-   !-------------------------------------------------------------------
-   SUBROUTINE grid_zgr__bat_zoom(td_nam,jpi,jpj) 
-      IMPLICIT NONE
-      ! Argument      
-      TYPE(TNAMZ), INTENT(IN   ) :: td_nam
-      INTEGER(i4), INTENT(IN   ) :: jpi
-      INTEGER(i4), INTENT(IN   ) :: jpj
-
-      ! local variable
-      INTEGER(i4) :: jpizoom
-      INTEGER(i4) :: jpjzoom
-
-      INTEGER(i4) :: ii0, ii1
-      INTEGER(i4) :: ij0, ij1
-      ! loop indices
-      !----------------------------------------------------------------
-
-      CALL logger_info('GRID ZGR BAT ZOOM : modify the level bathymetry for zoom domain')
-      CALL logger_info('~~~~~~~~~~~~')
-
-      jpizoom=td_nam%i_izoom
-      jpjzoom=td_nam%i_jzoom
-
-      ! Forced closed boundary if required
-      IF( td_nam%l_zoom_s ) tg_mbathy%d_value(    :         ,    jpjzoom  ,1,1) = 0
-      IF( td_nam%l_zoom_w ) tg_mbathy%d_value(     jpizoom  ,   :         ,1,1) = 0
-      IF( td_nam%l_zoom_e ) tg_mbathy%d_value( jpi+jpizoom-1,   :         ,1,1) = 0
-      IF( td_nam%l_zoom_n ) tg_mbathy%d_value(    :         ,jpj+jpjzoom-1,1,1) = 0
-
-      ! Configuration specific domain modifications
-      ! (here, ORCA arctic configuration: suppress Med Sea)
-      IF( TRIM(td_nam%c_cfg) == "orca" .AND. &
-        & TRIM(td_nam%c_cfz) == "arctic" ) THEN
-         SELECT CASE ( td_nam%i_cfg )
-         !                                        ! =======================
-         CASE ( 2 )                               !  ORCA_R2 configuration
-            !                                     ! =======================
-            CALL logger_info('ORCA R2 arctic zoom: suppress the Med Sea')
-            ii0 = 141   ;   ii1 = 162      ! Sea box i,j indices
-            ij0 =  98   ;   ij1 = 110
-            !                                     ! =======================
-         CASE ( 05 )                              !  ORCA_R05 configuration
-            !                                     ! =======================
-            CALL logger_info('ORCA R05 arctic zoom: suppress the Med Sea')
-            ii0 = 563   ;   ii1 = 642      ! zero over the Med Sea boxe
-            ij0 = 314   ;   ij1 = 370 
-         END SELECT
-         !
-         tg_mbathy%d_value( ii0:ii1, ij0:ij1, 1, 1) = 0   ! zero over the Med Sea boxe
-         !
-      ENDIF
-
-   END SUBROUTINE grid_zgr__bat_zoom
+!   !-------------------------------------------------------------------
+!   !> @brief This subroutine : 
+!   !> - close zoom domain boundary if necessary
+!   !> - suppress Med Sea from ORCA R2 and R05 arctic zoom
+!   !> 
+!   !> @author J.Paul
+!   !> @date September, 2015 - Initial version
+!   !>
+!   !> @param[in] td_nam
+!   !> @param[in] jpi
+!   !> @param[in] jpj
+!   !-------------------------------------------------------------------
+!   SUBROUTINE grid_zgr__bat_zoom(td_nam,jpi,jpj) 
+!      IMPLICIT NONE
+!      ! Argument      
+!      TYPE(TNAMZ), INTENT(IN   ) :: td_nam
+!      INTEGER(i4), INTENT(IN   ) :: jpi
+!      INTEGER(i4), INTENT(IN   ) :: jpj
+!
+!      ! local variable
+!      INTEGER(i4) :: jpizoom
+!      INTEGER(i4) :: jpjzoom
+!
+!      INTEGER(i4) :: ii0, ii1
+!      INTEGER(i4) :: ij0, ij1
+!      ! loop indices
+!      !----------------------------------------------------------------
+!
+!      CALL logger_info('GRID ZGR BAT ZOOM : modify the level bathymetry for zoom domain')
+!      CALL logger_info('~~~~~~~~~~~~')
+!
+!      jpizoom=td_nam%i_izoom
+!      jpjzoom=td_nam%i_jzoom
+!
+!      ! Forced closed boundary if required
+!      IF( td_nam%l_zoom_s ) tg_mbathy%d_value(    :         ,    jpjzoom  ,1,1) = 0
+!      IF( td_nam%l_zoom_w ) tg_mbathy%d_value(     jpizoom  ,   :         ,1,1) = 0
+!      IF( td_nam%l_zoom_e ) tg_mbathy%d_value( jpi+jpizoom-1,   :         ,1,1) = 0
+!      IF( td_nam%l_zoom_n ) tg_mbathy%d_value(    :         ,jpj+jpjzoom-1,1,1) = 0
+!
+!      ! Configuration specific domain modifications
+!      ! (here, ORCA arctic configuration: suppress Med Sea)
+!      IF( TRIM(td_nam%c_cfg) == "orca" .AND. &
+!        & TRIM(td_nam%c_cfz) == "arctic" ) THEN
+!         SELECT CASE ( td_nam%i_cfg )
+!         !                                        ! =======================
+!         CASE ( 2 )                               !  ORCA_R2 configuration
+!            !                                     ! =======================
+!            CALL logger_info('ORCA R2 arctic zoom: suppress the Med Sea')
+!            ii0 = 141   ;   ii1 = 162      ! Sea box i,j indices
+!            ij0 =  98   ;   ij1 = 110
+!            !                                     ! =======================
+!         CASE ( 05 )                              !  ORCA_R05 configuration
+!            !                                     ! =======================
+!            CALL logger_info('ORCA R05 arctic zoom: suppress the Med Sea')
+!            ii0 = 563   ;   ii1 = 642      ! zero over the Med Sea boxe
+!            ij0 = 314   ;   ij1 = 370 
+!         END SELECT
+!         !
+!         tg_mbathy%d_value( ii0:ii1, ij0:ij1, 1, 1) = 0   ! zero over the Med Sea boxe
+!         !
+!      ENDIF
+!
+!   END SUBROUTINE grid_zgr__bat_zoom
    !-------------------------------------------------------------------
    !> @brief This subroutine check the bathymetry in levels
@@ -1420,14 +1437,14 @@
    !> @date September, 2015 - rewrite from zgr_bot_level
    !>
-   !> @param[in] td_nam
-   !> @param[in] jpi
-   !> @param[in] jpj
+   ! @param[in] td_nam
+   ! @param[in] jpi
+   ! @param[in] jpj
    !-------------------------------------------------------------------
-   SUBROUTINE grid_zgr__bot_level(td_nam,jpi,jpj) 
+   SUBROUTINE grid_zgr__bot_level( )!td_nam,jpi,jpj) 
       IMPLICIT NONE
       ! Argument      
-      TYPE(TNAMZ), INTENT(IN   ) :: td_nam
-      INTEGER(i4), INTENT(IN   ) :: jpi
-      INTEGER(i4), INTENT(IN   ) :: jpj
+!      TYPE(TNAMZ), INTENT(IN   ) :: td_nam
+!      INTEGER(i4), INTENT(IN   ) :: jpi
+!      INTEGER(i4), INTENT(IN   ) :: jpj
 
       ! local variable
@@ -1474,14 +1491,14 @@
    !> @date September, 2015 - rewrite from zgr_top_level
    !>
-   !> @param[in] td_nam
-   !> @param[in] jpi
-   !> @param[in] jpj
+   ! @param[in] td_nam
+   ! @param[in] jpi
+   ! @param[in] jpj
    !-------------------------------------------------------------------
-   SUBROUTINE grid_zgr__top_level(td_nam,jpi,jpj) 
+   SUBROUTINE grid_zgr__top_level( )!td_nam,jpi,jpj) 
       IMPLICIT NONE
       ! Argument      
-      TYPE(TNAMZ), INTENT(IN   ) :: td_nam
-      INTEGER(i4), INTENT(IN   ) :: jpi
-      INTEGER(i4), INTENT(IN   ) :: jpj
+!      TYPE(TNAMZ), INTENT(IN   ) :: td_nam
+!      INTEGER(i4), INTENT(IN   ) :: jpi
+!      INTEGER(i4), INTENT(IN   ) :: jpj
       ! local variable
 
@@ -2995,4 +3012,5 @@
       INTEGER(i4), INTENT(IN) :: jpi
       INTEGER(i4), INTENT(IN) :: jpj
+!      LOGICAL    , INTENT(IN) :: ld_domcfg
 
       ! local variable
@@ -3446,5 +3464,5 @@
          CALL grid_zgr__sco_s_tanh( td_nam,jpi,jpj,jpk, &
          &                          dl_scosrf, &
-         &                          dl_hift, dl_hifu, dl_hifv, dl_hiff )
+         &                          dl_hift, dl_hifu, dl_hifv)!, dl_hiff )
       ENDIF
 
@@ -3769,10 +3787,13 @@
                tg_e3v_0%d_value(ji,jj,jk,1) = ( ( tg_hbatv%d_value(ji,jj,1,1) - td_nam%d_hc )*z_esigtv3(ji,jj,jk) &
                   &                            + td_nam%d_hc / REAL(jpk-1,dp) )
-               !tg_e3f_0%d_value(ji,jj,jk,1) = ( (tg_hbatf%d_value(ji,jj,1,1)-td_nam%d_hc)*z_esigtf3(ji,jj,jk) + td_nam%d_hc/REAL(jpk-1,dp) )
+               !tg_e3f_0%d_value(ji,jj,jk,1) = ( ( tg_hbatf%d_value(ji,jj,1,1) - td_nam%d_hc ) *z_esigtf3(ji,jj,jk) &
+               !   &                            + td_nam%d_hc/REAL(jpk-1,dp) )
                !
                tg_e3w_0%d_value (ji,jj,jk,1)= ( ( tg_hbatt%d_value(ji,jj,1,1) - td_nam%d_hc )*z_esigw3 (ji,jj,jk) &
                   &                            + td_nam%d_hc / REAL(jpk-1,dp) )
-               !tg_e3uw_0%d_value(ji,jj,jk,1)= ( (tg_hbatu%d_value(ji,jj,1,1)-td_nam%d_hc)*z_esigwu3(ji,jj,jk) + td_nam%d_hc/REAL(jpk-1,dp) )
-               !tg_e3vw_0%d_value(ji,jj,jk,1)= ( (tg_hbatv%d_value(ji,jj,1,1)-td_nam%d_hc)*z_esigwv3(ji,jj,jk) + td_nam%d_hc/REAL(jpk-1,dp) )
+               !tg_e3uw_0%d_value(ji,jj,jk,1)= ( ( tg_hbatu%d_value(ji,jj,1,1) - td_nam%d_hc)*z_esigwu3(ji,jj,jk) &
+               !  &                             + td_nam%d_hc/REAL(jpk-1,dp) )
+               !tg_e3vw_0%d_value(ji,jj,jk,1)= ( ( tg_hbatv%d_value(ji,jj,1,1) - td_nam%d_hc)*z_esigwv3(ji,jj,jk) &
+               !  &                             + td_nam%d_hc/REAL(jpk-1,dp) )
             END DO
         END DO
@@ -4043,9 +4064,9 @@
    !> @param[in] dd_hifu 
    !> @param[in] dd_hifv 
-   !> @param[in] dd_hiff 
+   ! @param[in] dd_hiff 
    !-------------------------------------------------------------------
    SUBROUTINE grid_zgr__sco_s_tanh( td_nam,jpi,jpj,jpk, &
          &                          dd_scosrf, &
-         &                          dd_hift, dd_hifu, dd_hifv, dd_hiff ) 
+         &                          dd_hift, dd_hifu, dd_hifv)!, dd_hiff ) 
       IMPLICIT NONE
       ! Argument      
@@ -4058,5 +4079,5 @@
       REAL(dp)   , DIMENSION(:,:), INTENT(IN   ) :: dd_hifu
       REAL(dp)   , DIMENSION(:,:), INTENT(IN   ) :: dd_hifv
-      REAL(dp)   , DIMENSION(:,:), INTENT(IN   ) :: dd_hiff
+!      REAL(dp)   , DIMENSION(:,:), INTENT(IN   ) :: dd_hiff
 
       ! local variable
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/iom.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/iom.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/iom.f90	(revision 7153)
@@ -157,6 +157,4 @@
    !> @author J.Paul
    !> @date November, 2013 - Initial Version
-   !> @date October, 2016
-   !> - open cdf4 file as cdf
    !>
    !> @param[inout] td_file file structure
@@ -174,5 +172,5 @@
       SELECT CASE(TRIM(ADJUSTL(fct_lower(td_file%c_type))))
 
-         CASE('cdf','cdf4')
+         CASE('cdf')
             CALL iom_cdf_open(td_file)
          CASE('dimg')
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/iom_cdf.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/iom_cdf.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/iom_cdf.f90	(revision 7153)
@@ -316,4 +316,6 @@
    !> @author J.Paul
    !> @date November, 2013 - Initial Version
+   !> @date October, 2016
+   !> - define cdf4 as cdf.
    !
    !> @param[inout] td_file   file structure
@@ -340,5 +342,6 @@
             td_file%c_type='cdf'
          CASE(nf90_format_netcdf4, nf90_format_netcdf4_classic)
-            td_file%c_type='cdf4'
+            !td_file%c_type='cdf4'
+            td_file%c_type='cdf'
       END SELECT
 
@@ -351,8 +354,10 @@
    !> reorder dimension to ('x', 'y', 'z', 't').
    !> The dimension structure inside file structure is then completed.
-   !
-   !> @author J.Paul
-   !> @date November, 2013 - Initial Version
-   !
+   !>
+   !> @author J.Paul
+   !> @date November, 2013 - Initial Version
+   !> @date October, 2016
+   !> - check unknown dimension
+   !>
    !> @param[inout] td_file   file structure
    !-------------------------------------------------------------------
@@ -375,12 +380,14 @@
 
       IF( td_file%i_ndim > 0 )THEN
+
          ii=1
          DO ji = 1, td_file%i_ndim
             ! read dimension information
             tl_dim=iom_cdf_read_dim( td_file, ji)
-            IF( .NOT. dim_is_dummy(tl_dim) )THEN
+            ! sname == 'u' if dimension is unknown (not to be used)
+            IF( TRIM(tl_dim%c_sname) /= 'u' )THEN
                IF( ii > ip_maxdim )THEN
                   CALL logger_fatal("IOM CDF OPEN: too much dimension "//&
-                  & "to be read. you should remove dummy dimension using "//&
+                  & "to be read. you could choose dimension to be used. see "//&
                   & " configuration file")
                ENDIF
@@ -395,6 +402,6 @@
             &  " IOM CDF GET FILE DIM: there is no unlimited dimension in file "//&
             &  TRIM(td_file%c_name))
-         ELSE
-            td_file%t_dim( td_file%i_uldid )%l_uld=.TRUE.
+         !ELSE
+         !   td_file%t_dim( td_file%i_uldid )%l_uld=.TRUE.
          ENDIF
 
@@ -466,5 +473,5 @@
    !> The variable structure inside file structure is then completed.
    !> @note variable value are not read !
-   !
+   !>
    !> @author J.Paul
    !> @date November, 2013 - Initial Version
@@ -473,5 +480,8 @@
    !> @date January, 2016
    !> - increment n3d for 4D variable
-   !
+   !> @date October, 2016
+   !> - check if variable to be used (variable's dimension allowed and variable
+   !> not "dummy")
+   !>
    !> @param[inout] td_file   file structure
    !-------------------------------------------------------------------
@@ -501,15 +511,11 @@
          il_nvar=td_file%i_nvar
          ALLOCATE(tl_var(il_nvar))
-         ii=0
          DO ji = 1, il_nvar
            ! read variable information
            tl_var(ji)=iom_cdf__read_var_meta( td_file, ji) 
-           IF( .NOT. var_is_dummy(tl_var(ji)) )THEN
-              ii=ii+1
-           ENDIF
          ENDDO
 
          ! update number of variable used
-         td_file%i_nvar=ii
+         td_file%i_nvar=COUNT(tl_var(:)%l_use)
 
          ALLOCATE(td_file%t_var(td_file%i_nvar))
@@ -517,5 +523,5 @@
          ii=0
          DO ji = 1, il_nvar
-            IF( .NOT. var_is_dummy(tl_var(ji)) )THEN
+            IF( tl_var(ji)%l_use )THEN
                ii=ii+1
                td_file%t_var(ii)=var_copy(tl_var(ji))
@@ -552,4 +558,11 @@
                      td_file%i_timeid=ji
                   ELSE
+                     IF( td_file%i_timeid /= ji )THEN
+                        CALL logger_warn("IOM CDF GET FILE VAR: find more "//&
+                        &                 "than one time variable in file "//&
+                        &                 TRIM(td_file%c_name)//". see "//&
+                        &                 "dummy.cfg configuration file to"//&
+                        &                 " not used dummy variables.")
+                     ENDIF
                      il_attid=0
                      IF( ASSOCIATED(td_file%t_var(ii)%t_att) )THEN
@@ -558,8 +571,4 @@
                      IF( il_attid /= 0 )THEN
                         td_file%i_timeid=ji
-                     !ELSE
-                     !   CALL logger_error("IOM CDF GET FILE VAR: find more "//&
-                     !   &                 "than one time variable in file "//&
-                     !   &                 TRIM(td_file%c_name) )
                      ENDIF
                   ENDIF
@@ -1413,4 +1422,16 @@
          ENDDO
 
+         !! check if variable is dummy
+         IF( var_is_dummy(iom_cdf__read_var_meta) )THEN
+            iom_cdf__read_var_meta%l_use=.FALSE.
+         ENDIF
+
+         !! check if all dimensions are allowed
+         DO ji=1,il_ndim
+            IF( ALL(td_file%t_dim(:)%i_id /= il_dimid(ji)) )THEN
+               iom_cdf__read_var_meta%l_use=.FALSE.
+            ENDIF
+         ENDDO
+
          ! clean
          CALL dim_clean(tl_dim(:))
@@ -1461,5 +1482,6 @@
 
       ! local variable
-      INTEGER(i4), DIMENSION(ip_maxdim) :: il_xyzt2
+      INTEGER(i4), DIMENSION(1) :: il_ind
+      INTEGER(i4) :: il_xyzt2
 
       TYPE(TDIM) , DIMENSION(ip_maxdim) :: tl_dim
@@ -1484,9 +1506,8 @@
       ELSE IF( id_ndim > 0 )THEN
 
-
          ii=1
          DO ji = 1, id_ndim
 
-            !!! check no dummy dimension to be used
+            ! check if dimension to be used, is allowed
             IF( ANY(td_file%t_dim(:)%i_id == id_dimid(ji)) )THEN
                IF( ii > ip_maxdim )THEN
@@ -1499,10 +1520,12 @@
                   &  "dimension "//TRIM(fct_str(ji)) )
 
-               il_xyzt2(ii)=td_file%t_dim(id_dimid(ji))%i_xyzt2
+               il_ind(:)= MINLOC(td_file%t_dim(:)%i_id, &
+                        &        td_file%t_dim(:)%i_id==id_dimid(ji) )
+               il_xyzt2 = td_file%t_dim(il_ind(1))%i_xyzt2
 
                ! read dimension information
-               tl_dim(ii) = dim_init( td_file%t_dim(il_xyzt2(ii))%c_name, &
-               &                      td_file%t_dim(il_xyzt2(ii))%i_len )
-            
+               tl_dim(ii) = dim_init( td_file%t_dim(il_xyzt2)%c_name, &
+               &                      td_file%t_dim(il_xyzt2)%i_len )
+
                ii=ii+1
             ELSE
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/merge_bathy.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/merge_bathy.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/merge_bathy.f90	(revision 7153)
@@ -51,4 +51,6 @@
 !>       - cn_varcfg : variable configuration file 
 !> (see ./SIREN/cfg/variable.cfg)
+!>       - cn_dimcfg : dimension configuration file. define dimension allowed to
+!> be used (see ./SIREN/cfg/dimension.cfg).
 !>       - cn_dumcfg : useless (dummy) configuration file, for useless 
 !> dimension or variable (see ./SIREN/cfg/dummy.cfg).
@@ -133,4 +135,5 @@
 !> @date October, 2016
 !> - allow to choose the number of boundary point with coarse grid value.
+!> - dimension to be used select from configuration file
 !>
 !> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -211,6 +214,7 @@
 
    ! namcfg
-   CHARACTER(LEN=lc)                       :: cn_varcfg = 'variable.cfg' 
-   CHARACTER(LEN=lc)                       :: cn_dumcfg = 'dummy.cfg'
+   CHARACTER(LEN=lc)                       :: cn_varcfg = './cfg/variable.cfg' 
+   CHARACTER(LEN=lc)                       :: cn_dimcfg = './cfg/dimension.cfg'
+   CHARACTER(LEN=lc)                       :: cn_dumcfg = './cfg/dummy.cfg'
 
    ! namcrs
@@ -252,4 +256,5 @@
    NAMELIST /namcfg/ &  !< config namelist
    &  cn_varcfg, &       !< variable configuration file
+   &  cn_dimcfg, &       !< dimension configuration file
    &  cn_dumcfg          !< dummy configuration file
 
@@ -324,4 +329,7 @@
       CALL var_def_extra(TRIM(cn_varcfg))
 
+      ! get dimension allowed
+      CALL dim_def_extra(TRIM(cn_dimcfg))
+
       ! get dummy variable
       CALL var_get_dummy(TRIM(cn_dumcfg))
@@ -626,4 +634,5 @@
    DEALLOCATE(dl_weight)
    CALL boundary_clean(tl_bdy(:))
+   CALL var_clean_extra()
 
    ! close log file
@@ -850,5 +859,5 @@
                il_width=td_bdy%t_seg(jl)%i_width-id_ncrs
                ! compute "distance"
-               dl_tmp1d(:)=(/(ji,ji=il_width-1,1,-1),(0,ji=1,id_ncrs)/)
+               dl_tmp1d(:)=(/(ji,ji=il_width,1,-1),(0,ji=1,id_ncrs)/)
 
                ! compute weight on segment
@@ -869,5 +878,5 @@
                il_width=td_bdy%t_seg(jl)%i_width-id_ncrs
                ! compute "distance"
-               dl_tmp1d(:)=(/(0,ji=1,id_ncrs),(ji,ji=1,il_width-1)/)
+               dl_tmp1d(:)=(/(0,ji=1,id_ncrs),(ji,ji=1,il_width)/)
 
                ! compute weight on segment
@@ -888,5 +897,5 @@
                il_width=td_bdy%t_seg(jl)%i_width-id_ncrs
                ! compute "distance"
-               dl_tmp1d(:)=(/(ji,ji=il_width-1,1,-1),(0,ji=1,id_ncrs)/)
+               dl_tmp1d(:)=(/(ji,ji=il_width,1,-1),(0,ji=1,id_ncrs)/)
 
                ! compute weight on segment
@@ -907,5 +916,5 @@
                il_width=td_bdy%t_seg(jl)%i_width-id_ncrs
                ! compute "distance"
-               dl_tmp1d(:)=(/(0,ji=1,id_ncrs),(ji,ji=1,il_width-1)/)
+               dl_tmp1d(:)=(/(0,ji=1,id_ncrs),(ji,ji=1,il_width)/)
 
                ! compute weight on segment
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/variable.f90
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/variable.f90	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/src/variable.f90	(revision 7153)
@@ -34,5 +34,5 @@
 !>    Note:<br/>
 !>       - others optionals arguments could be added, see var_init.
-!>       - to put variable 0D, use td_dim with all dimension unused
+!>       - to put scalar variable (OD), use td_dim with all dimension unused
 !> (td_dim(:)%l_use=.FALSE.)
 !>    
@@ -267,4 +267,9 @@
 !>    - cd_varinfo is variable information from namelist
 !>
+!>    to clean global array of variable structure:<br/>
+!>@code
+!>    CALL var_clean_extra( )
+!>@endcode
+!>
 !>    to check variable dimension expected, as defined in file 'variable.cfg':<br/>
 !>@code
@@ -287,5 +292,8 @@
 !> @date Spetember, 2015
 !> - manage useless (dummy) variable
-!
+!> @date October, 2016
+!> - add subroutine to clean global array of extra information.
+!> - define logical for variable to be used
+!>
 !> @note Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
 !----------------------------------------------------------------------
@@ -337,4 +345,5 @@
    PUBLIC :: var_def_extra     !< read variable configuration file, and save extra information.
    PUBLIC :: var_chg_extra     !< read variable namelist information, and modify extra information.
+   PUBLIC :: var_clean_extra   !< clean gloabl array of extra information.
    PUBLIC :: var_check_dim     !< check variable dimension expected
    PUBLIC :: var_get_dummy     !< fill dummy variable array
@@ -416,5 +425,6 @@
       TYPE(TDIM), DIMENSION(ip_maxdim)  :: t_dim           !< variable dimension
  
-      LOGICAL           :: l_file = .FALSE.  !< variable read in a file
+      LOGICAL           :: l_file = .FALSE. !< variable read in a file
+      LOGICAL           :: l_use  = .TRUE.  !< variable to be used
 
       ! highlight some attributes
@@ -451,5 +461,5 @@
                                                         !< fill when running var_def_extra() 
 
-   CHARACTER(LEN=lc), DIMENSION(ip_maxdum), SAVE :: cm_dumvar !< dummy variable
+   CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg), SAVE :: cm_dumvar !< dummy variable
 
    INTERFACE var_init
@@ -593,4 +603,7 @@
          CALL att_clean(tl_att)
       ENDIF
+
+      var__copy_unit%l_file     = td_var%l_file
+      var__copy_unit%l_use      = td_var%l_use
 
       ! copy highlight attribute
@@ -6669,4 +6682,5 @@
       ! check if variable is in array of variable structure
       DO ji=1,il_size
+
          ! look for variable name
          IF( fct_lower(td_var(ji)%c_name) == fct_lower(cd_name) )THEN
@@ -6683,4 +6697,5 @@
 
          ELSE IF( PRESENT(cd_stdname) )THEN 
+
             IF( fct_lower(td_var(ji)%c_stdname) == fct_lower(cd_stdname) .AND.&
             &    TRIM(fct_lower(td_var(ji)%c_stdname)) /= '' )THEN
@@ -6690,10 +6705,21 @@
             ENDIF
 
+         ENDIF
+
          ! look for variable longname
-         ELSE IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_name) .AND.&
-         &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN
+         IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_name) .AND.&
+         &   TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN
             
             var_get_index=ji
             EXIT
+
+         ELSE IF( PRESENT(cd_stdname) )THEN
+
+            IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_stdname) .AND.&
+            &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN
+            
+               var_get_index=ji
+               EXIT
+            ENDIF
 
          ENDIF
@@ -6734,4 +6760,5 @@
       ! check if variable is in array of variable structure
       DO ji=1,il_size
+      
          ! look for variable name
          IF( fct_lower(td_var(ji)%c_name) == fct_lower(cd_name) )THEN
@@ -6747,12 +6774,6 @@
             EXIT
 
-         ! look for variable long name
-         ELSE IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_name) .AND.&
-         &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN
-            
-            var_get_id=td_var(ji)%i_id
-            EXIT
-
-         ELSE IF( PRESENT(cd_stdname) )THEN 
+         ELSE IF( PRESENT(cd_stdname) )THEN
+
             IF( fct_lower(td_var(ji)%c_stdname) == fct_lower(cd_stdname) .AND.&
             &    TRIM(fct_lower(td_var(ji)%c_stdname)) /= '' )THEN
@@ -6761,4 +6782,23 @@
                EXIT
             ENDIF
+
+         ENDIF
+
+         ! look for variable long name
+         IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_name) .AND.&
+         &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN
+            
+            var_get_id=td_var(ji)%i_id
+            EXIT
+
+         ELSE IF( PRESENT(cd_stdname) )THEN 
+
+            IF( fct_lower(td_var(ji)%c_longname) == fct_lower(cd_stdname) .AND.&
+            &    TRIM(fct_lower(td_var(ji)%c_longname)) /= '' )THEN
+            
+               var_get_id=td_var(ji)%i_id
+               EXIT
+            ENDIF
+
          ENDIF
 
@@ -7176,4 +7216,21 @@
    !-------------------------------------------------------------------
    !> @brief
+   !> This subroutine clean global array of variable structure 
+   !> with extra information: tg_varextra.
+   !> 
+   !> @author J.Paul
+   !> @date October, 2016 - Initial Version
+   !-------------------------------------------------------------------
+   SUBROUTINE var_clean_extra( )
+      IMPLICIT NONE
+      ! Argument
+      !----------------------------------------------------------------
+
+      CALL var_clean(tg_varextra(:))
+      DEALLOCATE(tg_varextra)
+
+   END SUBROUTINE var_clean_extra
+   !-------------------------------------------------------------------
+   !> @brief
    !> This subroutine read matrix value from character string in namelist
    !> and fill variable strucutre value.
@@ -8463,7 +8520,7 @@
       ! loop indices
       ! namelist
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumvar
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumdim
-      CHARACTER(LEN=lc), DIMENSION(ip_maxdum) :: cn_dumatt
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumvar
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumdim
+      CHARACTER(LEN=lc), DIMENSION(ip_maxdumcfg) :: cn_dumatt
 
       !----------------------------------------------------------------
@@ -8526,5 +8583,5 @@
 
       var_is_dummy=.FALSE.
-      DO ji=1,ip_maxdum
+      DO ji=1,ip_maxdumcfg
          IF( fct_lower(td_var%c_name) == fct_lower(cm_dumvar(ji)) )THEN
             var_is_dummy=.TRUE.
Index: branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/templates/create_meshmask.nam
===================================================================
--- branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/templates/create_meshmask.nam	(revision 7148)
+++ branches/2016/dev_r6999_CONFIGMAN_1/NEMOGCM/TOOLS/SIREN/templates/create_meshmask.nam	(revision 7153)
@@ -16,4 +16,5 @@
    in_perio =   !< NEMO periodicity
    ln_closea=
+   ln_c1d=
 /
 
@@ -81,12 +82,4 @@
 /
 
-&namcla
-   in_cla =
-/
-
-&namlbc
-   rn_shlat =
-/
-
 &namwd            !< wetting and drying
   dn_wdmin1 =
@@ -96,20 +89,7 @@
 
 &namgrd
-   cn_cfg   =
    in_cfg   =
-   in_bench =
-   ln_zoom  =
+   ln_bench =
    ln_c1d   =
-/
-
-
-&namzoom
-   cn_cfz   =
-   in_izoom =
-   in_jzoom =
-   ln_zoom_s=
-   ln_zoom_e=
-   ln_zoom_w=
-   ln_zoom_n=
 /
 
