Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/EXP00/makebdy_tc7.py
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/EXP00/makebdy_tc7.py	(revision 7609)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/EXP00/makebdy_tc7.py	(revision 7609)
@@ -0,0 +1,80 @@
+from netCDF4 import Dataset
+import numpy as np
+
+pathout = "bdyssh_tc7"
+
+nx = 34 
+ny = 1
+nt = 24
+ndays=4
+
+#-------------------------------------------------------
+# Create bdyssh_tc7_m01d01.nc, bdyssh_tc7_m01d02.nc etc.
+#-------------------------------------------------------
+
+pathstart="{}_m12d30.nc".format(pathout)
+for nd in range(ndays):
+ print pathstart
+ ssh = np.zeros((nt,ny,nx))
+ for nnt in range(nd*nt,(nd+1)*nt):
+   tx = 2.5*np.cos((3.141592654/6.0)*(nnt+1.0))
+   print nnt, tx
+   for nnx in range(nx):
+     for nny in range(ny):
+       ssh[nnt-nd*nt,nny,nnx] = tx
+
+
+ fo = Dataset(pathstart, 'w', format='NETCDF4')
+ nxo = fo.createDimension('x', nx)
+ nyo = fo.createDimension('y', ny)
+ nto = fo.createDimension('t', None)
+ ssho = fo.createVariable('sshbdy', 'f4',('t','y','x'))
+
+ ssho[:,:,:] = ssh[:,:,:]
+ ssho.long_name = 'bdy ssh boundary condition'
+ ssho.standard_name = 'sshbdy'
+ ssho.units = 'm'
+#
+ fo.close()
+ pathstart="{}_m01d{:0>2d}.nc".format(pathout,nd+1)
+
+#-------------------------------------------------------
+# Create bdyuv_tc7_m01d01.nc, bdyuv_tc7_m01d02.nc etc.
+# u is -(1/H)*d(ssh)/dt; v =0.0
+#-------------------------------------------------------
+
+pathout = "bdyuv_tc7"
+
+
+pathstart="{}_m12d30.nc".format(pathout)
+for nd in range(ndays):
+ print pathstart
+ u = np.zeros((nt,ny,nx))
+ for nnt in range(nd*nt,(nd+1)*nt):
+  tx = 2.5*(3.141592654/6.0)*np.sin((3.141592654/6.0)*(nnt+1.0))/10.0
+  print nnt, tx
+  for nnx in range(nx):
+    for nny in range(ny):
+       u[nnt-nd*nt,nny,nnx] = tx
+
+ v = np.zeros((nt,ny,nx))
+
+ fo = Dataset(pathstart, 'w', format='NETCDF4')
+ nxo = fo.createDimension('x', nx)
+ nyo = fo.createDimension('y', ny)
+ nto = fo.createDimension('t', None)
+ uo = fo.createVariable('ubdy', 'f4',('t','y','x'))
+ vo = fo.createVariable('vbdy', 'f4',('t','y','x'))
+
+ uo[:,:,:] = u[:,:,:]
+ uo.long_name = 'bdy u boundary condition'
+ uo.standard_name = 'ubdy'
+ uo.units = 'm/s'
+#
+ vo[:,:,:] = v[:,:,:]
+ vo.long_name = 'bdy v boundary condition'
+ vo.standard_name = 'vbdy'
+ vo.units = 'm/s'
+#
+ fo.close()
+ pathstart="{}_m01d{:0>2d}.nc".format(pathout,nd+1)
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/EXP00/namelist_cfg
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/EXP00/namelist_cfg	(revision 7608)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/EXP00/namelist_cfg	(revision 7609)
@@ -142,5 +142,5 @@
 &nambdy        !  unstructured open boundaries
 !-----------------------------------------------------------------------
-    ln_bdy         = .true.             
+    ln_bdy         = .false.            
     nb_bdy         = 0                    !  number of open boundary sets
     ln_coords_file = .false.              !  =T : read bdy coordinates from file
@@ -178,5 +178,5 @@
 !-----------------------------------------------------------------------
     ctypebdy = 'E'
-    nbdyind  = 49
+    nbdyind  = 50
     nbdybeg  = 1
     nbdyend  = 34
@@ -191,11 +191,7 @@
 !              !  file name      ! frequency (hours) ! variable  ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
 !              !                 !  (if <0  months)  !   name    !  (logical)   !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      !
-   bn_ssh =     'bdyssh_2.5_slow_stop' ,         1        , 'sshbdy',       .true.   , .true.  ,  'daily'  ,    ''    ,   ''     , ''
-   bn_u2d =     'bdyuv_2.5_slow'  ,         1        , 'ubdy'  ,     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , ''
-   bn_v2d =     'bdyuv_2.5_slow'  ,         1        , 'vbdy'  ,     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , ''
-!   bn_u3d  =    'amm12_bdyU_u3d' ,         24        , 'vozocrtx',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , ''
-!   bn_v3d  =    'amm12_bdyV_u3d' ,         24        , 'vomecrty',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , ''
-!   bn_tem  =    'amm12_bdyT_tra' ,         24        , 'votemper',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , ''
-!   bn_sal  =    'amm12_bdyT_tra' ,         24        , 'vosaline',     .true.   , .false. ,  'daily'  ,    ''    ,   ''     , ''
+   bn_ssh =     'bdyssh_tc7' ,         1        , 'sshbdy',     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , ''
+   bn_u2d =     'bdyuv_tc7'  ,         1        , 'ubdy'  ,     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , ''
+   bn_v2d =     'bdyuv_tc7'  ,         1        , 'vbdy'  ,     .true.     , .true.  ,  'daily'  ,    ''    ,   ''     , ''
    cn_dir      =    './'   !  root directory for the location of the bulk files
    ln_full_vel = .false.        !
@@ -449,7 +445,7 @@
 !-----------------------------------------------------------------------
    ln_wd             = .true.   ! T/F activation of wetting and drying
-   rn_wdmin1         =  0.35    ! Minimum wet depth on dried cells
+   rn_wdmin1         =  0.3     ! Minimum wet depth on dried cells
    rn_wdmin2         =  0.0001  ! Tolerance of min wet depth on dried cells
    rn_wdld           =  2.5     ! Land elevation below which wetting/drying is allowed
-   nn_wdit           =  50      ! Max iterations for W/D limiter
-/
+   nn_wdit           =   20     ! Max iterations for W/D limiter
+/
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad	(revision 7608)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad	(revision 7609)
@@ -3,7 +3,7 @@
 !-----------------------------------------------------------------------
    ln_wd             = .true.   ! T/F activation of wetting and drying
-   rn_wdmin1         =  0.35    ! Minimum wet depth on dried cells
+   rn_wdmin1         =  0.3     ! Minimum wet depth on dried cells
    rn_wdmin2         =   0.0001 ! Tolerance of min wet depth on dried cells
    rn_wdld           =  2.5     ! Land elevation below which wetting/drying is allowed
-   nn_wdit           =  200     ! Max iterations for W/D limiter
+   nn_wdit           =  20      ! Max iterations for W/D limiter
 /
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc1
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc1	(revision 7609)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc1	(revision 7609)
@@ -0,0 +1,10 @@
+!-----------------------------------------------------------------------
+&namusr_def
+!-----------------------------------------------------------------------
+   nn_wad_test = 1
+/
+!-----------------------------------------------------------------------
+&namwad  !   Wetting and drying
+!-----------------------------------------------------------------------
+   rn_wdmin1         =  0.075   ! Minimum wet depth on dried cells
+/
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc2
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc2	(revision 7609)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc2	(revision 7609)
@@ -0,0 +1,5 @@
+!-----------------------------------------------------------------------
+&namusr_def
+!-----------------------------------------------------------------------
+   nn_wad_test = 2
+/
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc3
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc3	(revision 7609)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc3	(revision 7609)
@@ -0,0 +1,5 @@
+!-----------------------------------------------------------------------
+&namusr_def
+!-----------------------------------------------------------------------
+   nn_wad_test = 3
+/
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc4
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc4	(revision 7609)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc4	(revision 7609)
@@ -0,0 +1,10 @@
+!-----------------------------------------------------------------------
+&namusr_def
+!-----------------------------------------------------------------------
+   nn_wad_test = 4
+/
+!-----------------------------------------------------------------------
+&namwad  !   Wetting and drying
+!-----------------------------------------------------------------------
+   rn_wdmin1         =  0.45    ! Minimum wet depth on dried cells
+/
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc5
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc5	(revision 7609)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc5	(revision 7609)
@@ -0,0 +1,10 @@
+!-----------------------------------------------------------------------
+&namusr_def
+!-----------------------------------------------------------------------
+   nn_wad_test = 5
+/
+!-----------------------------------------------------------------------
+&namwad  !   Wetting and drying
+!-----------------------------------------------------------------------
+   rn_wdmin1         =  0.15    ! Minimum wet depth on dried cells
+/
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc6
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc6	(revision 7609)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc6	(revision 7609)
@@ -0,0 +1,5 @@
+!-----------------------------------------------------------------------
+&namusr_def
+!-----------------------------------------------------------------------
+   nn_wad_test = 6
+/
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc7
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc7	(revision 7609)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Namelists/nam_wad_tc7	(revision 7609)
@@ -0,0 +1,21 @@
+!-----------------------------------------------------------------------
+&namusr_def
+!-----------------------------------------------------------------------
+   nn_wad_test = 7
+/
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   nn_itend    =      9600  !  last  time step
+/
+!-----------------------------------------------------------------------
+&nambdy        !  unstructured open boundaries
+!-----------------------------------------------------------------------
+    ln_bdy         = .true.             
+    nb_bdy         = 1                    !  number of open boundary sets
+/
+!-----------------------------------------------------------------------
+&namwad  !   Wetting and drying
+!-----------------------------------------------------------------------
+   rn_wdmin1         =  0.150   ! Minimum wet depth on dried cells
+/
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Preamble.tex
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Preamble.tex	(revision 7608)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/Preamble.tex	(revision 7609)
@@ -7,5 +7,5 @@
 %\usepackage[french]{babel}
 %\usepackage{color}
-\usepackage{graphicx}			                   % allows insertion of pictures
+\usepackage{rotating, graphicx}			           % allows insertion of pictures
 %\usepackage{graphics}			                   % allows insertion of pictures
 \graphicspath{{Figures/}}                                  % Set global directory for pictures
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/WAD_doc.tex
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/WAD_doc.tex	(revision 7608)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_DOCS/WAD_doc.tex	(revision 7609)
@@ -260,20 +260,29 @@
 \label{WAD_test_cases}
 
-This section contains details of the six test cases that can be run as part of the
+This section contains details of the seven test cases that can be run as part of the
 WAD\_TEST\_CASES configuration. All the test cases are shallow (less than 10m deep),
-closed basins with 4m high walls and some of topography that can wet and dry up to 2m
-above sea-level. The horizontal grid is uniform with a 1km resolution and measures 52km by
-34km. These dimensions are determined by a combination of code in the \mdl{usrdef\_nam}
-module located in the WAD\_TEST\_CASES/MY\_SRC directory and setting read in from the
-namusr\_def namelist. There is no rotation or external forcing and motion is simply
-initiated by an initial ssh slope.
+basins or channels with 4m high walls and some of topography that can wet and dry up to
+2.5m above sea-level. The horizontal grid is uniform with a 1km resolution and measures
+52km by 34km. These dimensions are determined by a combination of code in the
+\mdl{usrdef\_nam} module located in the WAD\_TEST\_CASES/MY\_SRC directory and setting
+read in from the namusr\_def namelist. The first six test cases are closed systems with no
+rotation or external forcing and motion is simply initiated by an initial ssh slope. The
+seventh test case introduces and open boundary at the right-hand end of the channel which
+is forced with sinousoidally varying ssh and barotropic velocities.
 
 \namdisplay{nam_wad_usr}
 
-The $\mathrm{nn\_wad\_test}$ parameter can takes values 1 to 6 and it is this parameter
-that determines which of the test cases will be run. All cases will run with the default
-settings but the simple linear slope cases (tests 1 and 5) can be run with lower values of
-$\mathrm{rn\_wdmin1}$ as will be illustarted below.
-
+The $\mathrm{nn\_wad\_test}$ parameter can takes values 1 to 7 and it is this parameter
+that determines which of the test cases will be run. Most cases can be run with the
+default settings but the simple linear slope cases (tests 1 and 5) can be run with lower
+values of $\mathrm{rn\_wdmin1}$. Any recommended changes to the default namelist settings
+will be stated in the individual subsections.
+
+Test case 7 requires additional {\tt namelist\_cfg} changes to activate the open boundary
+and lengthen the duration of the run (in order to demonstrate the full forcing cycle).
+There is also a simple python script which needs to be run in order to generate the
+boundary forcing files.  Full details are given in subsection (\ref{WAD_TC7}).
+
+\clearpage
 \subsubsection [WAD test case 1 : A simple linear slope]
                     {WAD test case 1 : A simple linear slope}
@@ -284,8 +293,11 @@
 chosen such that the surge rises above sea-level before falling back and oscillating
 towards an equilibrium position. This case can be run with $\mathrm{rn\_wdmin1}$ values as
-low as 0.075m.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht] \begin{center}
+low as 0.075m. I.e. the following change may be made to the default values in {\tt
+namelist\_cfg} (for this test only):
+
+\namdisplay{nam_wad_tc1}
+
+%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\begin{figure}[htb] \begin{center}
 \includegraphics[width=0.8\textwidth]{Fig_WAD_TC1}
 \caption{ \label{Fig_WAD_TC1}
@@ -296,15 +308,19 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
+\clearpage
 \subsubsection [WAD test case 2 : A parabolic channel ]
                     {WAD test case 2 : A parabolic channel}
 \label{WAD_test_case2}
 
-The second and third test cases use a closed channel which is parabolic in x and uniform in y.
-Test case 2 uses a gentler initial SSH slope which nevertheless demonstrates the ability to
-wet and dry on both sides of the channel. This solution requires values of $\mathrm{rn\_wdmin1}$ greater than 0.25m ({\it Q.: A function of the maximum topographic slope?})
-
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht] \begin{center}
+The second and third test cases use a closed channel which is parabolic in x and uniform
+in y.  Test case 2 uses a gentler initial SSH slope which nevertheless demonstrates the
+ability to wet and dry on both sides of the channel. This solution requires values of
+$\mathrm{rn\_wdmin1}$ at least 0.3m ({\it Q.: A function of the maximum topographic
+slope?})
+
+\namdisplay{nam_wad_tc2}
+
+%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\begin{figure}[htb] \begin{center}
 \includegraphics[width=0.8\textwidth]{Fig_WAD_TC2}
 \caption{ \label{Fig_WAD_TC2}
@@ -315,12 +331,15 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
+\clearpage
 \subsubsection [WAD test case 3 : A parabolic channel (extreme slope) ]
                     {WAD test case 3 : A parabolic channel (extreme slope)}
 \label{WAD_test_case3}
 
-Same again but with a steeper initial SSH slope. The solution is similar but more vigorous.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht] \begin{center}
+Similar to test case 2 but with a steeper initial SSH slope. The solution is similar but more vigorous.
+
+\namdisplay{nam_wad_tc3}
+
+%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\begin{figure}[htb] \begin{center}
 \includegraphics[width=0.8\textwidth]{Fig_WAD_TC3}
 \caption{ \label{Fig_WAD_TC3}
@@ -331,4 +350,5 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
+\clearpage
 \subsubsection [WAD test case 4 : A parabolic bowl ]
                     {WAD test case 4 : A parabolic bowl}
@@ -340,7 +360,8 @@
 in all directions and interfere when return paths cross.
 
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht] \begin{center}
+\namdisplay{nam_wad_tc4}
+
+%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\begin{figure}[htb] \begin{center}
 \includegraphics[width=0.8\textwidth]{Fig_WAD_TC4}
 \caption{ \label{Fig_WAD_TC4}
@@ -351,4 +372,5 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
+\clearpage
 \subsubsection [WAD test case 5 : A double slope with shelf channel ]
                     {WAD test case 5 : A double slope with shelf channel}
@@ -357,7 +379,8 @@
 Similar in nature to test case 1 but with a change in slope and a mid-depth shelf.
 
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht] \begin{center}
+\namdisplay{nam_wad_tc5}
+
+%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\begin{figure}[htb] \begin{center}
 \includegraphics[width=0.8\textwidth]{Fig_WAD_TC5}
 \caption{ \label{Fig_WAD_TC5}
@@ -368,4 +391,5 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
+\clearpage
 \subsubsection [WAD test case 6 : A parabolic channel with central bar ]
                     {WAD test case 6 : A parabolic channel with central bar}
@@ -382,7 +406,8 @@
 can clearly be seen.
 
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht] \begin{center}
+\namdisplay{nam_wad_tc6}
+
+%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\begin{figure}[htb] \begin{center}
 \includegraphics[width=0.8\textwidth]{Fig_WAD_TC6}
 \caption{ \label{Fig_WAD_TC6}
@@ -395,4 +420,50 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
+\clearpage
+\subsubsection [WAD test case 7 : A double slope with shelf, open-ended channel ]
+                    {WAD test case 7 : A double slope with shelf, open-ended channel}
+\label{WAD_test_case7}
+
+Similar in nature to test case 5 but with an open boundary forced with a sinusoidally
+varying ssh. This test case has been introduced to emulate a typical coastal application
+with a tidally forced open boundary. The bathymetry and setup is identical to test case 5
+except the right hand end of the channel is now open and has simple ssh and barotropic
+velocity boundary conditions applied at the open boundary. Several additional steps and
+namelist changes are required to run this test.
+
+\namdisplay{nam_wad_tc7}
+
+In addition, the boundary condition files must be generated using the python script
+provided.
+
+\begin{verbatim}
+python ./makebdy_tc7.py
+\end{verbatim}
+
+will create the following boundary files for this test (assuming a suitably configured
+python environment: python2.7 with netCDF4 and numpy):
+
+\begin{verbatim}
+  bdyssh_tc7_m12d30.nc   bdyuv_tc7_m12d30.nc
+  bdyssh_tc7_m01d01.nc   bdyuv_tc7_m01d01.nc
+  bdyssh_tc7_m01d02.nc   bdyuv_tc7_m01d02.nc
+  bdyssh_tc7_m01d03.nc   bdyuv_tc7_m01d03.nc
+\end{verbatim}
+
+These are sufficient for up to a three day simulation; the script is easily adapted if
+longer periods are required.
+
+%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\begin{sidewaysfigure}[htb] \begin{center}
+\includegraphics[width=0.8\textwidth]{Fig_WAD_TC7}
+\caption{ \label{Fig_WAD_TC7}
+The evolution of the sea surface height in WAD\_TEST\_CASE 7 from the initial state (t=0)
+over the first 24 hours of simulation. After the initial surge the solution settles into a
+simulated tidal cycle with an amplitude of 5m. This is enough to repeatedly wet and dry
+both shelves.}
+
+\end{center}\end{sidewaysfigure}
+%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
 
 % ================================================================
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_SRC/usrdef_istate.F90
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_SRC/usrdef_istate.F90	(revision 7608)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_SRC/usrdef_istate.F90	(revision 7609)
@@ -131,6 +131,6 @@
             !
             !                                    ! ===========================
-         CASE ( 5 )                              ! WAD 5 configuration
-            !                                    ! ====================
+         CASE ( 5, 7 )                           ! WAD 5 and 7 configurations
+            !                                    ! ===========================
             !
             IF(lwp) WRITE(numout,*)
@@ -143,5 +143,5 @@
 
             !
-            !                                     ! ===========================
+            !                                     ! ====================
          CASE ( 6 )                               ! WAD 6 configuration
             !                                     ! ====================
@@ -159,4 +159,5 @@
              pssh(ji,:) = -0.1*ptmask(ji,:,1)
             end do
+            !
             !
             !                                    ! ===========================
Index: branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_SRC/usrdef_zgr.F90
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_SRC/usrdef_zgr.F90	(revision 7608)
+++ branches/2016/dev_merge_2016/NEMOGCM/CONFIG/WAD_TEST_CASES/MY_SRC/usrdef_zgr.F90	(revision 7609)
@@ -194,4 +194,32 @@
                zht(:,mj0(jpjglo):mj1(jpjglo)) = -4._wp
                !                                    ! ===========================
+            CASE ( 7 )                              ! WAD 7 configuration
+               !                                    ! ====================
+               !
+               IF(lwp) WRITE(numout,*)
+               IF(lwp) WRITE(numout,*) 'usr_def_zgr (WAD) : Double slope with open boundary'
+               IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
+               !
+               DO ji = 1, jpi
+                 zi = MIN(glamt(ji,1)/45.0, 1.0 )
+                 zht(ji,:) = MAX(zbathy*zi, -2.0)
+                 IF( glamt(ji,1) >= 46.0 ) THEN
+                   zht(ji,:) = 10.0
+                 ELSE IF( glamt(ji,1) >= 20.0 .AND. glamt(ji,1) < 46.0 ) THEN
+                   zi = 7.5/25.
+                   zht(ji,:) = MAX(10. - zi*(47.-glamt(ji,1)),2.5)
+                 ELSE IF( glamt(ji,1) >= 15.0 .AND. glamt(ji,1) < 20.0 ) THEN
+                   zht(ji,:) = 2.5
+                 ELSE IF( glamt(ji,1) >= 4.0 .AND. glamt(ji,1) < 15.0 ) THEN
+                   zi = 4.5/11.0
+                   zht(ji,:) = MAX(2.5 - zi*(16.0-glamt(ji,1)), -2.0)
+                 ELSE IF( glamt(ji,1) >= 0.0 .AND. glamt(ji,1) < 4.0 ) THEN
+                   zht(ji,:) = -2.0
+                 ENDIF
+               END DO
+               !                                    ! ===========================
+               zht(mi0(1):mi1(1),:) = -4._wp
+               zht(:,mj0(1):mj1(1)) = -4._wp
+               zht(:,mj0(jpjglo):mj1(jpjglo)) = -4._wp
             CASE DEFAULT
                !                                    ! ===========================
