Index: /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5389)
+++ /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5390)
@@ -350,5 +350,7 @@
    sn_snd_crt    =       'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'
    sn_snd_co2    =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_cond   =       'none'                 ,    'no'    ,     ''      ,         ''           ,   '' 
    sn_snd_mpnd   =       'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_sstfrz =       'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
 ! receive
    sn_rcv_w10m   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
Index: /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
===================================================================
--- /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 5389)
+++ /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 5390)
@@ -89,5 +89,7 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr_iv              !: ice fraction at NEMO V point
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   sstfrz             !: sea surface freezing temperature
-   
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tsfc_ice           !: sea-ice surface skin temperature (on categories)
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   kn_ice             !: sea-ice surface layer thermal conductivity (on cats)
+
    ! variables used in the coupled interface
    INTEGER , PUBLIC, PARAMETER ::   jpl = ncat
@@ -150,5 +152,6 @@
          &                     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)   , &
-         &                     a_p(jpi,jpj,jpl)      , ht_p(jpi,jpj,jpl)     , STAT=ierr(2) )
+         &                     a_p(jpi,jpj,jpl)      , ht_p(jpi,jpj,jpl)     , tsfc_ice(jpi,jpj,jpl) , &
+         &                     kn_ice(jpi,jpj,jpl) ,    STAT=ierr(2) )
       
 #endif
Index: /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5389)
+++ /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5390)
@@ -107,5 +107,7 @@
    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 sent
+   INTEGER, PARAMETER ::   jps_kice   = 18            ! ice surface layer thermal conductivity
+   INTEGER, PARAMETER ::   jps_sstfrz = 19            ! sea-surface freezing temperature
+   INTEGER, PARAMETER ::   jpsnd      = 19            ! total number of fields sent
    !                                                         !!** namelist namsbc_cpl **
    TYPE ::   FLD_C
@@ -117,5 +119,6 @@
    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, sn_snd_mpnd
+   TYPE(FLD_C) ::   sn_snd_temp, sn_snd_alb, sn_snd_thick, sn_snd_crt, sn_snd_co2, sn_snd_mpnd, sn_snd_cond, ssn_snd_sstfrz
+
    ! 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
@@ -241,5 +244,8 @@
          WRITE(numout,*)'                      - mesh          = ', sn_snd_crt%clvgrd
          WRITE(numout,*)'      oce co2 flux                    = ', TRIM(sn_snd_co2%cldes   ), ' (', TRIM(sn_snd_co2%clcat   ), ')'
+         WRITE(numout,*)'      ice effective conductivity      = ', TRIM(sn_snd_cond%cldes   ), ' (', TRIM(sn_snd_cond%clcat   ), ')'
          WRITE(numout,*)'      meltponds fraction & depth      = ', TRIM(sn_snd_mpnd%cldes  ), ' (', TRIM(sn_snd_mpnd%clcat   ), ')'
+         WRITE(numout,*)'      sea surface freezing temp       = ', TRIM(sn_snd_sstfrz%cldes   ), ' (', TRIM(sn_snd_sstfrz%clcat   ), ')'
+
          WRITE(numout,*)'  nn_cplmodel                         = ', nn_cplmodel
          WRITE(numout,*)'  ln_usecplmask                       = ', ln_usecplmask
@@ -356,5 +362,5 @@
       srcv(jpr_snow)%clname = 'OTotSnow'      ! Snow = solid precipitation
       srcv(jpr_tevp)%clname = 'OTotEvap'      ! total evaporation (over oce + ice sublimation)
-      srcv(jpr_ievp)%clname = 'OIceEvap'      ! evaporation over ice = sublimation
+      srcv(jpr_ievp)%clname = 'OIceEvp'      ! evaporation over ice = sublimation
       srcv(jpr_sbpr)%clname = 'OSubMPre'      ! sublimation - liquid precipitation - solid precipitation 
       srcv(jpr_semp)%clname = 'OISubMSn'      ! ice solid water budget = sublimation - solid precipitation
@@ -490,5 +496,5 @@
       !                                                      ! ------------------------- !
       ssnd(jps_toce)%clname = 'O_SSTSST'
-      ssnd(jps_tice)%clname = 'O_TepIce'
+      ssnd(jps_tice)%clname = 'OTepIce'
       ssnd(jps_tmix)%clname = 'O_TepMix'
       SELECT CASE( TRIM( sn_snd_temp%cldes ) )
@@ -498,4 +504,13 @@
          ssnd( (/jps_toce, jps_tice/) )%laction = .TRUE.
          IF ( TRIM( sn_snd_temp%clcat ) == 'yes' )  ssnd(jps_tice)%nct = jpl
+      CASE ( 'oce and ice' )
+         ssnd( (/jps_toce, jps_tice/) )%laction = .TRUE.
+         IF ( TRIM( sn_snd_temp%clcat ) == 'yes' ) THEN
+            ssnd(jps_tice)%nct = jpl
+         ELSE
+            IF ( jpl > 1 ) THEN
+               CALL ctl_stop( 'sbc_cpl_init: use weighted oce and ice option for sn_snd_temp%cldes if not exchanging category fields' )
+            ENDIF
+         ENDIF
       CASE( 'mixed oce-ice'        )   ;   ssnd(   jps_tmix             )%laction = .TRUE.
       CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_temp%cldes' )
@@ -622,4 +637,35 @@
       !                                                      ! ------------------------- !
       ssnd(jps_co2)%clname = 'O_CO2FLX' ;  IF( TRIM(sn_snd_co2%cldes) == 'coupled' )    ssnd(jps_co2 )%laction = .TRUE.
+      !
+
+
+      !                                                      ! ------------------------- !
+      !                                                      ! Sea surface freezing temp !
+      !                                                      ! ------------------------- !
+      ssnd(jps_sstfrz)%clname = 'O_SSTFrz' ; IF( TRIM(sn_snd_sstfrz%cldes) == 'coupled' )  ssnd(jps_sstfrz)%laction = .TRUE.
+      !
+      !                                                      ! ------------------------- !
+      !                                                      !    Ice conductivity       !
+      !                                                      ! ------------------------- !
+      ! Note that ultimately we will move to passing an ocean effective conductivity as well so there
+      ! will be some changes to the parts of the code which currently relate only to ice conductivity
+      ssnd(jps_kice )%clname = 'OIceKn'
+      SELECT CASE ( TRIM( sn_snd_cond%cldes ) )
+      CASE ( 'none' )
+         ssnd(jps_kice)%laction = .FALSE.
+      CASE ( 'ice only' )
+         ssnd(jps_kice)%laction = .TRUE.
+         IF ( TRIM( sn_snd_cond%clcat ) == 'yes' ) THEN
+            ssnd(jps_kice)%nct = jpl
+         ELSE
+            IF ( jpl > 1 ) THEN
+               CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_cond%cldes if not exchanging category fields' )
+            ENDIF
+         ENDIF
+      CASE ( 'weighted ice' )
+         ssnd(jps_kice)%laction = .TRUE.
+         IF ( TRIM( sn_snd_cond%clcat ) == 'yes' ) ssnd(jps_kice)%nct = jpl
+      CASE default   ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_cond%cldes' )
+      END SELECT
       !
       ! ================================ !
@@ -843,5 +889,4 @@
 #if defined key_cice && ! defined key_cice4
       !  ! Sea ice surface skin temp:
-      ! Use tn_ice for this as it's not used for anything else in cice case
       IF( srcv(jpr_ts_ice)%laction ) THEN
         DO jl = 1, jpl
@@ -849,9 +894,9 @@
             DO ji = 1, jpi
               IF (frcv(jpr_ts_ice)%z3(ji,jj,jl) > 0.0) THEN
-                tn_ice(ji,jj,jl) = 0.0
+                tsfc_ice(ji,jj,jl) = 0.0
               ELSE IF (frcv(jpr_ts_ice)%z3(ji,jj,jl) < -60.0) THEN
-                tn_ice(ji,jj,jl) = -60.0
+                tsfc_ice(ji,jj,jl) = -60.0
               ELSE
-                tn_ice(ji,jj,jl) = frcv(jpr_ts_ice)%z3(ji,jj,jl)
+                tsfc_ice(ji,jj,jl) = frcv(jpr_ts_ice)%z3(ji,jj,jl)
               ENDIF
             END DO
@@ -1546,4 +1591,22 @@
          IF( ssnd(jps_a_p)%laction )   CALL cpl_snd( jps_a_p, isec, ztmp3, info )    
          IF( ssnd(jps_ht_p)%laction )   CALL cpl_snd( jps_ht_p, isec, ztmp4, info )    
+         !
+         ! Send ice effective conductivity
+         SELECT CASE( sn_snd_cond%cldes)
+         CASE( 'weighted ice' )   
+            SELECT CASE( sn_snd_cond%clcat )
+            CASE( 'yes' )   
+               ztmp3(:,:,1:jpl) =  kn_ice(:,:,1:jpl) * a_i(:,:,1:jpl)
+            CASE( 'no' )
+               ztmp3(:,:,:) = 0.0
+               DO jl=1,jpl
+                 ztmp3(:,:,1) = ztmp3(:,:,1) + kn_ice(:,:,jl) * a_i(:,:,jl)
+               ENDDO
+            CASE default                  ;   CALL ctl_stop( 'sbc_cpl_snd: wrong definition of sn_snd_cond%clcat' )
+            END SELECT
+         CASE( 'ice only' )   
+           ztmp3(:,:,1:jpl) = kn_ice(:,:,1:jpl)
+         END SELECT
+         IF( ssnd(jps_kice)%laction )   CALL cpl_prism_snd( jps_kice, isec, ztmp3, info )
       ENDIF
       !
@@ -1686,4 +1749,7 @@
       ENDIF
       !
+      ztmp1(:,:) = sstfrz(:,:) + rt0
+      IF( ssnd(jps_sstfrz)%laction )  CALL cpl_prism_snd( jps_sstfrz, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info )
+      !
       CALL wrk_dealloc( jpi,jpj, zfr_l, ztmp1, ztmp2, zotx1, zoty1, zotz1, zitx1, zity1, zitz1 )
       CALL wrk_dealloc( jpi,jpj,jpl, ztmp3, ztmp4 )
Index: /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 5389)
+++ /branches/UKMO/dev_r5377_UKMO1_CICE_coupling_GSI7/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 5390)
@@ -16,5 +16,5 @@
    USE domvvl
    USE eosbn2, only : eos_fzp ! Function to calculate freezing point of seawater
-   USE phycst, only : rcp, rau0, r1_rau0, rhosn, rhoic
+   USE phycst, only : rcp, rau0, r1_rau0, rhosn, rhoic, rt0
    USE in_out_manager  ! I/O manager
    USE iom, ONLY : iom_put,iom_use              ! I/O manager library !!Joakim edit
@@ -39,5 +39,6 @@
    USE ice_calendar, only: dt
 # if defined key_cice4
-   USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen
+   USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen, &
+                        nt_Tsfc
    USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  &
                 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm,     &
@@ -45,5 +46,13 @@
                 flatn_f,fsurfn_f,fcondtopn_f,                    &
                 uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl,   &
-                swvdr,swvdf,swidr,swidf,Tf
+                swvdr,swvdf,swidr,swidf,Tf              !!!   &
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!! LINE BELOW COMMENTED OUT TEMPORARILY UNTIL CICE MULTILAYERS  !!!
+!!! BRANCH CAN BE INCLUDED AT CICE5.                             !!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!              ,keffn_top,Tn_top
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
+
    USE ice_therm_vertical, only: calc_Tsfc
 #else
@@ -56,5 +65,5 @@
                 uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl,   &
                 swvdr,swvdf,swidr,swidf,Tf
-   USE ice_therm_shared, only: calc_Tsfc
+   USE ice_therm_shared, only: calc_Tsfc, heat_capacity
    USE ice_shortwave, only: apeffn
 #endif
@@ -453,4 +462,9 @@
       CALL nemo2cice(sss_m,sss,'T', 1. )
 
+! Sea ice surface skin temperature
+      DO jpl=1,ncat
+        CALL nemo2cice(tsfc_ice(:,:,jpl), trcrn(:,:,nt_tsfc,jpl,:),'T',1.)
+      ENDDO 
+
 ! x comp and y comp of surface ocean current
 ! U point to F point
@@ -727,4 +741,24 @@
       ENDDO
 #endif
+
+
+! If using multilayers thermodynamics in CICE then get top layer temperature
+! and effective conductivity       
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!! LINES COMMENTED OUT UNTIL CICE MULTILAYERS BRANCH IS IMPLEMENTED 
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
+!!      IF (heat_capacity) THEN
+!!         DO jpl = 1,ncat
+!!            CALL cice2nemo(Tn_top(:,:,jpl,:),tn_ice(:,:,jpl),'T', 1. )
+!!            CALL cice2nemo(keffn_top(:,:,jpl,:),kn_ice(:,:,jpl),'T', 1. )
+!!         ENDDO
+!!! Convert surface temperature to Kelvin
+!!         tn_ice(:,:,:)=tn_ice(:,:,:)+rt0
+!!      ELSE
+!!         tn_ice(:,:,:) = 0.0
+!!         kn_ice(:,:,:) = 0.0
+!!      ENDIF       
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
 
       !
