Index: /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 4747)
+++ /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 4748)
@@ -1009,5 +1009,5 @@
 #endif
 
-#if defined key_cice && defined key_asminc
+#if ( defined key_cice || defined key_cice5 ) && defined key_asminc
             ! Sea-ice : CICE case. Pass ice increment tendency into CICE
             ndaice_da(:,:) = seaice_bkginc(:,:) * zincwgt / rdt
@@ -1020,5 +1020,5 @@
          ELSE
 
-#if defined key_cice && defined key_asminc
+#if ( defined key_cice || defined key_cice5 ) && defined key_asminc
             ! Sea-ice : CICE case. Zero ice increment tendency into CICE
             ndaice_da(:,:) = 0.0_wp
@@ -1064,5 +1064,5 @@
 #endif
  
-#if defined key_cice && defined key_asminc
+#if ( defined key_cice || defined key_cice5 ) && defined key_asminc
             ! Sea-ice : CICE case. Pass ice increment tendency into CICE
            ndaice_da(:,:) = seaice_bkginc(:,:) / rdt
@@ -1074,5 +1074,5 @@
          ELSE
 
-#if defined key_cice && defined key_asminc
+#if ( defined key_cice || defined key_cice5 ) && defined key_asminc
             ! Sea-ice : CICE case. Zero ice increment tendency into CICE 
             ndaice_da(:,:) = 0.0_wp
@@ -1081,5 +1081,5 @@
          ENDIF
 
-!#if defined defined key_lim2 || defined key_cice
+!#if defined defined key_lim2 || defined key_cice || defined key_cice5
 !
 !            IF (ln_seaicebal ) THEN       
Index: /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90	(revision 4747)
+++ /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90	(revision 4748)
@@ -47,5 +47,5 @@
    REAL(wp), PUBLIC ::   rt0_ice  = 273.05_wp        !: melting point of ice          [Kelvin]
 #endif
-#if defined key_cice
+#if defined key_cice || defined key_cice5
    REAL(wp), PUBLIC ::   rau0     = 1026._wp         !: volumic mass of reference     [kg/m3]
 #else
@@ -67,5 +67,5 @@
    REAL(wp), PUBLIC ::   stefan   =    5.67e-8_wp    !: Stefan-Boltzmann constant 
 
-#if defined key_lim3 || defined key_cice
+#if defined key_lim3 || defined key_cice || defined key_cice5
    REAL(wp), PUBLIC ::   rhoic    =  917._wp         !: volumic mass of sea ice                               [kg/m3]
    REAL(wp), PUBLIC ::   rcdic    =    2.034396_wp   !: thermal conductivity of fresh ice
@@ -136,5 +136,5 @@
       rsiyea = 365.25_wp * rday * 2._wp * rpi / 6.283076_wp
       rsiday = rday / ( 1._wp + rday / rsiyea )
-#if defined key_cice
+#if defined key_cice || key_cice5
       omega  = 7.292116e-05
 #else
@@ -174,5 +174,5 @@
 
 
-#if defined key_lim3 || defined key_cice
+#if defined key_lim3 || defined key_cice || key_cice5
       xlsn = lfus * rhosn        ! volumetric latent heat fusion of snow [J/m3]
 #else
@@ -187,5 +187,5 @@
          WRITE(numout,*) '          fresh ice specific heat                   = ', cpic    , ' J/kg/K'
          WRITE(numout,*) '          latent heat of fusion of fresh ice / snow = ', lfus    , ' J/kg'
-#if defined key_lim3 || defined key_cice
+#if defined key_lim3 || defined key_cice || key_cice5
          WRITE(numout,*) '          latent heat of subl.  of fresh ice / snow = ', lsub    , ' J/kg'
 #else
Index: /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 4747)
+++ /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 4748)
@@ -9,5 +9,5 @@
    !!            3.4  ! 2011-11  (C. Harris) CICE added as an option
    !!----------------------------------------------------------------------
-#if defined key_lim3 || defined key_lim2 || defined key_cice
+#if defined key_lim3 || defined key_lim2 || defined key_cice || defined key_cice5
    !!----------------------------------------------------------------------
    !!   'key_lim2' or 'key_lim3' :             LIM-2 or LIM-3 sea-ice model
@@ -21,5 +21,5 @@
    USE ice_2
 # endif
-# if defined key_cice 
+# if defined key_cice || defined key_cice5
    USE ice_domain_size, only: ncat 
 #endif
@@ -48,5 +48,5 @@
    CHARACTER(len=1), PUBLIC, PARAMETER ::   cp_ice_msh = 'C'      !: 'C'-grid ice-velocity
 # endif
-# if defined  key_cice
+# if defined  key_cice || defined key_cice5
    LOGICAL         , PUBLIC, PARAMETER ::   lk_lim2    = .FALSE.  !: no LIM-2
    LOGICAL         , PUBLIC, PARAMETER ::   lk_lim3    = .FALSE.  !: no LIM-3
@@ -75,5 +75,5 @@
 # endif
 
-#elif defined key_cice
+#elif defined key_cice || key_cice5
    !
    ! for consistency with LIM, these are declared with three dimensions
@@ -127,5 +127,5 @@
          &      emp_ice(jpi,jpj)                              , STAT= ierr(1) )
 #endif
-#elif defined key_cice
+#elif defined key_cice || defined key_cice5
       ALLOCATE( qla_ice(jpi,jpj,1)    , qlw_ice(jpi,jpj,1)    , qsr_ice(jpi,jpj,1)    , &
                 wndi_ice(jpi,jpj)     , tatm_ice(jpi,jpj)     , qatm_ice(jpi,jpj)     , &
Index: /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4747)
+++ /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4748)
@@ -39,5 +39,5 @@
    USE prtctl          ! Print control
    USE sbcwave,ONLY :  cdn_wave !wave module 
-#if defined key_lim3 || defined key_cice
+#if defined key_lim3 || defined key_cice | defined key_cice5
    USE sbc_ice         ! Surface boundary condition: ice fields
 #endif
@@ -194,5 +194,5 @@
       IF( ltrcdm2dc )   CALL blk_bio_meanqsr
 
-#if defined key_cice
+#if defined key_cice || defined key_cice5
       IF( MOD( kt - 1, nn_fsbc ) == 0 )   THEN
          qlw_ice(:,:,1)   = sf(jp_qlw)%fnow(:,:,1) 
Index: /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 4747)
+++ /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 4748)
@@ -53,5 +53,5 @@
 #endif
    USE diaar5, ONLY :   lk_diaar5
-#if defined key_cice
+#if defined key_cice || defined key_cice5
    USE ice_domain_size, only: ncat
 #endif
@@ -145,5 +145,5 @@
 #endif
 
-#if defined key_cice
+#if defined key_cice || defined key_cice5
    INTEGER, PARAMETER ::   jpl = ncat
 #elif ! defined key_lim2   &&   ! defined key_lim3
@@ -153,5 +153,5 @@
 #endif
 
-#if ! defined key_lim3   &&  ! defined key_cice
+#if ! defined key_lim3   &&  ! defined key_cice && ! defined key_cice5
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  a_i
 #endif
@@ -161,5 +161,5 @@
 #endif
 
-#if ! defined key_cice
+#if ! defined key_cice && ! defined key_cice5
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  topmelt, botmelt
 #endif
@@ -192,9 +192,9 @@
 #endif
 
-#if ! defined key_lim3 && ! defined key_cice
+#if ! defined key_lim3 && ! defined key_cice && ! defined key_cice5
       ALLOCATE( a_i(jpi,jpj,jpl) , STAT=ierr(3) )
 #endif
 
-#if defined key_cice || defined key_lim2
+#if defined key_cice || defined key_cice5 || defined key_lim2
       ALLOCATE( ht_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(4) )
 #endif
Index: /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 4747)
+++ /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 4748)
@@ -85,5 +85,5 @@
          area = glob_sum( e1e2t(:,:) )           ! interior global domain surface
          !
-#if ! defined key_lim2 &&  ! defined key_lim3 && ! defined key_cice 
+#if ! defined key_lim2 &&  ! defined key_lim3 && ! defined key_cice && ! defined key_cice5
          snwice_mass_b(:,:) = 0.e0               ! no sea-ice model is being used : no snow+ice mass
          snwice_mass  (:,:) = 0.e0
Index: /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 4747)
+++ /branches/2014/dev_r4650_UKMO13_CICE_changes_take2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 4748)
@@ -4,5 +4,5 @@
    !! To couple with sea ice model CICE (LANL)
    !!=====================================================================
-#if defined key_cice
+#if defined key_cice || defined key_cice5
    !!----------------------------------------------------------------------
    !!   'key_cice' :                                     CICE sea-ice model
@@ -23,5 +23,4 @@
    USE daymod          ! calendar
    USE fldread         ! read input fields
-
    USE sbc_oce         ! Surface boundary condition: ocean fields
    USE sbc_ice         ! Surface boundary condition: ice   fields
@@ -38,4 +37,13 @@
    USE ice_calendar, only: dt
    USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen
+# if defined key_cice5
+   USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  &
+                sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_ai,     &
+                fresh_ai,fhocn_ai,fswthru_ai,frzmlt,          &
+                flatn_f,fsurfn_f,fcondtopn_f,                    &
+                uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl,   &
+                swvdr,swvdf,swidr,swidf
+   USE ice_therm_shared, only: calc_Tsfc
+#else
    USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow,  &
                 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm,     &
@@ -44,7 +52,8 @@
                 uatm,vatm,wind,fsw,flw,Tair,potT,Qa,rhoa,zlvl,   &
                 swvdr,swvdf,swidr,swidf
+   USE ice_therm_vertical, only: calc_Tsfc
+#endif
    USE ice_forcing, only: frcvdr,frcvdf,frcidr,frcidf
    USE ice_atmo, only: calc_strair
-   USE ice_therm_vertical, only: calc_Tsfc
 
    USE CICE_InitMod
@@ -524,6 +533,11 @@
       ENDIF
 
+#if defined key_cice5
+      CALL cice2nemo(fresh_ai,ztmp1,'T', 1. )
+      CALL cice2nemo(fsalt_ai,ztmp2,'T', 1. )
+#else
       CALL cice2nemo(fresh_gbm,ztmp1,'T', 1. )
       CALL cice2nemo(fsalt_gbm,ztmp2,'T', 1. )
+#endif
 
 ! Check to avoid unphysical expression when ice is forming (ztmp1 negative)
@@ -557,5 +571,9 @@
 ! Now add in ice / snow related terms
 ! [fswthru will be zero unless running with calc_Tsfc=T in CICE]
+#if defined key_cice5
+      CALL cice2nemo(fswthru_ai,ztmp1,'T', 1. )
+#else
       CALL cice2nemo(fswthru_gbm,ztmp1,'T', 1. )
+#endif
       qsr(:,:)=qsr(:,:)+ztmp1(:,:)
       CALL lbc_lnk( qsr , 'T', 1. )
@@ -567,5 +585,9 @@
       ENDDO
 
+#if defined key_cice5
+      CALL cice2nemo(fhocn_ai,ztmp1,'T', 1. )
+#else
       CALL cice2nemo(fhocn_gbm,ztmp1,'T', 1. )
+#endif
       qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp1(:,:)
 
