Index: /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
===================================================================
--- /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 5029)
+++ /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 5030)
@@ -92,4 +92,5 @@
    INTEGER , PUBLIC, PARAMETER ::   jpl = ncat
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   u_ice, v_ice          ! jpi, jpj
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_p, ht_p ! Meltpond fraction and depth
 #endif
    
@@ -148,5 +149,5 @@
          &                     v_ice(jpi,jpj)        , fr2_i0(jpi,jpj)       , alb_ice(jpi,jpj,1)    , &
          &                     emp_ice(jpi,jpj)      , qns_ice(jpi,jpj,1)    , dqns_ice(jpi,jpj,1)   , &
-         &                     STAT= ierr(2) )
+         &                     a_p(jpi,jpj,jpl)      , ht_p(jpi,jpj,jpl)     , STAT=ierr(2) )
       
 #endif
@@ -157,5 +158,5 @@
          !
 #if defined key_cice || defined key_lim2
-      IF( lk_cpl )   ALLOCATE( ht_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(5) )
+      IF( lk_cpl ) ALLOCATE( ht_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(5) )
 #endif
 
Index: /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5029)
+++ /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5030)
@@ -104,6 +104,7 @@
    INTEGER, PARAMETER ::   jps_ivz1   = 14            !
    INTEGER, PARAMETER ::   jps_co2    = 15
-   INTEGER, PARAMETER ::   jpsnd      = 15            ! total number of fields sended
-
+   INTEGER, PARAMETER ::   jps_a_p    = 16            ! meltpond fraction  
+   INTEGER, PARAMETER ::   jps_ht_p   = 17            ! meltpond depth (m) 
+   INTEGER, PARAMETER ::   jpsnd      = 18            ! total number of fields sended
    !                                                         !!** namelist namsbc_cpl **
    TYPE ::   FLD_C
@@ -115,5 +116,5 @@
    END TYPE FLD_C
    ! Send to the atmosphere                           !
-   TYPE(FLD_C) ::   sn_snd_temp, sn_snd_alb, sn_snd_thick, sn_snd_crt, sn_snd_co2                        
+   TYPE(FLD_C) ::   sn_snd_temp, sn_snd_alb, sn_snd_thick, sn_snd_crt, sn_snd_co2, sn_snd_mpnd
    ! Received from the atmosphere                     !
    TYPE(FLD_C) ::   sn_rcv_w10m, sn_rcv_taumod, sn_rcv_tau, sn_rcv_dqnsdt, sn_rcv_qsr, sn_rcv_qns, sn_rcv_emp, sn_rcv_rnf
@@ -238,4 +239,5 @@
          WRITE(numout,*)'                      - mesh          = ', sn_snd_crt%clvgrd
          WRITE(numout,*)'      oce co2 flux                    = ', TRIM(sn_snd_co2%cldes   ), ' (', TRIM(sn_snd_co2%clcat   ), ')'
+         WRITE(numout,*)'      meltponds fraction & depth      = ', TRIM(sn_snd_mpnd%cldes  ), ' (', TRIM(sn_snd_mpnd%clcat   ), ')'
          WRITE(numout,*)'  nn_cplmodel                         = ', nn_cplmodel
          WRITE(numout,*)'  ln_usecplmask                       = ', ln_usecplmask
@@ -508,9 +510,11 @@
 
       !                                                      ! ------------------------- !
-      !                                                      !  Ice fraction & Thickness ! 
+      !                                                      !  Ice fraction & Thickness 
       !                                                      ! ------------------------- !
       ssnd(jps_fice)%clname = 'OIceFrc'
       ssnd(jps_hice)%clname = 'OIceTck'
       ssnd(jps_hsnw)%clname = 'OSnwTck'
+      ssnd(jps_a_p)%clname  = 'OPndFrc'
+      ssnd(jps_ht_p)%clname = 'OPndTck'
       IF( k_ice /= 0 ) THEN
          ssnd(jps_fice)%laction = .TRUE.                  ! if ice treated in the ocean (even in climato case)
@@ -535,4 +539,41 @@
       CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_thick%cldes' )
       END SELECT
+
+      !                                                      ! ------------------------- !
+      !                                                      ! Ice Meltponds             !
+      !                                                      ! ------------------------- !
+#if defined key_cice && ! defined key_cice4
+      ! Meltponds only CICE5 
+      ssnd(jps_a_p)%clname = 'OPndFrc'   
+      ssnd(jps_ht_p)%clname = 'OPndTck'   
+      SELECT CASE ( TRIM( sn_snd_mpnd%cldes ) )
+      CASE ( 'none' )
+         ssnd(jps_a_p)%laction = .FALSE.
+         ssnd(jps_ht_p)%laction = .FALSE.
+      CASE ( 'ice only' ) 
+         ssnd(jps_a_p)%laction = .TRUE.
+         ssnd(jps_ht_p)%laction = .TRUE.
+         IF ( TRIM( sn_snd_mpnd%clcat ) == 'yes' ) THEN
+            ssnd(jps_a_p)%nct = jpl
+            ssnd(jps_ht_p)%nct = jpl
+         ELSE
+            IF ( jpl > 1 ) THEN
+               CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_mpnd%cldes if not exchanging category fields' )
+            ENDIF
+         ENDIF
+      CASE ( 'weighted ice' ) 
+         ssnd(jps_a_p)%laction = .TRUE.
+         ssnd(jps_ht_p)%laction = .TRUE.
+         IF ( TRIM( sn_snd_mpnd%clcat ) == 'yes' ) THEN
+            ssnd(jps_a_p)%nct = jpl 
+            ssnd(jps_ht_p)%nct = jpl 
+         ENDIF
+      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_mpnd%cldes' )
+      END SELECT
+#else
+      IF( TRIM( sn_snd_mpnd%cldes /= 'none' ) THEN
+         CALL ctl_stop('Meltponds can only be used with CICEv5')
+      ENDIF
+#endif
 
       !                                                      ! ------------------------- !
@@ -650,5 +691,5 @@
       REAL(wp) ::   zcdrag = 1.5e-3        ! drag coefficient
       REAL(wp) ::   zzx, zzy               ! temporary variables
-      REAL(wp), POINTER, DIMENSION(:,:) ::   ztx, zty 
+      REAL(wp), POINTER, DIMENSION:,:) ::   ztx, zty 
       !!----------------------------------------------------------------------
       !
@@ -1448,4 +1489,28 @@
       ENDIF
       !
+      ! Send meltpond fields 
+      SELECT CASE( sn_snd_mpnd%cldes) 
+      CASE( 'weighted ice' ) 
+         SELECT CASE( sn_snd_mpnd%clcat ) 
+         CASE( 'yes' ) 
+            ztmp3(:,:,1:jpl) =  a_p(:,:,1:jpl) * a_i(:,:,1:jpl) 
+            ztmp4(:,:,1:jpl) =  ht_p(:,:,1:jpl) * a_i(:,:,1:jpl) 
+         CASE( 'no' ) 
+            ztmp3(:,:,:) = 0.0 
+            ztmp4(:,:,:) = 0.0 
+            DO jl=1,jpl 
+              ztmp3(:,:,1) = ztmp3(:,:,1) + a_p(:,:,jpl) * a_i(:,:,jpl) 
+              ztmp4(:,:,1) = ztmp4(:,:,1) + ht_p(:,:,jpl) * a_i(:,:,jpl) 
+            ENDDO 
+         CASE default    ;   CALL ctl_stop( 'sbc_cpl_mpd: wrong definition of sn_snd_mpnd%clcat' ) 
+         END SELECT 
+      CASE( 'ice only' )    
+         ztmp3(:,:,1:jpl) = a_p(:,:,1:jpl) 
+         ztmp4(:,:,1:jpl) = ht_p(:,:,1:jpl) 
+      END SELECT 
+      IF( ssnd(jps_a_p)%laction )   CALL cpl_prism_snd( jps_a_p, isec, ztmp3, info )    
+      IF( ssnd(jps_ht_p)%laction )   CALL cpl_prism_snd( jps_ht_p, isec, ztmp4, info )    
+      !
+      !
 #if defined key_cpl_carbon_cycle
       !                                                      ! ------------------------- !
Index: /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 5029)
+++ /branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 5030)
@@ -37,6 +37,6 @@
    USE ice_gather_scatter
    USE ice_calendar, only: dt
+# if defined key_cice4
    USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen
-# if defined key_cice4
    USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  &
                 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm,     &
@@ -47,4 +47,6 @@
    USE ice_therm_vertical, only: calc_Tsfc
 #else
+   USE ice_state, only: aice,aicen,uvel,nt_hpnd,trcrn,vvel,vsno,&
+                vsnon,vice,vicen
    USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  &
                 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_ai,     &
@@ -54,4 +56,5 @@
                 swvdr,swvdf,swidr,swidf
    USE ice_therm_shared, only: calc_Tsfc
+   USE ice_shortwave, only: apeffn
 #endif
    USE ice_forcing, only: frcvdr,frcvdf,frcidr,frcidf
@@ -702,4 +705,13 @@
          CALL cice2nemo(vicen(:,:,jl,:),ht_i(:,:,jl),'T', 1. )
       ENDDO
+
+#if ! defined key_cice4
+! Meltpond fraction and depth
+      DO jl = 1,ncat
+         CALL cice2nemo(apeffn(:,:,jl,:),a_p(:,:,jl),'T', 1. )
+         CALL cice2nemo(trcrn(:,:,jl,:),ht_p(:,:,jl),'T', 1. )
+      ENDDO
+#endif
+
       !
       IF( nn_timing == 1 )  CALL timing_stop('cice_sbc_hadgam')
