Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/domain_def.xml
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/domain_def.xml	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/domain_def.xml	(revision 8193)
@@ -191,7 +191,4 @@
 	</domain>  
 
-     <domain_group id="grid_N">
-      <domain id="grid_N" long_name="grid nomask"/>
-     </domain_group>
 
    </domain_definition>    
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/iodef.xml
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/iodef.xml	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/iodef.xml	(revision 8193)
@@ -79,55 +79,4 @@
   </context>
   
-  <context id="nemo_rst" >
-
-   <domain_definition src="./domain_def.xml"/>
-
-   <grid_definition>
-     <grid id="grid_T_2D" >
-       <domain id="grid_T" />
-     </grid>
-     <grid id="grid_T_3D" >
-       <domain id="grid_T" />
-       <axis id="deptht" />
-     </grid>
-     <grid id="grid_U_2D" >
-       <domain id="grid_U" />
-     </grid>
-     <grid id="grid_U_3D" >
-       <domain id="grid_U" />
-       <axis id="depthu" />
-     </grid>
-     <grid id="grid_V_2D" >
-       <domain id="grid_V" />
-     </grid>
-     <grid id="grid_V_3D" >
-       <domain id="grid_V" />
-       <axis id="depthv" />
-     </grid>
-     <grid id="grid_W_2D" >
-       <domain id="grid_W" />
-     </grid>
-     <grid id="grid_W_3D" >
-       <domain id="grid_W" />
-       <axis id="depthw" />
-     </grid>
-     <grid id="scalarpoint" />
-
-     <grid id="Vgrid">
-       <domain domain_ref="ptr" />
-       <axis axis_ref="deptht" />
-     </grid>
-
-     <grid id="grid_N" >
-       <domain domain_ref="grid_N" />
-     </grid>
-     <grid id="grid_N_3D" >
-       <domain domain_ref="grid_N" />
-       <axis axis_ref="deptht" />
-     </grid>
-
-    </grid_definition>
-
-  </context>
 
   <context id="xios">
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 8193)
@@ -50,5 +50,4 @@
    ln_clobber  = .false.   !  clobber (overwrite) an existing file
    nn_chunksz  =       0   !  chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
-   ln_xios_read = .FALSE.  !  use XIOS to read restart file (only for a single file restart)
 /
 !
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 8193)
@@ -343,5 +343,4 @@
             ENDIF
          ENDIF
-<<<<<<< .working
 
          IF( iom_use("sopht_vt") .OR. iom_use("sopst_vs") ) THEN   
@@ -434,72 +433,4 @@
          ENDIF
 #endif
-=======
-
-         IF( iom_use("sopht_vt") .OR. iom_use("sopst_vs") ) THEN   
-            z2d(1,:) = htr_vt(:,1) * rc_pwatt        !  (conversion in PW) 
-            DO ji = 1, jpi
-               z2d(ji,:) = z2d(1,:)
-            ENDDO
-            cl1 = 'sopht_vt'
-            CALL iom_put( TRIM(cl1), z2d )
-            z2d(1,:) = str_vs(:,1) * rc_ggram        !  (conversion in Gg)
-            DO ji = 1, jpi
-               z2d(ji,:) = z2d(1,:)
-            ENDDO
-            cl1 = 'sopst_vs'
-            CALL iom_put( TRIM(cl1), z2d )
-            IF( ln_subbas ) THEN
-              DO jn=2,nptr
-               z2d(1,:) = htr_vt(:,jn) * rc_pwatt        !  (conversion in PW)
-               DO ji = 1, jpi
-                 z2d(ji,:) = z2d(1,:)
-               ENDDO
-               cl1 = TRIM('sopht_vt_'//clsubb(jn))                 
-               CALL iom_put( cl1, z2d )
-               z2d(1,:) = str_vs(:,jn) * rc_ggram        ! (conversion in Gg)
-               DO ji = 1, jpi
-                  z2d(ji,:) = z2d(1,:)
-               ENDDO
-               cl1 = TRIM('sopst_vs_'//clsubb(jn))                 
-               CALL iom_put( cl1, z2d )              
-              ENDDO
-            ENDIF
-         ENDIF
-
-#ifdef key_diaeiv
-         IF(lk_traldf_eiv) THEN
-            IF( iom_use("sophteiv") .OR. iom_use("sopsteiv") ) THEN 
-               z2d(1,:) = htr_eiv(:,1) * rc_pwatt        !  (conversion in PW) 
-               DO ji = 1, jpi
-                  z2d(ji,:) = z2d(1,:)
-               ENDDO
-               cl1 = 'sophteiv'
-               CALL iom_put( TRIM(cl1), z2d )
-               z2d(1,:) = str_eiv(:,1) * rc_ggram        !  (conversion in Gg)
-               DO ji = 1, jpi
-                  z2d(ji,:) = z2d(1,:)
-               ENDDO
-               cl1 = 'sopsteiv'
-               CALL iom_put( TRIM(cl1), z2d )
-               IF( ln_subbas ) THEN
-                  DO jn=2,nptr
-                     z2d(1,:) = htr_eiv(:,jn) * rc_pwatt        !  (conversion in PW)
-                     DO ji = 1, jpi
-                        z2d(ji,:) = z2d(1,:)
-                     ENDDO
-                     cl1 = TRIM('sophteiv_'//clsubb(jn))                 
-                     CALL iom_put( cl1, z2d )
-                     z2d(1,:) = str_eiv(:,jn) * rc_ggram        ! (conversion in Gg)
-                     DO ji = 1, jpi
-                        z2d(ji,:) = z2d(1,:)
-                     ENDDO
-                     cl1 = TRIM('sopsteiv_'//clsubb(jn)) 
-                     CALL iom_put( cl1, z2d )              
-                  ENDDO
-               ENDIF
-            ENDIF
-         ENDIF
-#endif
->>>>>>> .merge-right.r7923
          !
       ENDIF
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 8193)
@@ -157,10 +157,6 @@
       IF( iom_use("e3tdef") )   &
          CALL iom_put( "e3tdef"  , ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 )
-<<<<<<< .working
       CALL iom_put("tpt_dep", fsdept_n(:,:,:) )
       CALL iom_put("wpt_dep", fsdepw_n(:,:,:) )
-=======
-      CALL iom_put("tpt_dep", fsdept_n(:,:,:) )
->>>>>>> .merge-right.r7923
 
 
@@ -254,10 +250,8 @@
       CALL iom_put( "avt" , avt                        )    ! T vert. eddy diff. coef.
       CALL iom_put( "avm" , avmu                       )    ! T vert. eddy visc. coef.
-#if defined key_zdftke   ||   defined key_esopa
       IF( lk_zdftke ) THEN   
          CALL iom_put( "tke"      , en                               )    ! TKE budget: Turbulent Kinetic Energy   
          CALL iom_put( "tke_niw"  , e_niw                            )    ! TKE budget: Near-inertial waves   
       ENDIF 
-#endif
       CALL iom_put( "avs" , fsavs(:,:,:)               )    ! S vert. eddy diff. coef. (useful only with key_zdfddm)
                                                             ! Log of eddy diff coef
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90	(revision 8193)
@@ -330,5 +330,5 @@
                CALL iom_get( numror, 'ndastp', zndastp )
                ndastp = NINT( zndastp )
-               CALL iom_get( numror, 'adatrj', adatrj, lrxios = lxios_read )
+               CALL iom_get( numror, 'adatrj', adatrj  )
             ELSE
                ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day)
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 8193)
@@ -138,6 +138,5 @@
          &             nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , ln_rstdate, nn_rstctl,   &
          &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   &
-         &             nn_write, ln_dimgnnn, ln_mskland  , ln_cfmeta    , ln_clobber, nn_chunksz, nn_euler, &
-         &             ln_xios_read
+         &             nn_write, ln_dimgnnn, ln_mskland  , ln_cfmeta    , ln_clobber, nn_chunksz, nn_euler
       NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   &
          &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  &
@@ -153,5 +152,5 @@
       INTEGER  ::   ios                 ! Local integer output status for namelist read
       !!----------------------------------------------------------------------
-      ln_xios_read = .false.            ! set in case ln_xios_read is not in namelist
+
       REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run
       READ  ( numnam_ref, namrun, IOSTAT = ios, ERR = 901)
@@ -194,5 +193,4 @@
          WRITE(numout,*) '      overwrite an existing file      ln_clobber = ', ln_clobber
          WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz = ', nn_chunksz
-         WRITE(numout,*) '      READ restart for a single file using XIOS ln_xios_read =', ln_xios_read
       ENDIF
 
@@ -209,5 +207,4 @@
       nwrite = nn_write
       neuler = nn_euler
-      lxios_read = ln_xios_read
       IF ( neuler == 1 .AND. .NOT. ln_rstart ) THEN
          WRITE(ctmp1,*) 'ln_rstart =.FALSE., nn_euler is forced to 0 '
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 8193)
@@ -49,5 +49,4 @@
    LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file
    INTEGER       ::   nn_chunksz       !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines)
-   LOGICAL       ::   ln_xios_read     !: use xios to read single file restart
 #if defined key_netcdf4
    !!----------------------------------------------------------------------
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 8193)
@@ -41,9 +41,7 @@
    USE dianam          ! build name of file
    USE xios
-   USE iom_def, ONLY : max_rst_fields, rst_fields
 # endif
    USE ioipsl, ONLY :  ju2ymds    ! for calendar
    USE crs             ! Grid coarsening
-   USE lib_fortran 
 
    IMPLICIT NONE
@@ -64,5 +62,4 @@
    PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr
    PRIVATE set_grid, set_grid_bounds, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate
-   PRIVATE set_rst_vars, set_rstr_active
 # endif
 
@@ -139,5 +136,4 @@
           &                                    start_date = xios_date(nyear,nmonth,nday,0,0,0) )
       END SELECT
-
 #endif
       ! horizontal grid definition
@@ -146,12 +142,11 @@
 
       IF( TRIM(cdname) == TRIM(cxios_context) ) THEN  
-         CALL set_grid( "T", glamt, gphit, ln_mskland ) 
-         CALL set_grid( "U", glamu, gphiu, ln_mskland )
-         CALL set_grid( "V", glamv, gphiv, ln_mskland )
-         CALL set_grid( "W", glamt, gphit, ln_mskland )
+         CALL set_grid( "T", glamt, gphit ) 
+         CALL set_grid( "U", glamu, gphiu )
+         CALL set_grid( "V", glamv, gphiv )
+         CALL set_grid( "W", glamt, gphit )
          CALL set_grid_znl( gphit )
-         CALL set_grid("N",glamt, gphit, .FALSE.)        ! not masked values
          !
-         IF( ln_cfmeta .AND. TRIM(cdname) .NE. TRIM(rxios_context)) THEN   ! Add additional grid metadata
+         IF( ln_cfmeta ) THEN   ! Add additional grid metadata
             CALL iom_set_domain_attr("grid_T", area = e12t(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_U", area = e12u(nldi:nlei, nldj:nlej))
@@ -168,13 +163,13 @@
          CALL dom_grid_crs   ! Save the parent grid information  & Switch to coarse grid domain
          !
-         CALL set_grid( "T", glamt_crs, gphit_crs, ln_mskland ) 
-         CALL set_grid( "U", glamu_crs, gphiu_crs, ln_mskland ) 
-         CALL set_grid( "V", glamv_crs, gphiv_crs, ln_mskland ) 
-         CALL set_grid( "W", glamt_crs, gphit_crs, ln_mskland ) 
+         CALL set_grid( "T", glamt_crs, gphit_crs ) 
+         CALL set_grid( "U", glamu_crs, gphiu_crs ) 
+         CALL set_grid( "V", glamv_crs, gphiv_crs ) 
+         CALL set_grid( "W", glamt_crs, gphit_crs ) 
          CALL set_grid_znl( gphit_crs )
           !
          CALL dom_grid_glo   ! Return to parent grid domain
          !
-         IF( ln_cfmeta .AND. TRIM(cdname) .NE. TRIM(rxios_context)) THEN   ! Add additional grid metadata
+         IF( ln_cfmeta ) THEN   ! Add additional grid metadata
             CALL iom_set_domain_attr("grid_T", area = e1e2t_crs(nldi:nlei, nldj:nlej))
             CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej))
@@ -232,12 +227,5 @@
       
       ! automatic definitions of some of the xml attributs
-      IF( TRIM(cdname) == TRIM(rxios_context)) THEN
-!set names of the fields in restart file IF using XIOS to read/write data
-       CALL set_rst_vars()
-!set which fields are to be read from restart file
-       CALL set_rstr_active()
-      ELSE
-       CALL set_xmlatt
-      ENDIF
+      CALL set_xmlatt
 
       CALL set_1point
@@ -256,142 +244,4 @@
    END SUBROUTINE iom_init
 
-   
-   SUBROUTINE set_rst_vars()
-!set names for variables in restart file
-
-        rst_fields(:)%vname="NO_NAME";         rst_fields(:)%grid="NO_GRID"
-
-        rst_fields(1)%vname="rdt";             rst_fields(1)% grid="grid_scalar"
-        rst_fields(2)%vname="rdttra1";         rst_fields(2)% grid="grid_scalar"      
-        rst_fields(3)%vname="un";              rst_fields(3)% grid="grid_N_3D"
-        rst_fields(4)%vname="ub";              rst_fields(4)% grid="grid_N_3D"
-        rst_fields(5)%vname="vn";              rst_fields(5)% grid="grid_N_3D"
-        rst_fields(6)%vname="vb";              rst_fields(6)% grid="grid_N_3D"  
-        rst_fields(7)%vname="tn";              rst_fields(7)% grid="grid_N_3D"
-        rst_fields(8)%vname="tb";              rst_fields(8)% grid="grid_N_3D"
-        rst_fields(9)%vname="sn";              rst_fields(9)% grid="grid_N_3D"
-        rst_fields(10)%vname="sb";             rst_fields(10)%grid="grid_N_3D"
-        rst_fields(11)%vname="sshn";           rst_fields(11)%grid="grid_N"
-        rst_fields(12)%vname="sshb";           rst_fields(12)%grid="grid_N"
-        rst_fields(13)%vname="hdivn";          rst_fields(13)%grid="grid_N_3D"
-        rst_fields(14)%vname="hdivb";          rst_fields(14)%grid="grid_N_3D"
-        rst_fields(15)%vname="rhop";           rst_fields(15)%grid="grid_N_3D"
-        rst_fields(16)%vname="rotn";           rst_fields(16)%grid="grid_N_3D"
-        rst_fields(17)%vname="rotb";           rst_fields(17)%grid="grid_N_3D"
-        rst_fields(18)%vname="kt";             rst_fields(18)%grid="grid_scalar"
-        rst_fields(19)%vname="ndastp";         rst_fields(19)%grid="grid_scalar"
-        rst_fields(20)%vname="adatrj";         rst_fields(20)%grid="grid_scalar"
-        rst_fields(21)%vname="utau_b";         rst_fields(21)%grid="grid_N"
-        rst_fields(22)%vname="vtau_b";         rst_fields(22)%grid="grid_N"
-        rst_fields(23)%vname="qns_b";          rst_fields(23)%grid="grid_N"
-        rst_fields(24)%vname="emp_b";          rst_fields(24)%grid="grid_N"
-        rst_fields(25)%vname="sfx_b";          rst_fields(25)%grid="grid_N"
-        rst_fields(26)%vname="en" ;            rst_fields(26)%grid="grid_N_3D" 
-        rst_fields(27)%vname="avt";            rst_fields(27)%grid="grid_N_3D"
-        rst_fields(28)%vname="avm";            rst_fields(28)%grid="grid_N_3D"
-        rst_fields(29)%vname="avmu";           rst_fields(29)%grid="grid_N_3D"
-        rst_fields(30)%vname="avmv";           rst_fields(30)%grid="grid_N_3D"
-        rst_fields(31)%vname="dissl";          rst_fields(31)%grid="grid_N_3D"
-        rst_fields(32)%vname="sbc_hc_b";       rst_fields(32)%grid="grid_N"
-        rst_fields(33)%vname="sbc_sc_b";       rst_fields(33)%grid="grid_N"
-        rst_fields(34)%vname="qsr_hc_b";       rst_fields(34)%grid="grid_N_3D"
-        rst_fields(35)%vname="gcx";            rst_fields(35)%grid="grid_N"
-        rst_fields(36)%vname="gcxb";           rst_fields(36)%grid="grid_N"
-        rst_fields(37)%vname="fraqsr_1lev";    rst_fields(37)%grid="grid_N"
-        rst_fields(38)%vname="greenland_icesheet_mass"
-                                               rst_fields(38)%grid="grid_scalar"
-        rst_fields(39)%vname="greenland_icesheet_timelapsed"
-                                               rst_fields(39)%grid="grid_scalar"
-        rst_fields(40)%vname="greenland_icesheet_mass_roc"
-                                               rst_fields(40)%grid="grid_scalar"
-        rst_fields(41)%vname="antarctica_icesheet_mass"
-                                               rst_fields(41)%grid="grid_scalar"
-        rst_fields(42)%vname="antarctica_icesheet_timelapsed"
-                                               rst_fields(42)%grid="grid_scalar"
-        rst_fields(43)%vname="antarctica_icesheet_mass_roc"
-                                               rst_fields(43)%grid="grid_scalar"
-        rst_fields(44)%vname="rhd";            rst_fields(44)%grid="grid_N_3D"
-        rst_fields(45)%vname="frc_v";          rst_fields(45)%grid="grid_scalar"
-        rst_fields(46)%vname="frc_t";          rst_fields(46)%grid="grid_scalar"
-        rst_fields(47)%vname="frc_s";          rst_fields(47)%grid="grid_scalar"
-        rst_fields(48)%vname="frc_wn_t";       rst_fields(48)%grid="grid_scalar"
-        rst_fields(49)%vname="frc_wn_s";       rst_fields(49)%grid="grid_scalar"
-        rst_fields(50)%vname="ssh_ini";        rst_fields(50)%grid="grid_N"
-        rst_fields(51)%vname="e3t_ini";        rst_fields(51)%grid="grid_N_3D"
-        rst_fields(52)%vname="hc_loc_ini";     rst_fields(52)%grid="grid_N_3D"
-        rst_fields(53)%vname="sc_loc_ini";     rst_fields(53)%grid="grid_N_3D"
-        rst_fields(54)%vname="ssh_hc_loc_ini"; rst_fields(54)%grid="grid_N"
-        rst_fields(55)%vname="ssh_sc_loc_ini"; rst_fields(55)%grid="grid_N"
-        rst_fields(56)%vname="fse3t_b";        rst_fields(56)%grid="grid_N_3D"
-        rst_fields(57)%vname="fse3t_n";        rst_fields(57)%grid="grid_N_3D"
-        rst_fields(58)%vname="tilde_e3t_b";    rst_fields(58)%grid="grid_N"
-        rst_fields(59)%vname="tilde_e3t_n";    rst_fields(59)%grid="grid_N"
-        rst_fields(60)%vname="hdiv_lf";        rst_fields(60)%grid="grid_N"
-        rst_fields(61)%vname="ub2_b";          rst_fields(61)%grid="grid_N"
-        rst_fields(62)%vname="vb2_b";          rst_fields(62)%grid="grid_N"
-        rst_fields(63)%vname="sshbb_e";        rst_fields(63)%grid="grid_N"
-        rst_fields(64)%vname="ubb_e";          rst_fields(64)%grid="grid_N"
-        rst_fields(65)%vname="vbb_e";          rst_fields(65)%grid="grid_N"
-        rst_fields(66)%vname="sshb_e";         rst_fields(66)%grid="grid_N"
-        rst_fields(67)%vname="ub_e";           rst_fields(67)%grid="grid_N"
-        rst_fields(68)%vname="vb_e";           rst_fields(68)%grid="grid_N"
-        rst_fields(69)%vname="fwf_isf_b";      rst_fields(69)%grid="grid_N"
-        rst_fields(70)%vname="isf_sc_b";       rst_fields(70)%grid="grid_N"
-        rst_fields(71)%vname="isf_hc_b";       rst_fields(71)%grid="grid_N"
-        rst_fields(72)%vname="ssh_ibb";        rst_fields(72)%grid="grid_N"
-        rst_fields(73)%vname="rnf_b";          rst_fields(73)%grid="grid_N"
-        rst_fields(74)%vname="rnf_hc_b";       rst_fields(74)%grid="grid_N"
-        rst_fields(75)%vname="rnf_sc_b";       rst_fields(75)%grid="grid_N"
-        rst_fields(76)%vname="nn_fsbc";        rst_fields(76)%grid="grid_scalar"
-        rst_fields(77)%vname="ssu_m";          rst_fields(77)%grid="grid_N"
-        rst_fields(78)%vname="ssv_m";          rst_fields(78)%grid="grid_N"
-        rst_fields(79)%vname="sst_m";          rst_fields(79)%grid="grid_N"
-        rst_fields(80)%vname="sss_m";          rst_fields(80)%grid="grid_N"
-        rst_fields(81)%vname="ssh_m";          rst_fields(81)%grid="grid_N"
-        rst_fields(82)%vname="e3t_m";          rst_fields(82)%grid="grid_N"
-        rst_fields(83)%vname="frq_m";          rst_fields(83)%grid="grid_N"
-        rst_fields(84)%vname="avmb";           rst_fields(84)%grid="Vgrid"
-        rst_fields(85)%vname="avtb";           rst_fields(85)%grid="Vgrid"
-
-   END SUBROUTINE set_rst_vars
-
-
-   SUBROUTINE set_rstr_active()
-!sets enabled = .TRUE. for each field in restart file
-#if defined key_xios2
-   CHARACTER(len=256) :: rst_file
-   TYPE(xios_field) :: field_hdl
-   TYPE(xios_file) :: file_hdl
-   TYPE(xios_filegroup) :: filegroup_hdl
-   INTEGER :: i
-   CHARACTER(lc)  ::   clpath
-
-        clpath = TRIM(cn_ocerst_indir)
-        IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
-        IF( TRIM(Agrif_CFixed()) == '0' ) THEN
-           rst_file = TRIM(cn_ocerst_indir)//TRIM(cn_ocerst_in)
-        ELSE
-           rst_file = TRIM(cn_ocerst_indir)//'1_'//TRIM(cn_ocerst_in)
-        ENDIF
-!set name of the restart file and enable available fields
-        if(lwp) WRITE(numout,*) 'Setting restart filename (for XIOS) to: ',rst_file
-        CALL xios_get_handle("file_definition", filegroup_hdl )
-        CALL xios_add_child(filegroup_hdl, file_hdl, 'rrestart')
-        CALL xios_set_file_attr( "rrestart", name=trim(rst_file), type="one_file", &
-             par_access="collective", enabled=.TRUE., mode="read",                 &
-             output_freq=xios_timestep)
-!defin files for restart context
-        DO i = 1, max_rst_fields
-         IF( TRIM(rst_fields(i)%vname) /= "NO_NAME") THEN
-           IF( iom_varid( numror, TRIM(rst_fields(i)%vname), ldstop = .FALSE. ) > 0 ) THEN
-                CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname))
-                CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_fields(i)%vname), &
-                     grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant")
-                if(lwp) WRITE(numout,*) TRIM(rst_fields(i)%vname), ' enabled'
-           ENDIF
-         ENDIF
-        END DO
-#endif
-   END SUBROUTINE set_rstr_active
 
    SUBROUTINE iom_swap( cdname )
@@ -837,5 +687,4 @@
                                                                            ! value for the 2nd dimension (netcdf only)
       !
-      LOGICAL                        ::   lxios       ! local definition for XIOS read
       LOGICAL                        ::   llnoov      ! local definition to read overlap
       LOGICAL                        ::   luse_jattr  ! local definition to read open_ocean_jstart file attribute
@@ -864,21 +713,15 @@
       !---------------------------------------------------------------------
       !
-      REAL(wp)                       :: gma, gmi
-      lxios = .FALSE.
-      if(PRESENT(lrxios)) lxios = lrxios
-      idvar = iom_varid( kiomid, cdvar ) 
+      clname = iom_file(kiomid)%name   !   esier to read
+      clinfo = '          iom_get_123d, file: '//trim(clname)//', var: '//trim(cdvar)
+      ! local definition of the domain ?
       idom = kdom
-
-      IF(.NOT.lxios) THEN
-          clname = iom_file(kiomid)%name   !   esier to read
-          clinfo = '          iom_get_123d, file: '//trim(clname)//', var: '//trim(cdvar)
-          ! local definition of the domain ?
-          ! do we read the overlap 
-          ! ugly patch SM+JMM+RB to overwrite global definition in some cases
-          llnoov = (jpni * jpnj ) == jpnij .AND. .NOT. lk_agrif 
-          ! check kcount and kstart optionals parameters...
-          IF( PRESENT(kcount) .AND. (.NOT. PRESENT(kstart)) ) CALL ctl_stop(trim(clinfo), 'kcount present needs kstart present')
-          IF( PRESENT(kstart) .AND. (.NOT. PRESENT(kcount)) ) CALL ctl_stop(trim(clinfo), 'kstart present needs kcount present')
-          IF( PRESENT(kstart) .AND. idom /= jpdom_unknown .AND.  idom /= jpdom_autoglo_xy  ) &
+      ! do we read the overlap 
+      ! ugly patch SM+JMM+RB to overwrite global definition in some cases
+      llnoov = (jpni * jpnj ) == jpnij .AND. .NOT. lk_agrif 
+      ! check kcount and kstart optionals parameters...
+      IF( PRESENT(kcount) .AND. (.NOT. PRESENT(kstart)) ) CALL ctl_stop(trim(clinfo), 'kcount present needs kstart present')
+      IF( PRESENT(kstart) .AND. (.NOT. PRESENT(kcount)) ) CALL ctl_stop(trim(clinfo), 'kstart present needs kcount present')
+      IF( PRESENT(kstart) .AND. idom /= jpdom_unknown .AND.  idom /= jpdom_autoglo_xy  ) &
      &           CALL ctl_stop(trim(clinfo), 'kstart present needs kdom = jpdom_unknown or kdom = jpdom_autoglo_xy')
 
@@ -1082,64 +925,28 @@
             IF(lwp) WRITE(numout,"(10x,' read ',a,' (rec: ',i6,') in ',a,' ok')") TRIM(cdvar), itime, TRIM(iom_file(kiomid)%name)
           
-                !--- overlap areas and extra hallows (mpp)
-                IF(     PRESENT(pv_r2d) .AND. idom /= jpdom_unknown ) THEN
-                   CALL lbc_lnk( pv_r2d,'Z',-999.,'no0' )
-                ELSEIF( PRESENT(pv_r3d) .AND. idom /= jpdom_unknown ) THEN
-                   ! this if could be simplified with the new lbc_lnk that works with any size of the 3rd dimension
-                   IF( icnt(3) == jpk ) THEN
-                      CALL lbc_lnk( pv_r3d,'Z',-999.,'no0' )
-                   ELSE   ! put some arbitrary value (a call to lbc_lnk will be done later...)
-                      DO jj = nlcj+1, jpj   ;   pv_r3d(1:nlci, jj, :) = pv_r3d(1:nlci, nlej, :)   ;   END DO
-                      DO ji = nlci+1, jpi   ;   pv_r3d(ji    , : , :) = pv_r3d(nlei  , :   , :)   ;   END DO
-                   ENDIF
-                ENDIF
-                !
-             ELSE
-                ! return if istop == nstop is false
-                RETURN
-             ENDIF
-          ELSE
-             ! return if statment idvar > 0 .AND. istop == nstop is false
-             RETURN
-          ENDIF
-          !
-       ELSE        ! read using XIOS. Only if KEY_IOMPUT is defined
-#if defined key_iomput
-!would be good to be able to check which context is active and swap only if current is not restart
-          CALL iom_swap( TRIM(rxios_context) ) 
-          IF( PRESENT(pv_r3d) ) THEN
-             if(lwp) write(numout,*) 'XIOS RST READ (3D): ',trim(cdvar)
-             CALL xios_recv_field( trim(cdvar), pv_r3d)
-             IF(idom /= jpdom_unknown ) then
-                 CALL lbc_lnk( pv_r3d,'Z',-999.,'no0' )
-             ENDIF
-          ELSEIF( PRESENT(pv_r2d) ) THEN
-             if(lwp) write(numout,*) 'XIOS RST READ (2D): ', trim(cdvar)
-             CALL xios_recv_field( trim(cdvar), pv_r2d)
-             IF(idom /= jpdom_unknown ) THEN
-                 CALL lbc_lnk(pv_r2d,'Z',-999.,'no0')
-             ENDIF
-          ELSEIF( PRESENT(pv_r1d) ) THEN
-             if(lwp) write(numout,*) 'XIOS RST READ (1D): ', trim(cdvar)
-             CALL xios_recv_field( trim(cdvar), pv_r1d)
-          ENDIF
-          CALL iom_swap( TRIM(cxios_context) )
-#else
-          istop = istop + 1 
-          clinfo = 'Can not use XIOS in iom_get_123d, file: '//trim(clname)//', var:'//trim(cdvar)
-#endif
-       ENDIF
-!some final adjustments
-       ! C1D case : always call lbc_lnk to replicate the central value over the whole 3X3 domain
-       IF( lk_c1d .AND. PRESENT(pv_r2d) )   CALL lbc_lnk( pv_r2d,'Z',1. )
-       IF( lk_c1d .AND. PRESENT(pv_r3d) )   CALL lbc_lnk( pv_r3d,'Z',1. )
-
-       !--- Apply scale_factor and offset
-       zscf = iom_file(kiomid)%scf(idvar)      ! scale factor
-       zofs = iom_file(kiomid)%ofs(idvar)      ! offset
-       IF(     PRESENT(pv_r1d) ) THEN
-          IF( zscf /= 1. )   pv_r1d(:) = pv_r1d(:) * zscf 
-          IF( zofs /= 0. )   pv_r1d(:) = pv_r1d(:) + zofs
-       ELSEIF( PRESENT(pv_r2d) ) THEN
+            !--- overlap areas and extra hallows (mpp)
+            IF(     PRESENT(pv_r2d) .AND. idom /= jpdom_unknown ) THEN
+               CALL lbc_lnk( pv_r2d,'Z',-999.,'no0' )
+            ELSEIF( PRESENT(pv_r3d) .AND. idom /= jpdom_unknown ) THEN
+               ! this if could be simplified with the new lbc_lnk that works with any size of the 3rd dimension
+               IF( icnt(3) == jpk ) THEN
+                  CALL lbc_lnk( pv_r3d,'Z',-999.,'no0' )
+               ELSE   ! put some arbitrary value (a call to lbc_lnk will be done later...)
+                  DO jj = nlcj+1, jpj   ;   pv_r3d(1:nlci, jj, :) = pv_r3d(1:nlci, nlej, :)   ;   END DO
+                  DO ji = nlci+1, jpi   ;   pv_r3d(ji    , : , :) = pv_r3d(nlei  , :   , :)   ;   END DO
+               ENDIF
+            ENDIF
+            
+            ! C1D case : always call lbc_lnk to replicate the central value over the whole 3X3 domain
+            IF( lk_c1d .AND. PRESENT(pv_r2d) )   CALL lbc_lnk( pv_r2d,'Z',1. )
+            IF( lk_c1d .AND. PRESENT(pv_r3d) )   CALL lbc_lnk( pv_r3d,'Z',1. )
+    
+            !--- Apply scale_factor and offset
+            zscf = iom_file(kiomid)%scf(idvar)      ! scale factor
+            zofs = iom_file(kiomid)%ofs(idvar)      ! offset
+            IF(     PRESENT(pv_r1d) ) THEN
+               IF( zscf /= 1. )   pv_r1d(:) = pv_r1d(:) * zscf 
+               IF( zofs /= 0. )   pv_r1d(:) = pv_r1d(:) + zofs
+            ELSEIF( PRESENT(pv_r2d) ) THEN
 !CDIR COLLAPSE
                IF( zscf /= 1.)   pv_r2d(:,:) = pv_r2d(:,:) * zscf
@@ -1150,6 +957,11 @@
                IF( zscf /= 1.)   pv_r3d(:,:,:) = pv_r3d(:,:,:) * zscf
 !CDIR COLLAPSE
-          IF( zofs /= 0.)   pv_r3d(:,:,:) = pv_r3d(:,:,:) + zofs
-       ENDIF
+               IF( zofs /= 0.)   pv_r3d(:,:,:) = pv_r3d(:,:,:) + zofs
+            ENDIF
+            !
+         ENDIF
+         !
+      ENDIF
+      !
    END SUBROUTINE iom_get_123d
 
@@ -1555,5 +1367,5 @@
 
 
-   SUBROUTINE set_grid( cdgrd, plon, plat, lmask )
+   SUBROUTINE set_grid( cdgrd, plon, plat )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE set_grid  ***
@@ -1568,5 +1380,4 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zmask
       INTEGER  :: ni,nj
-      LOGICAL :: lmask
       
       ni=nlei-nldi+1 ; nj=nlej-nldj+1
@@ -1581,5 +1392,5 @@
          &                                     latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /)))  
 
-      IF ( lmask ) THEN
+      IF ( ln_mskland ) THEN
          ! mask land points, keep values on coast line -> specific mask for U, V and W points
          SELECT CASE ( cdgrd )
@@ -1625,5 +1436,5 @@
       ! Offset of coordinate representing bottom-left corner
       SELECT CASE ( TRIM(cdgrd) )
-         CASE ('T', 'W', 'N')
+         CASE ('T', 'W')
             icnr = -1 ; jcnr = -1
          CASE ('U')
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90	(revision 8193)
@@ -51,8 +51,4 @@
 !$AGRIF_DO_NOT_TREAT
    INTEGER, PUBLIC            ::   iom_open_init = 0   !: used to initialize iom_file(:)%nfid to 0
-!XIOS read restart   
-   LOGICAL, PUBLIC            ::   lxios_read          !: read single file restart using XIOS
-   LOGICAL, PUBLIC            ::   lxios_sini = .FALSE. ! is restart in a single file
-   LOGICAL, PUBLIC            ::   lxios_set  = .FALSE. 
 
    TYPE, PUBLIC ::   file_descriptor
@@ -74,14 +70,4 @@
    END TYPE file_descriptor
    TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC ::   iom_file !: array containing the info for all opened files
-
-   INTEGER, PARAMETER, PUBLIC                   :: max_rst_fields = 85  
-!  CHARACTER(len=30),DIMENSION(max_rst_fields), PUBLIC   :: rst_fields ! names of variables in restart file
-
-   TYPE, PUBLIC :: RST_FIELD  
-    CHARACTER(len=30) :: vname ! names of variables in restart file
-    CHARACTER(len=30) :: grid
-   END TYPE RST_FIELD
-   TYPE(RST_FIELD), PUBLIC :: rst_fields(max_rst_fields)
-
 !$AGRIF_END_DO_NOT_TREAT
 
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 8193)
@@ -218,19 +218,4 @@
          ENDIF
          CALL iom_open( TRIM(clpath)//cn_ocerst_in, numror, kiolib = jlibalt )
-! are we using XIOS to read the data? Part above will have to modified once XIOS
-! can handle checking if variable is in the restart file (there will be no need to open
-! restart)
-         IF(.NOT.lxios_set) lxios_read = lxios_read.AND.lxios_sini
-         IF( lxios_read) THEN
-         if(.NOT.lxios_set) then
-             rxios_context = 'nemo_rst'
-             call iom_init( rxios_context )
-             lxios_set = .TRUE.
-         endif
-         ENDIF
-         IF( TRIM(Agrif_CFixed()) /= '0' .AND. lxios_read) THEN
-            rxios_context = 'nemo_rst'
-            call iom_init( rxios_context )
-         ENDIF 
       ENDIF
    END SUBROUTINE rst_read_open
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 8193)
@@ -68,5 +68,4 @@
       CHARACTER(len=100) ::  cn_dir   ! Root directory for location of ssr files
       TYPE(FLD_N)        ::  sn_apr   ! informations about the fields to be read
-      LOGICAL            ::  lxios_read ! read restart using XIOS?
       !!
       NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc
@@ -144,5 +143,5 @@
          IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 
             IF(lwp) WRITE(numout,*) 'sbc_apr:   ssh_ibb read in the restart file'
-            CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb, lrxios = lxios_read )   ! before inv. barometer ssh
+            CALL iom_get( numror, jpdom_autoglo, 'ssh_ibb', ssh_ibb )   ! before inv. barometer ssh
             !
          ELSE                                         !* no restart: set from nit000 values
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 8193)
@@ -82,5 +82,4 @@
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zun, zvn, zwn
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrdt, ztrds   ! 3D workspace
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrdt, ztrds   ! 3D workspace
       !!----------------------------------------------------------------------
       !
@@ -126,5 +125,4 @@
       IF( ln_diaptr )   CALL dia_ptr( zvn )                                     ! diagnose the effective MSF 
       !
-<<<<<<< .working
       IF( l_trdtra )   THEN                    !* Save ta and sa trends
          ALLOCATE(ztrdt( 1:jpi, 1:jpj, 1:jpk) )
@@ -134,12 +132,4 @@
       ENDIF
       !
-=======
-      IF( l_trdtra )   THEN                    !* Save ta and sa trends
-         CALL wrk_alloc( jpi, jpj, jpk, ztrdt, ztrds )
-         ztrdt(:,:,:) = tsa(:,:,:,jp_tem)
-         ztrds(:,:,:) = tsa(:,:,:,jp_sal)
-      ENDIF
-      !
->>>>>>> .merge-right.r7923
       SELECT CASE ( nadv )                            !==  compute advection trend and add it to general trend  ==!
       CASE ( 1 )   ;    CALL tra_adv_cen2   ( kt, nit000, 'TRA',         zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  2nd order centered
@@ -172,5 +162,4 @@
       END SELECT
       !
-<<<<<<< .working
       IF( l_trdtra )   THEN                      ! save the advective trends for further diagnostics
          DO jk = 1, jpkm1
@@ -183,15 +172,4 @@
          DEALLOCATE (ztrds)
       ENDIF
-=======
-      IF( l_trdtra )   THEN                      ! save the advective trends for further diagnostics
-         DO jk = 1, jpkm1
-            ztrdt(:,:,jk) = tsa(:,:,jk,jp_tem) - ztrdt(:,:,jk)
-            ztrds(:,:,jk) = tsa(:,:,jk,jp_sal) - ztrds(:,:,jk)
-         END DO
-         CALL trd_tra( kt, 'TRA', jp_tem, jptra_totad, ztrdt )
-         CALL trd_tra( kt, 'TRA', jp_sal, jptra_totad, ztrds )
-         CALL wrk_dealloc( jpi, jpj, jpk, ztrdt, ztrds )
-      ENDIF
->>>>>>> .merge-right.r7923
       !                                              ! print mean trends (used for debugging)
       IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv  - Ta: ', mask1=tmask,               &
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 8193)
@@ -86,13 +86,7 @@
       REAL(wp) ::   zfp_ui, zfp_vj, zfp_wk   !   -      -
       REAL(wp) ::   zfm_ui, zfm_vj, zfm_wk   !   -      -
-<<<<<<< .working
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zwi, zwz
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrdx, ztrdy, ztrdz, zptry
       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   :: z2d
-=======
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zwi, zwz
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdx, ztrdy, ztrdz, zptry
-      REAL(wp), POINTER, DIMENSION(:,:)   :: z2d
->>>>>>> .merge-right.r7923
       !!----------------------------------------------------------------------
       !
@@ -114,22 +108,12 @@
       IF( cdtype == 'TRA' .AND. (iom_use("uadv_heattr") .OR. iom_use("vadv_heattr") ) ) l_trans = .TRUE.
       !
-<<<<<<< .working
       IF( l_trd .OR. l_trans )  THEN
          ALLOCATE(ztrdx(1:jpi, 1:jpj, 1:jpk))
          ALLOCATE(ztrdy(1:jpi, 1:jpj, 1:jpk))
          ALLOCATE(ztrdz(1:jpi, 1:jpj, 1:jpk))
-=======
-      IF( l_trd .OR. l_trans )  THEN
-         CALL wrk_alloc( jpi, jpj, jpk, ztrdx, ztrdy, ztrdz )
->>>>>>> .merge-right.r7923
          ztrdx(:,:,:) = 0.e0   ;    ztrdy(:,:,:) = 0.e0   ;   ztrdz(:,:,:) = 0.e0
-<<<<<<< .working
          ALLOCATE(z2d(1:jpi, 1:jpj))
-=======
-         CALL wrk_alloc( jpi, jpj, z2d )
->>>>>>> .merge-right.r7923
       ENDIF
       !
-<<<<<<< .working
       IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
          ALLOCATE(zptry(1:jpi, 1:jpj, 1:jpk))
@@ -137,11 +121,4 @@
       ENDIF
       !
-=======
-      IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
-         CALL wrk_alloc( jpi, jpj, jpk, zptry )
-         zptry(:,:,:) = 0._wp
-      ENDIF
-      !
->>>>>>> .merge-right.r7923
       zwi(:,:,:) = 0.e0 ; 
       !
@@ -331,5 +308,4 @@
       END DO
       !
-<<<<<<< .working
       DEALLOCATE( zwi )
       DEALLOCATE( zwz )
@@ -341,12 +317,4 @@
       ENDIF
       IF( cdtype == 'TRA' .AND. ln_diaptr ) DEALLOCATE( zptry )
-=======
-      CALL wrk_dealloc( jpi, jpj, jpk, zwi, zwz )
-      IF( l_trd .OR. l_trans )  THEN 
-         CALL wrk_dealloc( jpi, jpj, jpk, ztrdx, ztrdy, ztrdz )
-         CALL wrk_dealloc( jpi, jpj, z2d )
-      ENDIF
-      IF( cdtype == 'TRA' .AND. ln_diaptr ) CALL wrk_dealloc( jpi, jpj, jpk, zptry )
->>>>>>> .merge-right.r7923
       !
       IF( nn_timing == 1 )  CALL timing_stop('tra_adv_tvd')
@@ -392,5 +360,4 @@
       REAL(wp) ::   zfp_ui, zfp_vj, zfp_wk   !   -      -
       REAL(wp) ::   zfm_ui, zfm_vj, zfm_wk   !   -      -
-<<<<<<< .working
       REAL(wp), ALLOCATABLE, DIMENSION(:,:  ) :: zwx_sav , zwy_sav
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zwi, zwz, zhdiv, zwz_sav, zwzts
@@ -398,11 +365,4 @@
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zptry
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: ztrs
-=======
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zwx_sav , zwy_sav
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zwi, zwz, zhdiv, zwz_sav, zwzts
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdx, ztrdy, ztrdz
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zptry
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrs
->>>>>>> .merge-right.r7923
       !!----------------------------------------------------------------------
       !
@@ -434,5 +394,4 @@
       ENDIF
       !
-<<<<<<< .working
       IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
          ALLOCATE(zptry(1:jpi, 1:jpj, 1:jpk))       
@@ -440,11 +399,4 @@
       ENDIF
       !
-=======
-      IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
-         CALL wrk_alloc( jpi, jpj,jpk, zptry )
-         zptry(:,:,:) = 0._wp
-      ENDIF
-      !
->>>>>>> .merge-right.r7923
       zwi(:,:,:) = 0._wp
       z_rzts = 1._wp / REAL( jnzts, wp )
@@ -681,5 +633,4 @@
 
       IF( cdtype == 'TRA' .AND. ln_diaptr ) DEALLOCATE(zptry )
-      IF( cdtype == 'TRA' .AND. ln_diaptr ) CALL wrk_dealloc( jpi, jpj, jpk, zptry )
       !
       IF( nn_timing == 1 )  CALL timing_stop('tra_adv_tvd_zts')
Index: branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 8191)
+++ branches/UKMO/dev_r5518_GO6_package_fix_rnf_MOCI_TEST_SUITE/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 8193)
@@ -106,5 +106,4 @@
       INTEGER  ::  ji, jj, jk, jn   ! dummy loop indices
       INTEGER  ::  ikt
-<<<<<<< .working
       REAL(wp) ::  zmsku, zabe1, zcof1, zcoef3       ! local scalars
       REAL(wp) ::  zmskv, zabe2, zcof2, zcoef4       !   -      -
@@ -114,18 +113,8 @@
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  ztrax, ztray, ztraz 
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  ztrax_T, ztray_T, ztraz_T
-=======
-      REAL(wp) ::  zmsku, zabe1, zcof1, zcoef3       ! local scalars
-      REAL(wp) ::  zmskv, zabe2, zcof2, zcoef4       !   -      -
-      REAL(wp) ::  zcoef0, zbtr                      !   -      -
-      REAL(wp), POINTER, DIMENSION(:,:  ) ::  z2d
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zdkt, zdk1t, zdit, zdjt, ztfw 
->>>>>>> .merge-right.r7923
-      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  ztrax, ztray, ztraz 
-      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  ztrax_T, ztray_T, ztraz_T
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('tra_ldf_iso')
       !
-<<<<<<< .working
       ALLOCATE( z2d(1:jpi, 1:jpj)) 
       ALLOCATE( zdit(1:jpi, 1:jpj, 1:jpk))
@@ -142,10 +131,4 @@
          ALLOCATE( ztraz_T(1:jpi,1:jpj,1:jpk)) 
       ENDIF
-=======
-      CALL wrk_alloc( jpi, jpj,      z2d ) 
-      CALL wrk_alloc( jpi, jpj, jpk, zdit, zdjt, ztfw, zdkt, zdk1t) 
-      ALLOCATE( ztrax(jpi,jpj,jpk), ztray(jpi,jpj,jpk), ztraz(jpi,jpj,jpk) ) 
-      IF( l_trdtra .and. cdtype == 'TRA' ) ALLOCATE( ztrax_T(jpi,jpj,jpk), ztray_T(jpi,jpj,jpk), ztraz_T(jpi,jpj,jpk) ) 
->>>>>>> .merge-right.r7923
       !
 
@@ -364,5 +347,4 @@
       END DO
       !
-<<<<<<< .working
       IF( l_trdtra .AND. cdtype == "TRA" )   THEN      ! save the horizontal component of diffusive trends for further diagnostics
          CALL trd_tra( kt, cdtype, jp_tem, jptra_iso_x, ztrax_T )
@@ -373,19 +355,4 @@
          CALL trd_tra( kt, cdtype, jp_sal, jptra_iso_z1, ztraz )    !
       ENDIF
-=======
-      IF( l_trdtra .AND. cdtype == "TRA" )   THEN      ! save the horizontal component of diffusive trends for further diagnostics
-         CALL trd_tra( kt, cdtype, jp_tem, jptra_iso_x, ztrax_T )
-         CALL trd_tra( kt, cdtype, jp_sal, jptra_iso_x, ztrax )
-         CALL trd_tra( kt, cdtype, jp_tem, jptra_iso_y, ztray_T )
-         CALL trd_tra( kt, cdtype, jp_sal, jptra_iso_y, ztray )
-         CALL trd_tra( kt, cdtype, jp_tem, jptra_iso_z1, ztraz_T )  ! This is the first part of the vertical component
-         CALL trd_tra( kt, cdtype, jp_sal, jptra_iso_z1, ztraz )    !
-      ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, z2d ) 
-      CALL wrk_dealloc( jpi, jpj, jpk, zdit, zdjt, ztfw, zdkt, zdk1t ) 
->>>>>>> .merge-right.r7923
-      DEALLOCATE( ztrax, ztray, ztraz ) 
-      IF( l_trdtra  .and. cdtype == 'TRA' ) DEALLOCATE( ztrax_T, ztray_T, ztraz_T ) 
       !
       DEALLOCATE( z2d ) 
