Index: LMDZ.3.3/branches/rel-LF/libf/phylmd/oasis.F
===================================================================
--- LMDZ.3.3/branches/rel-LF/libf/phylmd/oasis.F	(revision 177)
+++ LMDZ.3.3/branches/rel-LF/libf/phylmd/oasis.F	(revision 394)
@@ -80,14 +80,15 @@
       cl_writ(10)='CORUNCOA'
       cl_writ(11)='CORIVFLU'
-c$$$      cl_writ(12)='COZOTAUX'
-c$$$      cl_writ(13)='COZOTAUV'
-c$$$      cl_writ(14)='COMETAUY'
-c$$$      cl_writ(15)='COMETAUU'
-      cl_writ(12)='COTAUXXU'
-      cl_writ(13)='COTAUYYU'
-      cl_writ(14)='COTAUZZU'
-      cl_writ(15)='COTAUXXV'
-      cl_writ(16)='COTAUYYV'
-      cl_writ(17)='COTAUZZV'
+      cl_writ(12)='COCALVIN'
+c$$$      cl_writ(13)='COZOTAUX'
+c$$$      cl_writ(14)='COZOTAUV'
+c$$$      cl_writ(15)='COMETAUY'
+c$$$      cl_writ(16)='COMETAUU'
+      cl_writ(13)='COTAUXXU'
+      cl_writ(14)='COTAUYYU'
+      cl_writ(15)='COTAUZZU'
+      cl_writ(16)='COTAUXXV'
+      cl_writ(17)='COTAUYYV'
+      cl_writ(18)='COTAUZZV'
 c
 c     Define files name for fields exchanged from atmos to coupler,
@@ -111,4 +112,5 @@
       cl_f_writ(16)='flxatmos'
       cl_f_writ(17)='flxatmos'
+      cl_f_writ(18)='flxatmos'
 
 c
@@ -199,4 +201,6 @@
             CALL CLIM_Define (cl_read(jf), clim_in , clim_double, iparal
      $          , info )  
+            WRITE(nuout,*) 'inicma : clim define done for ',jf
+     $          ,cl_read(jf) 
           END DO 
 c
@@ -206,4 +210,6 @@
             CALL CLIM_Define (cl_writ(jf), clim_out , clim_double,
      $          iparal, info )   
+            WRITE(nuout,*) 'inicma : clim define done for ',jf
+     $          ,cl_writ(jf) 
           END DO 
 c
@@ -301,6 +307,7 @@
 c $Id$
       SUBROUTINE intocpl(kt, imjm, fsolice, fsolwat, fnsolice, fnsolwat,
-     $    fnsicedt, evice, evwat, lpre, spre, dirunoff, rivrunoff,
-     $    tauxx_u, tauyy_u, tauzz_u, tauxx_v, tauyy_v, tauzz_v,last) 
+     $    fnsicedt, evice, evwat, lpre, spre, dirunoff, rivrunoff, 
+     $    calving, tauxx_u, tauyy_u, tauzz_u, tauxx_v, tauyy_v, tauzz_v
+     $    , last) 
 c ======================================================================
 c S. Valcke (02/99) adapted From L.Z.X Li: this subroutine provides the 
@@ -323,4 +330,5 @@
       REAL dirunoff(imjm)
       REAL rivrunoff(imjm)
+      REAL calving(imjm)
 c$$$      REAL tauxu(imjm)
 c$$$      REAL tauxv(imjm)
@@ -356,5 +364,6 @@
       WRITE(nuout,*) ' '
       WRITE(nuout,*) 'Intocpl: sending fields to CPL, kt= ', kt
-      WRITE(nuout,*) ' '
+      WRITE(nuout,*) 'last  ', last
+      WRITE(nuout,*)
 
       IF (last) THEN 
@@ -404,4 +413,7 @@
           DO jn=1, max_file 
             OPEN (file_unit(jn), FILE=file_name(jn), FORM='UNFORMATTED')
+            WRITE(*,*) 'Opening FILE ', file_unit(jn), ' '
+     $          , file_name(jn) 
+            REWIND(file_unit(jn))
           END DO
 c 
@@ -410,66 +422,69 @@
             IF (jf.eq.1)
      $          CALL locwrite(cl_writ(jf),fsolice, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.2)
      $          CALL locwrite(cl_writ(jf),fsolwat, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.3)
      $          CALL locwrite(cl_writ(jf),fnsolice, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.4)
      $          CALL locwrite(cl_writ(jf),fnsolwat, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.5)
      $          CALL locwrite(cl_writ(jf),fnsicedt, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
 c            IF (jf.eq.6)
 c     $          CALL locwrite(cl_writ(jf),ictemp, imjm,
-c     $          file_unit_field(jf), ierror, nuout) 
+c     $          file_unit_field(jf), ierror) 
             IF (jf.eq.6)
      $          CALL locwrite(cl_writ(jf),evice, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.7)
      $          CALL locwrite(cl_writ(jf),evwat, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.8)
      $          CALL locwrite(cl_writ(jf),lpre, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.9)
      $          CALL locwrite(cl_writ(jf),spre, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.10)
      $          CALL locwrite(cl_writ(jf),dirunoff, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
+     $          file_unit_field(jf), ierror) 
             IF (jf.eq.11)
      $          CALL locwrite(cl_writ(jf),rivrunoff, imjm,
-     $          file_unit_field(jf), ierror, nuout) 
-c$$$            IF (jf.eq.12)
+     $          file_unit_field(jf), ierror) 
+            IF (jf.eq.12)
+     $          CALL locwrite(cl_writ(jf),calving, imjm,
+     $          file_unit_field(jf), ierror) 
+c$$$            IF (jf.eq.13)
 c$$$     $          CALL locwrite(cl_writ(jf),tauxu, imjm,
-c$$$     $          file_unit_field(jf),ierror, nuout) 
-c$$$            IF (jf.eq.13)
+c$$$     $          file_unit_field(jf),ierror) 
+c$$$            IF (jf.eq.1')
 c$$$     $          CALL locwrite(cl_writ(jf),tauxv, imjm,
-c$$$     $          file_unit_field(jf),ierror, nuout) 
-c$$$            IF (jf.eq.14)
+c$$$     $          file_unit_field(jf),ierror) 
+c$$$            IF (jf.eq.15)
 c$$$     $          CALL locwrite(cl_writ(jf),tauyv, imjm,
-c$$$     $          file_unit_field(jf),ierror, nuout) 
-c$$$            IF (jf.eq.15)
+c$$$     $          file_unit_field(jf),ierror) 
+c$$$            IF (jf.eq.16)
 c$$$     $          CALL locwrite(cl_writ(jf),tauyu, imjm,
-c$$$     $          file_unit_field(jf), ierror, nuout) 
-            IF (jf.eq.12)
+c$$$     $          file_unit_field(jf), ierror) 
+            IF (jf.eq.13)
      $          CALL locwrite(cl_writ(jf),tauxx_u, imjm,
      $          file_unit_field(jf),ierror)
-            IF (jf.eq.13)
+            IF (jf.eq.14)
      $          CALL locwrite(cl_writ(jf),tauyy_u, imjm,
      $          file_unit_field(jf),ierror)
-            IF (jf.eq.14)
+            IF (jf.eq.15)
      $          CALL locwrite(cl_writ(jf),tauzz_u, imjm,
      $          file_unit_field(jf),ierror)
-            IF (jf.eq.15)
+            IF (jf.eq.16)
      $          CALL locwrite(cl_writ(jf),tauxx_v, imjm,
      $          file_unit_field(jf),ierror)
-            IF (jf.eq.16)
+            IF (jf.eq.17)
      $          CALL locwrite(cl_writ(jf),tauyy_v, imjm,
      $          file_unit_field(jf),ierror)
-            IF (jf.eq.17)
+            IF (jf.eq.18)
      $          CALL locwrite(cl_writ(jf),tauzz_v, imjm,
      $          file_unit_field(jf),ierror)
@@ -515,14 +530,15 @@
           IF (jn.eq.10) CALL CLIM_Export(cl_writ(jn),kt,dirunoff, info)
           IF (jn.eq.11) CALL CLIM_Export(cl_writ(jn),kt,rivrunoff,info)
-c$$$          IF (jn.eq.12) CALL CLIM_Export(cl_writ(jn), kt, tauxu, info)
-c$$$          IF (jn.eq.13) CALL CLIM_Export(cl_writ(jn), kt, tauxv, info)
-c$$$          IF (jn.eq.14) CALL CLIM_Export(cl_writ(jn), kt, tauyv, info)
-c$$$          IF (jn.eq.15) CALL CLIM_Export(cl_writ(jn), kt, tauyu, info)
-          IF (jn.eq.12) CALL CLIM_Export(cl_writ(jn), kt, tauxx_u, info)
-          IF (jn.eq.13) CALL CLIM_Export(cl_writ(jn), kt, tauyy_u, info)
-          IF (jn.eq.14) CALL CLIM_Export(cl_writ(jn), kt, tauzz_u, info)
-          IF (jn.eq.15) CALL CLIM_Export(cl_writ(jn), kt, tauxx_v, info)
-          IF (jn.eq.16) CALL CLIM_Export(cl_writ(jn), kt, tauyy_v, info)
-          IF (jn.eq.17) CALL CLIM_Export(cl_writ(jn), kt, tauzz_v, info)
+          IF (jn.eq.12) CALL CLIM_Export(cl_writ(jn),kt,calving,info)
+c$$$          IF (jn.eq.13) CALL CLIM_Export(cl_writ(jn), kt, tauxu, info)
+c$$$          IF (jn.eq.14) CALL CLIM_Export(cl_writ(jn), kt, tauxv, info)
+c$$$          IF (jn.eq.15) CALL CLIM_Export(cl_writ(jn), kt, tauyv, info)
+c$$$          IF (jn.eq.16) CALL CLIM_Export(cl_writ(jn), kt, tauyu, info)
+          IF (jn.eq.13) CALL CLIM_Export(cl_writ(jn), kt, tauxx_u, info)
+          IF (jn.eq.14) CALL CLIM_Export(cl_writ(jn), kt, tauyy_u, info)
+          IF (jn.eq.15) CALL CLIM_Export(cl_writ(jn), kt, tauzz_u, info)
+          IF (jn.eq.16) CALL CLIM_Export(cl_writ(jn), kt, tauxx_v, info)
+          IF (jn.eq.17) CALL CLIM_Export(cl_writ(jn), kt, tauyy_v, info)
+          IF (jn.eq.18) CALL CLIM_Export(cl_writ(jn), kt, tauzz_v, info)
           
             IF (info .NE. CLIM_Ok) THEN
