Index: trunk/NEMO/C1D_SRC/diawri1d.F90
===================================================================
--- trunk/NEMO/C1D_SRC/diawri1d.F90	(revision 833)
+++ trunk/NEMO/C1D_SRC/diawri1d.F90	(revision 888)
@@ -13,4 +13,6 @@
    USE dom_oce         ! ocean space and time domain
    USE zdf_oce         ! ocean vertical physics
+   USE sbc_oce         ! surface boundary condition: ocean
+   USE sbc_ice         ! surface boundary condition: ice
    USE zdftke          ! TKE vertical mixing
    USE zdfkpp          ! KPP vertical mixing
@@ -19,7 +21,4 @@
    USE phycst          ! physical constants
    USE ocfzpt          ! ???
-   USE ocesbc          ! surface thermohaline fluxes
-   USE taumod          ! surface stress
-   USE flxrnf          ! ???
    USE zdfmxl          ! mixed layer
    USE daymod          ! calendar
@@ -49,5 +48,5 @@
    !!----------------------------------------------------------------------
    !!   OPA 9.0 , LOCEAN-IPSL  (2005)
-   !! $Header$ 
+   !! $Id$
    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
@@ -194,13 +193,13 @@
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
 
-#if ! defined key_dynspg_rl && defined key_lim3
-         ! 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
+!!$#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 )
@@ -211,5 +210,5 @@
          CALL histdef( nid_T, "sosalflx", "Surface Salt Flux"                  , "Kg/m2/s",   &  ! emps * sn
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
-         CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux"             , "W/m2"   ,   &  ! qt
+         CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux"             , "W/m2"   ,   &  ! qsr + qns
             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
          CALL histdef( nid_T, "soshfldo", "Shortwave Radiation"                , "W/m2"   ,   &  ! qsr
@@ -238,5 +237,5 @@
 #endif
 
-#if ( defined key_coupled && ! defined key_lim3 ) 
+#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 )
@@ -260,5 +259,5 @@
 #endif
 
-#if defined key_lim3 && defined key_coupled
+#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 )
@@ -275,5 +274,5 @@
 #endif
          !                                                                                      !!! nid_U : 2D
-         CALL histdef( nid_T, "sozotaux", "Wind Stress along i-axis"           , "N/m2"   ,   &  ! taux
+         CALL histdef( nid_T, "sozotaux", "Wind Stress along i-axis"           , "N/m2"   ,   &  ! utau
             &          jpi, jpj, nh_T, 1  , 1, 1  , - 99, 32, clop, zsto, zout )
 
@@ -286,5 +285,5 @@
 #endif
          !                                                                                      !!! nid_V : 2D
-         CALL histdef( nid_T, "sometauy", "Wind Stress along j-axis"           , "N/m2"   ,   &  ! tauy
+         CALL histdef( nid_T, "sometauy", "Wind Stress along j-axis"           , "N/m2"   ,   &  ! vtau
             &          jpi, jpj, nh_T, 1  , 1, 1  , - 99, 32, clop, zsto, zout )
 #if defined key_zdftke
@@ -365,5 +364,5 @@
       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
+#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
@@ -374,5 +373,5 @@
       zw2d(:,:) = emps(:,:) * sn(:,:,1) * tmask(:,:,1)
       CALL histwrite( nid_T, "sosalflx", it, zw2d          , ndim_hT, ndex_hT )   ! c/d salt flux
-      CALL histwrite( nid_T, "sohefldo", it, qt            , ndim_hT, ndex_hT )   ! total heat flux
+      CALL histwrite( nid_T, "sohefldo", it, qsr + qns     , ndim_hT, ndex_hT )   ! total heat flux
       CALL histwrite( nid_T, "soshfldo", it, qsr           , ndim_hT, ndex_hT )   ! solar heat flux
       CALL histwrite( nid_T, "somxl010", it, hmlp          , ndim_hT, ndex_hT )   ! mixed layer depth
@@ -397,5 +396,5 @@
       CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping
 #endif
-#if ( defined key_coupled && ! defined key_lim3 ) 
+#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
@@ -412,5 +411,5 @@
       CALL histwrite( nid_T, "sohtc300", it, htc3          , ndim_hT, ndex_hT )   ! first 300m heaat content
 #endif
-#if defined key_lim3 &&  defined key_coupled 
+#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
@@ -418,7 +417,7 @@
 
       CALL histwrite( nid_T, "vozocrtx", it, un            , ndim_T , ndex_T )    ! i-current
-      CALL histwrite( nid_T, "sozotaux", it, taux          , ndim_hT, ndex_hT )   ! i-wind stress
+      CALL histwrite( nid_T, "sozotaux", it, utau          , ndim_hT, ndex_hT )   ! i-wind stress
       CALL histwrite( nid_T, "vomecrty", it, vn            , ndim_T , ndex_T  )   ! j-current
-      CALL histwrite( nid_T, "sometauy", it, tauy          , ndim_hT, ndex_hT )   ! j-wind stress
+      CALL histwrite( nid_T, "sometauy", it, vtau          , ndim_hT, ndex_hT )   ! j-wind stress
 #if defined key_zdftke
       CALL histwrite( nid_T, "votlsdis", it, e_dis         , ndim_T , ndex_T )    ! Diss. Turb. lenght scale
Index: trunk/NEMO/C1D_SRC/icestp1d.F90
===================================================================
--- trunk/NEMO/C1D_SRC/icestp1d.F90	(revision 833)
+++ trunk/NEMO/C1D_SRC/icestp1d.F90	(revision 888)
@@ -6,8 +6,8 @@
    !! History :   9.0  !  04-10  (C. Ethe)  from icestp, 1D configuration
    !!----------------------------------------------------------------------
-#if defined key_cfg_1d && defined key_lim3
+#if defined key_cfg_1d && ( defined key_lim3 || defined key_lim2 )
    !!----------------------------------------------------------------------
    !!   'key_cfg_1d'  .AND.                                1D Configuration
-   !!   'key_lim3'                                     Lim sea-ice model
+   !!   'key_lim2' OR 'key_lim3' :             LIM 2.0 or 3.0 sea-ice model
    !!----------------------------------------------------------------------
    !!----------------------------------------------------------------------
@@ -18,21 +18,15 @@
    USE in_out_manager  ! I/O manager
    USE ice_oce         ! ice variables
-   USE flx_oce         ! forcings variables
-   USE dom_ice         ! LIM sea-ice domain
-   USE cpl_oce         ! coupled ocean-atmosphere variables
-   USE blk_oce         ! bulk variables
+   USE dom_ice_2       ! LIM sea-ice domain
+   USE sbc_oce         ! surface boundary condition: ocean
+   USE sbc_ice         ! surface boundary condition: ice
    USE daymod          ! calendar
    USE phycst          ! Define parameters for the routines
-   USE taumod          ! surface stress forcing
-   USE ice             ! ice variables
+   USE ice_2           ! ice variables
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE limthd
-   USE limflx
-   USE limwri
-   USE limrst
-
-   USE ocesbc          ! thermohaline fluxes
-   USE flxmod          ! thermohaline forcing
-   USE flxrnf          ! runoffs forcing
+   USE limthd_2
+   USE limwri_2
+   USE limrst_2
+
    USE tradmp          ! damping salinity trend
    USE dtatem          ! ocean temperature data
@@ -52,5 +46,5 @@
    !!----------------------------------------------------------------------
    !!   LIM 2.0 , UCL-LOCEAN-IPSL (2006) 
-   !! $Header$ 
+   !! $Id$
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
@@ -109,6 +103,6 @@
          u_io  (:,:) = u_io  (:,:) / FLOAT( nfice )
          v_io  (:,:) = v_io  (:,:) / FLOAT( nfice )
-         gtaux (:,:) = taux  (:,:)
-         gtauy (:,:) = tauy  (:,:)
+         gtaux (:,:) = utau  (:,:)
+         gtauy (:,:) = vtau  (:,:)
 
          zsss_io (:,:) = SQRT( sss_io(:,:) ) 
@@ -220,5 +214,5 @@
       IF( kt == nit000 ) THEN     
          qsr    (:,:) = 0.e0
-         qt     (:,:) = 0.e0
+         qns    (:,:) = 0.e0
          qrp    (:,:) = 0.e0
          emp    (:,:) = 0.e0
@@ -238,5 +232,5 @@
       ! -----------------
       
-      qt  (:,:) = fnsolar(:,:) + fsolar(:,:)     ! non solar heat flux + solar flux
+      qns (:,:) = fnsolar(:,:)                    ! non solar heat flux
       qsr (:,:) = fsolar(:,:)                     ! solar flux
       
@@ -261,12 +255,12 @@
          DO ji = 1, fs_jpim1   ! vertor opt.
             ztxy        = freezn(ji,jj)             ! ice/ocean indicator at T-points
-            taux(ji,jj) = (1.-ztxy) * taux(ji,jj) + ztxy * ftaux(ji,jj)    ! stress at the ocean surface
-            tauy(ji,jj) = (1.-ztxy) * tauy(ji,jj) + ztxy * ftauy(ji,jj)
-         END DO
-      END DO
-      
-      ! boundary condition on the stress (taux,tauy)
-      CALL lbc_lnk( taux, 'U', -1. )
-      CALL lbc_lnk( tauy, 'V', -1. )
+            utau(ji,jj) = (1.-ztxy) * utau(ji,jj) + ztxy * ftaux(ji,jj)    ! stress at the ocean surface
+            vtau(ji,jj) = (1.-ztxy) * vtau(ji,jj) + ztxy * ftauy(ji,jj)
+         END DO
+      END DO
+      
+      ! boundary condition on the stress (utau,vtau)
+      CALL lbc_lnk( utau, 'U', -1. )
+      CALL lbc_lnk( vtau, 'V', -1. )
       
       ! Re-initialization of fluxes
Index: trunk/NEMO/C1D_SRC/step1d.F90
===================================================================
--- trunk/NEMO/C1D_SRC/step1d.F90	(revision 833)
+++ trunk/NEMO/C1D_SRC/step1d.F90	(revision 888)
@@ -15,4 +15,5 @@
    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
@@ -24,10 +25,4 @@
    USE dtatem          ! ocean temperature data           (dta_tem routine)
    USE dtasal          ! ocean salinity    data           (dta_sal routine)
-   USE dtasst          ! ocean sea surface temerature     (dta_sst routine)
-   USE taumod          ! surface stress                   (tau     routine)
-   USE flxmod          ! thermohaline fluxes              (flx     routine)
-   USE ocesbc          ! thermohaline fluxes              (oce_sbc routine)
-   USE flxrnf          ! runoffs                          (flx_rnf routine)
-   USE flxfwb          ! freshwater budget correction     (flx_fwb routine)
    USE ocfzpt          ! surface ocean freezing point    (oc_fz_pt routine)
 
@@ -75,5 +70,5 @@
    !!----------------------------------------------------------------------
    !!   OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
+   !! $Id$
    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
    !!----------------------------------------------------------------------
@@ -157,12 +152,11 @@
          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=qt     , clinfo1=' qt   -   : ', 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(tab2d_1=runoff , clinfo1=' runoff   : ', 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=taux   , clinfo1=' tau  - x : ', mask1=umask, &
-            &         tab2d_2=tauy   , clinfo2='      - y : ', mask2=vmask, ovlap=1)
+         CALL prt_ctl(tab2d_1=utau   , clinfo1=' tau  - u : ', mask1=umask, &
+            &         tab2d_2=vtau   , clinfo2='      - v : ', mask2=vmask, ovlap=1)
       ENDIF
 
