Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/1_namelist_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/1_namelist_ref	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/1_namelist_ref	(revision 4775)
@@ -36,5 +36,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/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ice_lim2_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ice_lim2_ref	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ice_lim2_ref	(revision 4775)
@@ -14,5 +14,7 @@
 !-----------------------------------------------------------------------
    cn_icerst_in  = "restart_ice_in"   !  suffix of ice restart name (input)
+   cn_icerst_indir = "."              !  directory from which to read input ice restarts
    cn_icerst_out = "restart_ice"      !  suffix of ice restart name (output)
+   cn_icerst_outdir = "."             !  directory in which to write output ice restarts
    ln_limdyn     = .true.             !  ice dynamics (T) or thermodynamics only (F)
    ln_limdmp     = .false.            !  restoring ice thickness and fraction leads   (T => fill  namice_dmp)
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ice_lim3_ref	(revision 4775)
@@ -15,5 +15,7 @@
 !-----------------------------------------------------------------------
    cn_icerst_in  = "restart_ice"   !  suffix of ice restart name (input)
+   cn_icerst_indir = "."           !  directory from which to read input ice restarts
    cn_icerst_out = "restart_ice"   !  suffix of ice restart name (output)
+   cn_icerst_outdir = "."          !  directory in which to write output ice restarts
    ln_limdyn     = .true.          !  ice dynamics (T) or thermodynamics only (F)
    amax          = 0.999           !  maximum ice concentration
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 4775)
@@ -37,5 +37,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/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90	(revision 4775)
@@ -24,5 +24,7 @@
    !                                                   !!* namicerun read in iceini  *
    CHARACTER(len=32)     , PUBLIC ::   cn_icerst_in     !: suffix of ice restart name (input)
+   CHARACTER(len=200)    , PUBLIC ::   cn_icerst_indir  !: ice restart in directory
    CHARACTER(len=32)     , PUBLIC ::   cn_icerst_out    !: suffix of ice restart name (output)
+   CHARACTER(len=200)    , PUBLIC ::   cn_icerst_outdir !: ice restart out directory
    LOGICAL               , PUBLIC ::   ln_limdyn        !: flag for ice dynamics (T) or not (F)
    LOGICAL               , PUBLIC ::   ln_limdmp        !: Ice damping
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 4775)
@@ -123,5 +123,6 @@
       !! ** input   :   Namelist namicerun
       !!-------------------------------------------------------------------
-      NAMELIST/namicerun/ cn_icerst_in, cn_icerst_out, ln_limdyn, ln_limdmp, acrit, hsndif, hicdif
+      NAMELIST/namicerun/ cn_icerst_in, cn_icerst_indir, cn_icerst_out, cn_icerst_outdir, &
+                          ln_limdyn, ln_limdmp, acrit, hsndif, hicdif
       INTEGER  ::   ios                 ! Local integer output status for namelist read
       !!-------------------------------------------------------------------
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_2/limrst_2.F90	(revision 4775)
@@ -50,4 +50,5 @@
       CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
       CHARACTER(LEN=50)   ::   clname   ! ice output restart file name
+      CHARACTER(len=150)  ::   clpath   ! full path to ice output restart file
       !!----------------------------------------------------------------------
       !
@@ -64,9 +65,13 @@
          ! create the file
          clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)
+         clpath = TRIM(cn_icerst_outdir) 
+         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/' 
          IF(lwp) THEN
             WRITE(numout,*)
             SELECT CASE ( jprstlib )
-            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ice restart binary file: '//clname
-            CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname
+            CASE ( jprstdimg )
+               WRITE(numout,*) '             open ice restart binary file: ',TRIM(clpath)//clname
+            CASE DEFAULT
+               WRITE(numout,*) '             open ice restart NetCDF file: ',TRIM(clpath)//clname
             END SELECT
             IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN   
@@ -76,5 +81,5 @@
          ENDIF
 
-         CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib )
+         CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib )
          lrst_ice = .TRUE.
       ENDIF
@@ -188,9 +193,9 @@
         ! eventually read netcdf file (monobloc)  for restarting on different number of processors
         ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90
-        INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok )
+        INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok )
         IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
       ENDIF
 
-      CALL iom_open ( cn_icerst_in, numrir, kiolib = jlibalt )
+      CALL iom_open ( TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in), numrir, kiolib = jlibalt )
 
       CALL iom_get( numrir, 'kt_ice' , ziter )
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/ice.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/ice.F90	(revision 4775)
@@ -393,5 +393,7 @@
    !                                                  !!: ** Namelist namicerun read in iceini **
    CHARACTER(len=32)     , PUBLIC ::   cn_icerst_in    !: suffix of ice restart name (input)
+   CHARACTER(len=200)    , PUBLIC ::   cn_icerst_indir !: ice restart input directory 
    CHARACTER(len=32)     , PUBLIC ::   cn_icerst_out   !: suffix of ice restart name (output)
+   CHARACTER(len=200)    , PUBLIC ::   cn_icerst_outdir!: ice restart output directory 
    LOGICAL               , PUBLIC ::   ln_limdyn       !: flag for ice dynamics (T) or not (F)
    LOGICAL               , PUBLIC ::   ln_nicep        !: flag for sea-ice points output (T) or not (F)
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90	(revision 4775)
@@ -55,4 +55,5 @@
       CHARACTER(LEN=20)   ::   clkt     ! ocean time-step define as a character
       CHARACTER(LEN=50)   ::   clname   ! ice output restart file name
+      CHARACTER(len=150)  ::   clpath   ! full path to ice output restart file 
       !!----------------------------------------------------------------------
       !
@@ -70,9 +71,13 @@
          ! create the file
          clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out)
+         clpath = TRIM(cn_icerst_outdir) 
+         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/'
          IF(lwp) THEN
             WRITE(numout,*)
             SELECT CASE ( jprstlib )
-            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ice restart binary file: '//clname
-            CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname
+            CASE ( jprstdimg )
+               WRITE(numout,*) '             open ice restart binary file: ',TRIM(clpath)//clname
+            CASE DEFAULT
+               WRITE(numout,*) '             open ice restart NetCDF file: ',TRIM(clpath)//clname
             END SELECT
             IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN   
@@ -82,5 +87,5 @@
          ENDIF
          !
-         CALL iom_open( clname, numriw, ldwrt = .TRUE., kiolib = jprstlib )
+         CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kiolib = jprstlib )
          lrst_ice = .TRUE.
       ENDIF
@@ -142,5 +147,5 @@
          CALL iom_rstput( iter, nitrst, numriw, znam , z2d )
       END DO
-      
+
       DO jl = 1, jpl 
          WRITE(zchar,'(I1)') jl
@@ -329,9 +334,9 @@
         ! eventually read netcdf file (monobloc)  for restarting on different number of processors
         ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90
-        INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok )
+        INQUIRE( FILE = TRIM(cn_icerst_indir)//'/'//TRIM(cn_icerst_in)//'.nc', EXIST = llok )
         IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
       ENDIF
 
-      CALL iom_open ( cn_icerst_in, numrir, kiolib = jprstlib )
+      CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kiolib = jprstlib )
 
       CALL iom_get( numrir, 'nn_fsbc', zfice )
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 4775)
@@ -135,5 +135,6 @@
       !!----------------------------------------------------------------------
       USE ioipsl
-      NAMELIST/namrun/ nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   &
+      NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir,                                          &
+         &             nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , 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
@@ -169,5 +170,7 @@
          WRITE(numout,*) '      experiment name for output      cn_exp     = ', cn_exp
          WRITE(numout,*) '      file prefix restart input       cn_ocerst_in= ', cn_ocerst_in
+         WRITE(numout,*) '      restart input directory         cn_ocerst_indir= ', cn_ocerst_indir
          WRITE(numout,*) '      file prefix restart output      cn_ocerst_out= ', cn_ocerst_out
+         WRITE(numout,*) '      restart output directory        cn_ocerst_outdir= ', cn_ocerst_outdir
          WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart
          WRITE(numout,*) '      start with forward time step    nn_euler   = ', nn_euler
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 4775)
@@ -26,5 +26,7 @@
    CHARACTER(lc) ::   cn_exp           !: experiment name used for output filename
    CHARACTER(lc) ::   cn_ocerst_in     !: suffix of ocean restart name (input)
+   CHARACTER(lc) ::   cn_ocerst_indir  !: restart input directory
    CHARACTER(lc) ::   cn_ocerst_out    !: suffix of ocean restart name (output)
+   CHARACTER(lc) ::   cn_ocerst_outdir !: restart output directory
    LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file
    INTEGER       ::   nn_no            !: job number
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 4775)
@@ -61,6 +61,6 @@
       INTEGER, DIMENSION(2,5), INTENT(in   ), OPTIONAL ::   kdompar     ! domain parameters: 
 
-      CHARACTER(LEN=100) ::   clinfo           ! info character
-      CHARACTER(LEN=100) ::   cltmp            ! temporary character
+      CHARACTER(LEN=256) ::   clinfo           ! info character
+      CHARACTER(LEN=256) ::   cltmp            ! temporary character
       INTEGER            ::   iln              ! lengths of character
       INTEGER            ::   istop            ! temporary storage of nstop
@@ -393,5 +393,5 @@
       INTEGER, DIMENSION(4) :: idimsz               ! dimensions size  
       INTEGER, DIMENSION(4) :: idimid               ! dimensions id
-      CHARACTER(LEN=100)    :: clinfo               ! info character
+      CHARACTER(LEN=256)    :: clinfo               ! info character
       CHARACTER(LEN= 12), DIMENSION(4) :: cltmp     ! temporary character
       INTEGER               :: if90id               ! nf90 file identifier
Index: /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 4774)
+++ /branches/2014/dev_r4650_UKMO11_restart_functionality/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 4775)
@@ -57,5 +57,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
       !!----------------------------------------------------------------------
       !
@@ -79,9 +80,13 @@
          ! 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,*)
             SELECT CASE ( jprstlib )
-            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ocean restart binary file: '//clname
-            CASE DEFAULT         ;   WRITE(numout,*) '             open ocean restart NetCDF file: '//clname
+            CASE ( jprstdimg )   ;   WRITE(numout,*)                            &
+                '             open ocean restart binary file: ',TRIM(clpath)//clname
+            CASE DEFAULT         ;   WRITE(numout,*)                            &
+                '             open ocean restart NetCDF file: ',TRIM(clpath)//clname
             END SELECT
             IF ( snc4set%luse )      WRITE(numout,*) '             opened for NetCDF4 chunking and compression'
@@ -91,5 +96,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
@@ -171,8 +176,8 @@
            ! 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(cn_ocerst_indir)//'/'//cn_ocerst_in, numror, kiolib = jlibalt )
       ENDIF
    END SUBROUTINE rst_read_open
