Index: trunk/NEMO/OPA_SRC/SBC/sbc_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 1229)
+++ trunk/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 1230)
@@ -11,4 +11,6 @@
    IMPLICIT NONE
    PRIVATE
+   
+   PUBLIC sbc_tau2wnd   ! compute wind speed based on the wind stress
    
    !!----------------------------------------------------------------------
@@ -67,3 +69,37 @@
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!======================================================================
+CONTAINS
+
+   SUBROUTINE sbc_tau2wnd
+      !!---------------------------------------------------------------------
+      !!                    ***  ROUTINE sbc_tau2wnd  ***
+      !!                   
+      !! ** Purpose : Estimation of wind speed as a function of wind stress   
+      !!
+      !! ** Method  : |tau|=rhoa*Cd*|U|^2
+      !!---------------------------------------------------------------------
+      USE dom_oce         ! ocean space and time domain
+      USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+      REAL(wp) ::   zrhoa  = 1.22         ! Air density kg/m3
+      REAL(wp) ::   zcdrag = 1.5e-3       ! drag coefficient
+      REAL(wp) ::   ztx, zty, ztau, zcoef ! temporary variables
+      INTEGER  ::   ji, jj                ! dummy indices
+      !! * Substitutions
+#  include "vectopt_loop_substitute.h90"
+      !!---------------------------------------------------------------------
+      zcoef = 0.5 / ( zrhoa * zcdrag ) 
+!CDIR NOVERRCHK
+      DO jj = 2, jpjm1
+!CDIR NOVERRCHK
+         DO ji = fs_2, fs_jpim1   ! vect. opt.
+            ztx = utau(ji-1,jj  ) + utau(ji,jj) 
+            zty = vtau(ji  ,jj-1) + vtau(ji,jj) 
+            ztau = SQRT( ztx * ztx + zty * zty )
+            wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1)
+         END DO
+      END DO
+      CALL lbc_lnk( wndm(:,:) , 'T', 1. )
+
+   END SUBROUTINE sbc_tau2wnd
+
 END MODULE sbc_oce
Index: trunk/NEMO/OPA_SRC/SBC/sbcana.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcana.F90	(revision 1229)
+++ trunk/NEMO/OPA_SRC/SBC/sbcana.F90	(revision 1230)
@@ -34,8 +34,5 @@
    REAL(wp) ::   rn_qsr0   = 0.e0   !     solar heat flux
    REAL(wp) ::   rn_emp0   = 0.e0   ! net freshwater flux
- 
-   REAL(wp) ::   rhoa      = 1.22   ! Air density kg/m3
-   REAL(wp) ::   cdrag     = 1.5e-3 ! drag coefficient
-  
+   
    !! * Substitutions
 #  include "domzgr_substitute.h90"
@@ -69,5 +66,4 @@
       INTEGER             ::   ji, jj          ! dummy loop indices
       REAL(wp)            ::   zfacto          ! local scalar
-      REAL(wp)            ::   ztx, zty, ztau  ! local scalar
       !!
       NAMELIST/namsbc_ana/ nn_tau000, rn_utau0, rn_vtau0, rn_qns0, rn_qsr0, rn_emp0
@@ -105,16 +101,5 @@
 
       ! Estimation of wind speed as a function of wind stress ( |tau|=rhoa*Cd*|U|^2 )
-      zfacto = 0.5 / ( rhoa * cdrag )
-!CDIR NOVERRCHK
-      DO jj = 2, jpjm1
-!CDIR NOVERRCHK
-         DO ji = fs_2, fs_jpim1   ! vect. opt.
-            ztx = utau(ji-1,jj  ) + utau(ji,jj)            
-            zty = vtau(ji  ,jj-1) + vtau(ji,jj) 
-            ztau = SQRT( ztx * ztx + zty * zty )
-            wndm(ji,jj) = SQRT ( ztau * zfacto ) * tmask(ji,jj,1)
-         END DO
-      END DO
-      CALL lbc_lnk( wndm(:,:) , 'T', 1. )
+      CALL sbc_tau2wnd
       !
    END SUBROUTINE sbc_ana
@@ -152,5 +137,4 @@
       REAL(wp) ::   zcos_sais1, zcos_sais2, ztrp, zconv, t_star
       REAL(wp) ::   zsumemp, zsurf
-      REAL(wp) ::   ztx, zty, zfacto
       !!---------------------------------------------------------------------
          
@@ -270,16 +254,5 @@
 
       ! Estimation of wind speed as a function of wind stress ( |tau|=rhoa*Cd*|U|^2 )
-      zfacto = 0.5 / ( rhoa * cdrag )
-!CDIR NOVERRCHK
-      DO jj = 2, jpjm1
-!CDIR NOVERRCHK
-         DO ji = fs_2, fs_jpim1   ! vect. opt.
-            ztx = utau(ji-1,jj  ) + utau(ji,jj)
-            zty = vtau(ji  ,jj-1) + vtau(ji,jj)
-            ztau = SQRT( ztx * ztx + zty * zty )
-            wndm(ji,jj) = SQRT ( ztau * zfacto ) * tmask(ji,jj,1)
-         END DO
-      END DO
-      CALL lbc_lnk( wndm(:,:) , 'T', 1. )
+      CALL sbc_tau2wnd
 
       ! ---------------------------------- !
Index: trunk/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 1229)
+++ trunk/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 1230)
@@ -568,4 +568,5 @@
          utau(:,:) = frcv(:,:,jpr_otx1)                   
          vtau(:,:) = frcv(:,:,jpr_oty1)
+         IF( .NOT. srcv(jpr_w10m)%laction )   CALL sbc_tau2wnd
       ENDIF
       !                                                      ! ========================= !
@@ -615,8 +616,8 @@
          !
          emps(:,:) = emp(:,:)                                        ! concentration/dilution = emp
-
-         !                                                       ! 10 m wind speed
-!!AC         IF( srcv(jpr_w10m)%laction )   wind10m(:,:) = frcv(:,:,jpr_w10m)
-!!gm ---> blinder dans tke  si cn_rcv_w10m == 'none'
+  
+         !                                                           ! 10 m wind speed
+         IF( srcv(jpr_w10m)%laction )   wndm(:,:) = frcv(:,:,jpr_w10m)
+         ! it not, we call sbc_tau2wnd in sbc_cpl_rcv (or later, after the ice???)
          !
       ENDIF
@@ -861,5 +862,5 @@
       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   pemp_ice   ! ice solid freshwater budget  [Kg/m2/s]
       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   psprecip   ! solid precipitation          [Kg/m2/s]
-      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   pdqns_ice 
+      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   pdqns_ice  ! d(Q non solar)/d(Temperature) over ice
      !!
       INTEGER ::   ji, jj           ! dummy loop indices
@@ -950,6 +951,6 @@
 !!gm  cpl_albedo ???? kezako ?????   je pige pas grand chose ici....
          pqsr_ice(:,:) = frcv(:,:,jpr_qsrmix) * ( 1.- palbi(:,:) )   &
-            &          / (  1.- ( albedo_oce_mix(ji,jj) * ( 1.- p_frld(ji,jj) )   &
-            &                   + palbi         (ji,jj) *       p_frld(ji,jj)   )  )
+            &          / (  1.- ( albedo_oce_mix(:,:) * ( 1.- p_frld(:,:) )   &
+            &                   + palbi         (:,:) *       p_frld(:,:)   )  )
       END SELECT
 
Index: trunk/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 1229)
+++ trunk/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 1230)
@@ -49,7 +49,4 @@
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf    ! structure of input fields (file informations, fields read)
 
-   REAL(wp) ::   rhoa  = 1.22         ! Air density kg/m3
-   REAL(wp) ::   cdrag = 1.5e-3       ! drag coefficient
-
    !! * Substitutions
 #  include "domzgr_substitute.h90"
@@ -99,5 +96,4 @@
       INTEGER  ::   ierror       ! return error code
       REAL(wp) ::   zfact        ! temporary scalar
-      REAL(wp) ::   ztx, zty, ztau, zcoef
       !!
       CHARACTER(len=100) ::  cn_dir                               ! Root directory for location of flx files
@@ -163,16 +159,5 @@
 
       ! Estimation of wind speed as a function of wind stress ( |tau|=rhoa*Cd*|U|^2 )
-      zcoef = 0.5 / ( rhoa * cdrag ) 
-!CDIR NOVERRCHK
-      DO jj = 2, jpjm1
-!CDIR NOVERRCHK
-         DO ji = fs_2, fs_jpim1   ! vect. opt.
-            ztx = utau(ji-1,jj  ) + utau(ji,jj) 
-            zty = vtau(ji  ,jj-1) + vtau(ji,jj) 
-            ztau = SQRT( ztx * ztx + zty * zty )
-            wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1)
-         END DO
-      END DO
-      CALL lbc_lnk( wndm(:,:) , 'T', 1. )
+      CALL sbc_tau2wnd
 
       ! control print (if less than 100 time-step asked)
