Index: branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/NEMO/NST_SRC/agrif_oce.F90
===================================================================
--- branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/NEMO/NST_SRC/agrif_oce.F90	(revision 10248)
+++ branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/NEMO/NST_SRC/agrif_oce.F90	(revision 10251)
@@ -12,5 +12,5 @@
    USE par_oce      ! ocean parameters
    USE dom_oce      ! domain parameters
-
+   
    IMPLICIT NONE
    PRIVATE 
@@ -19,10 +19,8 @@
 
    !                                              !!* Namelist namagrif: AGRIF parameters
-   LOGICAL , PUBLIC ::   ln_spc_dyn    = .FALSE.   !:
-   INTEGER , PUBLIC ::   nn_cln_update = 3         !: update frequency 
-   INTEGER , PUBLIC, PARAMETER ::   nn_sponge_len = 2  !: Sponge width (in number of parent grid points)
-   REAL(wp), PUBLIC ::   rn_sponge_tra = 2800.     !: sponge coeff. for tracers
-   REAL(wp), PUBLIC ::   rn_sponge_dyn = 2800.     !: sponge coeff. for dynamics
-   LOGICAL , PUBLIC ::   ln_chk_bathy  = .FALSE.   !: check of parent bathymetry 
+   LOGICAL , PUBLIC ::   ln_spc_dyn      !:
+   INTEGER , PUBLIC ::   nn_cln_update   !: update frequency 
+   REAL(wp), PUBLIC ::   rn_sponge_tra   !: sponge coeff. for tracers
+   REAL(wp), PUBLIC ::   rn_sponge_dyn   !: sponge coeff. for dynamics
 
    !                                              !!! OLD namelist names
@@ -32,42 +30,16 @@
    REAL(wp), PUBLIC ::   visc_dyn                  !: sponge coeff. for dynamics
 
-   LOGICAL , PUBLIC :: spongedoneT = .FALSE.       !: tracer   sponge layer indicator
-   LOGICAL , PUBLIC :: spongedoneU = .FALSE.       !: dynamics sponge layer indicator
-   LOGICAL , PUBLIC :: lk_agrif_fstep = .TRUE.     !: if true: first step
-   LOGICAL , PUBLIC :: lk_agrif_doupd = .TRUE.     !: if true: send update from current grid
-   LOGICAL , PUBLIC :: lk_agrif_debug = .FALSE.    !: if true: print debugging info
+   LOGICAL , PUBLIC :: spongedoneT = .FALSE.   !: tracer   sponge layer indicator
+   LOGICAL , PUBLIC :: spongedoneU = .FALSE.   !: dynamics sponge layer indicator
+   LOGICAL , PUBLIC :: lk_agrif_fstep = .TRUE. !: if true: first step
 
-   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_tsn
-# if defined key_top
-   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_trn
-# endif
-   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_u
-   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_v
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE,  DIMENSION(:,:) :: fsaht_spu, fsaht_spv !: sponge diffusivities
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE,  DIMENSION(:,:) :: fsahm_spt, fsahm_spf !: sponge viscosities
-
-   ! Barotropic arrays used to store open boundary data during
-   ! time-splitting loop:
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  ubdy_w, vbdy_w, hbdy_w
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  ubdy_e, vbdy_e, hbdy_e
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  ubdy_n, vbdy_n, hbdy_n
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  ubdy_s, vbdy_s, hbdy_s
-
-   INTEGER :: tsn_id                                                  ! AGRIF profile for tracers interpolation and update
-   INTEGER :: un_interp_id, vn_interp_id                              ! AGRIF profiles for interpolations
-   INTEGER :: un_update_id, vn_update_id                              ! AGRIF profiles for udpates
-   INTEGER :: tsn_sponge_id, un_sponge_id, vn_sponge_id               ! AGRIF profiles for sponge layers
-# if defined key_top
-   INTEGER :: trn_id, trn_sponge_id
-# endif  
-   INTEGER :: unb_id, vnb_id, ub2b_interp_id, vb2b_interp_id
-   INTEGER :: ub2b_update_id, vb2b_update_id
-   INTEGER :: e3t_id, e1u_id, e2v_id, sshn_id
-   INTEGER :: scales_t_id
-# if defined key_zdftke
-   INTEGER :: avt_id, avm_id, en_id
-# endif  
-   INTEGER :: umsk_id, vmsk_id
-   INTEGER :: kindic_agr
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE,  DIMENSION(:,:) ::   spe1ur , spe2vr , spbtr2   !: ???
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE,  DIMENSION(:,:) ::   spe1ur2, spe2vr2, spbtr3   !: ???
+   
+   INTEGER :: tsn_id,tsb_id,tsa_id
+   INTEGER :: un_id, vn_id, ua_id, va_id
+   INTEGER :: e1u_id, e2v_id, sshn_id, gcb_id
+   INTEGER :: trn_id, trb_id, tra_id
+   INTEGER :: unb_id, vnb_id, ub2b_id, vb2b_id
 
    !!----------------------------------------------------------------------
@@ -82,24 +54,6 @@
       !!                ***  FUNCTION agrif_oce_alloc  ***
       !!----------------------------------------------------------------------
-      INTEGER, DIMENSION(2) :: ierr
-      !!----------------------------------------------------------------------
-      ierr(:) = 0
-      !
-      ALLOCATE( fsaht_spu(jpi,jpj), fsaht_spv(jpi,jpj),   &
-         &      fsahm_spt(jpi,jpj), fsahm_spf(jpi,jpj),   &
-         &      tabspongedone_tsn(jpi,jpj),           &
-# if defined key_top         
-         &      tabspongedone_trn(jpi,jpj),           &
-# endif         
-         &      tabspongedone_u  (jpi,jpj),           &
-         &      tabspongedone_v  (jpi,jpj), STAT = ierr(1) )
-
-      ALLOCATE( ubdy_w(jpj), vbdy_w(jpj), hbdy_w(jpj),   &
-         &      ubdy_e(jpj), vbdy_e(jpj), hbdy_e(jpj),   & 
-         &      ubdy_n(jpi), vbdy_n(jpi), hbdy_n(jpi),   & 
-         &      ubdy_s(jpi), vbdy_s(jpi), hbdy_s(jpi), STAT = ierr(2) )
-
-      agrif_oce_alloc = MAXVAL(ierr)
-      !
+      ALLOCATE( spe1ur (jpi,jpj) , spe2vr (jpi,jpj) , spbtr2(jpi,jpj) ,      &
+         &      spe1ur2(jpi,jpj) , spe2vr2(jpi,jpj) , spbtr3(jpi,jpj) , STAT = agrif_oce_alloc ) 
    END FUNCTION agrif_oce_alloc
 
