Index: /trunk/NEMO/C1D_SRC/c1d.F90
===================================================================
--- /trunk/NEMO/C1D_SRC/c1d.F90	(revision 899)
+++ /trunk/NEMO/C1D_SRC/c1d.F90	(revision 900)
@@ -1,70 +1,24 @@
-MODULE ini1d
+MODULE c1d
    !!======================================================================
-   !!                     ***  MODULE  ini1D  ***
-   !! Ocean state   :  1D initialization
+   !!                     ***  MODULE  c1d  ***
+   !! Ocean domain  :  1D configuration
    !!=====================================================================
-#if defined key_c1d
+   !! History :   2.0  !  2004-09  (C. Ethe)  Original code
+   !!             3.0  !  2008-04 (G. Madec)  adaptation to SBC
    !!----------------------------------------------------------------------
-   !!   'key_cf1d'               1D Configuration
-   !!----------------------------------------------------------------------
-   !!   init_1d   : initial mask
-   !!----------------------------------------------------------------------
-   !! * Modules used
-   USE dom_oce         ! ocean space and time domain 
-   USE phycst
-   USE in_out_manager
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Share Module variables
-   LOGICAL, PUBLIC, PARAMETER ::  lk_c1d = .TRUE.       !: 1D flag
-
-   !! * Routine accessibility
-   PUBLIC init_1d   ! routine called by OPA.F90
+#if defined key_c1d
+   LOGICAL, PUBLIC, PARAMETER ::   lk_c1d = .TRUE.    !: 1D config. flag activated
+#else
+   LOGICAL, PUBLIC, PARAMETER ::   lk_c1d = .FALSE.   !: 1D config. flag de-activated
+#endif
 
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE init_1d
-      !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE init_1d  ***
-      !! 
-      !! ** Purpose :   Re-Initialization of masks on 1D configuration
-      !!
-      !! ** Method  :
-      !!
-      !! History :
-      !!   9.0  !  04-09  (C. Ethe) 1D configuration
-      !!----------------------------------------------------------------------
-      !! * Local declarations
-      !!----------------------------------------------------------------------
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'init_1d :  masks on 1D configuration'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~'
-
-      ! set umask and vmask equal tmask in 1D configuration
-      umask(:,:,:) = tmask(:,:,:)
-      vmask(:,:,:) = tmask(:,:,:)     
-
-   END SUBROUTINE init_1d
-
-#else
-   !!----------------------------------------------------------------------
-   !!   Default key                                     NO 1D Config
-   !!----------------------------------------------------------------------
-   LOGICAL , PUBLIC, PARAMETER ::   lk_c1d = .FALSE.    !: internal damping flag
-CONTAINS
-   SUBROUTINE init_1d       ! Empty routine
-
-   END SUBROUTINE init_1d
-#endif
-
+   !! NEMO/C1D 3.0 , LOCEAN-IPSL (2008) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!=====================================================================
-END MODULE ini1d
+END MODULE c1d
Index: /trunk/NEMO/C1D_SRC/diawri_c1d.F90
===================================================================
--- /trunk/NEMO/C1D_SRC/diawri_c1d.F90	(revision 899)
+++ /trunk/NEMO/C1D_SRC/diawri_c1d.F90	(revision 900)
@@ -1,13 +1,16 @@
-MODULE diawri1d
+MODULE diawri_c1d
    !!======================================================================
-   !!                     ***  MODULE  diawri1d  ***
+   !!                     ***  MODULE  diawri_c1d  ***
    !! Ocean diagnostics :  write ocean output files
    !!=====================================================================
+   !! History :   2.0  !  2004-10  (C. Ethe)  1D Configuration
+   !!             3.0  !  2008-04  (G. Madec)  adaptation to SBC
+   !!----------------------------------------------------------------------
 #if defined key_c1d
    !!----------------------------------------------------------------------
-   !!   'key_c1d'               1D Configuration
+   !!   'key_c1d'                                          1D Configuration
    !!----------------------------------------------------------------------  
-   !!----------------------------------------------------------------------
-   !! * Modules used
+   !!   dia_wri_c1d       : create the standart NetCDF output files
+   !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
@@ -15,4 +18,6 @@
    USE sbc_oce         ! surface boundary condition: ocean
    USE sbc_ice         ! surface boundary condition: ice
+   USE sbcmod          ! surface Boundary Codition
+   USE sbcssr          ! surface boundary condition: restauring to SSS and or SST
    USE zdftke          ! TKE vertical mixing
    USE zdfkpp          ! KPP vertical mixing
@@ -26,42 +31,30 @@
    USE diawri
    USE zdfddm          ! vertical  physics: double diffusion
-   USE diahth          ! thermocline diagnostics
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE in_out_manager  ! I/O manager
+   USE ioipsl
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC dia_wri_1d                 ! routines called by step.F90
-   !! * Module variables
-   INTEGER ::   &
-      nid_T, nz_T, nh_T, ndim_T, ndim_hT,      &   ! grid_T file
-      ndex(1)                                      ! ???
-   INTEGER, DIMENSION(jpi*jpj) ::   &
-      ndex_hT
-   INTEGER, DIMENSION(jpi*jpj*jpk) ::   &
-      ndex_T
+   PUBLIC dia_wri_c1d                 ! routines called by step.F90
+
+   INTEGER ::   nid_T, nz_T, nh_T, ndim_T, ndim_hT, ndex(1)   ! grid_T file
+   INTEGER, DIMENSION(jpi*jpj)     ::   ndex_hT
+   INTEGER, DIMENSION(jpi*jpj*jpk) ::   ndex_T
 
    !! * Substitutions
 #  include "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL  (2005)
+   !! NEMO/C1D 3.0 , LOCEAN-IPSL  (2008)
    !! $Id$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
 CONTAINS
-   !!----------------------------------------------------------------------
-   !!   Default option                                   NetCDF output file
-   !!----------------------------------------------------------------------
-   !!   dia_wri_1d       : create the standart NetCDF output files
-   !!   dia_wri_state_1d : create an output NetCDF file for a single
-   !!                      instantaeous ocean state and forcing fields
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE dia_wri_1d( kt, kindic )
+
+   SUBROUTINE dia_wri_c1d( kt, kindic )
       !!---------------------------------------------------------------------
-      !!                  ***  ROUTINE dia_wri_1d  ***
+      !!                  ***  ROUTINE dia_wri_c1d  ***
       !!                   
       !! ** Purpose :   Standard output of opa: dynamics and tracer fields 
@@ -75,39 +68,15 @@
       !!      IF kindic =0, time step loop
       !!      IF kindic >0, output of fields before the time step loop
-      !!
-      !! History :
-      !!        !  91-03  (M.-A. Foujols)  Original code
-      !!        !  91-11  (G. Madec)
-      !!        !  92-06  (M. Imbard)  correction restart file
-      !!        !  92-07  (M. Imbard)  split into diawri and rstwri
-      !!        !  93-03  (M. Imbard)  suppress writibm
-      !!        !  98-01  (C. Levy)  NETCDF format using ioipsl INTERFACE
-      !!        !  99-02  (E. Guilyardi)  name of netCDF files + variables
-      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
-      !!   9.0  !  04-10  (C. Ethe)   1D Configuration
-      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization
       !!----------------------------------------------------------------------
-      !! * Modules used
-      USE ioipsl
-
-      !! * Arguments
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
       INTEGER, INTENT( in ) ::   kindic  ! 
-
-      !! * Local declarations
-      LOGICAL ::   ll_print = .FALSE.    ! =T print and flush numout
-      CHARACTER (len=40) ::           &
-         clhstnam, clop, clmx            ! temporary names
-      INTEGER ::   inum = 11             ! temporary logical unit
-      INTEGER ::   &
-         ji, jj, ik                      ! dummy loop indices
-      INTEGER ::   &
-         iimi, iima, ipk, it,         &  ! temporary integers
-         ijmi, ijma                      !    "          "
-      REAL(wp) ::   &
-         zsto, zout, zmax,            &  ! temporary scalars
-         zjulian, zdt                    !    "         "
-      REAL(wp), DIMENSION(jpi,jpj) :: &
-         zw2d                            ! temporary workspace
+      !!
+      LOGICAL ::   ll_print = .FALSE.                ! =T print and flush numout
+      CHARACTER (len=40) ::   clhstnam, clop, clmx   ! temporary names
+      INTEGER ::   inum = 11                         ! temporary logical unit
+      INTEGER ::   ji, jj, ik                        ! dummy loop indices
+      INTEGER ::   iimi, iima, ipk, it, ijmi, ijma   ! temporary integers
+      REAL(wp) ::   zsto, zout, zmax, zjulian, zdt   ! temporary scalars
+      REAL(wp), DIMENSION(jpi,jpj) ::   zw2d         ! temporary workspace
       !!----------------------------------------------------------------------
       
@@ -146,5 +115,5 @@
       ! -----------------------------------------------------------------
 
-      IF(ll_print) WRITE(numout,*) 'dia_wri_1d kt = ', kt, ' kindic ', kindic
+      IF(ll_print) WRITE(numout,*) 'dia_wri_c1d kt = ', kt, ' kindic ', kindic
 
       IF( kt == nit000 ) THEN
@@ -192,18 +161,8 @@
          CALL histdef( nid_T, "sosaline", "Sea Surface Salinity"               , "PSU"    ,   &  ! sss
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-
-!!$#if ! defined key_dynspg_rl && ( defined key_lim2 || defined key_lim2 )
-!!$         ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to
-!!$         !    internal damping to Levitus that can be diagnosed from others
-!!$         ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup
-!!$         CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater"          , "kg/m2/s",   &  ! fsalt
-!!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-!!$         CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater"        , "kg/m2/s",   &  ! fmass
-!!$            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-!!$#endif
          CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux"              , "Kg/m2/s",   &  ! emp
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "sorunoff", "Runoffs"                            , "Kg/m2/s",   &  ! runoffs
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+!!       CALL histdef( nid_T, "sorunoff", "Runoffs"                            , "Kg/m2/s",   &  ! runoffs
+!!          &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
          CALL histdef( nid_T, "sowaflcd", "concentration/dilution water flux"  , "kg/m2/s",   &  ! emps
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
@@ -228,42 +187,15 @@
          CALL histdef( nid_T, "soicecov", "Ice Cover"                          , "[0,1]"  ,   &  ! freeze
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-#if ! defined key_coupled 
-         CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "sosafldp", "Surface salt flux: damping"         , "Kg/m2/s",   &  ! erp * sn
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-#endif
-
-#if ( defined key_coupled && ! ( defined key_lim3 || defined key_lim2 ) ) 
-         CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping"         , "Kg/m2/s",   &  ! erp * sn
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-#endif
+         IF( ln_ssr ) THEN
+            CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp
+               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+            CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp
+               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+            CALL histdef( nid_T, "sosafldp", "Surface salt flux: damping"         , "Kg/m2/s",   &  ! erp * sn
+               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
+         ENDIF
          clmx ="l_max(only(x))"    ! max index on a period
          CALL histdef( nid_T, "sobowlin", "Bowl Index"                         , "W-point",   &  ! bowl INDEX 
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clmx, zsto, zout )
-#if defined key_diahth
-         CALL histdef( nid_T, "sothedep", "Thermocline Depth"                  , "m"      ,   & ! hth
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "so20chgt", "Depth of 20C isotherm"              , "m"      ,   & ! hd20
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "so28chgt", "Depth of 28C isotherm"              , "m"      ,   & ! hd28
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "sohtc300", "Heat content 300 m"                 , "W"      ,   & ! htc3
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-#endif
-
-#if ( defined key_lim3 || defined key_lim2 ) && defined key_coupled
-         CALL histdef( nid_T,"soicetem" , "Ice Surface Temperature"            , "K"      ,   &  ! tn_ice
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T,"soicealb" , "Ice Albedo"                         , "[0,1]"  ,   &  ! alb_ice
-            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-#endif 
-
          !                                                                                      !!! nid_U : 3D
          CALL histdef( nid_T, "vozocrtx", "Zonal Current"                      , "m/s"    ,   &  ! un
@@ -288,31 +220,22 @@
             &          jpi, jpj, nh_T, 1  , 1, 1  , - 99, 32, clop, zsto, zout )
 #if defined key_zdftke
-         !                                                                                      !!! nid_W : 3D
          CALL histdef( nid_T, "votlsdis", " Dissipation Turbulent Lenght Scale", "m"      ,   &  ! e_dis
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-         !
          CALL histdef( nid_T, "votlsmix", " Mixing Turbulent Lenght Scale"     , "m"      ,   &  ! e_mix
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-         !
          CALL histdef( nid_T, "votlspdl", " Prandl Number",                      "-"       ,   &  ! e_pdl
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-         !
          CALL histdef( nid_T, "votlsric", " Local Richardson Number",            "-"       ,   &  ! e_ric
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-         !
          CALL histdef( nid_T, "votkeend", "TKE: Turbulent kinetic energy"       , "m2/s"   ,   &  ! TKE
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
 #endif
 #if defined key_zdfkpp
-         !                                                                                      !!! nid_W : 3D
          CALL histdef( nid_T, "vokpprig", " Gradient Richardson Number"        ,  "-"      ,   &  ! rig
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-         !
          CALL histdef( nid_T, "vokpprib", " Bulk Richardson Number    "        ,  "-"      ,   &   ! rib
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-         !
          CALL histdef( nid_T, "vokppbsf", " Buoyancy forcing          "        , "N/m2"    ,   &  ! sokppbsf
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-         !
          CALL histdef( nid_T, "vokppmol", "Moning Obukhov length scale     "   , "m"       ,   &  ! sokppmol
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
@@ -321,11 +244,8 @@
          CALL histdef( nid_T, "voeosbn2", "Brunt-Vaisala Frequency"             , "m2/s2"  ,   &  ! rn2
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-
          CALL histdef( nid_T, "votkeavt", "Vertical Eddy Diffusivity"          , "m2/s"   ,   &  ! avt
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-
          CALL histdef( nid_T, "votkeevd", "Enhanced Vertical Diffusivity",       "m2/s"   ,   &  ! avt_evd
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-
          CALL histdef( nid_T, "votkeavm", "Vertical Eddy Viscosity",             "m2/s"   ,   &  ! avmu
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
@@ -333,5 +253,4 @@
          CALL histdef( nid_T, "votkeevm", "Enhanced Vertical Viscosity",         "m2/s"   ,   &  ! avmu_evd
             &          jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout )
-
          IF( lk_zdfddm ) THEN
             CALL histdef( nid_T,"voddmavs","Salt Vertical Eddy Diffusivity"    , "m2/s"   ,   &  ! avs
@@ -364,10 +283,6 @@
       CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface temperature
       CALL histwrite( nid_T, "sosaline", it, sn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface salinity
-#if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 )
-      CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux
-      CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux
-#endif
       CALL histwrite( nid_T, "sowaflup", it, emp           , ndim_hT, ndex_hT )   ! upward water flux
-      CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff
+!!    CALL histwrite( nid_T, "sorunoff", it, runoff        , ndim_hT, ndex_hT )   ! runoff
       CALL histwrite( nid_T, "sowaflcd", it, emps          , ndim_hT, ndex_hT )   ! c/d water flux
       zw2d(:,:) = emps(:,:) * sn(:,:,1) * tmask(:,:,1)
@@ -390,30 +305,12 @@
       CALL histwrite( nid_T, "somixhgt", it, hmld          , ndim_hT, ndex_hT )   ! turbocline depth
       CALL histwrite( nid_T, "soicecov", it, freeze        , ndim_hT, ndex_hT )   ! ice cover 
-#if ! defined key_coupled
-      CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping
-      CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping
-      zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1)
-      CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping
-#endif
-#if ( defined key_coupled && ! ( defined key_lim3 || defined key_lim2 ) ) 
-      CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping
-      CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping
+      IF( ln_ssr ) THEN
+         CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping
+         CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping
          zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1)
-      CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping
-#endif
-         zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1)
+         CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping
+      ENDIF
+      zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1)
       CALL histwrite( nid_T, "sobowlin", it, zw2d          , ndim_hT, ndex_hT )   ! ???
-
-#if defined key_diahth
-      CALL histwrite( nid_T, "sothedep", it, hth           , ndim_hT, ndex_hT )   ! depth of the thermocline
-      CALL histwrite( nid_T, "so20chgt", it, hd20          , ndim_hT, ndex_hT )   ! depth of the 20 isotherm
-      CALL histwrite( nid_T, "so28chgt", it, hd28          , ndim_hT, ndex_hT )   ! depth of the 28 isotherm
-      CALL histwrite( nid_T, "sohtc300", it, htc3          , ndim_hT, ndex_hT )   ! first 300m heaat content
-#endif
-#if ( defined key_lim3 || defined key_lim2 ) &&  defined key_coupled 
-      CALL histwrite( nid_T, "soicetem", it, tn_ice        , ndim_hT, ndex_hT )   ! surf. ice temperature
-      CALL histwrite( nid_T, "soicealb", it, alb_ice       , ndim_hT, ndex_hT )   ! ice albedo
-#endif
-
       CALL histwrite( nid_T, "vozocrtx", it, un            , ndim_T , ndex_T )    ! i-current
       CALL histwrite( nid_T, "sozotaux", it, utau          , ndim_hT, ndex_hT )   ! i-wind stress
@@ -444,26 +341,23 @@
       ! 3. Synchronise and close all files
       ! ---------------------------------------
-      IF( MOD( kt, nwrite ) == 0 .OR. kindic < 0 ) THEN
-         CALL histsync( nid_T )
-      ENDIF
+      IF( MOD( kt, nwrite ) == 0 .OR. kindic < 0 )   CALL histsync( nid_T )
 
       !  Create an output files (output.abort.nc) if S < 0 or u > 20 m/s
       IF( kindic < 0 )   CALL dia_wri_state( 'output.abort' )
 
-      IF( kt == nitend .OR. kindic < 0 ) THEN
-         CALL histclo( nid_T )
-      ENDIF
-
-   END SUBROUTINE dia_wri_1d
+      IF( kt == nitend .OR. kindic < 0 )   CALL histclo( nid_T )
+      !
+   END SUBROUTINE dia_wri_c1d
+
 #else
    !!----------------------------------------------------------------------
-   !!   Default key                                     NO 1D Config
+   !!   Default key                                     NO 1D Configuration
    !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE dia_wri_1d ( kt, kindic )
-      WRITE(*,*) 'dia_wri_1d: You should not have seen this print! error?', kt, kindic
-   END SUBROUTINE dia_wri_1d
+   SUBROUTINE dia_wri_c1d ( kt, kindic )      ! dummy routine
+      WRITE(*,*) 'dia_wri_c1d: You should not have seen this print! error?', kt, kindic
+   END SUBROUTINE dia_wri_c1d
 #endif
 
    !!======================================================================
-END MODULE diawri1d
+END MODULE diawri_c1d
Index: /trunk/NEMO/C1D_SRC/dyncor_c1d.F90
===================================================================
--- /trunk/NEMO/C1D_SRC/dyncor_c1d.F90	(revision 899)
+++ /trunk/NEMO/C1D_SRC/dyncor_c1d.F90	(revision 900)
@@ -1,107 +1,85 @@
-MODULE dyncor1d
+MODULE dyncor_c1d
    !!======================================================================
-   !!                     ***  MODULE  ini1D  ***
-   !! Ocean state   :  1D initialization
+   !!                     ***  MODULE  dyncor_c1d  ***
+   !! Ocean Dynamics :   Coriolis term in 1D configuration
    !!=====================================================================
+   !! History :  2.0  !  2004-09  (C. Ethe)  Original code
+   !!            3.0  !  2008-04  (G. Madec)  style only
+   !!----------------------------------------------------------------------
 #if defined key_c1d
    !!----------------------------------------------------------------------
-   !!   'key_c1d'               1D Configuration
+   !!   'key_c1d'                                          1D Configuration
    !!----------------------------------------------------------------------
+   !!   cor_c1d      : Coriolis factor at T-point (1D configuration)
+   !!   dyn_cor_c1d  : vorticity trend due to Coriolis at T-point
    !!----------------------------------------------------------------------
-   !!   fcorio_1d   : Coriolis factor at T-point
-   !!   dyn_cor_1d  : vorticity trend due to Coriolis
-   !!----------------------------------------------------------------------
-   !! * Modules used
-   USE oce            ! ocean dynamics and tracers
-   USE dom_oce        ! ocean space and time domain
-   USE phycst         ! physical constants
-   USE in_out_manager ! I/O manager
-   USE prtctl         ! Print control
+   USE oce               ! ocean dynamics and tracers
+   USE dom_oce           ! ocean space and time domain
+   USE phycst            ! physical constants
+   USE in_out_manager    ! I/O manager
+   USE prtctl            ! Print control
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC fcorio_1d   ! routine called by OPA.F90
-   PUBLIC dyn_cor_1d  ! routine called by step1d.F90
+   PUBLIC   cor_c1d      ! routine called by OPA.F90
+   PUBLIC   dyn_cor_c1d  ! routine called by step1d.F90
 
    !! * Substitutions
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/C1D  3.0 , LOCEAN-IPSL (2009) 
    !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
 CONTAINS
 
-   SUBROUTINE fcorio_1d
+   SUBROUTINE cor_c1d
       !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE fcorio_1d  ***
+      !!                   ***  ROUTINE cor_c1d  ***
       !! 
       !! ** Purpose : Compute the Coriolis factor at T-point
-      !!
-      !! ** Method  :
-      !!
-      !! History :
-      !!   9.0  !  04-09  (C. Ethe) 1D configuration
       !!----------------------------------------------------------------------
-      !! * Local declarations
-      !!----------------------------------------------------------------------
-      REAL(wp) ::   &
-         zphi0, zbeta, zf0         !  temporary scalars
- 
-
+      REAL(wp) ::   zphi0, zbeta, zf0         !  temporary scalars
       !!----------------------------------------------------------------------
 
-      ! ================= !
-      !  Coriolis factor  !
-      ! ================= !
       IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'fcorio_1d : Coriolis factor at T-point'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+      IF(lwp) WRITE(numout,*) 'cor_c1d : Coriolis factor at T-point'
+      IF(lwp) WRITE(numout,*) '~~~~~~~'
 
       SELECT CASE( jphgr_msh )   ! type of horizontal mesh
-
+      !
       CASE ( 0, 1, 4 )               ! mesh on the sphere
-
          ff(:,:) = 2. * omega * SIN( rad * gphit(:,:) ) 
-
+         !
       CASE ( 2 )                     ! f-plane at ppgphi0 
-
          ff(:,:) = 2. * omega * SIN( rad * ppgphi0 )
-
          IF(lwp) WRITE(numout,*) '          f-plane: Coriolis parameter = constant = ', ff(1,1)
-
+         !
       CASE ( 3 )                     ! beta-plane
-
          zbeta   = 2. * omega * COS( rad * ppgphi0 ) / ra                     ! beta at latitude ppgphi0
          zphi0   = ppgphi0 - FLOAT( jpjglo/2) * ppe2_m *1.e-3  / ( ra * rad ) ! latitude of the first row F-points
          zf0     = 2. * omega * SIN( rad * zphi0 )                            ! compute f0 1st point south
-
          ff(:,:) = ( zf0  + zbeta * gphit(:,:) * 1.e+3 )                      ! f = f0 +beta* y ( y=0 at south)
-
          IF(lwp) WRITE(numout,*) '          Beta-plane: Beta parameter = constant = ', ff(1,1)
          IF(lwp) WRITE(numout,*) '                      Coriolis parameter varies from ', ff(1,1),' to ', ff(1,jpj)
-
+         !
       CASE ( 5 )                     ! beta-plane and rotated domain
-
          zbeta = 2. * omega * COS( rad * ppgphi0 ) / ra                     ! beta at latitude ppgphi0
          zphi0 = 15.e0                                                      ! latitude of the first row F-points
          zf0   = 2. * omega * SIN( rad * zphi0 )                            ! compute f0 1st point south
-
          ff(:,:) = ( zf0 + zbeta * ABS( gphit(:,:) - zphi0 ) * rad * ra )   ! f = f0 +beta* y ( y=0 at south)
-
          IF(lwp) WRITE(numout,*) '          Beta-plane: Beta parameter = constant = ', ff(1,1)
          IF(lwp) WRITE(numout,*) '                      Coriolis parameter varies from ', ff(1,1),' to ', ff(1,jpj)
-
+         !
       END SELECT
-
-   END SUBROUTINE fcorio_1d
+      !
+   END SUBROUTINE cor_c1d
 
 
-   SUBROUTINE dyn_cor_1d( kt )
+   SUBROUTINE dyn_cor_c1d( kt )
       !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE dyn_cor_1d  ***
+      !!                   ***  ROUTINE dyn_cor_c1d  ***
       !! 
       !! ** Purpose :   Compute the now total vorticity trend and add it to 
@@ -113,57 +91,41 @@
       !!   9.0  !  04-09  (C. Ethe) 1D configuration
       !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt        ! ocean time-step index
-
-      !! * Local declarations
-      INTEGER ::   ji, jj, jk              ! dummy loop indices
-      REAL(wp) ::   &
-         zua, zva                          ! temporary scalars
-
+      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
+      !!
+      INTEGER ::   ji, jj, jk         ! dummy loop indices
       !!----------------------------------------------------------------------
-
+      !
       IF( kt == nit000 ) THEN
          IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'dyn_cor_1d : total vorticity trend in 1D'
+         IF(lwp) WRITE(numout,*) 'dyn_cor_c1d : total vorticity trend in 1D'
          IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
       ENDIF
-
+      !
       DO jk = 1, jpkm1
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zua =    ff(ji,jj) * vn(ji,jj,jk)
-               zva =  - ff(ji,jj) * un(ji,jj,jk)
-               ua(ji,jj,jk) = ua(ji,jj,jk) + zua
-               va(ji,jj,jk) = va(ji,jj,jk) + zva
+               ua(ji,jj,jk) = ua(ji,jj,jk) + ff(ji,jj) * vn(ji,jj,jk)
+               va(ji,jj,jk) = va(ji,jj,jk) - ff(ji,jj) * un(ji,jj,jk)
             END DO
          END DO
       END DO   
-
-      IF(ln_ctl)   THEN
-         CALL prt_ctl(tab3d_1=ua, clinfo1=' cor  - Ua: ', mask1=umask, &
-            &         tab3d_2=va, clinfo2=' Va: ', mask2=vmask)
-      ENDIF
-
-!     IF(l_ctl) THEN         ! print sum trends (used for debugging)
-!        zua = SUM( ua(2:nictl,2:njctl,1:jpkm1) * umask(2:nictl,2:njctl,1:jpkm1) )
-!        zva = SUM( va(2:nictl,2:njctl,1:jpkm1) * vmask(2:nictl,2:njctl,1:jpkm1) )
-!        WRITE(numout,*) ' cor  - Ua: ', zua-u_ctl, ' Va: ', zva-v_ctl
-!        u_ctl = zua   ;   v_ctl = zva
-!     ENDIF
-
-   END SUBROUTINE dyn_cor_1d
+      !
+      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' cor  - Ua: ', mask1=umask,  &
+         &                       tab3d_2=va, clinfo2=' Va: '       , mask2=vmask )
+      !
+   END SUBROUTINE dyn_cor_c1d
 
 #else
    !!----------------------------------------------------------------------
-   !!   Default key                                     NO 1D Config
+   !!   Default key                                     NO 1D Configuration
    !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE fcorio_1d      ! Empty routine
-   END SUBROUTINE fcorio_1d   
-   SUBROUTINE dyn_cor_1d ( kt )
-      WRITE(*,*) 'dyn_cor_1d: You should not have seen this print! error?', kt
-   END SUBROUTINE dyn_cor_1d
+   SUBROUTINE cor_c1d              ! Empty routine
+   END SUBROUTINE cor_c1d   
+   SUBROUTINE dyn_cor_c1d ( kt )      ! Empty routine
+      WRITE(*,*) 'dyn_cor_c1d: You should not have seen this print! error?', kt
+   END SUBROUTINE dyn_cor_c1d
 #endif
 
    !!=====================================================================
-END MODULE dyncor1d
+END MODULE dyncor_c1d
Index: /trunk/NEMO/C1D_SRC/dynnxt_c1d.F90
===================================================================
--- /trunk/NEMO/C1D_SRC/dynnxt_c1d.F90	(revision 899)
+++ /trunk/NEMO/C1D_SRC/dynnxt_c1d.F90	(revision 900)
@@ -1,15 +1,17 @@
-MODULE dynnxt1d
+MODULE dynnxt_c1d
    !!======================================================================
-   !!                       ***  MODULE  dynnxt1d  ***
+   !!                       ***  MODULE  dynnxt_c1d  ***
    !! Ocean dynamics: time stepping in 1D configuration
    !!======================================================================
+   !! History :  2.0  !  2004-10  (C. Ethe)  Original code from dynnxt.F90
+   !!            3.0  !  2008-04  (G.madec)  Style only
+   !!----------------------------------------------------------------------
 #if defined key_c1d
    !!----------------------------------------------------------------------
-   !!   'key_c1d'               1D Configuration
+   !!   'key_c1d'                                          1D Configuration
    !!----------------------------------------------------------------------  
    !!----------------------------------------------------------------------
-   !!   dyn_nxt_1d   : update the horizontal velocity from the momentum trend
+   !!   dyn_nxt_c1d : update the horizontal velocity from the momentum trend
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers
    USE dom_oce         ! ocean space and time domain
@@ -21,13 +23,16 @@
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC dyn_nxt_1d                ! routine called by step.F90
+   PUBLIC dyn_nxt_c1d                ! routine called by step.F90
+   !!----------------------------------------------------------------------
+   !! NEMO/C1D  3.0 , LOCEAN-IPSL (2008) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
 CONTAINS
 
-   SUBROUTINE dyn_nxt_1d ( kt )
+   SUBROUTINE dyn_nxt_c1d ( kt )
       !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE dyn_nxt_1d  ***
+      !!                  ***  ROUTINE dyn_nxt_c1d  ***
       !!                   
       !! ** Purpose :   Compute the after horizontal velocity from the 
@@ -46,30 +51,14 @@
       !! ** Action : - Update ub,vb arrays, the before horizontal velocity
       !!             - Update un,vn arrays, the now horizontal velocity
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
       !!
-      !! History :
-      !!        !  87-02  (P. Andrich, D. L Hostis)  Original code
-      !!        !  90-10  (C. Levy, G. Madec)
-      !!        !  93-03  (M. Guyon)  symetrical conditions
-      !!        !  97-02  (G. Madec & M. Imbard)  opa, release 8.0
-      !!        !  97-04  (A. Weaver)  Euler forward step
-      !!        !  97-06  (G. Madec)  lateral boudary cond., lbc routine
-      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module
-      !!        !  04-10  (C. Ethe) 1D configuration
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
-
-      !! * Local declarations
-      INTEGER  ::   ji, jj, jk   ! dummy loop indices
+      INTEGER  ::   jk           ! dummy loop indices
       REAL(wp) ::   z2dt         ! temporary scalar
-      !!----------------------------------------------------------------------
-      !!   OPA 9.0 , LOCEAN-IPSL (2005) 
-      !! $Header$ 
-      !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
       !!----------------------------------------------------------------------
 
       IF( kt == nit000 ) THEN
          IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'dyn_nxt_1d : time stepping on 1D configuation'
+         IF(lwp) WRITE(numout,*) 'dyn_nxt_c1d : time stepping on 1D configuation'
          IF(lwp) WRITE(numout,*) '~~~~~~~'
       ENDIF
@@ -83,59 +72,28 @@
       CALL lbc_lnk( va, 'V', -1. )
 
-      !                                                ! ===============
-      DO jk = 1, jpkm1                                 ! Horizontal slab
-         !                                             ! ===============
-         ! Next velocity
-         ! -------------
-         DO jj = 1, jpj                      ! caution: don't use (:,:) for this loop
-            DO ji = 1, jpi                   ! it causes optimization problems on NEC in auto-tasking
-               ! Leap-frog time stepping
-               ua(ji,jj,jk) = ( ub(ji,jj,jk) + z2dt * ua(ji,jj,jk) ) * umask(ji,jj,jk)
-               va(ji,jj,jk) = ( vb(ji,jj,jk) + z2dt * va(ji,jj,jk) ) * vmask(ji,jj,jk)
-            END DO
-         END DO
-         !                                             ! ===============
-      END DO                                           !   End of slab
-      !                                                ! ===============
+      DO jk = 1, jpkm1      ! Next Velocity
+         ua(:,:,jk) = ( ub(:,:,jk) + z2dt * ua(:,:,jk) ) * umask(:,:,jk)
+         va(:,:,jk) = ( vb(:,:,jk) + z2dt * va(:,:,jk) ) * vmask(:,:,jk)
+      END DO 
  
-     !                                                ! ===============
-      DO jk = 1, jpkm1                                 ! Horizontal slab
-         !                                             ! ===============
-         ! Time filter and swap of dynamics arrays
-         ! ------------------------------------------
-         IF( neuler == 0 .AND. kt == nit000 ) THEN
-            DO jj = 1, jpj                      ! caution: don't use (:,:) for this loop
-               DO ji = 1, jpi                   ! it causes optimization problems on NEC in auto-tasking
-                  ! Euler (forward) time stepping
-                  ub(ji,jj,jk) = un(ji,jj,jk)
-                  vb(ji,jj,jk) = vn(ji,jj,jk)
-                  un(ji,jj,jk) = ua(ji,jj,jk)
-                  vn(ji,jj,jk) = va(ji,jj,jk)
-               END DO
-            END DO
-         ELSE
-            DO jj = 1, jpj                      ! caution: don't use (:,:) for this loop
-               DO ji = 1, jpi                   ! it causes optimization problems on NEC in auto-tasking
-                  ! Leap-frog time stepping
-                  ub(ji,jj,jk) = atfp * ( ub(ji,jj,jk) + ua(ji,jj,jk) ) + atfp1 * un(ji,jj,jk)
-                  vb(ji,jj,jk) = atfp * ( vb(ji,jj,jk) + va(ji,jj,jk) ) + atfp1 * vn(ji,jj,jk)
-                  un(ji,jj,jk) = ua(ji,jj,jk)
-                  vn(ji,jj,jk) = va(ji,jj,jk)
-               END DO
-            END DO
+      DO jk = 1, jpkm1      ! Time filter and swap of dynamics arrays
+         IF( neuler == 0 .AND. kt == nit000 ) THEN      ! Euler (forward) time stepping
+             ub(:,:,:) = un(:,:,:)
+             vb(:,:,:) = vn(:,:,:)
+             un(:,:,:) = ua(:,:,:)
+             vn(:,:,:) = va(:,:,:)
+         ELSE                                           ! Leap-frog time stepping
+             ub(:,:,:) = atfp * ( ub(:,:,:) + ua(:,:,:) ) + atfp1 * un(:,:,:)
+             vb(:,:,:) = atfp * ( vb(:,:,:) + va(:,:,:) ) + atfp1 * vn(:,:,:)
+             un(:,:,:) = ua(:,:,:)
+             vn(:,:,:) = va(:,:,:)
          ENDIF
-         !                                             ! ===============
-      END DO                                           !   End of slab
-      !                                                ! ===============
+      END DO
 
-      IF(ln_ctl)   THEN
-         CALL prt_ctl(tab3d_1=un, clinfo1=' nxt_1d  - Un: ', mask1=umask, &
-            &         tab3d_2=vn, clinfo2=' Vn: ', mask2=vmask)
-      ENDIF
+      IF(ln_ctl)   CALL prt_ctl( tab3d_1=un, clinfo1=' nxt_c1d  - Un: ', mask1=umask,   &
+         &                       tab3d_2=vn, clinfo2=' Vn: '           , mask2=vmask )
+      !
+   END SUBROUTINE dyn_nxt_c1d
 
-!     IF(l_ctl)   WRITE(numout,*) ' nxt  - Un: ', SUM(un(2:nictl,2:njctl,1:jpkm1)*umask(2:nictl,2:njctl,1:jpkm1)), &
-!     &                                  ' Vn: ', SUM(vn(2:nictl,2:njctl,1:jpkm1)*vmask(2:nictl,2:njctl,1:jpkm1))
-
-   END SUBROUTINE dyn_nxt_1d
 #else
    !!----------------------------------------------------------------------
@@ -143,8 +101,9 @@
    !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE dyn_nxt_1d ( kt )
-      WRITE(*,*) 'dyn_nxt_1d: You should not have seen this print! error?', kt
-   END SUBROUTINE dyn_nxt_1d
+   SUBROUTINE dyn_nxt_c1d ( kt )
+      WRITE(*,*) 'dyn_nxt_c1d: You should not have seen this print! error?', kt
+   END SUBROUTINE dyn_nxt_c1d
 #endif
+
    !!======================================================================
-END MODULE dynnxt1d
+END MODULE dynnxt_c1d
Index: /trunk/NEMO/C1D_SRC/step_c1d.F90
===================================================================
--- /trunk/NEMO/C1D_SRC/step_c1d.F90	(revision 899)
+++ /trunk/NEMO/C1D_SRC/step_c1d.F90	(revision 900)
@@ -1,22 +1,21 @@
-MODULE step1d
+MODULE step_c1d
    !!======================================================================
-   !!                       ***  MODULE step1D  ***
-   !! Time-stepping    : manager of the ocean, tracer and ice time stepping
+   !!                       ***  MODULE step_c1d  ***
+   !! Time-stepping    : manager of the ocean, tracer and ice time stepping - c1d case
    !!======================================================================
+   !! History :   2.0  !  2004-04  (C. Ethe)  adapted from step.F90 for C1D
+   !!             3.0  !  2008-04  (G. Madec)  redo the adaptation to include SBC
+   !!----------------------------------------------------------------------
 #if defined key_cfg_1d
    !!----------------------------------------------------------------------
-   !!   'key_cfg_1d'               1D Configuration
+   !!   'key_cfg_1d'                                       1D Configuration
    !!----------------------------------------------------------------------  
-   !!----------------------------------------------------------------------
-   !!   stp_1d           : OPA system time-stepping on 1 direction
-   !!----------------------------------------------------------------------
-   !! * Modules used
+   !!   stp_c1d        : NEMO system time-stepping in c1d case
+   !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables 
    USE zdf_oce         ! ocean vertical physics variables
-   USE sbc_oce         ! surface boundary condition: ocean
-   USE ldftra_oce
-   USE ldfdyn_oce
    USE in_out_manager  ! I/O manager
+   USE iom             !
    USE lbclnk
 
@@ -25,16 +24,22 @@
    USE dtatem          ! ocean temperature data           (dta_tem routine)
    USE dtasal          ! ocean salinity    data           (dta_sal routine)
+   USE sbcmod          ! surface boundary condition       (sbc     routine)
+   USE sbcrnf          ! surface boundary condition: runoff variables
    USE ocfzpt          ! surface ocean freezing point    (oc_fz_pt routine)
 
-   USE trcstp          ! passive tracer time-stepping     (trc_stp routine)
-
+   USE trcstp          ! passive tracer time-stepping      (trc_stp routine)
+
+   USE traqsr          ! solar radiation penetration      (tra_qsr routine)
+   USE trasbc          ! surface boundary condition       (tra_sbc routine)
+   !   zdfkpp          ! KPP non-local tracer fluxes      (tra_kpp routine)
+   USE trazdf          ! vertical mixing                  (tra_zdf routine)
+   USE tranxt          ! time-stepping                    (tra_nxt routine)
+   USE tranpc          ! non-penetrative convection       (tra_npc routine)
+
+   USE eosbn2          ! equation of state                (eos_bn2 routine)
+
+   USE dyncor1d        ! Coriolis term (c1d case)         (dyn_cor_1d     )
    USE dynzdf          ! vertical diffusion               (dyn_zdf routine)
-
-   USE traqsr          ! solar radiation penetration      (tra_qsr routine)
-   USE tranxt          ! time-stepping                    (tra_nxt routine)
-   USE trazdf          ! vertical diffusion               (tra_zdf routine)
-   USE trasbc          ! surface boundary condition       (tra_sbc routine)
-
-   USE eosbn2
+   USE dynnxt1d        ! time-stepping                    (dyn_nxt routine)
 
    USE zdfbfr          ! bottom friction                  (zdf_bfr routine)
@@ -46,22 +51,16 @@
    USE zdfmxl          ! Mixed-layer depth                (zdf_mxl routine)
 
-   USE dyncor1d
-   USE dynnxt1d
-   USE diawri1d        ! Standard run outputs             (dia_wri_1d routine)
-
    USE ice_oce         ! sea-ice variable
-   USE icestp1d        ! sea-ice time-stepping             (ice_stp routine)
-
-   USE diawri          ! Standard run outputs             (dia_wri_state routine)
-
+
+   USE diawri          ! Standard run outputs             (dia_wri routine)
 
    USE stpctl          ! time stepping control            (stp_ctl routine)
    USE restart         ! ocean restart                    (rst_wri routine)
    USE prtctl          ! Print control                    (prt_ctl routine)
+
    IMPLICIT NONE
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC stp_1d            ! called by opa.F90
+   PUBLIC stp_c1d      ! called by opa.F90
 
    !! * Substitutions
@@ -69,20 +68,21 @@
 #  include "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Id$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! NEMO 3.0 , LOCEAN-IPSL (2008) 
+   !! $Id:$
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    !!----------------------------------------------------------------------
 
 CONTAINS
 
-   SUBROUTINE stp_1d( kstp )
+   SUBROUTINE stp_c1d( kstp )
       !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE stp1D  ***
+      !!                     ***  ROUTINE stp_c1d  ***
       !!                      
-      !! ** Purpose : - Time stepping of OPA (momentum and active tracer eqs.)
-      !!              - Time stepping of LIM (dynamic and thermodynamic eqs.)
+      !! ** Purpose :  - Time stepping of SBC including LIM (dynamic and thermodynamic eqs.)
+      !!               - Time stepping of OPA (momentum and active tracer eqs.)
+      !!               - Time stepping of TOP (passive tracer eqs.)
       !! 
       !! ** Method  : -1- Update forcings and data  
-      !!              -2- Update ocean physics 
+      !!              -2- Update vertical ocean physics 
       !!              -3- Compute the t and s trends 
       !!              -4- Update t and s 
@@ -91,75 +91,29 @@
       !!              -7- Compute the diagnostics variables (rd,N2, div,cur,w)
       !!              -8- Outputs and diagnostics
-      !!
-      !! History :
-      !!        !  91-03  ()  Original code
-      !!        !  91-11  (G. Madec)
-      !!        !  92-06  (M. Imbard)  add a first output record
-      !!        !  96-04  (G. Madec)  introduction of dynspg
-      !!        !  96-04  (M.A. Foujols)  introduction of passive tracer
-      !!   8.0  !  97-06  (G. Madec)  new architecture of call
-      !!   8.2  !  97-06  (G. Madec, M. Imbard, G. Roullet)  free surface
-      !!   8.2  !  99-02  (G. Madec, N. Grima)  hpg implicit
-      !!   8.2  !  00-07  (J-M Molines, M. Imbard)  Open Bondary Conditions
-      !!   9.0  !  02-06  (G. Madec)  free form, suppress macro-tasking
-      !!        !  04-10  (C. Ethe) 1D configuration
       !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kstp   ! ocean time-step index
-
-      !! * local declarations
+      INTEGER, INTENT(in) ::   kstp   ! ocean time-step index
+      INTEGER ::   jk       ! dummy loop indice
       INTEGER ::   indic    ! error indicator if < 0
-!!      INTEGER ::   ii0, ii1, ij0, ij1   ! temporary integers
       !! ---------------------------------------------------------------------
 
       indic = 1                    ! reset to no error condition
-      adatrj = adatrj + rdt/86400._wp
 
       CALL day( kstp )             ! Calendar
 
-      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Update data, open boundaries and Forcings
+      CALL rst_opn( kstp )         ! Open the restart file
+
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! Update data, open boundaries, surface boundary condition (including sea-ice)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
       IF( lk_dtatem  )   CALL dta_tem( kstp )         ! update 3D temperature data
-
-      IF( lk_dtasal  )   CALL dta_sal( kstp )         ! Salinity data
-
-      IF( lk_dtasst  )   CALL dta_sst( kstp )         ! Sea Surface Temperature data
-
-                         CALL tau( kstp )             ! wind stress
-
-                         CALL flx_rnf( kstp )         ! runoff data
-
-                         CALL flx( kstp )             ! heat and freshwater fluxes
-
-      IF( lk_ice_lim )  THEN 
-                        CALL ice_stp_1d( kstp )      ! sea-ice model (Update stress & fluxes)
-      ELSE
-                        CALL oce_sbc( kstp )         ! ocean surface boudaries
+      IF( lk_dtasal  )   CALL dta_sal( kstp )         ! update 3D salinity data
+
+                         CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice)
+
+      IF( ninist == 1 ) THEN                          ! Output the initial state and forcings
+                        CALL dia_wri_state( 'output.init' )   ;   ninist = 0
       ENDIF
 
-      IF( ln_fwb     )   CALL flx_fwb( kstp )         ! freshwater budget
-
-
-      IF( kstp == nit000 ) THEN 
-         IF( ninist == 1 ) THEN                       ! Output the initial state and forcings
-            CALL dia_wri_state( 'output.init' )
-         ENDIF
-      ENDIF
-
-      IF(ln_ctl) THEN         ! print mean trends (used for debugging)
-         CALL prt_ctl(tab2d_1=emp    , clinfo1=' emp  -   : ', mask1=tmask, ovlap=1)
-         CALL prt_ctl(tab2d_1=emps   , clinfo1=' emps -   : ', mask1=tmask, ovlap=1)
-         CALL prt_ctl(tab2d_1=qns    , clinfo1=' qns  -   : ', mask1=tmask, ovlap=1)
-         CALL prt_ctl(tab2d_1=qsr    , clinfo1=' qsr  -   : ', mask1=tmask, ovlap=1)
-         CALL prt_ctl(tab3d_1=tmask  , clinfo1=' tmask    : ', mask1=tmask, ovlap=1, kdim=jpk)
-         CALL prt_ctl(tab3d_1=tn     , clinfo1=' sst  -   : ', mask1=tmask, ovlap=1, kdim=1)
-         CALL prt_ctl(tab3d_1=sn     , clinfo1=' sss  -   : ', mask1=tmask, ovlap=1, kdim=1)
-         CALL prt_ctl(tab2d_1=utau   , clinfo1=' tau  - u : ', mask1=umask, &
-            &         tab2d_2=vtau   , clinfo2='      - v : ', mask2=vmask, ovlap=1)
-      ENDIF
-
-
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -172,23 +126,24 @@
       !-----------------------------------------------------------------------
 
-                       CALL bn2( tb, sb, rn2 )              ! before Brunt-Vaisala frequency
+                        CALL bn2( tb, sb, rn2 )             ! before Brunt-Vaisala frequency
       
       !                                                     ! Vertical eddy viscosity and diffusivity coefficients
-      IF( lk_zdfric )   CALL zdf_ric( kstp )                       ! Richardson number dependent Kz
-      IF( lk_zdftke )   CALL zdf_tke( kstp )                       ! TKE closure scheme for Kz
-      IF( lk_zdfkpp )   CALL zdf_kpp( kstp )                       ! KPP scheme for Kz
-      IF( lk_zdfcst )   avt (:,:,:) = avt0 * tmask(:,:,:)          ! Constant Kz (reset avt to the background value)
-
-
+      IF( lk_zdfric )   CALL zdf_ric( kstp )                     ! Richardson number dependent Kz
+      IF( lk_zdftke )   CALL zdf_tke( kstp )                     ! TKE closure scheme for Kz
+      IF( lk_zdfkpp )   CALL zdf_kpp( kstp )                     ! KPP closure scheme for Kz
+      IF( lk_zdfcst )   THEN                                     ! Constant Kz (reset avt, avm to the background value)
+         avt (:,:,:) = avt0 * tmask(:,:,:)
+         avmu(:,:,:) = avm0 * umask(:,:,:)
+         avmv(:,:,:) = avm0 * vmask(:,:,:)
+      ENDIF
+      IF( nn_runoff /=0 ) THEN                              ! increase diffusivity at rivers mouths
+         DO jk = 2, nkrnf   ;   avt(:,:,jk) = avt(:,:,jk) + rn_avt_rnf * rnfmsk(:,:)   ;   END DO
+      ENDIF
       IF( ln_zdfevd )   CALL zdf_evd( kstp )                 ! enhanced vertical eddy diffusivity
-
-      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp)   &
+      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   &
          &              CALL zdf_ddm( kstp )                 ! double diffusive mixing
-
                         CALL zdf_bfr( kstp )                 ! bottom friction
-
                         CALL zdf_mxl( kstp )                 ! mixed layer depth
 
-
 #if defined key_passivetrc
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -197,10 +152,7 @@
       ! N.B. ua, va, ta, sa arrays are used as workspace in this section
       !-----------------------------------------------------------------------
-
-                               CALL trc_stp( kstp, indic )            ! time-stepping
-
+                             CALL trc_stp( kstp, indic )            ! time-stepping
 #endif
 
-
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
       ! Active tracers
@@ -208,19 +160,15 @@
       ! N.B. ua, va arrays are used as workspace in this section
       !-----------------------------------------------------------------------
-
-                               ta(:,:,:) = 0.e0               ! set tracer trends to zero
-                               sa(:,:,:) = 0.e0
-
-                               CALL tra_sbc( kstp )           ! surface boundary condition
-
-      IF( ln_traqsr        )   CALL tra_qsr( kstp )           ! penetrative solar radiation qsr
-
-      IF( lk_zdfkpp        )   CALL tra_kpp( kstp )           ! KPP non-local tracer fluxes
-
-                               CALL tra_zdf( kstp )           ! vertical mixing
-
-                               CALL tra_nxt( kstp )           ! tracer fields at next time step
-
-                               CALL eos( tb, sb, rhd, rhop )       ! now (swap=before) in situ density for dynhpg module
+                             ta(:,:,:) = 0.e0                ! set tracer trends to zero
+                             sa(:,:,:) = 0.e0
+
+                             CALL tra_sbc    ( kstp )        ! surface boundary condition
+      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )        ! penetrative solar radiation qsr
+                             CALL tra_adv    ( kstp )        ! horizontal & vertical advection
+      IF( lk_zdfkpp )        CALL tra_kpp    ( kstp )        ! KPP non-local tracer fluxes
+                             CALL tra_zdf    ( kstp )        ! vertical mixing
+                             CALL tra_nxt( kstp )            ! tracer fields at next time step
+      IF( ln_zdfnpc      )   CALL tra_npc( kstp )            ! applied non penetrative convective adjustment on (t,s)
+                             CALL eos( tb, sb, rhd, rhop )   ! now (swap=before) in situ density for dynhpg module
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -229,18 +177,10 @@
       ! N.B. ta, sa arrays are used as workspace in this section 
       !-----------------------------------------------------------------------
-
                                ua(:,:,:) = 0.e0               ! set dynamics trends to zero
                                va(:,:,:) = 0.e0
-  
-                               CALL dyn_cor_1d     ( kstp )
-      !                                                       ! vertical diffusion
-                               CALL dyn_zdf( kstp )      
-
-!i bug lbc sur emp
-      CALL lbc_lnk( emp, 'T', 1. )
-!i
- 
-                                CALL dyn_nxt_1d( kstp )          ! lateral velocity at next time step 
-
+
+                               CALL dyn_vor_c1d( kstp )       ! vorticity term including Coriolis
+                               CALL dyn_zdf    ( kstp )       ! vertical diffusion
+                               CALL dyn_nxt_c1d( kstp )       ! lateral velocity at next time step
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -249,37 +189,33 @@
       ! N.B. ua, va, ta, sa arrays are used as workspace in this section
       !-----------------------------------------------------------------------
-
-                               CALL oc_fz_pt                    ! ocean surface freezing temperature
-
-
-      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Control, diagnostics and outputs
-      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
-      !-----------------------------------------------------------------------
-
-      !                                            ! Time loop: control and print
-                       CALL stp_ctl( kstp, indic )
-                       IF ( indic < 0 ) CALL ctl_stop( 'step1d: indic < 0' )
-
-      IF ( nstop == 0 ) THEN
-         !                                         ! Diagnostics:
-         !                                         ! save and outputs
-                           CALL rst_write  ( kstp )              ! ocean model: restart file output
-                           CALL dia_wri_1d ( kstp, indic )       ! ocean model: outputs
-
-      ENDIF
-
-
-   END SUBROUTINE stp_1d
+                       CALL oc_fz_pt                        ! ocean surface freezing temperature
+
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! Control and restarts
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+                                 CALL stp_ctl( kstp, indic )
+      IF( kstp == nit000     )   CALL iom_close( numror )             ! close input  ocean restart file
+      IF( lrst_oce           )   CALL rst_write  ( kstp )             ! write output ocean restart file
+
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! diagnostics and outputs
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      ! N.B. ua, va, ta, sa arrays are used as workspace in this section
+      !-----------------------------------------------------------------------
+
+      IF( nstop == 0 )           CALL dia_wri_c1d( kstp, indic )       ! ocean model: outputs
+      !
+   END SUBROUTINE stp_c1d
+
 #else
    !!----------------------------------------------------------------------
-   !!   Default key                                     NO 1D Config
+   !!   Default key                                            NO 1D Config
    !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE stp_1d ( kt )
-      WRITE(*,*) 'stp_1d: You should not have seen this print! error?', kt
-   END SUBROUTINE stp_1d
+   SUBROUTINE stp_c1d ( kt )      ! dummy routine
+      WRITE(*,*) 'stp_c1d: You should not have seen this print! error?', kt
+   END SUBROUTINE stp_c1d
 #endif
+
    !!======================================================================
-END MODULE step1d
+END MODULE step_c1d
Index: /trunk/NEMO/LIM_SRC_2/iceini_2.F90
===================================================================
--- /trunk/NEMO/LIM_SRC_2/iceini_2.F90	(revision 899)
+++ /trunk/NEMO/LIM_SRC_2/iceini_2.F90	(revision 900)
@@ -26,5 +26,4 @@
    USE limistate_2
    USE limrst_2   
-   USE ini1d           ! initialization of the 1D configuration
    USE in_out_manager
       
@@ -101,6 +100,4 @@
       READ   ( numnam_ice , namicerun )
 
-      IF( lk_cfg_1d  )   ln_limdyn = .FALSE.      ! No ice transport in 1D configuration
-
       IF(lwp) THEN
          WRITE(numout,*)
Index: /trunk/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 899)
+++ /trunk/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 900)
@@ -23,5 +23,5 @@
    USE closea
    USE solisl
-   USE ini1d           ! initialization of the 1D configuration
+   USE c1d             ! 1D configuration
 
    IMPLICIT NONE
Index: /trunk/NEMO/OPA_SRC/SBC/sbcice_lim.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 899)
+++ /trunk/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 900)
@@ -18,4 +18,5 @@
    !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers
+   USE c1d             ! 1d configuration
    USE dom_oce         ! ocean space and time domain
    USE par_ice         ! sea-ice parameters
@@ -135,16 +136,4 @@
 
          ! ... masked sea surface freezing temperature [Kelvin] (set to rt0 over land)
-!old fashion         zsss_m (:,:) = SQRT( sss_m(:,:) )
-!old fashion         zsss2_m(:,:) = sss_m(:,:) * sss_m(:,:)
-!old fashion         zsss3_m(:,:) = zsss_m(:,:) * zsss_m(:,:) * zsss_m(:,:)
-!old fashion
-!old fashion         DO jj = 1, jpj
-!old fashion            DO ji = 1, jpi
-!old fashion               t_bo(ji,jj)  = ABS ( rt0 - 0.0575      * sss_m(ji,jj)      &
-!old fashion                  &                    + 1.710523e-03 * zsss3_m(ji,jj)    &
-!old fashion                  &                    - 2.154996e-04 * zsss2_m(ji,jj) )  &
-!old fashion                            * tms(ji,jj)
-!old fashion            END DO
-!old fashion         END DO
          t_bo(:,:) = tfreez( sss_m ) +  rt0 
 
@@ -221,5 +210,5 @@
          d_oa_i_thd(:,:,:)  = 0.e0 ; d_oa_i_trp(:,:,:)  = 0.e0
 
-         emps(:,:)      = 0.e0     ; fseqv(:,:)     = 0.e0
+         fseqv(:,:)     = 0.e0
          fsbri(:,:)     = 0.e0     ; fsalt_res(:,:) = 0.e0
          fsalt_rpo(:,:) = 0.e0
@@ -251,12 +240,12 @@
          ! Dynamical processes |       
          !---------------------|
-                         CALL lim_dyn                    ! Ice dynamics    ( rheology/dynamics )
-                         CALL lim_trp                    ! Ice transport   ( Advection/diffusion )
-                         CALL lim_var_agg(1)             ! aggregate categories, requested
-                         CALL lim_var_glo2eqv            ! equivalent variables, requested for rafting
+         IF( .NOT. lk_c1d ) THEN                         ! Ice dynamics & transport (not in 1D case)
+                         CALL lim_dyn                         ! Ice dynamics    ( rheology/dynamics )
+                         CALL lim_trp                         ! Ice transport   ( Advection/diffusion )
+                         CALL lim_var_agg(1)                  ! aggregate categories, requested
+                         CALL lim_var_glo2eqv                 ! equivalent variables, requested for rafting
                          !+++++
                          WRITE(numout,*) ' - After ice dynamics and transport '
-                         CALL lim_inst_state(jiindx,jjindx,1)
-                         WRITE(numout,*) ' '
+                         CALL lim_inst_state( jiindx, jjindx, 1 )
                          WRITE(numout,*)
                          WRITE(numout,*) ' Mechanical Check ************** '
@@ -267,5 +256,6 @@
                          WRITE(numout,*) ' Sum of both minus 1     ', ato_i(jiindx,jjindx) + at_i(jiindx,jjindx) - 1.00
                          !+++++
-                         CALL lim_itd_me                 ! Mechanical redistribution ! (ridging/rafting)
+                         CALL lim_itd_me                      ! Mechanical redistribution ! (ridging/rafting)
+         ENDIF
          !--------------------|
          ! Ice thermodynamics |
@@ -317,22 +307,4 @@
          IF( lrst_ice )  CALL lim_rst_write( kt )        ! Ice restart file 
                          CALL lim_var_glo2eqv
-         !
-         ! Re-initialization of forcings
-         qsr     (:,:)   = 0.e0
-         qns     (:,:)   = 0.e0
-         tprecip (:,:)   = 0.e0 
-         sprecip (:,:)   = 0.e0
-         qsr_ice (:,:,:) = 0.e0
-         qns_ice (:,:,:) = 0.e0 
-         dqns_ice(:,:,:) = 0.e0 
-#if ! defined key_coupled 
-         qla_ice (:,:,:) = 0.e0
-         dqla_ice(:,:,:) = 0.e0
-         fr1_i0  (:,:)   = 0.e0
-         fr2_i0  (:,:)   = 0.e0
-#else
-         rrunoff (:,:)   = 0.e0
-         calving (:,:)   = 0.e0
-#endif
          !
          !-------------------------------|
Index: /trunk/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 899)
+++ /trunk/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 900)
@@ -12,9 +12,9 @@
    !!   'key_lim2' :                                  LIM 2.0 sea-ice model
    !!----------------------------------------------------------------------
-   !!----------------------------------------------------------------------
    !!   sbc_ice_lim_2  : sea-ice model time-stepping and
    !!                    update ocean sbc over ice-covered area
    !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers
+   USE c1d             ! 1d configuration
    USE dom_oce         ! ocean space and time domain
    USE ice_2
@@ -58,6 +58,6 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2006) 
-   !! $ Id: $
+   !! NEMO/SBC  3.0 , LOCEAN-IPSL (2008) 
+   !! $Id: $
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
@@ -177,13 +177,15 @@
          !  Ice model step  !
          ! ---------------- !
-         ;                              CALL lim_rst_opn_2  ( kt )      ! Open Ice restart file
-         ;                              CALL lim_dyn_2      ( kt )      ! Ice dynamics    ( rheology/dynamics )
-         ;                              CALL lim_trp_2      ( kt )      ! Ice transport   ( Advection/diffusion )
-         IF( ln_limdmp )                CALL lim_dmp_2      ( kt )      ! Ice damping 
-         ;                              CALL lim_thd_2      ( kt )      ! Ice thermodynamics 
-         ;                              CALL lim_sbc_2      ( kt )      ! Ice/Ocean Mass & Heat fluxes 
+                                        CALL lim_rst_opn_2  ( kt )      ! Open Ice restart file
+         IF( .NOT. lk_c1d ) THEN                                        ! Ice dynamics & transport (not in 1D case)
+                                        CALL lim_dyn_2      ( kt )           ! Ice dynamics    ( rheology/dynamics )
+                                        CALL lim_trp_2      ( kt )           ! Ice transport   ( Advection/diffusion )
+            IF( ln_limdmp )             CALL lim_dmp_2      ( kt )           ! Ice damping 
+         ENDIF
+                                        CALL lim_thd_2      ( kt )      ! Ice thermodynamics 
+                                        CALL lim_sbc_2      ( kt )      ! Ice/Ocean Mass & Heat fluxes 
          IF( MOD( kt+nn_fsbc-1, ninfo ) == 0 .OR.   &
             &  ntmoy == 1 )             CALL lim_dia_2      ( kt )      ! Ice Diagnostics 
-         ;                              CALL lim_wri_2      ( kt )      ! Ice outputs 
+                                        CALL lim_wri_2      ( kt )      ! Ice outputs 
          IF( lrst_ice )                 CALL lim_rst_write_2( kt )      ! Ice restart file 
          !
Index: /trunk/NEMO/OPA_SRC/istate.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/istate.F90	(revision 899)
+++ /trunk/NEMO/OPA_SRC/istate.F90	(revision 900)
@@ -36,5 +36,5 @@
    USE in_out_manager  ! I/O manager
    USE iom
-   USE ini1d           ! re-initialization of u-v mask for the 1D configuration
+   USE c1d             ! re-initialization of u-v mask for the 1D configuration
    USE zpshde          ! partial step: hor. derivative (zps_hde routine)
    USE eosbn2          ! equation of state            (eos bn2 routine)
Index: /trunk/NEMO/OPA_SRC/opa.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/opa.F90	(revision 899)
+++ /trunk/NEMO/OPA_SRC/opa.F90	(revision 900)
@@ -73,7 +73,7 @@
    USE dynspg_oce      ! Control choice of surface pressure gradient schemes
    USE prtctl          ! Print control                 (prt_ctl_init routine)
-   USE ini1d           ! re-initialization of u-v mask for the 1D configuration
-   USE dyncor1d        ! Coriolis factor at T-point
-   USE step1d          ! Time stepping loop for the 1D configuration
+   USE c1d             ! 1D configuration
+   USE dyncor_c1d      ! Coriolis factor at T-point
+   USE step_c1d        ! Time stepping loop for the 1D configuration
 
    USE initrc          ! Initialization of the passive tracers
@@ -122,31 +122,23 @@
       ! check that all process are still there... If some process have an error,
       ! they will never enter in step and other processes will wait until the end of the cpu time!
-      IF( lk_mpp )   CALL mpp_max(nstop)
-
-      IF( lk_c1d ) THEN 
-         istp = nit000
+      IF( lk_mpp )   CALL mpp_max( nstop )
+
+      istp = nit000
+      IF( lk_c1d ) THEN                 ! 1D configuration (no AGRIF zoom)
+         !
+         DO WHILE ( istp <= nitend .AND. nstop == 0 )
+            CALL stp_c1d( istp )
+            istp = istp + 1
+         END DO
+      ELSE                              ! 3D ocean with or without AGRIF zoom
+         !
          DO WHILE ( istp <= nitend .AND. nstop == 0 )
 #if defined key_agrif
-            CALL Agrif_Step(stp_1d)
-#else
-            CALL stp_1d( istp )
-#endif
-            istp = istp + 1
-
-            IF( lk_mpp )   CALL mpp_max(nstop)
- 
-         END DO
-      ELSE
-         istp = nit000
-         DO WHILE ( istp <= nitend .AND. nstop == 0 )
-#if defined key_agrif
-            CALL Agrif_Step(stp)
+            CALL Agrif_Step( stp )
 #else
             CALL stp( istp )
 #endif
             istp = istp + 1
-
-            IF( lk_mpp )   CALL mpp_max(nstop)
-            
+            IF( lk_mpp )   CALL mpp_max( nstop )
          END DO
       ENDIF
@@ -168,5 +160,5 @@
       IF( lk_mpp )   CALL mppstop                          ! Close all files (mpp)
 #endif
-
+      !
    END SUBROUTINE opa_model
 
@@ -267,7 +259,11 @@
       CALL dom_init                         ! Domain
 
-      IF( ln_ctl )      CALL prt_ctl_init   ! Print control
-
-      IF( lk_c1d )      CALL fcorio_1d      ! redefine Coriolis at T-point
+      IF( lk_c1d    ) THEN                      ! adaptation for 1D configuration 
+         CALL cor_c1d                                ! redefine Coriolis at T-point
+         umask(:,:,:) = tmask(:,:,:)                 ! U, V and T-points are the same
+         vmask(:,:,:) = tmask(:,:,:)                 ! 
+      ENDIF
+
+      IF( ln_ctl    )   CALL prt_ctl_init   ! Print control
 
       IF( lk_obc    )   CALL obc_init       ! Open boundaries 
@@ -309,8 +305,4 @@
 
       IF(lwp) WRITE(numout,cform_aaa)       ! Flag AAAAAAA
-
-      IF( lk_c1d  )  THEN 
-         CALL init_1d
-      ENDIF
 
    END SUBROUTINE opa_init
Index: /trunk/NEMO/OPA_SRC/par_oce.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/par_oce.F90	(revision 899)
+++ /trunk/NEMO/OPA_SRC/par_oce.F90	(revision 900)
@@ -28,6 +28,6 @@
    INTEGER, PUBLIC, PARAMETER ::    &  !: 
       jpni   = 1,                   &  !: number of processors following i 
-      jpnj   = 2,                   &  !: number of processors following j
-      jpnij  = 2                       !: nb of local domain = nb of processors 
+      jpnj   = 1,                   &  !: number of processors following j
+      jpnij  = 1                       !: nb of local domain = nb of processors 
       !                                !  ( <= jpni x jpnj )
 #else
Index: /trunk/NEMO/OPA_SRC/restart.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/restart.F90	(revision 899)
+++ /trunk/NEMO/OPA_SRC/restart.F90	(revision 900)
@@ -22,5 +22,5 @@
    USE in_out_manager  ! I/O manager
    USE iom             ! I/O module
-   USE ini1d           ! re-initialization of u-v mask for the 1D configuration
+   USE c1d             ! re-initialization of u-v mask for the 1D configuration
    USE zpshde          ! partial step: hor. derivative (zps_hde routine)
    USE eosbn2          ! equation of state            (eos bn2 routine)
