Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 43)
@@ -27,5 +27,4 @@
    USE prtctl          ! Print control
    USE iom             ! I/O library
-   USE restart         ! only for lrst_oce
    USE timing          ! Timing
 
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 43)
@@ -45,5 +45,4 @@
    USE prtctl          ! Print control
    USE iom
-   USE restart         ! only for lrst_oce
    USE lib_fortran
 #if defined key_agrif
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 43)
@@ -41,5 +41,4 @@
    USE in_out_manager  ! I/O manager
    USE iom             ! IOM library
-   USE restart         ! only for lrst_oce
    USE zdf_oce         ! Vertical diffusion
    USE wrk_nemo        ! Memory Allocation
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 43)
@@ -20,5 +20,4 @@
    USE divcur          ! hor. divergence and curl      (div & cur routines)
    USE iom             ! I/O library
-   USE restart         ! only for lrst_oce
    USE in_out_manager  ! I/O manager
    USE prtctl          ! Print control
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 43)
@@ -80,5 +80,7 @@
    !! was in restart but moved here because of the OFF line... better solution should be found...
    !!----------------------------------------------------------------------
-   INTEGER ::   nitrst   !: time step at which restart file should be written
+   INTEGER ::   nitrst                !: time step at which restart file should be written
+   LOGICAL ::   lrst_oce              !: logical to control the oce restart write 
+   INTEGER ::   numror, numrow        !: logical unit for cean restart (read and write)
 
    !!----------------------------------------------------------------------
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 43)
@@ -24,4 +24,5 @@
    USE trdmld_oce      ! ocean active mixed layer tracers trends variables
    USE domvvl          ! variable volume
+   USE divcur          ! hor. divergence and curl      (div & cur routines)
 
    IMPLICIT NONE
@@ -31,7 +32,4 @@
    PUBLIC   rst_write  ! routine called by step module
    PUBLIC   rst_read   ! routine called by opa  module
-
-   LOGICAL, PUBLIC ::   lrst_oce =  .FALSE.   !: logical to control the oce restart write 
-   INTEGER, PUBLIC ::   numror, numrow        !: logical unit for cean restart (read and write)
 
    !! * Substitutions
@@ -183,26 +181,38 @@
       ENDIF
       ! 
-                     CALL iom_get( numror, jpdom_autoglo, 'ub'     , ub      )   ! before fields
-                     CALL iom_get( numror, jpdom_autoglo, 'vb'     , vb      )
-                     CALL iom_get( numror, jpdom_autoglo, 'tb'     , tsb(:,:,:,jp_tem) )
-                     CALL iom_get( numror, jpdom_autoglo, 'sb'     , tsb(:,:,:,jp_sal) )
-                     CALL iom_get( numror, jpdom_autoglo, 'rotb'   , rotb    )
-                     CALL iom_get( numror, jpdom_autoglo, 'hdivb'  , hdivb   )
-                     CALL iom_get( numror, jpdom_autoglo, 'sshb'   , sshb    )
-      IF( lk_vvl )   CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) )
-                     !
-                     CALL iom_get( numror, jpdom_autoglo, 'un'     , un      )   ! now    fields
-                     CALL iom_get( numror, jpdom_autoglo, 'vn'     , vn      )
-                     CALL iom_get( numror, jpdom_autoglo, 'tn'     , tsn(:,:,:,jp_tem) )
-                     CALL iom_get( numror, jpdom_autoglo, 'sn'     , tsn(:,:,:,jp_sal) )
-                     CALL iom_get( numror, jpdom_autoglo, 'rotn'   , rotn    )
-                     CALL iom_get( numror, jpdom_autoglo, 'hdivn'  , hdivn   )
-                     CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn    )
-                     CALL iom_get( numror, jpdom_autoglo, 'rhop'   , rhop    )   ! now    potential density
+      IF( iom_varid( numror, 'ub', ldstop = .FALSE. ) > 0 ) THEN
+         CALL iom_get( numror, jpdom_autoglo, 'ub'     , ub      )   ! before fields
+         CALL iom_get( numror, jpdom_autoglo, 'vb'     , vb      )
+         CALL iom_get( numror, jpdom_autoglo, 'tb'     , tsb(:,:,:,jp_tem) )
+         CALL iom_get( numror, jpdom_autoglo, 'sb'     , tsb(:,:,:,jp_sal) )
+         CALL iom_get( numror, jpdom_autoglo, 'rotb'   , rotb    )
+         CALL iom_get( numror, jpdom_autoglo, 'hdivb'  , hdivb   )
+         CALL iom_get( numror, jpdom_autoglo, 'sshb'   , sshb    )
+         IF( lk_vvl )   CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) )
+      ELSE
+         neuler = 0
+      ENDIF
+      !
+      CALL iom_get( numror, jpdom_autoglo, 'un'     , un      )   ! now    fields
+      CALL iom_get( numror, jpdom_autoglo, 'vn'     , vn      )
+      CALL iom_get( numror, jpdom_autoglo, 'tn'     , tsn(:,:,:,jp_tem) )
+      CALL iom_get( numror, jpdom_autoglo, 'sn'     , tsn(:,:,:,jp_sal) )
+      CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn    )
+      IF( iom_varid( numror, 'rotn', ldstop = .FALSE. ) > 0 ) THEN
+         CALL iom_get( numror, jpdom_autoglo, 'rotn'   , rotn    )
+         CALL iom_get( numror, jpdom_autoglo, 'hdivn'  , hdivn   )
+      ELSE
+         CALL div_cur( 0 )                              ! Horizontal divergence & Relative vorticity
+      ENDIF
+      IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN
+         CALL iom_get( numror, jpdom_autoglo, 'rhop'   , rhop    )   ! now    potential density
+      ELSE
+         CALL eos    ( tsn, rhd, rhop )   
+      ENDIF
 #if defined key_zdfkpp
       IF( iom_varid( numror, 'rhd', ldstop = .FALSE. ) > 0 ) THEN
-                     CALL iom_get( numror, jpdom_autoglo, 'rhd'    , rhd     )   ! now    in situ density anomaly
-      ELSE
-                     CALL eos( tsn, rhd )   ! compute rhd
+         CALL iom_get( numror, jpdom_autoglo, 'rhd'    , rhd     )   ! now    in situ density anomaly
+      ELSE
+         CALL eos( tsn, rhd )   ! compute rhd
       ENDIF
 #endif
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 43)
@@ -20,5 +20,4 @@
    USE iom             ! IOM library
    USE lib_mpp         ! MPP library
-   USE restart         ! ocean restart
 
    IMPLICIT NONE
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 43)
@@ -41,5 +41,4 @@
 #endif
    USE geo2ocean       ! 
-   USE restart         !
    USE oce   , ONLY : tsn, un, vn
    USE albedo          !
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 43)
@@ -45,5 +45,4 @@
 
    USE prtctl           ! Print control                    (prt_ctl routine)
-   USE restart          ! ocean restart
    USE iom              ! IOM library
    USE in_out_manager   ! I/O manager
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 43)
@@ -21,5 +21,4 @@
    USE closea          ! closed seas
    USE fldread         ! read input field at current time step
-   USE restart         ! restart
    USE in_out_manager  ! I/O manager
    USE iom             ! I/O module
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 43)
@@ -18,5 +18,4 @@
    USE sbcapr          ! surface boundary condition: atmospheric pressure
    USE prtctl          ! Print control                    (prt_ctl routine)
-   USE restart         ! ocean restart
    USE iom
    USE in_out_manager  ! I/O manager
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 43)
@@ -29,5 +29,4 @@
    USE diaptr          ! poleward transport diagnostics
    USE zdf_oce         ! ocean vertical physics
-   USE restart         ! ocean restart
    USE trc_oce         ! share passive tracers/Ocean variables
    USE lib_mpp         ! MPP library
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 43)
@@ -27,5 +27,4 @@
    USE iom             ! I/O manager
    USE fldread         ! read input fields
-   USE restart         ! ocean restart
    USE lib_mpp         ! MPP library
    USE wrk_nemo       ! Memory Allocation
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 43)
@@ -23,5 +23,4 @@
    USE in_out_manager  ! I/O manager
    USE prtctl          ! Print control
-   USE restart         ! ocean restart
    USE sbcrnf          ! River runoff  
    USE sbcmod          ! ln_rnf  
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld.F90	(revision 43)
@@ -36,5 +36,4 @@
    USE trdmld_rst      ! restart for diagnosing the ML trends
    USE prtctl          ! Print control
-   USE restart         ! for lrst_oce
    USE lib_mpp         ! MPP library
    USE wrk_nemo        ! Memory allocation
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld_rst.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld_rst.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmld_rst.F90	(revision 43)
@@ -12,5 +12,4 @@
    USE in_out_manager  ! I/O manager
    USE iom             ! I/O module
-   USE restart         ! only for lrst_oce
 
    IMPLICIT NONE
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 43)
@@ -23,5 +23,4 @@
    USE phycst         ! physical constants
    USE zdfmxl         ! mixed layer
-   USE restart        ! only for lrst_oce
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp        ! MPP manager
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 43)
@@ -26,5 +26,4 @@
    USE tranpc          ! convection: non penetrative adjustment
    USE ldfslp          ! iso-neutral slopes
-   USE restart         ! ocean restart
 
    USE in_out_manager  ! I/O manager
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 42)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 43)
@@ -44,5 +44,4 @@
    USE zdf_oce        ! vertical physics: ocean variables
    USE zdfmxl         ! vertical physics: mixed layer
-   USE restart        ! ocean restart
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE prtctl         ! Print control
