Index: NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/restart.F90
===================================================================
--- NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/restart.F90	(revision 13750)
+++ NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/restart.F90	(revision 13871)
@@ -110,5 +110,5 @@
             ELSE
 #if defined key_iomput
-               cwxios_context = "rstw_"//TRIM(ADJUSTL(clkt))
+               cw_ocerst_cxt = "rstw_"//TRIM(ADJUSTL(clkt))
                IF( TRIM(Agrif_CFixed()) == '0' ) THEN
                   clpname = clname
@@ -116,5 +116,5 @@
                   clpname = TRIM(Agrif_CFixed())//"_"//clname   
                ENDIF
-               CALL iom_init( cwxios_context, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .false. )
+               CALL iom_init( cw_ocerst_cxt, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .false. )
                CALL iom_swap(      cxios_context          )
 #else
@@ -142,5 +142,5 @@
       INTEGER, INTENT(in) ::   Kbb, Kmm   ! ocean time level indices
       !!----------------------------------------------------------------------
-                     IF(lwxios) CALL iom_swap(      cwxios_context          )
+                     IF(lwxios) CALL iom_swap(      cw_ocerst_cxt          )
                      CALL iom_rstput( kt, nitrst, numrow, 'rdt'    , rn_Dt       , ldxios = lwxios)   ! dynamics time step
                      CALL iom_delay_rst( 'WRITE', 'OCE', numrow )   ! save only ocean delayed global communication variables
@@ -167,5 +167,5 @@
             CALL iom_close( numrow )     ! close the restart file (only at last time step)
          ELSE
-            CALL iom_context_finalize(      cwxios_context          )
+            CALL iom_context_finalize(      cw_ocerst_cxt          )
          ENDIF
 !!gm         IF( .NOT. lk_trdmld )   lrst_oce = .FALSE.
@@ -209,8 +209,8 @@
 ! can handle checking if variable is in the restart file (there will be no need to open
 ! restart)
-         lroxios = lrxios.AND.lxios_sini
-
-         IF( lroxios) THEN
-             crxios_context = 'oce_rst'
+         lrxios = lrxios.AND.lxios_sini
+
+         IF( lrxios) THEN
+             cr_ocerst_cxt = 'oce_rst'
              IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS'
              IF( TRIM(Agrif_CFixed()) == '0' ) THEN
@@ -219,5 +219,5 @@
                 clpname = TRIM(Agrif_CFixed())//"_"//cn_ocerst_in   
              ENDIF
-             CALL iom_init( crxios_context, fname = TRIM(clpath)//TRIM(clpname), &
+             CALL iom_init( cr_ocerst_cxt, fname = TRIM(clpath)//TRIM(clpname), &
                               idfp = iom_file(numror)%nfid, ld_closedef = .TRUE. )
          ENDIF
@@ -245,7 +245,7 @@
 
       ! Check dynamics and tracer time-step consistency and force Euler restart if changed
-      IF( lroxios ) CALL iom_swap( TRIM(crxios_context) )
+      IF( lrxios ) CALL iom_swap( cr_ocerst_cxt )
       IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN
-         CALL iom_get( numror, 'rdt', zrdt, ldxios = lroxios )
+         CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios )
          IF( zrdt /= rn_Dt ) THEN
             IF(lwp) WRITE( numout,*)
@@ -260,10 +260,10 @@
       
       ! Diurnal DSST 
-      IF( ln_diurnal ) CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst, ldxios = lroxios ) 
+      IF( ln_diurnal ) CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst, ldxios = lrxios ) 
       IF ( ln_diurnal_only ) THEN 
          IF(lwp) WRITE( numout, * ) &
          &   "rst_read:- ln_diurnal_only set, setting rhop=rho0" 
          rhop = rho0
-         CALL iom_get( numror, jpdom_auto, 'tn'     , w3d, ldxios = lroxios ) 
+         CALL iom_get( numror, jpdom_auto, 'tn'     , w3d, ldxios = lrxios ) 
          ts(:,:,1,jp_tem,Kmm) = w3d(:,:,1)
          RETURN 
@@ -288,9 +288,9 @@
       CALL iom_get( numror, jpdom_auto, 'sshn'   ,ssh(:,:         ,Kmm), ldxios = lrxios )
       IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN
-         CALL iom_get( numror, jpdom_auto, 'rhop'   , rhop, ldxios = lroxios )   ! now    potential density
+         CALL iom_get( numror, jpdom_auto, 'rhop'   , rhop, ldxios = lrxios )   ! now    potential density
       ELSE
          CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, gdept(:,:,:,Kmm) )   
       ENDIF
-      IF( lroxios ) CALL iom_swap( TRIM(cxios_context) )
+      IF( lrxios ) CALL iom_swap( cxios_context )
       !
       IF( l_1st_euler ) THEN                                  ! Euler restart 
