Index: /trunk/NEMO/LIM_SRC_2/limrst_2.F90
===================================================================
--- /trunk/NEMO/LIM_SRC_2/limrst_2.F90	(revision 1472)
+++ /trunk/NEMO/LIM_SRC_2/limrst_2.F90	(revision 1473)
@@ -170,4 +170,6 @@
       !!----------------------------------------------------------------------
       REAL(wp) ::   ziter
+      INTEGER  ::   jlibalt = jprstlib
+      LOGICAL  ::   llok
       INTEGER  ::   itest
       !!----------------------------------------------------------------------
@@ -179,5 +181,12 @@
       ENDIF
 
-      CALL iom_open ( cn_icerst_in, numrir, kiolib = jprstlib )
+      IF ( jprstlib == jprstdimg ) THEN
+        ! 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 )
+        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
+      ENDIF
+
+      CALL iom_open ( cn_icerst_in, numrir, kiolib = jlibalt )
 
       CALL iom_get( numrir, 'kt_ice' , ziter )
Index: /trunk/NEMO/LIM_SRC_3/limrst.F90
===================================================================
--- /trunk/NEMO/LIM_SRC_3/limrst.F90	(revision 1472)
+++ /trunk/NEMO/LIM_SRC_3/limrst.F90	(revision 1473)
@@ -391,5 +391,7 @@
       REAL(wp), DIMENSION(jpi,jpj) :: z2d
       CHARACTER(len=15) :: znam
-      CHARACTER(len=1) :: zchar, zchar1
+      CHARACTER(len=1)  :: zchar, zchar1
+      INTEGER           :: jlibalt = jprstlib
+      LOGICAL           :: llok
       !!----------------------------------------------------------------------
 
@@ -398,4 +400,11 @@
          WRITE(numout,*) 'lim_rst_read : read ice NetCDF restart file'
          WRITE(numout,*) '~~~~~~~~~~~~~~'
+      ENDIF
+
+      IF ( jprstlib == jprstdimg ) THEN
+        ! 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 )
+        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
       ENDIF
 
Index: /trunk/NEMO/OPA_SRC/TRD/trdmld_rst.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/TRD/trdmld_rst.F90	(revision 1472)
+++ /trunk/NEMO/OPA_SRC/TRD/trdmld_rst.F90	(revision 1473)
@@ -131,4 +131,6 @@
     CHARACTER (len=35) :: charout
     INTEGER ::   jk         ! loop indice
+    INTEGER ::   jlibalt = jprstlib
+    LOGICAL ::   llok
     !!-----------------------------------------------------------------------------
 
@@ -138,6 +140,12 @@
        WRITE(numout,*) ' ~~~~~~~~~~~~~~~~'
     ENDIF
-
-    CALL iom_open( cn_trdrst_in, inum, kiolib = jprstlib ) 
+    IF ( jprstlib == jprstdimg ) THEN
+       ! eventually read netcdf file (monobloc)  for restarting on different number of processors
+       ! if {cn_trdrst_in}.nc exists, then set jlibalt to jpnf90
+       INQUIRE( FILE = TRIM(cn_trdrst_in)//'.nc', EXIST = llok )
+       IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
+    ENDIF
+
+    CALL iom_open( cn_trdrst_in, inum, kiolib = jlibalt ) 
 
     IF( ln_trdmld_instant ) THEN 
Index: /trunk/NEMO/OPA_SRC/restart.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/restart.F90	(revision 1472)
+++ /trunk/NEMO/OPA_SRC/restart.F90	(revision 1473)
@@ -193,4 +193,6 @@
       !!----------------------------------------------------------------------
       REAL(wp) ::   zrdt, zrdttra1
+      INTEGER  ::   jlibalt = jprstlib
+      LOGICAL  ::   llok
       !!----------------------------------------------------------------------
 
@@ -204,5 +206,11 @@
       ENDIF
 
-      CALL iom_open( cn_ocerst_in, numror, kiolib = jprstlib )
+      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 )
+        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
+      ENDIF
+      CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt )
 
       ! Check dynamics and tracer time-step consistency and force Euler restart if changed
Index: /trunk/NEMO/TOP_SRC/SED/sedrst.F90
===================================================================
--- /trunk/NEMO/TOP_SRC/SED/sedrst.F90	(revision 1472)
+++ /trunk/NEMO/TOP_SRC/SED/sedrst.F90	(revision 1473)
@@ -55,5 +55,7 @@
 
       REAL(wp) :: zkt
-      CHARACTER(len = 20)  ::  cltra
+      CHARACTER(len = 20) ::   cltra
+      INTEGER             ::   jlibalt = jprstlib
+      LOGICAL             ::   llok
       !--------------------------------------------------------------------
  
@@ -65,5 +67,12 @@
       ALLOCATE( zhipor(jpoce,jpksed) ) 
 
-      CALL iom_open( 'restart_sed', numrsr, kiolib = jprstlib )     
+      IF ( jprstlib == jprstdimg ) THEN
+        ! eventually read netcdf file (monobloc)  for restarting on different number of processors
+        ! if restart_sed.nc exists, then set jlibalt to jpnf90
+        INQUIRE( FILE = 'restart_sed.nc', EXIST = llok )
+        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
+      ENDIF
+
+      CALL iom_open( 'restart_sed', numrsr, kiolib = jlibalt )     
       CALL iom_get( numrsr, 'kt'     , zkt      )   ! time-step
  
Index: /trunk/NEMO/TOP_SRC/TRP/trdmld_trc_rst.F90
===================================================================
--- /trunk/NEMO/TOP_SRC/TRP/trdmld_trc_rst.F90	(revision 1472)
+++ /trunk/NEMO/TOP_SRC/TRP/trdmld_trc_rst.F90	(revision 1473)
@@ -132,4 +132,6 @@
       CHARACTER (len=35) :: charout
       INTEGER ::  jk, jn, jl     ! loop indice
+      INTEGER ::  jlibalt = jprstlib
+      LOGICAL ::  llok
       !!-----------------------------------------------------------------------------
       
@@ -140,5 +142,12 @@
       ENDIF
       
-      CALL iom_open( cn_trdrst_trc_in, inum, kiolib = jprstlib ) 
+      IF ( jprstlib == jprstdimg ) THEN
+        ! eventually read netcdf file (monobloc)  for restarting on different number of processors
+        ! if {cn_trdrst_trc_in}.nc exists, then set jlibalt to jpnf90
+        INQUIRE( FILE = TRIM(cn_trdrst_trc_in)//'.nc', EXIST = llok )
+        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
+      ENDIF
+
+      CALL iom_open( cn_trdrst_trc_in, inum, kiolib = jlibalt ) 
       
       IF( ln_trdmld_trc_instant ) THEN 
Index: /trunk/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /trunk/NEMO/TOP_SRC/trcrst.F90	(revision 1472)
+++ /trunk/NEMO/TOP_SRC/trcrst.F90	(revision 1473)
@@ -92,4 +92,6 @@
       INTEGER  ::  iarak0
       REAL(wp) ::  zarak0
+      INTEGER  ::  jlibalt = jprstlib
+      LOGICAL  ::  llok
 #if defined key_pisces 
       INTEGER  ::  ji, jj, jk
@@ -104,5 +106,12 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
 
-      CALL iom_open( cn_trcrst_in, numrtr, kiolib = jprstlib )
+      IF ( jprstlib == jprstdimg ) THEN
+        ! eventually read netcdf file (monobloc)  for restarting on different number of processors
+        ! if {cn_trcrst_in}.nc exists, then set jlibalt to jpnf90
+        INQUIRE( FILE = TRIM(cn_trcrst_in)//'.nc', EXIST = llok )
+        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF
+      ENDIF
+      
+      CALL iom_open( cn_trcrst_in, numrtr, kiolib = jlibalt )
 
       ! Time domain : restart
