Index: trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 3711)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 3720)
@@ -67,9 +67,9 @@
       !!              - 1D configuration, move Coriolis, u and v at T-point
       !!----------------------------------------------------------------------
-      INTEGER ::   jk                ! dummy loop argument
-      INTEGER ::   iconf = 0         ! temporary integers
-      !!----------------------------------------------------------------------
-      !
-      IF( nn_timing == 1 )  CALL timing_start('dom_init')
+      INTEGER ::   jk          ! dummy loop argument
+      INTEGER ::   iconf = 0   ! local integers
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )   CALL timing_start('dom_init')
       !
       IF(lwp) THEN
@@ -86,12 +86,8 @@
       IF( lk_vvl         )   CALL dom_vvl      ! Vertical variable mesh
       !
-      IF( lk_c1d ) THEN                        ! 1D configuration 
-         CALL cor_c1d                          ! Coriolis set at T-point
-         umask(:,:,:) = tmask(:,:,:)           ! U, V moved at T-point
-         vmask(:,:,:) = tmask(:,:,:)
-      END IF
-      !
-      hu(:,:) = 0.e0                           ! Ocean depth at U- and V-points
-      hv(:,:) = 0.e0
+      IF( lk_c1d         )   CALL cor_c1d      ! 1D configuration: Coriolis set at T-point
+      !
+      hu(:,:) = 0._wp                          ! Ocean depth at U- and V-points
+      hv(:,:) = 0._wp
       DO jk = 1, jpk
          hu(:,:) = hu(:,:) + fse3u(:,:,jk) * umask(:,:,jk)
@@ -99,6 +95,6 @@
       END DO
       !                                        ! Inverse of the local depth
-      hur(:,:) = 1. / ( hu(:,:) + 1.e0 - umask(:,:,1) ) * umask(:,:,1)
-      hvr(:,:) = 1. / ( hv(:,:) + 1.e0 - vmask(:,:,1) ) * vmask(:,:,1)
+      hur(:,:) = 1._wp / ( hu(:,:) + 1._wp - umask(:,:,1) ) * umask(:,:,1)
+      hvr(:,:) = 1._wp / ( hv(:,:) + 1._wp - vmask(:,:,1) ) * vmask(:,:,1)
 
                              CALL dom_stp      ! time step
@@ -106,5 +102,5 @@
       IF( .NOT.ln_rstart )   CALL dom_ctl      ! Domain control
       !
-      IF( nn_timing == 1 )  CALL timing_stop('dom_init')
+      IF( nn_timing == 1 )   CALL timing_stop('dom_init')
       !
    END SUBROUTINE dom_init
@@ -292,19 +288,19 @@
          CALL mpp_maxloc( e2t(:,:), tmask(:,:,1), ze2max, iima2,ijma2 )
       ELSE
-         ze1min = MINVAL( e1t(:,:), mask = tmask(:,:,1) == 1.e0 )    
-         ze2min = MINVAL( e2t(:,:), mask = tmask(:,:,1) == 1.e0 )    
-         ze1max = MAXVAL( e1t(:,:), mask = tmask(:,:,1) == 1.e0 )    
-         ze2max = MAXVAL( e2t(:,:), mask = tmask(:,:,1) == 1.e0 )    
-
-         iloc  = MINLOC( e1t(:,:), mask = tmask(:,:,1) == 1.e0 )
+         ze1min = MINVAL( e1t(:,:), mask = tmask(:,:,1) == 1._wp )    
+         ze2min = MINVAL( e2t(:,:), mask = tmask(:,:,1) == 1._wp )    
+         ze1max = MAXVAL( e1t(:,:), mask = tmask(:,:,1) == 1._wp )    
+         ze2max = MAXVAL( e2t(:,:), mask = tmask(:,:,1) == 1._wp )    
+
+         iloc  = MINLOC( e1t(:,:), mask = tmask(:,:,1) == 1._wp )
          iimi1 = iloc(1) + nimpp - 1
          ijmi1 = iloc(2) + njmpp - 1
-         iloc  = MINLOC( e2t(:,:), mask = tmask(:,:,1) == 1.e0 )
+         iloc  = MINLOC( e2t(:,:), mask = tmask(:,:,1) == 1._wp )
          iimi2 = iloc(1) + nimpp - 1
          ijmi2 = iloc(2) + njmpp - 1
-         iloc  = MAXLOC( e1t(:,:), mask = tmask(:,:,1) == 1.e0 )
+         iloc  = MAXLOC( e1t(:,:), mask = tmask(:,:,1) == 1._wp )
          iima1 = iloc(1) + nimpp - 1
          ijma1 = iloc(2) + njmpp - 1
-         iloc  = MAXLOC( e2t(:,:), mask = tmask(:,:,1) == 1.e0 )
+         iloc  = MAXLOC( e2t(:,:), mask = tmask(:,:,1) == 1._wp )
          iima2 = iloc(1) + nimpp - 1
          ijma2 = iloc(2) + njmpp - 1
Index: trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 3711)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 3720)
@@ -15,5 +15,6 @@
    !!            3.2  ! 2009-07  (R. Benshila) Suppression of rigid-lid option
    !!            3.3  ! 2010-11  (G. Madec) add mbk. arrays associated to the deepest ocean level
-   !!----------------------------------------------------------------------
+   !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  modify C1D case  
+  !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
@@ -38,6 +39,6 @@
    USE lbclnk            ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp           ! distributed memory computing library
-   USE wrk_nemo        ! Memory allocation
-   USE timing          ! Timing
+   USE wrk_nemo          ! Memory allocation
+   USE timing            ! Timing
 
    IMPLICIT NONE
@@ -71,6 +72,6 @@
       !!                ***  ROUTINE dom_zgr  ***
       !!                   
-      !! ** Purpose :  set the depth of model levels and the resulting 
-      !!      vertical scale factors.
+      !! ** Purpose :   set the depth of model levels and the resulting 
+      !!              vertical scale factors.
       !!
       !! ** Method  : - reference 1D vertical coordinate (gdep._0, e3._0)
@@ -84,10 +85,10 @@
       !! ** Action  :   define gdep., e3., mbathy and bathy
       !!----------------------------------------------------------------------
-      INTEGER ::   ioptio = 0   ! temporary integer
+      INTEGER ::   ioptio, ibat   ! local integer
       !
       NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('dom_zgr')
+      IF( nn_timing == 1 )   CALL timing_start('dom_zgr')
       !
       REWIND( numnam )                 ! Read Namelist namzgr : vertical coordinate'
@@ -105,7 +106,7 @@
 
       ioptio = 0                       ! Check Vertical coordinate options
-      IF( ln_zco ) ioptio = ioptio + 1
-      IF( ln_zps ) ioptio = ioptio + 1
-      IF( ln_sco ) ioptio = ioptio + 1
+      IF( ln_zco      )   ioptio = ioptio + 1
+      IF( ln_zps      )   ioptio = ioptio + 1
+      IF( ln_sco      )   ioptio = ioptio + 1
       IF( ioptio /= 1 )   CALL ctl_stop( ' none or several vertical coordinate options used' )
       !
@@ -114,16 +115,21 @@
                           CALL zgr_z            ! Reference z-coordinate system (always called)
                           CALL zgr_bat          ! Bathymetry fields (levels and meters)
+      IF( lk_c1d      )   CALL lbc_lnk( bathy , 'T', 1._wp )   ! 1D config.: same bathy value over the 3x3 domain
       IF( ln_zco      )   CALL zgr_zco          ! z-coordinate
       IF( ln_zps      )   CALL zgr_zps          ! Partial step z-coordinate
       IF( ln_sco      )   CALL zgr_sco          ! s-coordinate or hybrid z-s coordinate
       !
+      !
       ! final adjustment of mbathy & check 
       ! -----------------------------------
       IF( lzoom       )   CALL zgr_bat_zoom     ! correct mbathy in case of zoom subdomain
-      IF( .NOT.lk_c1d )   CALL zgr_bat_ctl      ! check bathymetry (mbathy) and suppress isoated ocean points
+      IF( .NOT.lk_c1d )   CALL zgr_bat_ctl      ! check bathymetry (mbathy) and suppress isolated ocean points
                           CALL zgr_bot_level    ! deepest ocean level for t-, u- and v-points
       !
-      !
-
+      IF( lk_c1d ) THEN                         ! 1D config.: same mbathy value over the 3x3 domain
+         ibat = mbathy(2,2)
+         mbathy(:,:) = ibat
+      END IF
+      !
       IF( nprint == 1 .AND. lwp )   THEN
          WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) )
@@ -465,5 +471,5 @@
                     END DO
                  END DO
-                 IF(lwp) WRITE(numout,*)
+                 IF(lwp) WRITE(numout,*)     
                  IF(lwp) WRITE(numout,*) '      orca_r2: Gibraltar strait open at i=',ii0,' j=',ij0
                  !
@@ -502,4 +508,5 @@
       ENDIF
       !
+      ! 
       CALL wrk_dealloc( jpidta, jpjdta, idta )
       CALL wrk_dealloc( jpidta, jpjdta, zdta )
@@ -729,4 +736,5 @@
       !
       mbkt(:,:) = MAX( mbathy(:,:) , 1 )    ! bottom k-index of T-level (=1 over land)
+ 
       !                                     ! bottom k-index of W-level = mbkt+1
       DO jj = 1, jpjm1                      ! bottom k-index of u- (v-) level
Index: trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 3711)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 3720)
@@ -4,9 +4,9 @@
    !! Input/Output manager :  Library to read input files
    !!====================================================================
-   !! History :  9.0  ! 05 12  (J. Belier) Original code
-   !!            9.0  ! 06 02  (S. Masson) Adaptation to NEMO
-   !!             "   ! 07 07  (D. Storkey) Changes to iom_gettime
+   !! History :  2.0  ! 2005-12  (J. Belier) Original code
+   !!            2.0  ! 2006-02  (S. Masson) Adaptation to NEMO
+   !!            3.0  ! 2007-07  (D. Storkey) Changes to iom_gettime
+   !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  add C1D case  
    !!--------------------------------------------------------------------
-   !!gm  caution add !DIR nec: improved performance to be checked as well as no result changes
 
    !!--------------------------------------------------------------------
@@ -19,4 +19,5 @@
    !!--------------------------------------------------------------------
    USE dom_oce         ! ocean space and time domain
+   USE c1d             ! 1D vertical configuration
    USE flo_oce         ! floats module declarations
    USE lbclnk          ! lateal boundary condition / mpp exchanges
@@ -751,4 +752,8 @@
             ENDIF
             
+            ! C1D case : always call lbc_lnk to replicate the central value over the whole 3X3 domain
+            IF( lk_c1d .AND. PRESENT(pv_r2d) )   CALL lbc_lnk( pv_r2d,'Z',1. )
+            IF( lk_c1d .AND. PRESENT(pv_r3d) )   CALL lbc_lnk( pv_r3d,'Z',1. )
+    
             !--- Apply scale_factor and offset
             zscf = iom_file(kiomid)%scf(idvar)      ! scale factor
Index: trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90	(revision 3711)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90	(revision 3720)
@@ -7,6 +7,7 @@
    !!   NEMO     1.0  ! 2002-09  (G. Madec)     F90: Free form and module
    !!            3.2  ! 2009-03  (R. Benshila)  External north fold treatment  
-   !!----------------------------------------------------------------------
-#if   defined key_mpp_mpi
+   !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  add a C1D case  
+   !!----------------------------------------------------------------------
+#if defined key_mpp_mpi
    !!----------------------------------------------------------------------
    !!   'key_mpp_mpi'             MPI massively parallel processing library
@@ -67,4 +68,81 @@
    !!----------------------------------------------------------------------
 CONTAINS
+
+# if defined key_c1d
+   !!----------------------------------------------------------------------
+   !!   'key_c1d'                                          1D configuration
+   !!----------------------------------------------------------------------
+
+   SUBROUTINE lbc_lnk_3d_gather( pt3d1, cd_type1, pt3d2, cd_type2, psgn )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE lbc_lnk_3d_gather  ***
+      !!
+      !! ** Purpose :   set lateral boundary conditions on two 3D arrays (C1D case)
+      !!
+      !! ** Method  :   call lbc_lnk_3d on pt3d1 and pt3d2
+      !!----------------------------------------------------------------------
+      CHARACTER(len=1)                , INTENT(in   ) ::   cd_type1, cd_type2   ! nature of pt3d grid-points
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   pt3d1   , pt3d2      ! 3D array on which the lbc is applied
+      REAL(wp)                        , INTENT(in   ) ::   psgn                 ! control of the sign 
+      !!----------------------------------------------------------------------
+      !
+      CALL lbc_lnk_3d( pt3d1, cd_type1, psgn)
+      CALL lbc_lnk_3d( pt3d2, cd_type2, psgn)
+      !
+   END SUBROUTINE lbc_lnk_3d_gather
+
+
+   SUBROUTINE lbc_lnk_3d( pt3d, cd_type, psgn, cd_mpp, pval )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE lbc_lnk_3d  ***
+      !!
+      !! ** Purpose :   set lateral boundary conditions on a 3D array (C1D case)
+      !!
+      !! ** Method  :   1D case, the central water column is set everywhere
+      !!----------------------------------------------------------------------
+      CHARACTER(len=1)                , INTENT(in   )           ::   cd_type   ! nature of pt3d grid-points
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout)           ::   pt3d      ! 3D array on which the lbc is applied
+      REAL(wp)                        , INTENT(in   )           ::   psgn      ! control of the sign 
+      CHARACTER(len=3)                , INTENT(in   ), OPTIONAL ::   cd_mpp    ! MPP only (here do nothing)
+      REAL(wp)                        , INTENT(in   ), OPTIONAL ::   pval      ! background value (for closed boundaries)
+      !
+      INTEGER  ::   jk     ! dummy loop index
+      REAL(wp) ::   ztab   ! local scalar
+      !!----------------------------------------------------------------------
+      !
+      DO jk = 1, jpk
+         ztab = pt3d(2,2,jk)
+         pt3d(:,:,jk) = ztab
+      END DO
+      !
+   END SUBROUTINE lbc_lnk_3d
+
+
+   SUBROUTINE lbc_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval )
+      !!---------------------------------------------------------------------
+      !!                 ***  ROUTINE lbc_lnk_2d  ***
+      !!
+      !! ** Purpose :   set lateral boundary conditions on a 2D array (non mpp case)
+      !!
+      !! ** Method  :   1D case, the central water column is set everywhere
+      !!----------------------------------------------------------------------
+      CHARACTER(len=1)            , INTENT(in   )           ::   cd_type   ! nature of pt3d grid-points
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout)           ::   pt2d      ! 2D array on which the lbc is applied
+      REAL(wp)                    , INTENT(in   )           ::   psgn      ! control of the sign 
+      CHARACTER(len=3)            , INTENT(in   ), OPTIONAL ::   cd_mpp    ! MPP only (here do nothing)
+      REAL(wp)                    , INTENT(in   ), OPTIONAL ::   pval      ! background value (for closed boundaries)
+      !
+      REAL(wp) ::   ztab   ! local scalar
+      !!----------------------------------------------------------------------
+      !
+      ztab = pt2d(2,2)
+      pt2d(:,:) = ztab
+      !
+   END SUBROUTINE lbc_lnk_2d
+
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option                           3D shared memory computing
+   !!----------------------------------------------------------------------
 
    SUBROUTINE lbc_lnk_3d_gather( pt3d1, cd_type1, pt3d2, cd_type2, psgn )
@@ -113,5 +191,5 @@
 
       IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value (zero by default)
-      ELSE                         ;   zland = 0.e0
+      ELSE                         ;   zland = 0._wp
       ENDIF
 
@@ -203,5 +281,5 @@
 
       IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value (zero by default)
-      ELSE                         ;   zland = 0.e0
+      ELSE                         ;   zland = 0._wp
       ENDIF
 
@@ -270,4 +348,5 @@
    END SUBROUTINE lbc_lnk_2d
 
+# endif
 #endif
 
