Index: /branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/AMM7_SURGE/EXP00/namelist_ref
===================================================================
--- /branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/AMM7_SURGE/EXP00/namelist_ref	(revision 5745)
+++ /branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/AMM7_SURGE/EXP00/namelist_ref	(revision 5746)
@@ -31,4 +31,5 @@
    nn_leapy    =       0   !  Leap year calendar (1) or not (0)
    ln_rstart   = .false.   !  start from rest (F) or from a restart file (T)
+   ln_rstdate  = .false.   !  Name restart dump by date instead of time step
    nn_euler    =       1   !  = 0 : start with forward time step if ln_rstart=.true.
    nn_rstctl   =       0   !  restart control => activated only if ln_rstart = T
Index: /branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5745)
+++ /branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5746)
@@ -31,4 +31,5 @@
    nn_leapy    =       0   !  Leap year calendar (1) or not (0)
    ln_rstart   = .false.   !  start from rest (F) or from a restart file (T)
+   ln_rstdate  = .false.   !  Name restart dump by date instead of time step
    nn_euler    =       1   !  = 0 : start with forward time step if ln_rstart=.true.
    nn_rstctl   =       0   !  restart control => activated only if ln_rstart = T
@@ -305,4 +306,5 @@
    rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity 
                            !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+   ln_charnock = .false.   ! logical flag for charnock wind stress in surge model(true) or not(false)
 /
 !-----------------------------------------------------------------------
@@ -1178,2 +1180,11 @@
    rn_htrmax         =  200.0   ! max. depth of transition range
 /
+!-----------------------------------------------------------------------
+&namwad       !   Wetting and Drying namelist
+!-----------------------------------------------------------------------
+   ln_wd = .false.   !: key to turn on/off wetting/drying (T: on, F: off)
+   rn_wdmin1=0.1     !: minimum water depth on dried cells
+   rn_wdmin2 = 0.01  !: tolerrance of minimum water depth on dried cells
+   rn_wdld   = 20.0  !: land elevation below which wetting/drying will be considered
+   nn_wdit   =   10  !: maximum number of iteration for W/D limiter
+/
Index: /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5745)
+++ /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5746)
@@ -136,5 +136,6 @@
       !!----------------------------------------------------------------------
       USE ioipsl
-      NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   &
+! Added nn_rstdate, eventually should include separate branch for this
+      NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstdate, nn_rstctl,   &
          &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   &
          &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz, nn_euler
@@ -172,4 +173,5 @@
          WRITE(numout,*) '      file prefix restart output      cn_ocerst_out= ', cn_ocerst_out
          WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart
+         WRITE(numout,*) '      datestamping of restarts        ln_rstdate = ', ln_rstdate
          WRITE(numout,*) '      start with forward time step    nn_euler   = ', nn_euler
          WRITE(numout,*) '      control of time step            nn_rstctl  = ', nn_rstctl
Index: /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90
===================================================================
--- /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90	(revision 5745)
+++ /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90	(revision 5746)
@@ -24,4 +24,7 @@
    USE icb_oce        ! define iceberg arrays
    USE icbutl         ! iceberg utility routines
+! added for ln_rstdate, should include separate branch at later date...
+   USE phycst         ! for rday
+   USE ioipsl, ONLY : ju2ymds    ! for calendar
 
    IMPLICIT NONE
@@ -231,10 +234,26 @@
       TYPE(iceberg), POINTER :: this
       TYPE(point)  , POINTER :: pt
-      !!----------------------------------------------------------------------
-
+! included for ln_rstdate....
+      INTEGER             ::   iyear, imonth, iday
+      REAL (wp)           ::   zsec
+      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
+      !!----------------------------------------------------------------------
+
+      IF ( ln_rstdate ) THEN
+         CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )           
+         WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
+      ELSE
+         IF( kt > 999999999 ) THEN   ;   WRITE(clkt, *       ) kt
+         ELSE                        ;   WRITE(clkt, '(i8.8)') kt
+         ENDIF
+      ENDIF
+
+! changed for ln_rstdate....
       IF( lk_mpp ) THEN
-         WRITE(cl_filename,'("icebergs_",I8.8,"_restart_",I4.4,".nc")') kt, narea-1
+         !WRITE(cl_filename,'("icebergs_",I8.8,"_restart_",I4.4,".nc")') kt, narea-1
+         WRITE(cl_filename,'("icebergs_",A,"_restart_",I4.4,".nc")') TRIM(ADJUSTL(clkt)), narea-1
       ELSE
-         WRITE(cl_filename,'("icebergs_",I8.8,"_restart.nc")') kt
+         !WRITE(cl_filename,'("icebergs_",I8.8,"_restart.nc")') kt
+         WRITE(cl_filename,'("_icebergs_",A,"_restart.nc")') TRIM(ADJUSTL(clkt))
       ENDIF
       IF (nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',TRIM(cl_filename)
Index: /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 5745)
+++ /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 5746)
@@ -43,4 +43,6 @@
    LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file
    INTEGER       ::   nn_chunksz       !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
+! included for rstdate, should be moved to seperate branch!
+   LOGICAL       ::   ln_rstdate       !: datestamping of restarts
 #if defined key_netcdf4
    !!----------------------------------------------------------------------
Index: /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5745)
+++ /branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5746)
@@ -25,4 +25,6 @@
    USE divcur          ! hor. divergence and curl      (div & cur routines)
    USE sbc_ice, ONLY : lk_lim3
+! for ln_rstdate....
+   USE ioipsl, ONLY : ju2ymds    ! for calendar
 
    IMPLICIT NONE
@@ -58,4 +60,8 @@
       CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
       CHARACTER(LEN=50)   ::   clname   ! ice output restart file name
+! Included for ln_rstdate
+      INTEGER             ::   iyear, imonth, iday
+      REAL (wp)           ::   zsec
+
       !!----------------------------------------------------------------------
       !
@@ -73,7 +79,17 @@
       ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1
       IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN
-         ! beware of the format used to write kt (default is i8.8, that should be large enough...)
-         IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
-         ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
+! changes for ln_rstdate....
+!         ! beware of the format used to write kt (default is i8.8, that should be large enough...)
+!         IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
+!         ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
+           IF ( ln_rstdate ) THEN
+              CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )           
+              WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
+           ELSE
+              ! beware of the format used to write kt (default is i8.8, that should be large enough...)
+              IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
+              ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
+              ENDIF
+! end
          ENDIF
          ! create the file
