Index: LMDZ5/trunk/libf/phylmd/ocean_cpl_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/ocean_cpl_mod.F90	(revision 2254)
+++ LMDZ5/trunk/libf/phylmd/ocean_cpl_mod.F90	(revision 2538)
@@ -1,2 +1,4 @@
+!
+! $Id$
 !
 MODULE ocean_cpl_mod
@@ -10,4 +12,5 @@
 
   PUBLIC :: ocean_cpl_init, ocean_cpl_noice, ocean_cpl_ice
+
 
 !****************************************************************************************
@@ -63,4 +66,6 @@
     USE calcul_fluxs_mod
     USE indice_sol_mod
+    USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
+    USE cpl_mod,             ONLY : gath2cpl
 
     INCLUDE "YOMCST.h"
@@ -99,8 +104,9 @@
     REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
     REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l      
+  
 
 ! Local variables
 !****************************************************************************************
-    INTEGER               :: i
+    INTEGER               :: i, j
     INTEGER, DIMENSION(1) :: iloc
     REAL, DIMENSION(klon) :: cal, beta, dif_grnd
@@ -110,4 +116,6 @@
     REAL, DIMENSION(klon) :: u1_lay, v1_lay
     LOGICAL               :: check=.FALSE.
+    REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol    
+    REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol    
 
 ! End definitions
@@ -130,4 +138,6 @@
     dif_grnd = 0.
     agesno(:) = 0.
+    sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0.
+    
 
     DO i = 1, knon
@@ -141,5 +151,15 @@
          radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, &
          f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, &
-         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l)
+         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
+         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
+    do j = 1, knon
+      i = knindex(j)
+      sens_prec_liq_o(i,1) = sens_prec_liq(j)
+      sens_prec_sol_o(i,1) = sens_prec_sol(j)
+      lat_prec_liq_o(i,1) = lat_prec_liq(j)
+      lat_prec_sol_o(i,1) = lat_prec_sol(j)
+    enddo
+
+
     
 ! - Flux calculation at first modele level for U and V
@@ -171,5 +191,6 @@
     CALL cpl_send_ocean_fields(itime, knon, knindex, &
          swnet, lwnet, fluxlat, fluxsens, &
-         precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1, windsp)
+         precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1, windsp,&
+         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
     
 
@@ -199,4 +220,5 @@
     USE calcul_fluxs_mod
     USE indice_sol_mod
+    USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o
 
     INCLUDE "YOMCST.h"
@@ -237,8 +259,9 @@
     REAL, DIMENSION(klon), INTENT(OUT)       :: tsurf_new
     REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l      
+  
 
 ! Local variables
 !****************************************************************************************
-    INTEGER                 :: i
+    INTEGER                 :: i, j
     INTEGER, DIMENSION(1)   :: iloc
     LOGICAL                 :: check=.FALSE.
@@ -249,4 +272,6 @@
     REAL, DIMENSION(klon)   :: u0, v0
     REAL, DIMENSION(klon)   :: u1_lay, v1_lay
+    REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol    
+    REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol    
 
 ! End definitions
@@ -254,4 +279,6 @@
     
     IF (check) WRITE(*,*)'Entering surface_seaice, knon=',knon 
+
+    sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0.
 
 !****************************************************************************************
@@ -285,5 +312,13 @@
          radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, &
          f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, &
-         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l)
+         tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, &
+         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
+    do j = 1, knon
+      i = knindex(j)
+      sens_prec_liq_o(i,2) = sens_prec_liq(j)
+      sens_prec_sol_o(i,2) = sens_prec_sol(j)
+      lat_prec_liq_o(i,2) = lat_prec_liq(j)
+      lat_prec_sol_o(i,2) = lat_prec_sol(j)
+    enddo
 
 
@@ -317,5 +352,7 @@
        pctsrf, lafin, rlon, rlat, &
        swnet, lwnet, fluxlat, fluxsens, &
-       precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1)
+       precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1,&
+       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
+
  
 
