Index: branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90	(revision 8561)
+++ branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90	(revision 8790)
@@ -108,4 +108,9 @@
    LOGICAL, DIMENSION(jp_bdy) ::   ln_tra_dmp               !: =T Tracer damping
    LOGICAL, DIMENSION(jp_bdy) ::   ln_dyn3d_dmp             !: =T Baroclinic velocity damping
+   
+!   !JT
+   LOGICAL, DIMENSION(jp_bdy) ::   ln_ssh_bdy               !: =T USE SSH BDY - name list switch
+!   !JT
+   
    REAL(wp),    DIMENSION(jp_bdy) ::   rn_time_dmp              !: Damping time scale in days
    REAL(wp),    DIMENSION(jp_bdy) ::   rn_time_dmp_out          !: Damping time scale in days at radiation outflow points
Index: branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 8561)
+++ branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 8790)
@@ -398,4 +398,22 @@
 #endif
       ! end jchanut tschanges
+      
+      
+      !JT use sshn (ssh now) if ln_ssh_bdy set to false in the name list
+      DO ib_bdy = 1, nb_bdy   
+        nblen => idx_bdy(ib_bdy)%nblen
+        dta => dta_bdy(ib_bdy)
+         
+        ilen1(:) = nblen(:)
+        !JT IF( .NOT. dta%ll_ssh ) THEN 
+        IF( .NOT. ln_ssh_bdy(ib_bdy) ) THEN 
+          igrd = 1 ! t Grid
+          DO ib = 1, ilen1(igrd)
+              ii = idx_bdy(ib_bdy)%nbi(ib,igrd)
+              ij = idx_bdy(ib_bdy)%nbj(ib,igrd)
+              dta_bdy(ib_bdy)%ssh(ib) = sshn(ii,ij) * tmask(ii,ij,1)         
+          END DO 
+        END IF
+      END DO 
 
       IF ( ln_apr_obc ) THEN
@@ -786,10 +804,20 @@
             IF( dta%ll_v2d ) ALLOCATE( dta%v2d(nblen(3)) )
          ENDIF
-         IF ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) THEN
-            IF( dta%ll_ssh ) THEN
-               if(lwp) write(numout,*) '++++++ dta%ssh pointing to fnow'
-               jfld = jfld + 1
-               dta%ssh => bf(jfld)%fnow(:,1,1)
-            ENDIF
+         IF ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) THEN         
+            !JT 
+            !JT allocate ssh if dta%ll_ssh set too false, as may still use it
+            IF (dta%ll_ssh) THEN
+                IF( dta%ll_ssh ) THEN
+                  if(lwp) write(numout,*) '++++++ dta%ssh pointing to fnow'
+                  jfld = jfld + 1
+                  dta%ssh => bf(jfld)%fnow(:,1,1)
+                ENDIF
+            ELSE
+              if(lwp) write(numout,*) '++++++ dta%ssh allocated space'
+              !ALLOCATE( dta_bdy(ib_bdy)%ssh(nblen(1)) )            
+              ALLOCATE( dta%ssh(nblen(1)) )            
+            ENDIF
+            !JT if 
+            
             IF ( dta%ll_u2d ) THEN
                IF ( ln_full_vel_array(ib_bdy) ) THEN
Index: branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 8561)
+++ branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 8790)
@@ -105,4 +105,9 @@
       !!
       NAMELIST/nambdy_index/ ctypebdy, nbdyind, nbdybeg, nbdyend
+      
+      
+!      ! JT
+      NAMELIST/nambdy_ssh/ ln_ssh_bdy
+!      ! JT
       INTEGER  ::   ios                 ! Local integer output status for namelist read
       !!----------------------------------------------------------------------
@@ -132,4 +137,24 @@
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy in configuration namelist', lwp )
       IF(lwm) WRITE ( numond, nambdy )
+      !JT Read nambdy_ssh namelist 
+      REWIND( numnam_ref )              ! Namelist nambdy in reference namelist :Unstructured open boundaries  
+      READ  ( numnam_ref, nambdy_ssh, IOSTAT = ios, ERR = 905)
+905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_ssh in reference namelist', lwp )
+
+      REWIND( numnam_cfg )              ! Namelist nambdy in configuration namelist :Unstructured open boundaries
+      READ  ( numnam_cfg, nambdy_ssh, IOSTAT = ios, ERR = 906)
+906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_ssh in configuration namelist', lwp )
+      IF(lwm) WRITE ( numond, nambdy_ssh )
+      
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'nambdy_ssh : use of ssh boundaries'
+      IF(lwp) WRITE(numout,*) '~~~~~~~~'
+      IF(lwp) WRITE(numout,*) '      ln_ssh_bdy: '
+      DO ib_bdy = 1,nb_bdy
+        IF(lwp) WRITE(numout,*) '      ln_ssh_bdy(',ib_bdy,'): ',ln_ssh_bdy(ib_bdy)
+      ENDDO
+      IF(lwp) WRITE(numout,*) '~~~~~~~~'
+      IF(lwp) WRITE(numout,*) 
+      !JT
 
       ! -----------------------------------------
@@ -185,4 +210,20 @@
           CASE DEFAULT   ;   CALL ctl_stop( 'unrecognised value for cn_dyn2d' )
         END SELECT
+        
+        !JT override dta_bdy(ib_bdy)%ll_ssh with namelist value (ln_ssh_bdy)
+        IF(lwp) WRITE(numout,*) 'nambdy_ssh : use of ssh boundaries'
+        IF(lwp) WRITE(numout,*) '~~~~~~~~'
+        IF(lwp) WRITE(numout,*) '      ib_bdy: ',ib_bdy
+        IF(lwp) WRITE(numout,*) '      Prior to Implementation of nambdy_ssh'
+        IF(lwp) WRITE(numout,*) '      dta_bdy(ib_bdy)%ll_ssh: ',dta_bdy(ib_bdy)%ll_ssh
+        
+        dta_bdy(ib_bdy)%ll_ssh = ln_ssh_bdy(ib_bdy)
+        
+        IF(lwp) WRITE(numout,*) '      After to Implementation of nambdy_ssh'
+        IF(lwp) WRITE(numout,*) '      dta_bdy(ib_bdy)%ll_ssh: ',dta_bdy(ib_bdy)%ll_ssh
+        IF(lwp) WRITE(numout,*) '~~~~~~~~'
+        
+        !JT         
+        
         IF( cn_dyn2d(ib_bdy) /= 'none' ) THEN
            SELECT CASE( nn_dyn2d_dta(ib_bdy) )                   ! 
Index: branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 8561)
+++ branches/UKMO/AMM15_v3_6_STABLE_package/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 8790)
@@ -149,4 +149,6 @@
          END DO
          !
+         CALL lbc_lnk( zhke, 'T', 1. )
+         !
       CASE ( nkeg_HW )                          !--  Hollingsworth scheme  --!
          DO jk = 1, jpkm1
