Index: trunk/NEMO/OPA_SRC/SBC/cpl_oasis3.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/cpl_oasis3.F90	(revision 1221)
+++ trunk/NEMO/OPA_SRC/SBC/cpl_oasis3.F90	(revision 1226)
@@ -44,6 +44,4 @@
    INTEGER                    :: nerror            ! return error code
 
-   INTEGER, PUBLIC :: nrcv, nsnd    ! Number of received and sent coupling fields
-
    INTEGER, PARAMETER :: nmaxfld=40    ! Maximum number of coupling fields
    
@@ -75,5 +73,5 @@
 CONTAINS
 
-   SUBROUTINE cpl_prism_init
+   SUBROUTINE cpl_prism_init (kl_comm) 
 
       !!-------------------------------------------------------------------
@@ -85,5 +83,6 @@
       !! ** Method  :   OASIS3 MPI communication 
       !!--------------------------------------------------------------------
-      !!
+      INTEGER, INTENT(   OUT )   :: kl_comm       ! local communicator of the model
+      !!--------------------------------------------------------------------
 
       IF(lwp) WRITE(numout,*) 'cpl_prism_init : initialization in coupled ocean/atmosphere case'
@@ -101,5 +100,5 @@
       !------------------------------------------------------------------
 
-      CALL prism_get_localcomm_proto ( nlocalComm, nerror )
+      CALL prism_get_localcomm_proto ( kl_comm, nerror )
       IF ( nerror /= PRISM_Ok ) &
          CALL prism_abort_proto (ncomp_id, 'cpl_prism_init','Failure in prism_get_localcomm_proto' )
@@ -108,5 +107,5 @@
 
 
-   SUBROUTINE cpl_prism_define ()
+   SUBROUTINE cpl_prism_define (krcv, ksnd)
 
       !!-------------------------------------------------------------------
@@ -118,8 +117,6 @@
       !! ** Method  :   OASIS3 MPI communication 
       !!--------------------------------------------------------------------
-      !! * Arguments
-      !!
-      !! * Local declarations
-      !!
+      INTEGER, INTENT( IN    )   :: krcv, ksnd     ! Number of received and sent coupling fields
+      !
       INTEGER                    :: id_part
       INTEGER                    :: paral(5)       ! OASIS3 box partition
@@ -171,5 +168,5 @@
       ! ... Announce send variables. 
       !
-      DO ji = 1, nsnd
+      DO ji = 1, ksnd
          IF ( ssnd(ji)%laction ) THEN 
             CALL prism_def_var_proto (ssnd(ji)%nid, ssnd(ji)%clname, id_part, (/ 2, 0/),  &
@@ -184,5 +181,5 @@
       ! ... Announce received variables. 
       !
-      DO ji = 1, nrcv
+      DO ji = 1, krcv
          IF ( srcv(ji)%laction ) THEN 
             CALL prism_def_var_proto ( srcv(ji)%nid, srcv(ji)%clname, id_part, (/ 2, 0/),   &
@@ -292,5 +289,4 @@
             WRITE(numout,*) '     -     Sum value is ', SUM(pdata)
             WRITE(numout,*) '****************'
-            call flush(numout)
          ENDIF
       
@@ -329,5 +325,7 @@
 CONTAINS
 
-   SUBROUTINE cpl_prism_init
+   SUBROUTINE cpl_prism_init (kl_comm) 
+      INTEGER, INTENT(   OUT )   :: kl_comm       ! local communicator of the model
+      kl_comm = -1
       WRITE(numout,*) 'cpl_prism_init: Error you sould not be there...'
    END SUBROUTINE cpl_prism_init
Index: trunk/NEMO/OPA_SRC/SBC/sbc_ice.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 1221)
+++ trunk/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 1226)
@@ -19,40 +19,26 @@
 
 #if defined key_lim3 
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qns_ice     !: non solar heat flux over ice  [W/m2]
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qsr_ice     !: solar heat flux over ice      [W/m2]
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   dqns_ice    !: non solar heat flux sensibility over ice (LW+SEN+LA) [W/m2/K]
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   tn_ice      !: ice surface temperature       [K]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qns_ice   !: non solar heat flux over ice  [W/m2]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qsr_ice   !: solar heat flux over ice      [W/m2]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qla_ice   !: latent flux over ice
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   dqla_ice  !: latent sensibility over ice
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   dqns_ice  !: non solar heat flux sensibility over ice (LW+SEN+LA) [W/m2/K]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   tn_ice    !: ice surface temperature       [K]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   alb_ice   !: albedo of ice
 #else
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qns_ice     !: non solar heat flux over ice  [W/m2]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qsr_ice     !: solar heat flux over ice      [W/m2]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qla_ice     !: latent flux over ice
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   dqla_ice    !: latent sensibility over ice
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   dqns_ice    !: non solar heat flux sensibility over ice (LW+SEN+LA) [W/m2/K]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   tn_ice      !: ice surface temperature       [K]
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   alb_ice       !: albedo of ice
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   alb_ice     !: albedo of ice
 #endif
 
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   tprecip     !: total precipitation           [Kg/m2/s]
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   sprecip     !: solid precipitation           [Kg/m2/s]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   utaui_ice   !: u-stress over ice (I-point)   [N/m2]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   vtaui_ice   !: v-stress over ice (I-point)   [N/m2]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fr1_i0      !: 1st fraction of sol. rad.  which penetrate inside the ice cover
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fr2_i0      !: 2nd fraction of sol. rad.  which penetrate inside the ice cover
-
-#if ! defined key_coupled
-
-# if defined key_lim3 
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qla_ice   !: latent flux over ice
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   dqla_ice  !: latent sensibility over ice
-# else
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qla_ice   !: latent flux over ice
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   dqla_ice  !: latent sensibility over ice
-# endif
-
-#else
-
-!!$   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   rrunoff       !: runoff
-!!$   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   calving       !: calving
-
-#endif
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   emp_ice     !: solid freshwater budget over ice: sublivation - snow
 
 #else
Index: trunk/NEMO/OPA_SRC/SBC/sbc_oce.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 1221)
+++ trunk/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 1226)
@@ -40,8 +40,15 @@
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   vtau      !: sea surface j-stress (ocean referential)     [N/m2]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   wndm      !: wind speed module at T-point (=|U10m-Uoce|)  [m/s]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qsr       !: sea heat flux:     solar                     [W/m2]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qns       !: sea heat flux: non solar                     [W/m2]
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qsr       !: sea heat flux:     solar                     [W/m2]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qsr_tot   !: total     solar heat flux (over sea and ice) [W/m2]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   qns_tot   !: total non solar heat flux (over sea and ice) [W/m2]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   emp       !: freshwater budget: volume flux               [Kg/m2/s]
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   emps      !: freshwater budget: concentration/dillution   [Kg/m2/s]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   emp_tot   !: total evaporation - (liquid + solid) precpitation over oce and ice
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   tprecip   !: total precipitation           [Kg/m2/s]
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   sprecip   !: solid precipitation           [Kg/m2/s]
+!!$   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   rrunoff       !: runoff
+!!$   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   calving       !: calving
    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fr_i      !: ice fraction  (between 0 to 1)               -
 
Index: trunk/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 1221)
+++ trunk/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 1226)
@@ -27,4 +27,7 @@
    USE par_ice         ! ice parameters
 #endif
+#if defined key_lim2
+   USE ice_2, ONLY : hicif, hsnif          ! Ice and Snow thickness
+#endif
    USE cpl_oasis3      ! OASIS3 coupling
    USE geo2ocean       ! 
@@ -38,4 +41,5 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE mod_prism_proto ! OASIS3 prism module: PRISM_* variables...
+   USE phycst, ONLY : xlsn, rhosn
    IMPLICIT NONE
    PRIVATE
@@ -60,20 +64,20 @@
    INTEGER, PARAMETER ::   jpr_qsroce = 13            ! Qsr above the ocean
    INTEGER, PARAMETER ::   jpr_qsrice = 14            ! Qsr above the ice
-   INTEGER, PARAMETER ::   jpr_qsrmix =  jpr_qsroce   ! Qsr above ocean+ice
-   INTEGER, PARAMETER ::   jpr_qnsoce = 15            ! Qns above the ocean
-   INTEGER, PARAMETER ::   jpr_qnsice = 16            ! Qns above the ice
-   INTEGER, PARAMETER ::   jpr_qnsmix =  jpr_qnsoce   ! Qns above ocean+ice
-   INTEGER, PARAMETER ::   jpr_rain   = 17            ! total liquid precipitation (rain)
-   INTEGER, PARAMETER ::   jpr_snow   = 18            ! solid precipitation over the ocean (snow)
-   INTEGER, PARAMETER ::   jpr_tevp   = 19            ! total evaporation
-   INTEGER, PARAMETER ::   jpr_ievp   = 20            ! solid evaporation (sublimation)
-   INTEGER, PARAMETER ::   jpr_prsb   = 21            ! total precipitation (liquid + solid)
-   INTEGER, PARAMETER ::   jpr_semp   = 22            ! solid freshwater budget (sublimation - snow)
-   INTEGER, PARAMETER ::   jpr_oemp   = 23            ! ocean freshwater budget (evap - precip)
-   INTEGER, PARAMETER ::   jpr_w10m   = 24            ! 
-   INTEGER, PARAMETER ::   jpr_dqnsdt = 25            ! 
-   INTEGER, PARAMETER ::   jpr_rnf    = 26            ! 
-   INTEGER, PARAMETER ::   jpr_cal    = 27            ! 
-   INTEGER, PARAMETER ::   jprcv      = 27            ! total number of fields recieved
+   INTEGER, PARAMETER ::   jpr_qsrmix = 15 
+   INTEGER, PARAMETER ::   jpr_qnsoce = 16            ! Qns above the ocean
+   INTEGER, PARAMETER ::   jpr_qnsice = 17            ! Qns above the ice
+   INTEGER, PARAMETER ::   jpr_qnsmix = 18
+   INTEGER, PARAMETER ::   jpr_rain   = 19            ! total liquid precipitation (rain)
+   INTEGER, PARAMETER ::   jpr_snow   = 20            ! solid precipitation over the ocean (snow)
+   INTEGER, PARAMETER ::   jpr_tevp   = 21            ! total evaporation
+   INTEGER, PARAMETER ::   jpr_ievp   = 22            ! solid evaporation (sublimation)
+   INTEGER, PARAMETER ::   jpr_prsb   = 23            ! sublimation - liquid precipitation - solid precipitation
+   INTEGER, PARAMETER ::   jpr_semp   = 24            ! solid freshwater budget (sublimation - snow)
+   INTEGER, PARAMETER ::   jpr_oemp   = 25            ! ocean freshwater budget (evap - precip)
+   INTEGER, PARAMETER ::   jpr_w10m   = 26            ! 
+   INTEGER, PARAMETER ::   jpr_dqnsdt = 27            ! 
+   INTEGER, PARAMETER ::   jpr_rnf    = 28            ! 
+   INTEGER, PARAMETER ::   jpr_cal    = 29            ! 
+   INTEGER, PARAMETER ::   jprcv      = 29            ! total number of fields recieved
    
    INTEGER, PARAMETER ::   jps_fice   =  1            ! ice fraction 
@@ -130,5 +134,5 @@
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008) 
-   !! $Id:$
+   !! $Id$
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
@@ -298,5 +302,5 @@
       srcv(jpr_tevp)%clname = 'OTotEvap'      ! total evaporation (over oce + ice sublimation)
       srcv(jpr_ievp)%clname = 'OIceEvap'      ! evaporation over ice = sublimation
-      srcv(jpr_prsb)%clname = 'OPre-Sub'      ! liquid precipitation + solid precipitation - sublimation
+      srcv(jpr_prsb)%clname = 'OPre-Sub'      ! sublimation - liquid precipitation - solid precipitation 
       srcv(jpr_semp)%clname = 'OISub-Sn'      ! ice solid water budget = sublimation - solid precipitation
       srcv(jpr_oemp)%clname = 'OOEva-Pr'      ! ocean water budget = ocean Evap - ocean precip
@@ -304,5 +308,5 @@
       CASE( 'oce only'      )   ;   srcv(                                 jpr_oemp   )%laction = .TRUE. 
       CASE( 'conservative'  )   ;   srcv( (/jpr_rain, jpr_snow, jpr_ievp, jpr_tevp/) )%laction = .TRUE.
-      CASE( 'oce and ice'   )   ;   srcv( (/          jpr_prsb, jpr_semp, jpr_oemp/) )%laction = .TRUE.
+      CASE( 'oce and ice'   )   ;   srcv( (/jpr_ievp, jpr_prsb, jpr_semp, jpr_oemp/) )%laction = .TRUE.
       CASE( 'mixed oce-ice' )   ;   srcv( (/jpr_rain,           jpr_semp, jpr_tevp/) )%laction = .TRUE. 
       CASE default              ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of cn_rcv_emp' )
@@ -421,22 +425,16 @@
       ssnd(jps_ocz1)%clname = 'O_OCurz1'   ;   ssnd(jps_ivz1)%clname = 'O_IVelz1'
       !
-      ssnd(jps_ocx1:jps_ivz2)%nsgn = -1    ! vectors: change of the sign at the north fold
+      ssnd(jps_ocx1:jps_ivz1)%nsgn = -1    ! vectors: change of the sign at the north fold
 
       IF( cn_snd_crt(4) /= 'T' )   CALL ctl_stop( 'cn_snd_crt(4) must be equal to T' )
-      ssnd(jps_ocx1:jps_ivz2)%clgrid  = 'T'      ! all oce and ice components on the same unique grid
-      ssnd(jps_ocx1:jps_ocz1)%laction = .TRUE.   ! oce components on 1 grid 
-      ssnd(jps_ivx1:jps_ivz1)%laction = .TRUE.   ! ice components on 1 grid 
-      
-      IF( TRIM( cn_snd_crt(2) ) == 'spherical' )   &                        ! 3rd component not used
-         &     srcv( (/jps_otz1, jps_otz2, jps_itz1, jps_itz2/) )%laction = .FALSE. 
-      !
-      IF( TRIM( cn_snd_crt(1) ) /= 'oce only' .OR. 'oce and ice' )   &      ! ice components not used
-         &     srcv(jps_itx1:jps_itz2)%laction = FALSE.
-
+      ssnd(jps_ocx1:jps_ivz1)%clgrid  = 'T'      ! all oce and ice components on the same unique grid
+
+      ssnd(jps_ocx1:jps_ivz1)%laction = .TRUE.   ! default: all are send
+      IF( TRIM( cn_snd_crt(2) ) == 'spherical' )   ssnd( (/jps_ocz1, jps_ivz1/) )%laction = .FALSE. 
       SELECT CASE( TRIM( cn_snd_crt(1) ) )
-      CASE( 'none'                 )   ;   ssnd(jps_ocx1:jps_ivz2)%laction = .FALSE.
-      CASE( 'oce only'             )   ;   ssnd(jps_ivx1:jps_ivz2)%laction = .FALSE.
+      CASE( 'none'                 )   ;   ssnd(jps_ocx1:jps_ivz1)%laction = .FALSE.
+      CASE( 'oce only'             )   ;   ssnd(jps_ivx1:jps_ivz1)%laction = .FALSE.
       CASE( 'weighted oce and ice' )   !   nothing to do
-      CASE( 'mixed oce-ice'        )   ;   ssnd(jps_ivx1:jps_ivz2)%laction = .FALSE.
+      CASE( 'mixed oce-ice'        )   ;   ssnd(jps_ivx1:jps_ivz1)%laction = .FALSE.
       END SELECT
 
@@ -444,5 +442,6 @@
       !   initialisation of the coupler  !
       ! ================================ !
-      CALL cpl_prism_define            
+
+      CALL cpl_prism_define(jprcv, jpsnd)            
       !
    END SUBROUTINE sbc_cpl_init
@@ -498,5 +497,6 @@
       INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdttra did not change since nit000)
       REAL(wp) ::   zcumulneg, zcumulpos   ! temporary scalars     
-      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, ztx   ! 2D workspace 
+      REAL(wp) ::   zcoef                  ! temporary scalar
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, zty   ! 2D workspace 
       !!----------------------------------------------------------------------
 
@@ -570,5 +570,5 @@
       ENDIF
       !                                                      ! ========================= !
-      IF( k_ice <= 1 ) THEN                                 !  heat & freshwater fluxes ! (Ocean only case)
+      IF( k_ice <= 1 ) THEN                                  !  heat & freshwater fluxes ! (Ocean only case)
          !                                                   ! ========================= !
          !
@@ -576,4 +576,7 @@
          IF( srcv(jpr_qnsoce)%laction )   qns(:,:) = frcv(:,:,jpr_qnsoce)
          IF( srcv(jpr_qnsmix)%laction )   qns(:,:) = frcv(:,:,jpr_qnsmix)        
+         !   energy for melting solid precipitation over free ocean
+         zcoef = xlsn / rhosn
+         qns(:,:) = qns(:,:) - frcv(:,:,jpr_snow) * zcoef
          !                                                       ! solar flux over the ocean          (qsr)
          IF( srcv(jpr_qsroce)%laction )   qsr(:,:) = frcv(:,:,jpr_qsroce) 
@@ -614,5 +617,5 @@
 
          !                                                       ! 10 m wind speed
-         IF( srcv(jpr_w10m)%laction )   wind10m(:,:) = frcv(:,:,jpr_w10m)
+!!AC         IF( srcv(jpr_w10m)%laction )   wind10m(:,:) = frcv(:,:,jpr_w10m)
 !!gm ---> blinder dans tke  si cn_rcv_w10m == 'none'
          !
@@ -660,5 +663,5 @@
       INTEGER ::   ji, jj                          ! dummy loop indices
       INTEGER ::   itx                             ! index of taux over ice
-      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, ztx   ! 2D workspace
+      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, zty   ! 2D workspace
       !!----------------------------------------------------------------------
 
@@ -803,5 +806,5 @@
       &                                pqns_tot, pqns_ice,         &
       &                                pqsr_tot, pqsr_ice,         &
-      &                                pemp_tot, pemp_ice, psprecip )
+      &                                pemp_tot, pemp_ice, pdqns_ice, psprecip )
       !!----------------------------------------------------------------------
       !!             ***  ROUTINE sbc_cpl_ice_flx_rcv  ***
@@ -843,5 +846,6 @@
       !!                   pemp_tot            total evaporation - precipitation(liquid and solid) (-runoff)(-calving)
       !!                   pemp_ice            ice sublimation - solid precipitation over the ice
-      !!                   sprecip             solid precipitation over the ocean   
+      !!                   pdqns_ice           d(non-solar heat flux)/d(Temperature) over the ice
+      !!                   sprecip             solid precipitation over the ocean  
       !!                   wind10m             10m wind module
       !!----------------------------------------------------------------------
@@ -857,9 +861,9 @@
       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 
      !!
       INTEGER ::   ji, jj           ! dummy loop indices
       INTEGER ::   isec, info       ! temporary integer
       REAL(wp)::   zcoef, ztsurf    ! temporary scalar
-      REAL(wp), DIMENSION(jpi,jpj) ::   ztx, ztx   ! 2D workspace
       !!----------------------------------------------------------------------
       !
@@ -877,7 +881,7 @@
          psprecip(:,:) = frcv(:,:,jpr_snow)
       CASE( 'oce and ice'   )   ! received fields: jpr_prsb, jpr_semp, jpr_oemp
-         pemp_tot(:,:) = p_frld(:,:) * frcv(:,:,jpr_oemp) + (1.- p_frld(:,:)) * frcv(:,:,jpr_semp) !!sm: rain over ice is missing??
+         pemp_tot(:,:) = p_frld(:,:) * frcv(:,:,jpr_oemp) + (1.- p_frld(:,:)) * frcv(:,:,jpr_prsb) 
          pemp_ice(:,:) = frcv(:,:,jpr_semp)
-         psprecip(:,:) = frcv(:,:,jpr_semp)                            !!gm here error due to sublimation
+         psprecip(:,:) = - frcv(:,:,jpr_semp) + frcv(:,:,jpr_ievp)
       CASE( 'mixed oce-ice' )   ! received fields: jpr_rain, jpr_semp, jpr_tevp
          pemp_tot(:,:) = frcv(:,:,jpr_tevp) - frcv(:,:,jpr_rain) + frcv(:,:,jpr_semp)       !!gm here sublimation error  ???
@@ -924,5 +928,5 @@
       !   energy for melting solid precipitation over free ocean
       zcoef = xlsn / rhosn
-      pqns_tot(:,:) = pqns_tot(:,:) - p_frld(:,:) * psprecip(:,:) * zcoef  
+      pqns_tot(:,:) = pqns_tot(:,:) - p_frld(:,:) * psprecip(:,:) * zcoef
 !!gm
 !!    currently it is taken into account in leads budget but not in the qns_tot, and thus not in 
@@ -945,5 +949,5 @@
          pqsr_tot(:,:) = frcv(:,:,jpr_qsrmix)
 !!gm  cpl_albedo ???? kezako ?????   je pige pas grand chose ici....
-         pqsr_ice(:,:) = qsr_mix(:,:) * ( 1.- palbi(:,:) )   &
+         pqsr_ice(:,:) = frcv(:,:,jpr_qsrmix) * ( 1.- palbi(:,:) )   &
             &          / (  1.- ( cpl_ocean_albedo(ji,jj) * ( 1.- p_frld(ji,jj) )   &
             &                   + palbi           (ji,jj) *       p_frld(ji,jj)   )  )
@@ -951,12 +955,18 @@
 
 
+      SELECT CASE( TRIM( cn_rcv_dqnsdt ) )
+      CASE ('coupled')
+          pdqns_ice(:,:) = frcv(:,:,jpr_dqnsdt)
+      END SELECT
+
+
       !                                                      ! ========================= !
       !                                                      !      10 m wind speed      !   (wind10m)
       !                                                      ! ========================= !
       !
-      IF( srcv(jpr_w10m  )%laction )   wind10m(:,:) = frcv(:,:,jpr_w10m)
+!!AC      IF( srcv(jpr_w10m  )%laction )   wind10m(:,:) = frcv(:,:,jpr_w10m)
 !!gm ---> blinder dans tke  si cn_rcv_w10m == 'none'
       !
-   END SUBROUTINE sbc_cpl_ice_flx_rcv
+   END SUBROUTINE sbc_cpl_ice_flx
    
    
@@ -1000,17 +1010,17 @@
       !                                                      ! ------------------------- !
       IF( ssnd(jps_albice)%laction ) THEN                         ! ice 
-         ztmp(:,:) = alb_ice(:,:) * fr_i(:,:)
-         CALL cpl_prism_snd( jps_albice, isec, ztmp, info )
+         ztmp1(:,:) = alb_ice(:,:) * fr_i(:,:)
+         CALL cpl_prism_snd( jps_albice, isec, ztmp1, info )
       ENDIF
       IF( ssnd(jps_albmix)%laction ) THEN                         ! mixed ice-ocean
-         ztmp(:,:) = albedo_oce_mix(:,:) * zfr_l(:,:) + alb_ice(:,:) * fr_i(:,:)
-         CALL cpl_prism_snd( jps_albmix, isec, ztmp, info )
+         ztmp1(:,:) = albedo_oce_mix(:,:) * zfr_l(:,:) + alb_ice(:,:) * fr_i(:,:)
+         CALL cpl_prism_snd( jps_albmix, isec, ztmp1, info )
       ENDIF
       !                                                      ! ------------------------- !
       !                                                      !  Ice fraction & Thickness ! 
       !                                                      ! ------------------------- !
-      IF( ssnd(jps_fice)%laction )   CALL cpl_prism_snd( jps_fice, isec, fr_i                 , info )
-      IF( ssnd(jps_hice)%laction )   CALL cpl_prism_snd( jps_hice, isec, hice(:,:) * fr_i(:,:), info )
-      IF( ssnd(jps_hsnw)%laction )   CALL cpl_prism_snd( jps_hsnw, isec, hsnw(:,:) * fr_i(:,:), info )
+      IF( ssnd(jps_fice)%laction )   CALL cpl_prism_snd( jps_fice, isec, fr_i                  , info )
+      IF( ssnd(jps_hice)%laction )   CALL cpl_prism_snd( jps_hice, isec, hicif(:,:) * fr_i(:,:), info )
+      IF( ssnd(jps_hsnw)%laction )   CALL cpl_prism_snd( jps_hsnw, isec, hsnif(:,:) * fr_i(:,:), info )
       !
       !                                                      ! ------------------------- !
@@ -1026,11 +1036,11 @@
             END DO
          CASE( 'weighted oce and ice' )   
-            IF( cice_grid = 'C' ) THEN      ! 'C'-grid ice velocity
+            IF( cice_grid == 'C' ) THEN      ! 'C'-grid ice velocity
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     zotx1(ji,jj) = 0.5 * ( un       (ji,jj,1) + un       (ji-1,jj  ,1) ) * zfr_l(:,:)  
-                     zoty1(ji,jj) = 0.5 * ( vn       (ji,jj,1) + un       (ji  ,jj-1,1) ) * zfr_l(:,:)
-                     zitx1(ji,jj) = 0.5 * ( utaui_ice(ji,jj)   + utaui_ice(ji-1,jj  )   ) *  fr_i(:,:)
-                     zity1(ji,jj) = 0.5 * ( vtaui_ice(ji,jj)   + vtaui_ice(ji  ,jj-1)   ) *  fr_i(:,:)
+                     zotx1(ji,jj) = 0.5 * ( un       (ji,jj,1) + un       (ji-1,jj  ,1) ) * zfr_l(ji,jj)  
+                     zoty1(ji,jj) = 0.5 * ( vn       (ji,jj,1) + un       (ji  ,jj-1,1) ) * zfr_l(ji,jj)
+                     zitx1(ji,jj) = 0.5 * ( utaui_ice(ji,jj)   + utaui_ice(ji-1,jj  )   ) *  fr_i(ji,jj)
+                     zity1(ji,jj) = 0.5 * ( vtaui_ice(ji,jj)   + vtaui_ice(ji  ,jj-1)   ) *  fr_i(ji,jj)
                   END DO
                END DO
@@ -1038,10 +1048,10 @@
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)          + un(ji-1,jj-1,1)    ) * zfr_l(:,:)  
-                     zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)          + un(ji  ,jj-1,1)    ) * zfr_l(:,:)  
+                     zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)          + un(ji-1,jj-1,1)    ) * zfr_l(ji,jj)  
+                     zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)          + un(ji  ,jj-1,1)    ) * zfr_l(ji,jj)  
                      zitx1(ji,jj) = 0.25 * ( utaui_ice(ji+1,jj+1) + utaui_ice(ji,jj+1)   &
-                        &                  + utaui_ice(ji+1,jj  ) + utaui_ice(ji,jj  ) ) * fr_i(:,:)
+                        &                  + utaui_ice(ji+1,jj  ) + utaui_ice(ji,jj  ) ) * fr_i(ji,jj)
                      zity1(ji,jj) = 0.25 * ( vtaui_ice(ji+1,jj+1) + vtaui_ice(ji,jj+1)   &
-                        &                  + vtaui_ice(ji+1,jj  ) + vtaui_ice(ji,jj  ) ) * fr_i(:,:)
+                        &                  + vtaui_ice(ji+1,jj  ) + vtaui_ice(ji,jj  ) ) * fr_i(ji,jj)
                   END DO
                END DO
@@ -1049,22 +1059,22 @@
             CALL lbc_lnk( zitx1, 'T', -1. )   ;   CALL lbc_lnk( zity1, 'T', -1. )
          CASE( 'mixed oce-ice'        )
-            IF( cice_grid = 'C' ) THEN      ! 'C'-grid ice velocity
+            IF( cice_grid == 'C' ) THEN      ! 'C'-grid ice velocity
                DO jj = 2, jpjm1
-                  DO ji = fs_2, fs_jpim1   ! vector opt.
-                     zotx1(ji,jj) = 0.5 * ( un       (ji,jj,1) + un       (ji-1,jj  ,1) ) * zfr_l(:,:)
-                     &            + 0.5 * ( utaui_ice(ji,jj)   + utaui_ice(ji-1,jj  )   ) *  fr_i(:,:)
-                     zoty1(ji,jj) = 0.5 * ( vn       (ji,jj,1) + un       (ji  ,jj-1,1) ) * zfr_l(:,:)
-                     &            + 0.5 * ( vtaui_ice(ji,jj)   + vtaui_ice(ji  ,jj-1)   ) *  fr_i(:,:)
-                  END DO
+                 DO ji = fs_2, fs_jpim1   ! vector opt.
+                   zotx1(ji,jj) = 0.5 * ( un       (ji,jj,1) + un       (ji-1,jj  ,1) ) * zfr_l(ji,jj) &
+                      + 0.5 * ( utaui_ice(ji,jj)   + utaui_ice(ji-1,jj  )   ) *  fr_i(ji,jj)
+                   zoty1(ji,jj) = 0.5 * ( vn       (ji,jj,1) + un       (ji  ,jj-1,1) ) * zfr_l(ji,jj) &
+                      + 0.5 * ( vtaui_ice(ji,jj)   + vtaui_ice(ji  ,jj-1)   ) *  fr_i(ji,jj)
+                 END DO
                END DO
             ELSE                            ! 'B'-grid ice velocity
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)          + un(ji-1,jj-1,1)    ) * zfr_l(:,:)    
-                     &            + 0.25 * ( utaui_ice(ji+1,jj+1) + utaui_ice(ji,jj+1)   &
-                        &                  + utaui_ice(ji+1,jj  ) + utaui_ice(ji,jj  ) ) *  fr_i(:,:)
-                     zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)          + un(ji  ,jj-1,1)    ) * zfr_l(:,:)  
-                     &            + 0.25 * ( vtaui_ice(ji+1,jj+1) + vtaui_ice(ji,jj+1)   &
-                        &                  + vtaui_ice(ji+1,jj  ) + vtaui_ice(ji,jj  ) ) *  fr_i(:,:)
+                     zotx1(ji,jj) = 0.5  * ( un(ji,jj,1)          + un(ji-1,jj-1,1)    ) * zfr_l(ji,jj) &   
+                       + 0.25 * ( utaui_ice(ji+1,jj+1) + utaui_ice(ji,jj+1)   &
+                                     + utaui_ice(ji+1,jj  ) + utaui_ice(ji,jj  ) ) *  fr_i(ji,jj)
+                     zoty1(ji,jj) = 0.5  * ( vn(ji,jj,1)          + un(ji  ,jj-1,1)    ) * zfr_l(ji,jj) & 
+                           + 0.25 * ( vtaui_ice(ji+1,jj+1) + vtaui_ice(ji,jj+1)   &
+                              + vtaui_ice(ji+1,jj  ) + vtaui_ice(ji,jj  ) ) *  fr_i(ji,jj)
                   END DO
                END DO
@@ -1088,15 +1098,14 @@
          ENDIF
          !
-         !!gm  Eric : Arnaud, je te laisse coder oce2geo !     
          ! spherical coordinates to cartesian -> 2 components to 3 components
          IF( TRIM( cn_snd_crt(2) ) == 'cartesian' ) THEN
             ztmp1(:,:) = zotx1(:,:)                     ! ocean currents
             ztmp2(:,:) = zoty1(:,:)
-            CALL oce2geo ( ztmp1, ztmp2, 't', glamt, gphit, zotx1, zoty1, zotz1 )
+            CALL oce2geo ( ztmp1, ztmp2, 'T', zotx1, zoty1, zotz1 )
             !
             IF( ssnd(jps_ivx1)%laction ) THEN           ! ice velocities
                ztmp1(:,:) = zitx1(:,:)
                ztmp1(:,:) = zity1(:,:)
-               CALL oce2geo ( ztmp1, ztmp2, 't', glamt, gphit, zitx1, zity1, zitz1 )
+               CALL oce2geo ( ztmp1, ztmp2, 'T', zitx1, zity1, zitz1 )
             ENDIF
          ENDIF
@@ -1112,5 +1121,5 @@
       ENDIF
    !
-END SUBROUTINE sbc_cpl_snd
+   END SUBROUTINE sbc_cpl_snd
    
 #else
Index: trunk/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 1221)
+++ trunk/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 1226)
@@ -193,5 +193,5 @@
       &                                                             qns_tot, qns_ice,   &
       &                                                             qsr_tot, qsr_ice,   &
-      &                                                             emp_tot, emp_ice, sprecip )
+      &                                                             emp_tot, emp_ice, dqns_ice, sprecip )
 #endif
                                         CALL lim_thd_2      ( kt )      ! Ice thermodynamics 
Index: trunk/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 1221)
+++ trunk/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 1226)
@@ -28,4 +28,5 @@
    USE sbcice_lim_2    ! surface boundary condition: LIM 2.0 sea-ice model
    USE sbccpl          ! surface boundary condition: coupled florulation
+   USE cpl_oasis3, ONLY:lk_cpl      ! are we in coupled mode?
    USE sbcssr          ! surface boundary condition: sea surface restoring
    USE sbcrnf          ! surface boundary condition: runoffs
@@ -130,6 +131,6 @@
          &  CALL ctl_warn( 'nn_fsbc is NOT a multiple of the number of time steps in a day' )
       !
-      IF( nn_ice == 2 .AND. .NOT.( ln_blk_clio .OR. ln_blk_core ) )   &
-         &   CALL ctl_stop( 'sea-ice model requires a bulk formulation' )
+      IF( nn_ice == 2 .AND. .NOT.( ln_blk_clio .OR. ln_blk_core .OR. lk_cpl ) )   &
+         &   CALL ctl_stop( 'sea-ice model requires a bulk formulation or coupled configuration' )
       
       ! Choice of the Surface Boudary Condition (set nsbc)
@@ -201,10 +202,10 @@
       CASE(  5 )   ;   CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! coupled formulation
       CASE( -1 )                                
-                       CALL sbc_ana     ( kt )                     ! ESOPA, test ALL the formulations
-                       CALL sbc_gyre    ( kt )                     !
-                       CALL sbc_flx     ( kt )                     !
-                       CALL sbc_blk_clio( kt )                     !
-                       CALL sbc_blk_core( kt )                     !
-                       CALL sbc_cpl_rcv ( kt,  nn_fsbc, nn_ice )   !
+                       CALL sbc_ana     ( kt )                    ! ESOPA, test ALL the formulations
+                       CALL sbc_gyre    ( kt )                    !
+                       CALL sbc_flx     ( kt )                    !
+                       CALL sbc_blk_clio( kt )                    !
+                       CALL sbc_blk_core( kt )                    !
+                       CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   !
       END SELECT
 
Index: trunk/NEMO/OPA_SRC/geo2ocean.F90
===================================================================
--- trunk/NEMO/OPA_SRC/geo2ocean.F90	(revision 1221)
+++ trunk/NEMO/OPA_SRC/geo2ocean.F90	(revision 1226)
@@ -39,5 +39,5 @@
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008) 
-   !! $Id:$ 
+   !! $Id$ 
    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
@@ -311,8 +311,8 @@
 
       ! lateral boundary cond.: T-, U-, V-, F-pts, sgn
-      CALL lbc_lnk ( gcost, 'T', 1. )   ;   CALL lbc_lnk( gsint, 'T', -1. )
-      CALL lbc_lnk ( gcosu, 'U', 1. )   ;   CALL lbc_lnk( gsinu, 'U', -1. )
-      CALL lbc_lnk ( gcosv, 'V', 1. )   ;   CALL lbc_lnk( gsinv, 'V', -1. )
-      CALL lbc_lnk ( gcosf, 'F', 1. )   ;   CALL lbc_lnk( gsinf, 'F', -1. )
+      CALL lbc_lnk( gcost, 'T', 1. )   ;   CALL lbc_lnk( gsint, 'T', -1. )
+      CALL lbc_lnk( gcosu, 'U', 1. )   ;   CALL lbc_lnk( gsinu, 'U', -1. )
+      CALL lbc_lnk( gcosv, 'V', 1. )   ;   CALL lbc_lnk( gsinv, 'V', -1. )
+      CALL lbc_lnk( gcosf, 'F', 1. )   ;   CALL lbc_lnk( gsinf, 'F', -1. )
 
    END SUBROUTINE angle
@@ -350,39 +350,39 @@
 
       SELECT CASE( cgrid)
-         CASE ( 't' )   
+         CASE ( 'T' )   
             ig = 1
             IF( .NOT. linit(ig) ) THEN 
-               zsinlon (:,:,ig) = SIN (rad * glamt)
-               zcoslon (:,:,ig) = COS (rad * glamt)
-               zsinlat (:,:,ig) = SIN (rad * gphit)
-               zcoslat (:,:,ig) = COS (rad * gphit)
-               linit (ig) = .TRUE.
-            ENDIF
-         CASE ( 'u' )   
+               zsinlon(:,:,ig) = SIN( rad * glamt(:,:) )
+               zcoslon(:,:,ig) = COS( rad * glamt(:,:) )
+               zsinlat(:,:,ig) = SIN( rad * gphit(:,:) )
+               zcoslat(:,:,ig) = COS( rad * gphit(:,:) )
+               linit(ig) = .TRUE.
+            ENDIF
+         CASE ( 'U' )   
             ig = 2
             IF( .NOT. linit(ig) ) THEN 
-               zsinlon (:,:,ig) = SIN (rad * glamu)
-               zcoslon (:,:,ig) = COS (rad * glamu)
-               zsinlat (:,:,ig) = SIN (rad * gphiu)
-               zcoslat (:,:,ig) = COS (rad * gphiu)
-               linit (ig) = .TRUE.
-            ENDIF
-         CASE ( 'v' )   
+               zsinlon(:,:,ig) = SIN( rad * glamu(:,:) )
+               zcoslon(:,:,ig) = COS( rad * glamu(:,:) )
+               zsinlat(:,:,ig) = SIN( rad * gphiu(:,:) )
+               zcoslat(:,:,ig) = COS( rad * gphiu(:,:) )
+               linit(ig) = .TRUE.
+            ENDIF
+         CASE ( 'V' )   
             ig = 3
             IF( .NOT. linit(ig) ) THEN 
-               zsinlon (:,:,ig) = SIN (rad * glamv)
-               zcoslon (:,:,ig) = COS (rad * glamv)
-               zsinlat (:,:,ig) = SIN (rad * gphiv)
-               zcoslat (:,:,ig) = COS (rad * gphiv)
-               linit (ig) = .TRUE.
-            ENDIF
-         CASE ( 'f' )   
+               zsinlon(:,:,ig) = SIN( rad * glamv(:,:) )
+               zcoslon(:,:,ig) = COS( rad * glamv(:,:) )
+               zsinlat(:,:,ig) = SIN( rad * gphiv(:,:) )
+               zcoslat(:,:,ig) = COS( rad * gphiv(:,:) )
+               linit(ig) = .TRUE.
+            ENDIF
+         CASE ( 'F' )   
             ig = 4
             IF( .NOT. linit(ig) ) THEN 
-               zsinlon (:,:,ig) = SIN (rad * glamf)
-               zcoslon (:,:,ig) = COS (rad * glamf)
-               zsinlat (:,:,ig) = SIN (rad * gphif)
-               zcoslat (:,:,ig) = COS (rad * gphif)
-               linit (ig) = .TRUE.
+               zsinlon(:,:,ig) = SIN( rad * glamf(:,:) )
+               zcoslon(:,:,ig) = COS( rad * glamf(:,:) )
+               zsinlat(:,:,ig) = SIN( rad * gphif(:,:) )
+               zcoslat(:,:,ig) = COS( rad * gphif(:,:) )
+               linit(ig) = .TRUE.
             ENDIF
          CASE default   
@@ -391,16 +391,16 @@
       END SELECT
       
-      pte = - zsinlon (:,:,ig) * pxx + zcoslon (:,:,ig) * pyy
-      ptn = - zcoslon (:,:,ig) * zsinlat (:,:,ig) * pxx    &
-            - zsinlon (:,:,ig) * zsinlat (:,:,ig) * pyy    &
-            + zcoslat (:,:,ig) * pzz
-!!$   ptv =   zcoslon (:,:,ig) * zcoslat (:,:,ig) * pxx    &
-!!$         + zsinlon (:,:,ig) * zcoslat (:,:,ig) * pyy    &
-!!$         + zsinlat (:,:,ig) * pzz
+      pte = - zsinlon(:,:,ig) * pxx + zcoslon(:,:,ig) * pyy
+      ptn = - zcoslon(:,:,ig) * zsinlat(:,:,ig) * pxx    &
+            - zsinlon(:,:,ig) * zsinlat(:,:,ig) * pyy    &
+            + zcoslat(:,:,ig) * pzz
+!!$   ptv =   zcoslon(:,:,ig) * zcoslat(:,:,ig) * pxx    &
+!!$         + zsinlon(:,:,ig) * zcoslat(:,:,ig) * pyy    &
+!!$         + zsinlat(:,:,ig) * pzz
       !
    END SUBROUTINE geo2oce
 
    SUBROUTINE oce2geo ( pte, ptn, cgrid,     &
-                        plon, plat, pxx , pyy , pzz )
+                        pxx , pyy , pzz )
       !!----------------------------------------------------------------------
       !!                    ***  ROUTINE oce2geo  ***
@@ -415,5 +415,4 @@
       REAL(wp), DIMENSION(jpi,jpj), INTENT( IN    ) ::  pte, ptn
       CHARACTER(len=1)            , INTENT( IN    ) ::  cgrid
-      REAL(wp), DIMENSION(jpi,jpj), INTENT( IN    ) ::  plon, plat
       REAL(wp), DIMENSION(jpi,jpj), INTENT(   OUT ) ::  pxx , pyy , pzz
       !!
@@ -426,17 +425,50 @@
       !!----------------------------------------------------------------------
 
-      WRITE(ctmp1,*) 'oce2geo : Arnaud, au boulot '
-      CALL ctl_stop( ctmp1 )
-
       SELECT CASE( cgrid)
-         CASE ( 't' ) ;; ig = 1
-         CASE ( 'u' ) ;; ig = 2
-         CASE ( 'v' ) ;; ig = 3
-         CASE ( 'f' ) ;; ig = 4
-         CASE default
-            WRITE(ctmp1,*) 'oce2geo : bad grid argument : ', cgrid
+         CASE ( 'T' )   
+            ig = 1
+            IF( .NOT. linit(ig) ) THEN 
+               zsinlon(:,:,ig) = SIN( rad * glamt(:,:) )
+               zcoslon(:,:,ig) = COS( rad * glamt(:,:) )
+               zsinlat(:,:,ig) = SIN( rad * gphit(:,:) )
+               zcoslat(:,:,ig) = COS( rad * gphit(:,:) )
+               linit(ig) = .TRUE.
+            ENDIF
+         CASE ( 'U' )   
+            ig = 2
+            IF( .NOT. linit(ig) ) THEN 
+               zsinlon(:,:,ig) = SIN( rad * glamu(:,:) )
+               zcoslon(:,:,ig) = COS( rad * glamu(:,:) )
+               zsinlat(:,:,ig) = SIN( rad * gphiu(:,:) )
+               zcoslat(:,:,ig) = COS( rad * gphiu(:,:) )
+               linit(ig) = .TRUE.
+            ENDIF
+         CASE ( 'V' )   
+            ig = 3
+            IF( .NOT. linit(ig) ) THEN 
+               zsinlon(:,:,ig) = SIN( rad * glamv(:,:) )
+               zcoslon(:,:,ig) = COS( rad * glamv(:,:) )
+               zsinlat(:,:,ig) = SIN( rad * gphiv(:,:) )
+               zcoslat(:,:,ig) = COS( rad * gphiv(:,:) )
+               linit(ig) = .TRUE.
+            ENDIF
+         CASE ( 'F' )   
+            ig = 4
+            IF( .NOT. linit(ig) ) THEN 
+               zsinlon(:,:,ig) = SIN( rad * glamf(:,:) )
+               zcoslon(:,:,ig) = COS( rad * glamf(:,:) )
+               zsinlat(:,:,ig) = SIN( rad * gphif(:,:) )
+               zcoslat(:,:,ig) = COS( rad * gphif(:,:) )
+               linit(ig) = .TRUE.
+            ENDIF
+         CASE default   
+            WRITE(ctmp1,*) 'geo2oce : bad grid argument : ', cgrid
             CALL ctl_stop( ctmp1 )
-       END SELECT
-       pxx(:,:) = 0. ; pyy(:,:) = 0. ; pzz(:,:) = 0. ! stupid definition to avoid warning message when compiling...
+      END SELECT
+
+       pxx = - zsinlon(:,:,ig) * pte - zcoslon(:,:,ig) * zsinlat(:,:,ig) * ptn 
+       pyy =   zcoslon(:,:,ig) * pte - zsinlon(:,:,ig) * zsinlat(:,:,ig) * ptn
+       pzz =   zcoslat(:,:,ig) * ptn
+
       
    END SUBROUTINE oce2geo
Index: trunk/NEMO/OPA_SRC/opa.F90
===================================================================
--- trunk/NEMO/OPA_SRC/opa.F90	(revision 1221)
+++ trunk/NEMO/OPA_SRC/opa.F90	(revision 1226)
@@ -172,7 +172,4 @@
       !!
       !!----------------------------------------------------------------------
-#if defined key_coupled
-      INTEGER ::   itro, istp0        ! ???
-#endif
 #if defined key_oasis3 || defined key_oasis4
       INTEGER :: localComm
@@ -289,14 +286,4 @@
 #endif
 
-#if defined key_coupled && ! defined key_oasis3 && ! defined key_oasis4
-      itro  = nitend - nit000 + 1           ! Coupled
-      istp0 = NINT( rdt )
-      CALL cpl_init( itro, nexco, istp0 )   ! Signal processing and process id exchange
-#endif
-
-#if defined key_oasis3 || defined key_oasis4
-      CALL cpl_prism_define
-#endif
-
       CALL dia_ptr_init                     ! Poleward TRansports initialization
 
