Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn_c3d.h90	(revision 9975)
@@ -210,4 +210,5 @@
       !
       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   ztemp2d  ! temporary array to read ahmcoef file
+      LOGICAL ::  tempmask( jpi,jpj)   ! Temporary mask to avoid Cray compiler bug at cce 8.3.4
       !!----------------------------------------------------------------------
       !
@@ -252,6 +253,10 @@
          zemax = MAXVAL ( e1t(:,:) * e2t(:,:), tmask(:,:,1) .GE. 0.5 )
          zemin = MINVAL ( e1t(:,:) * e2t(:,:), tmask(:,:,1) .GE. 0.5 )
-         zeref = MAXVAL ( e1t(:,:) * e2t(:,:),   &
-             &   tmask(:,:,1) .GE. 0.5 .AND. ABS(gphit(:,:)) .GT. 50. )
+         tempmask(:,:) = .FALSE.
+         ! Pre calculate mask for zeref since embedding the following
+         ! term in the MAXVAL operation offends the Cray compiler for no 
+         ! justifiable reason under certain conditions. 
+         tempmask(:,:) = (tmask(:,:,1) .GE. 0.5) .AND. (ABS(gphit(:,:)) .GT. 50.)
+         zeref = MAXVAL ( e1t(:,:) * e2t(:,:), tempmask(:,:) )
  
          DO jj = 1, jpj
Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 9975)
@@ -167,5 +167,5 @@
 
 #if defined key_cice
-      ALLOCATE( qla_ice(jpi,jpj,ncat) , qlw_ice(jpi,jpj,1)    , qsr_ice(jpi,jpj,1)    , &
+      ALLOCATE( qla_ice(jpi,jpj,ncat) , qlw_ice(jpi,jpj,1)    , qsr_ice(jpi,jpj,jpl)  , &
                 wndi_ice(jpi,jpj)     , tatm_ice(jpi,jpj)     , qatm_ice(jpi,jpj)     , &
                 wndj_ice(jpi,jpj)     , nfrzmlt(jpi,jpj)      , ss_iou(jpi,jpj)       , &
@@ -180,5 +180,5 @@
       IF( ln_cpl )   ALLOCATE( u_ice(jpi,jpj)        , fr1_i0(jpi,jpj)       , tn_ice (jpi,jpj,jpl)  , &
          &                     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)   , &
+         &                     emp_ice(jpi,jpj)      , qns_ice(jpi,jpj,jpl)  , dqns_ice(jpi,jpj,1)   , &
          &                     a_p(jpi,jpj,jpl)      , ht_p(jpi,jpj,jpl)     , tsfc_ice(jpi,jpj,jpl) , &
          &                     kn_ice(jpi,jpj,jpl) ,    STAT=ierr(2) )
Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 9975)
@@ -1178,12 +1178,18 @@
 
    SUBROUTINE sbc_ice_cice ( kt, ksbc )     ! Dummy routine
+      IMPLICIT NONE
+      INTEGER, INTENT(in) ::   kt    ! ocean time-step index
+      INTEGER, INTENT(in) ::   ksbc    ! surface forcing type
       WRITE(*,*) 'sbc_ice_cice: You should not have seen this print! error?', kt
    END SUBROUTINE sbc_ice_cice
 
    SUBROUTINE cice_sbc_init (ksbc)    ! Dummy routine
+      IMPLICIT NONE
+      INTEGER, INTENT(in) ::   ksbc    ! surface forcing type
       WRITE(*,*) 'cice_sbc_init: You should not have seen this print! error?'
    END SUBROUTINE cice_sbc_init
 
    SUBROUTINE cice_sbc_final     ! Dummy routine
+      IMPLICIT NONE
       WRITE(*,*) 'cice_sbc_final: You should not have seen this print! error?'
    END SUBROUTINE cice_sbc_final
Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/oce.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/oce.F90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/oce.F90	(revision 9975)
@@ -101,4 +101,5 @@
       INTEGER :: ierr(5)
       !!----------------------------------------------------------------------
+      ierr(:) = 0
       !
       ALLOCATE( ub   (jpi,jpj,jpk)      , un   (jpi,jpj,jpk)      , ua(jpi,jpj,jpk)       ,     &
Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 9975)
@@ -330,4 +330,6 @@
 CONTAINS
    SUBROUTINE trc_sms_c14b( kt )       ! Empty routine
+      IMPLICIT NONE
+      INTEGER, INTENT(in) ::   kt    ! ocean time-step index
       WRITE(*,*) 'trc_freons: You should not have seen this print! error?', kt
    END SUBROUTINE trc_sms_c14b
Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_update.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_update.F90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_update.F90	(revision 9975)
@@ -267,5 +267,5 @@
                              ! mort. loss
                          ((1.0 - xfdfrac1) * fdpds(ji,jj)) +                 &
-                             &  ! egestion of grazed Si
+                             ! egestion of grazed Si
                          ((1.0 - xfdfrac3) * fgmepds(ji,jj)) +               &
                              ! fast diss. and metab. losses
Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90	(revision 9975)
@@ -798,5 +798,5 @@
       !! temporary variables
       REAL(wp), INTENT( in ), DIMENSION(3,3) :: tiny_var, tiny_mask
-      CHARACTER(25), INTENT( in )            :: var_nm
+      CHARACTER(3), INTENT( in )            :: var_nm
       REAL(wp), INTENT( in )                 :: mini, maxi
       REAL(wp), INTENT( out )                :: varout
Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 9975)
@@ -51,7 +51,9 @@
       !!
       !!----------------------------------------------------------------------  
+      IMPLICIT NONE
       INTEGER, INTENT( in ) ::   kt   ! ocean time-step 
       CHARACTER (len=22) :: charout
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrtrd
+      INTEGER :: jn                   ! Local loop index
       !!----------------------------------------------------------------------
       !
@@ -108,4 +110,6 @@
 CONTAINS
    SUBROUTINE trc_bbl( kt )              ! Empty routine
+      IMPLICIT NONE
+      INTEGER, INTENT(in) ::   kt    ! ocean time-step index
       WRITE(*,*) 'tra_bbl: You should not have seen this print! error?', kt
    END SUBROUTINE trc_bbl
Index: /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 9974)
+++ /branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 9975)
@@ -726,6 +726,5 @@
       !!----------------------------------------------------------------------
       INTEGER  :: ji, jj, jk, jn
-      REAL(wp) :: zsum3d, zsum2d, zinvt, zdelta, zratio, loc_vol, loc_are
-      REAL(wp) :: zq1, zq2, loc_vol, loc_area
+      REAL(wp) :: zsum3d, zsum2d, zinvt, zdelta, zratio
       REAL(wp), DIMENSION(jpi,jpj,jpk) :: z3d, zvol
       REAL(wp), DIMENSION(jpi,jpj)     :: z2d, zarea
