Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90	(revision 9166)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90	(revision 9167)
@@ -165,5 +165,8 @@
             ptab(i1:i2,j1:j2,jm+3) = sv_i(i1:i2,j1:j2,jl)
             ptab(i1:i2,j1:j2,jm+4) = oa_i(i1:i2,j1:j2,jl)
-            jm = jm + 5
+            ptab(i1:i2,j1:j2,jm+5) = a_ip(i1:i2,j1:j2,jl)
+            ptab(i1:i2,j1:j2,jm+6) = v_ip(i1:i2,j1:j2,jl)
+            ptab(i1:i2,j1:j2,jm+7) = t_su(i1:i2,j1:j2,jl)
+            jm = jm + 8
             DO jk = 1, nlay_s
                ptab(i1:i2,j1:j2,jm) = e_s(i1:i2,j1:j2,jk,jl)   ;   jm = jm + 1
@@ -192,7 +195,10 @@
                      sv_i(ji,jj,jl) = ptab(ji,jj,jm+3) * tmask(ji,jj,1)
                      oa_i(ji,jj,jl) = ptab(ji,jj,jm+4) * tmask(ji,jj,1)
+                     a_ip(ji,jj,jl) = ptab(ji,jj,jm+5) * tmask(ji,jj,1)
+                     v_ip(ji,jj,jl) = ptab(ji,jj,jm+6) * tmask(ji,jj,1)
+                     t_su(ji,jj,jl) = ptab(ji,jj,jm+7) * tmask(ji,jj,1)
                   END DO
                END DO
-               jm = jm + 5
+               jm = jm + 8
                !
                DO jk = 1, nlay_s
@@ -217,10 +223,13 @@
             jm = 1
             DO jl = 1, jpl
-               ztab(:,:,jm  ) = a_i  (:,:,jl)
-               ztab(:,:,jm+1) = v_i  (:,:,jl)
-               ztab(:,:,jm+2) = v_s  (:,:,jl)
+               ztab(:,:,jm  ) = a_i (:,:,jl)
+               ztab(:,:,jm+1) = v_i (:,:,jl)
+               ztab(:,:,jm+2) = v_s (:,:,jl)
                ztab(:,:,jm+3) = sv_i(:,:,jl)
                ztab(:,:,jm+4) = oa_i(:,:,jl)
-               jm = jm + 5
+               ztab(:,:,jm+5) = a_ip(:,:,jl)
+               ztab(:,:,jm+6) = v_ip(:,:,jl)
+               ztab(:,:,jm+7) = t_su(:,:,jl)
+               jm = jm + 8
                DO jk = 1, nlay_s
                   ztab(:,:,jm) = e_s(:,:,jk,jl)
@@ -324,8 +333,11 @@
                      v_s (ji,jj,jl) = ztab(ji,jj,jm+2) * tmask(ji,jj,1)
                      sv_i(ji,jj,jl) = ztab(ji,jj,jm+3) * tmask(ji,jj,1)
-                     oa_i (ji,jj,jl) = ztab(ji,jj,jm+4) * tmask(ji,jj,1)
+                     oa_i(ji,jj,jl) = ztab(ji,jj,jm+4) * tmask(ji,jj,1)
+                     a_ip(ji,jj,jl) = ztab(ji,jj,jm+5) * tmask(ji,jj,1)
+                     v_ip(ji,jj,jl) = ztab(ji,jj,jm+6) * tmask(ji,jj,1)
+                     t_su(ji,jj,jl) = ztab(ji,jj,jm+7) * tmask(ji,jj,1)
                   END DO
                END DO
-               jm = jm + 5
+               jm = jm + 8
                !
                DO jk = 1, nlay_s
@@ -344,7 +356,7 @@
          
          ! integrated values
-         vt_i (i1:i2,j1:j2) = SUM( v_i(i1:i2,j1:j2,:), dim=3 )
-         vt_s (i1:i2,j1:j2) = SUM( v_s(i1:i2,j1:j2,:), dim=3 )
-         at_i (i1:i2,j1:j2) = SUM( a_i(i1:i2,j1:j2,:), dim=3 )
+         vt_i (i1:i2,j1:j2) = SUM(      v_i(i1:i2,j1:j2,:),            dim=3 )
+         vt_s (i1:i2,j1:j2) = SUM(      v_s(i1:i2,j1:j2,:),            dim=3 )
+         at_i (i1:i2,j1:j2) = SUM(      a_i(i1:i2,j1:j2,:),            dim=3 )
          et_s(i1:i2,j1:j2)  = SUM( SUM( e_s(i1:i2,j1:j2,:,:), dim=4 ), dim=3 )
          et_i(i1:i2,j1:j2)  = SUM( SUM( e_i(i1:i2,j1:j2,:,:), dim=4 ), dim=3 )
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_lim3_update.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_lim3_update.F90	(revision 9166)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_lim3_update.F90	(revision 9167)
@@ -93,6 +93,9 @@
             ptab(i1:i2,j1:j2,jm+2) = v_s (i1:i2,j1:j2,jl)
             ptab(i1:i2,j1:j2,jm+3) = sv_i(i1:i2,j1:j2,jl)
-            ptab(i1:i2,j1:j2,jm+4) = oa_i (i1:i2,j1:j2,jl)
-            jm = jm + 5
+            ptab(i1:i2,j1:j2,jm+4) = oa_i(i1:i2,j1:j2,jl)
+            ptab(i1:i2,j1:j2,jm+5) = a_ip(i1:i2,j1:j2,jl)
+            ptab(i1:i2,j1:j2,jm+6) = v_ip(i1:i2,j1:j2,jl)
+            ptab(i1:i2,j1:j2,jm+7) = t_su(i1:i2,j1:j2,jl)
+            jm = jm + 8
             DO jk = 1, nlay_s
                ptab(i1:i2,j1:j2,jm) = e_s(i1:i2,j1:j2,jk,jl)   ;   jm = jm + 1
@@ -120,8 +123,11 @@
                      sv_i(ji,jj,jl) = ptab(ji,jj,jm+3) * tmask(ji,jj,1)
                      oa_i(ji,jj,jl) = ptab(ji,jj,jm+4) * tmask(ji,jj,1)
+                     a_ip(ji,jj,jl) = ptab(ji,jj,jm+5) * tmask(ji,jj,1)
+                     v_ip(ji,jj,jl) = ptab(ji,jj,jm+6) * tmask(ji,jj,1)
+                     t_su(ji,jj,jl) = ptab(ji,jj,jm+7) * tmask(ji,jj,1)
                   ENDIF
                END DO
             END DO
-            jm = jm + 5
+            jm = jm + 8
             !
             DO jk = 1, nlay_s
@@ -147,4 +153,9 @@
          et_s(i1:i2,j1:j2) = SUM( SUM( e_s(i1:i2,j1:j2,:,:), dim=4 ), dim=3 )
          et_i(i1:i2,j1:j2) = SUM( SUM( e_i(i1:i2,j1:j2,:,:), dim=4 ), dim=3 )
+
+         at_ip(i1:i2,j1:j2) = SUM( a_ip(i1:i2,j1:j2,:), dim=3 ) ! melt ponds
+         vt_ip(i1:i2,j1:j2) = SUM( v_ip(i1:i2,j1:j2,:), dim=3 )
+         !
+         ato_i(i1:i2,j1:j2) = 1._wp - at_i(i1:i2,j1:j2)         ! open water fraction  
          
       ENDIF
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 9166)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 9167)
@@ -584,11 +584,11 @@
    ind2 = 1 + nbghostcells
    ind3 = 2 + nbghostcells
-   CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpl*(5+nlay_s+nlay_i)/),tra_ice_id )
-   CALL agrif_declare_variable((/1,2/)  ,(/ind2,ind3/)  ,(/'x','y'/)    ,(/1,1/)  ,(/nlci,nlcj/)                      ,u_ice_id   )
-   CALL agrif_declare_variable((/2,1/)  ,(/ind3,ind2/)  ,(/'x','y'/)    ,(/1,1/)  ,(/nlci,nlcj/)                      ,v_ice_id   )
+   CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpl*(8+nlay_s+nlay_i)/),tra_ice_id)
+   CALL agrif_declare_variable((/1,2/)  ,(/ind2,ind3/)  ,(/'x','y'/)    ,(/1,1/)  ,(/nlci,nlcj/)                      ,u_ice_id  )
+   CALL agrif_declare_variable((/2,1/)  ,(/ind3,ind2/)  ,(/'x','y'/)    ,(/1,1/)  ,(/nlci,nlcj/)                      ,v_ice_id  )
 
    ! 2. Set interpolations (normal & tangent to the grid cell for velocities)
    !-----------------------------------
-   CALL Agrif_Set_bcinterp(tra_ice_id,  interp = AGRIF_linear)
+   CALL Agrif_Set_bcinterp(tra_ice_id, interp  = AGRIF_linear)
    CALL Agrif_Set_bcinterp(u_ice_id  , interp1 = Agrif_linear,interp2 = AGRIF_ppm   )
    CALL Agrif_Set_bcinterp(v_ice_id  , interp1 = AGRIF_ppm   ,interp2 = Agrif_linear)
@@ -603,11 +603,11 @@
    !--------------------------------------------------
 # if defined UPD_HIGH
-   CALL Agrif_Set_Updatetype(tra_ice_id, update = Agrif_Update_Full_Weighting)
-   CALL Agrif_Set_Updatetype(u_ice_id  ,update1 = Agrif_Update_Average       , update2 = Agrif_Update_Full_Weighting)
-   CALL Agrif_Set_Updatetype(v_ice_id  ,update1 = Agrif_Update_Full_Weighting, update2 = Agrif_Update_Average)
+   CALL Agrif_Set_Updatetype(tra_ice_id, update  = Agrif_Update_Full_Weighting)
+   CALL Agrif_Set_Updatetype(u_ice_id  , update1 = Agrif_Update_Average       , update2 = Agrif_Update_Full_Weighting)
+   CALL Agrif_Set_Updatetype(v_ice_id  , update1 = Agrif_Update_Full_Weighting, update2 = Agrif_Update_Average       )
 #else
-   CALL Agrif_Set_Updatetype(tra_ice_id, update = AGRIF_Update_Average)
-   CALL Agrif_Set_Updatetype(u_ice_id  ,update1 = Agrif_Update_Copy   , update2 = Agrif_Update_Average)
-   CALL Agrif_Set_Updatetype(v_ice_id  ,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy   )
+   CALL Agrif_Set_Updatetype(tra_ice_id, update  = AGRIF_Update_Average)
+   CALL Agrif_Set_Updatetype(u_ice_id  , update1 = Agrif_Update_Copy   , update2 = Agrif_Update_Average)
+   CALL Agrif_Set_Updatetype(v_ice_id  , update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy   )
 #endif
 
