Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90	(revision 397)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90	(revision 398)
@@ -43,5 +43,5 @@
   real, allocatable, dimension(:),save    :: coastalflow, riverflow
 !!$PB
-!!  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: tmp_rriv, tmp_rcoa
+  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: tmp_rriv, tmp_rcoa
 !! pour simuler la fonte des glaciers antarctiques
   REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: coeff_iceberg
@@ -276,14 +276,14 @@
       endif
 !!$PB
-!!      ALLOCATE (tmp_rriv(iim,jjm+1), stat=error)
-! !     if (error /= 0) then
-!!        abort_message='Pb allocation tmp_rriv'
- !!       call abort_gcm(modname,abort_message,1)
-!!      endif
-!!      ALLOCATE (tmp_rcoa(iim,jjm+1), stat=error)
-!!      if (error /= 0) then
-!!        abort_message='Pb allocation tmp_rcoa'
-!!        call abort_gcm(modname,abort_message,1)
-!!      endif
+      ALLOCATE (tmp_rriv(iim,jjm+1), stat=error)
+      if (error /= 0) then
+        abort_message='Pb allocation tmp_rriv'
+        call abort_gcm(modname,abort_message,1)
+      endif
+      ALLOCATE (tmp_rcoa(iim,jjm+1), stat=error)
+      if (error /= 0) then
+        abort_message='Pb allocation tmp_rcoa'
+        call abort_gcm(modname,abort_message,1)
+      endif
 !!$
     else if (size(coastalflow) /= knon) then
@@ -1022,8 +1022,8 @@
     bidule=0.
     bidule(1:knon)=riverflow(1:knon)
-!    call gath2cpl(bidule, tmp_rriv, klon, knon,iim,jjm,ktindex)
+    call gath2cpl(bidule, tmp_rriv, klon, knon,iim,jjm,knindex)
     bidule=0.
     bidule(1:knon)=coastalflow(1:knon)
-!    call gath2cpl(bidule, tmp_rcoa, klon, knon,iim,jjm,ktindex)
+    call gath2cpl(bidule, tmp_rcoa, klon, knon,iim,jjm,knindex)
     alb_new(1:knon) = albedo_out(1:knon,1) 
     alblw(1:knon) = albedo_out(1:knon,2)
@@ -1144,6 +1144,6 @@
   real, allocatable, dimension(:,:,:),save :: tmp_snow, tmp_evap, tmp_tsol
   real, allocatable, dimension(:,:,:),save :: tmp_fder, tmp_albe, tmp_taux
-  real, allocatable, dimension(:,:,:),save :: tmp_tauy, tmp_rriv, tmp_rcoa
-!!  REAL, ALLOCATABLE, DIMENSION(:,:,:),SAVE :: tmp_tauy
+!!$  real, allocatable, dimension(:,:,:),save :: tmp_tauy, tmp_rriv, tmp_rcoa
+  REAL, ALLOCATABLE, DIMENSION(:,:,:),SAVE :: tmp_tauy
 ! variables a passer au coupleur
   real, dimension(iim, jjm+1) :: wri_sol_ice, wri_sol_sea, wri_nsol_ice 
@@ -1336,13 +1336,13 @@
       cpl_tauy(ig,cpl_index) = cpl_tauy(ig,cpl_index) &
        &                          + tauy(ig)        / FLOAT(nexca)
-      cpl_rriv(ig,cpl_index) = cpl_rriv(ig,cpl_index) &
-       &                          + riverflow(ig)   / FLOAT(nexca)/dtime
-      cpl_rcoa(ig,cpl_index) = cpl_rcoa(ig,cpl_index) &
-       &                          + coastalflow(ig) / FLOAT(nexca)/dtime
+!!$      cpl_rriv(ig,cpl_index) = cpl_rriv(ig,cpl_index) &
+!!$       &                          + riverflow(ig)   / FLOAT(nexca)/dtime
+!!$      cpl_rcoa(ig,cpl_index) = cpl_rcoa(ig,cpl_index) &
+!!$       &                          + coastalflow(ig) / FLOAT(nexca)/dtime
     enddo
-!    IF (cpl_index .EQ. 1) THEN 
-!        cpl_rriv(:,:) = cpl_rriv(:,:) + tmp_rriv(:,:) / FLOAT(nexca)
-!       cpl_rcoa(:,:) = cpl_rcoa(:,:) + tmp_rcoa(:,:) / FLOAT(nexca)
-!    ENDIF
+    IF (cpl_index .EQ. 1) THEN 
+        cpl_rriv(:,:) = cpl_rriv(:,:) + tmp_rriv(:,:) / FLOAT(nexca)
+        cpl_rcoa(:,:) = cpl_rcoa(:,:) + tmp_rcoa(:,:) / FLOAT(nexca)
+    ENDIF
   endif
 
@@ -1442,6 +1442,6 @@
       allocate(tmp_taux(iim,jjm+1,2), stat=error); sum_error = sum_error + error
       allocate(tmp_tauy(iim,jjm+1,2), stat=error); sum_error = sum_error + error
-      allocate(tmp_rriv(iim,jjm+1,2), stat=error); sum_error = sum_error + error
-      allocate(tmp_rcoa(iim,jjm+1,2), stat=error); sum_error = sum_error + error
+!!$      allocate(tmp_rriv(iim,jjm+1,2), stat=error); sum_error = sum_error + error
+!!$      allocate(tmp_rcoa(iim,jjm+1,2), stat=error); sum_error = sum_error + error
       if (sum_error /= 0) then
         abort_message='Pb allocation variables couplees pour l''ecriture'
@@ -1465,6 +1465,6 @@
     call gath2cpl(cpl_taux(1,cpl_index), tmp_taux(1,1,cpl_index), klon, knon,iim,jjm,                  knindex)
     call gath2cpl(cpl_tauy(1,cpl_index), tmp_tauy(1,1,cpl_index), klon, knon,iim,jjm,                  knindex)
-    call gath2cpl(cpl_rriv(1,cpl_index), tmp_rriv(1,1,cpl_index), klon, knon,iim,jjm,                  knindex)
-    call gath2cpl(cpl_rcoa(1,cpl_index), tmp_rcoa(1,1,cpl_index), klon, knon,iim,jjm,                  knindex)
+!!$    call gath2cpl(cpl_rriv(1,cpl_index), tmp_rriv(1,1,cpl_index), klon, knon,iim,jjm,                  knindex)
+!!$    call gath2cpl(cpl_rcoa(1,cpl_index), tmp_rcoa(1,1,cpl_index), klon, knon,iim,jjm,                  knindex)
 
 !
@@ -1495,8 +1495,8 @@
       &            tmp_snow(:,:,2) * tamp_srf(:,:,2) / deno
 !!$PB
-        wri_rriv = tmp_rriv(:,:,1) * tamp_srf(:,:,1) / deno +    &
-      &            tmp_rriv(:,:,2) * tamp_srf(:,:,2) / deno
-        wri_rcoa = tmp_rcoa(:,:,1) * tamp_srf(:,:,1) / deno +    &
-      &            tmp_rcoa(:,:,2) * tamp_srf(:,:,2) / deno
+!!$        wri_rriv = tmp_rriv(:,:,1) * tamp_srf(:,:,1) / deno +    &
+!!$      &            tmp_rriv(:,:,2) * tamp_srf(:,:,2) / deno
+!!$        wri_rcoa = tmp_rcoa(:,:,1) * tamp_srf(:,:,1) / deno +    &
+!!$      &            tmp_rcoa(:,:,2) * tamp_srf(:,:,2) / deno
         wri_taux = tmp_taux(:,:,1) * tamp_srf(:,:,1) / deno +    &
       &            tmp_taux(:,:,2) * tamp_srf(:,:,2) / deno
@@ -1583,6 +1583,6 @@
       deallocate(tmp_tauy, stat=error); sum_error = sum_error + error
 !!$PB
-      deallocate(tmp_rriv, stat=error); sum_error = sum_error + error
-      deallocate(tmp_rcoa, stat=error); sum_error = sum_error + error
+!!$      deallocate(tmp_rriv, stat=error); sum_error = sum_error + error
+!!$      deallocate(tmp_rcoa, stat=error); sum_error = sum_error + error
       if (sum_error /= 0) then
         abort_message='Pb deallocation variables couplees'
