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 5747)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/AMM7_SURGE/EXP00/namelist_ref	(revision 5750)
@@ -38,5 +38,7 @@
                            !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart
    cn_ocerst_in  = "restart"   !  suffix of ocean restart name (input)
+   cn_ocerst_indir = "."       !  directory from which to read input ocean restarts
    cn_ocerst_out = "restart"   !  suffix of ocean restart name (output)
+   cn_ocerst_outdir = "."      !  directory in which to write output ocean restarts
    nn_istate   =       0   !  output the initial state (1) or not (0)
    nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1)
Index: branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5747)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5750)
@@ -38,5 +38,7 @@
                            !    = 2 nn_date0 read in restart  ; nn_it000 : check consistancy between namelist and restart
    cn_ocerst_in  = "restart"   !  suffix of ocean restart name (input)
+   cn_ocerst_indir = "."       !  directory from which to read input ocean restarts
    cn_ocerst_out = "restart"   !  suffix of ocean restart name (output)
+   cn_ocerst_outdir = "."      !  directory in which to write output ocean restarts
    nn_istate   =       0   !  output the initial state (1) or not (0)
    nn_stock    =    5475   !  frequency of creation of a restart file (modulo referenced to 1)
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 5747)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5750)
@@ -136,6 +136,7 @@
       !!----------------------------------------------------------------------
       USE ioipsl
-! Added ln_rstdate, eventually should include separate branch for this
-      NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , ln_rstdate, nn_rstctl,   &
+! Added ln_rstdate and rstdir, eventually should include separate branch for this
+      NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   &
+         &             ln_rstdate, cn_ocerst_indir, cn_ocerst_outdir,                              &
          &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   &
          &             nn_write, ln_dimgnnn, ln_mskland  , ln_clobber   , nn_chunksz, nn_euler
@@ -174,4 +175,6 @@
          WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart
          WRITE(numout,*) '      datestamping of restarts        ln_rstdate = ', ln_rstdate
+         WRITE(numout,*) '      restart input directory         cn_ocerst_indir= ', cn_ocerst_indir
+         WRITE(numout,*) '      restart output directory        cn_ocerst_outdir= ', cn_ocerst_outdir
          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/IOM/in_out_manager.F90
===================================================================
--- branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 5747)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 5750)
@@ -43,6 +43,8 @@
    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!
+! included for rstdate and rstdir, should be moved to seperate branch!
    LOGICAL       ::   ln_rstdate       !: datestamping of restarts
+   CHARACTER(lc) ::   cn_ocerst_indir  !: restart input directory
+   CHARACTER(lc) ::   cn_ocerst_outdir !: restart output directory
 #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 5747)
+++ branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5750)
@@ -59,5 +59,6 @@
       !!
       CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
-      CHARACTER(LEN=50)   ::   clname   ! ice output restart file name
+      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name
+      CHARACTER(len=150)  ::   clpath   ! full path to ocean output restart file
 ! Included for ln_rstdate
       INTEGER             ::   iyear, imonth, iday
@@ -95,4 +96,7 @@
          ! create the file
          clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out)
+         clpath = TRIM(cn_ocerst_outdir)
+         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
+         !
          IF(lwp) THEN
             WRITE(numout,*)
@@ -107,5 +111,5 @@
          ENDIF
          !
-         CALL iom_open( clname, numrow, ldwrt = .TRUE., kiolib = jprstlib )
+         CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib )
          lrst_oce = .TRUE.
       ENDIF
@@ -170,4 +174,5 @@
       INTEGER  ::   jlibalt = jprstlib
       LOGICAL  ::   llok
+      CHARACTER(lc)  ::   clpath   ! full path to ocean output restart file
       !!----------------------------------------------------------------------
 
@@ -183,11 +188,13 @@
          ENDIF
 
+         clpath = TRIM(cn_ocerst_indir)
+         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
          IF ( jprstlib == jprstdimg ) THEN
            ! eventually read netcdf file (monobloc)  for restarting on different number of processors
            ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90
-           INQUIRE( FILE = TRIM(cn_ocerst_in)//'.nc', EXIST = llok )
+           INQUIRE( FILE = TRIM(cn_ocerst_indir)//'/'//TRIM(cn_ocerst_in)//'.nc', EXIST = llok )
            IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
          ENDIF
-         CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt )
+         CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror, kiolib = jlibalt )
       ENDIF
    END SUBROUTINE rst_read_open
