      subroutine u2dbc_interp_tile(Istr,Iend,Jstr,Jend
     &                ,DU_west4, DU_east4, DU_west6, DU_east6
     &                ,DU_south4,DU_north4,DU_south6,DU_north6)      

      use AGRIF_Util
#include "Param_BeforeCall_u2dbc_interp_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      real, dimension(-1: Agrif_tabvars_i(4)%iarray0+2+ Agrif_tabvars_i(
     &14)%iarray0) :: DU_west6
      real, dimension(-1: Agrif_tabvars_i(4)%iarray0+2+ Agrif_tabvars_i(
     &14)%iarray0) :: DU_east6
      real, dimension(-1: Agrif_tabvars_i(4)%iarray0+2+ Agrif_tabvars_i(
     &14)%iarray0,0:NWEIGHT) :: DU_west4
      real, dimension(-1: Agrif_tabvars_i(4)%iarray0+2+ Agrif_tabvars_i(
     &14)%iarray0,0:NWEIGHT) :: DU_east4
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0) :: DU_south6
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0) :: DU_north6
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0,0:NWEIGHT) :: DU_south4
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0,0:NWEIGHT) :: DU_north4
      

        call Sub_Loop_u2dbc_interp_tile(Istr,Iend,Jstr,Jend,DU_west4,DU_
     &east4,DU_west6,DU_east6,DU_south4,DU_north4,DU_south6,DU_north6, A
     &grif_tabvars_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif_tabv
     &ars_i(13)%iarray0, Agrif_tabvars_i(2)%iarray0, Agrif_tabvars(171)%
     &array1, Agrif_tabvars(183)%array1, Agrif_tabvars(195)%array1, Agri
     &f_tabvars(99)%array2, Agrif_tabvars(115)%array2, Agrif_tabvars_i(1
     &50)%iarray0, Agrif_tabvars(75)%array3, Agrif_tabvars(211)%array2, 
     &Agrif_tabvars(92)%array2, Agrif_tabvars(207)%array1, Agrif_tabvars
     &_r(4)%array0, Agrif_tabvars(79)%array2, Agrif_tabvars_i(161)%iarra
     &y0, Agrif_tabvars(44)%array3, Agrif_tabvars(60)%array2, Agrif_tabv
     &ars_i(238)%iarray0, Agrif_tabvars_i(213)%iarray0, Agrif_tabvars_i(
     &216)%iarray0, Agrif_tabvars(53)%array2, Agrif_tabvars_i(239)%iarra
     &y0, Agrif_tabvars_i(152)%iarray0, Agrif_tabvars_l(13)%larray0, Agr
     &if_tabvars_l(14)%larray0, Agrif_tabvars_l(11)%larray0, Agrif_tabva
     &rs_l(12)%larray0, Agrif_tabvars_i(8)%iarray0, Agrif_tabvars_i(7)%i
     &array0)

      end


#include "Sub_Loop_u2dbc_interp_tile.h"
      subroutine u2Dinterp(tabres,i1,i2,j1,j2,before)      


      use Agrif_Util
#include "Param_BeforeCall_u2Dinterp.h"
      integer(4) :: i1
      integer(4) :: i2
      integer(4) :: j1
      integer(4) :: j2
      real, dimension(i1:i2,j1:j2) :: tabres
      logical :: before
      

        call Sub_Loop_u2Dinterp(tabres,i1,i2,j1,j2,before, Agrif_tabvars
     &_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif_tabvars_i(13)%ia
     &rray0, Agrif_tabvars_i(2)%iarray0, Agrif_tabvars(53)%array2, Agrif
     &_tabvars_i(216)%iarray0, Agrif_tabvars(60)%array2, Agrif_tabvars_i
     &(150)%iarray0, Agrif_tabvars(74)%array3, Agrif_tabvars(99)%array2,
     & Agrif_tabvars_i(148)%iarray0, Agrif_tabvars(75)%array3, Agrif_tab
     &vars(115)%array2, Agrif_tabvars_i(161)%iarray0, Agrif_tabvars(22)%
     &array2, Agrif_tabvars_i(152)%iarray0, Agrif_tabvars_i(8)%iarray0, 
     &Agrif_tabvars_i(7)%iarray0)

      end


#include "Sub_Loop_u2Dinterp.h"
      subroutine v2dbc_interp_tile(Istr,Iend,Jstr,Jend
     &                         ,DV_west4, DV_east4, DV_west6, DV_east6
     &                         ,DV_south4,DV_north4,DV_south6,DV_north6)      

      use AGRIF_Util
#include "Param_BeforeCall_v2dbc_interp_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      real, dimension(-1: Agrif_tabvars_i(4)%iarray0+2+ Agrif_tabvars_i(
     &14)%iarray0) :: DV_west6
      real, dimension(-1: Agrif_tabvars_i(4)%iarray0+2+ Agrif_tabvars_i(
     &14)%iarray0) :: DV_east6
      real, dimension(-1: Agrif_tabvars_i(4)%iarray0+2+ Agrif_tabvars_i(
     &14)%iarray0,0:NWEIGHT) :: DV_west4
      real, dimension(-1: Agrif_tabvars_i(4)%iarray0+2+ Agrif_tabvars_i(
     &14)%iarray0,0:NWEIGHT) :: DV_east4
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0) :: DV_south6
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0) :: DV_north6
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0,0:NWEIGHT) :: DV_south4
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0,0:NWEIGHT) :: DV_north4
      

        call Sub_Loop_v2dbc_interp_tile(Istr,Iend,Jstr,Jend,DV_west4,DV_
     &east4,DV_west6,DV_east6,DV_south4,DV_north4,DV_south6,DV_north6, A
     &grif_tabvars_i(13)%iarray0, Agrif_tabvars_i(2)%iarray0, Agrif_tabv
     &ars_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif_tabvars(205)%
     &array1, Agrif_tabvars(193)%array1, Agrif_tabvars(169)%array1, Agri
     &f_tabvars(98)%array2, Agrif_tabvars(115)%array2, Agrif_tabvars_i(1
     &50)%iarray0, Agrif_tabvars(75)%array3, Agrif_tabvars(211)%array2, 
     &Agrif_tabvars(91)%array2, Agrif_tabvars(181)%array1, Agrif_tabvars
     &_r(4)%array0, Agrif_tabvars(78)%array2, Agrif_tabvars_i(161)%iarra
     &y0, Agrif_tabvars(43)%array3, Agrif_tabvars(60)%array2, Agrif_tabv
     &ars_i(236)%iarray0, Agrif_tabvars_i(212)%iarray0, Agrif_tabvars_i(
     &216)%iarray0, Agrif_tabvars(52)%array2, Agrif_tabvars_i(237)%iarra
     &y0, Agrif_tabvars_i(152)%iarray0, Agrif_tabvars_l(13)%larray0, Agr
     &if_tabvars_l(14)%larray0, Agrif_tabvars_l(11)%larray0, Agrif_tabva
     &rs_l(12)%larray0, Agrif_tabvars_i(8)%iarray0, Agrif_tabvars_i(7)%i
     &array0)

      end


#include "Sub_Loop_v2dbc_interp_tile.h"
      subroutine v2Dinterp(tabres,i1,i2,j1,j2,before)      


      use Agrif_Util
#include "Param_BeforeCall_v2Dinterp.h"
      integer(4) :: i1
      integer(4) :: i2
      integer(4) :: j1
      integer(4) :: j2
      real, dimension(i1:i2,j1:j2) :: tabres
      logical :: before
      

        call Sub_Loop_v2Dinterp(tabres,i1,i2,j1,j2,before, Agrif_tabvars
     &_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif_tabvars_i(13)%ia
     &rray0, Agrif_tabvars_i(2)%iarray0, Agrif_tabvars(52)%array2, Agrif
     &_tabvars_i(216)%iarray0, Agrif_tabvars(60)%array2, Agrif_tabvars_i
     &(150)%iarray0, Agrif_tabvars(73)%array3, Agrif_tabvars(98)%array2,
     & Agrif_tabvars_i(148)%iarray0, Agrif_tabvars(75)%array3, Agrif_tab
     &vars(115)%array2, Agrif_tabvars_i(161)%iarray0, Agrif_tabvars(22)%
     &array2, Agrif_tabvars_i(152)%iarray0, Agrif_tabvars_i(8)%iarray0, 
     &Agrif_tabvars_i(7)%iarray0)

      end


#include "Sub_Loop_v2Dinterp.h"
      subroutine copy1d(tab1,tab2,cff,isize)
      use Agrif_Types, only : Agrif_tabvars


#include "Param_BeforeCall_copy1d.h"
      integer(4) :: isize
      real :: cff
      real, dimension(1:isize) :: tab1
      real, dimension(1:isize) :: tab2

                           
      integer(4) :: i
                     
                                         
      do i=1,isize
        tab1(i)=tab1(i)+cff*tab2(i)
      enddo
      return
      end subroutine copy1d
      subroutine checksizeinterp(isize)      


      use Agrif_Util
#include "Param_BeforeCall_checksizeinterp.h"
      integer(4) :: isize
      

        call Sub_Loop_checksizeinterp(isize, Agrif_tabvars_i(161)%iarray
     &0, Agrif_tabvars(22)%array2, Agrif_tabvars_i(8)%iarray0, Agrif_tab
     &vars_i(7)%iarray0, Agrif_tabvars_i(14)%iarray0, Agrif_tabvars_i(4)
     &%iarray0, Agrif_tabvars_i(13)%iarray0, Agrif_tabvars_i(2)%iarray0)

      end


#include "Sub_Loop_checksizeinterp.h"
      subroutine zetabc_interp_tile(Istr,Iend,Jstr,Jend
     &                 ,Zeta_west4, Zeta_east4, Zeta_west6, Zeta_east6
     &                 ,Zeta_south4,Zeta_north4,Zeta_south6,Zeta_north6)      

      use AGRIF_Util
#include "Param_BeforeCall_zetabc_interp_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      real, dimension(Istr-1:Istr,-1: Agrif_tabvars_i(4)%iarray0+2+ Agri
     &f_tabvars_i(14)%iarray0) :: Zeta_west6
      real, dimension(Iend:Iend+1,-1: Agrif_tabvars_i(4)%iarray0+2+ Agri
     &f_tabvars_i(14)%iarray0) :: Zeta_east6
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0,Jstr-1:Jstr) :: Zeta_south6
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0,Jend:Jend+1) :: Zeta_north6
      real, dimension(Istr-1:Istr,-1: Agrif_tabvars_i(4)%iarray0+2+ Agri
     &f_tabvars_i(14)%iarray0,0:NWEIGHT) :: Zeta_west4
      real, dimension(Iend:Iend+1,-1: Agrif_tabvars_i(4)%iarray0+2+ Agri
     &f_tabvars_i(14)%iarray0,0:NWEIGHT) :: Zeta_east4
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0,Jstr-1:Jstr,0:NWEIGHT) :: Zeta_south4
      real, dimension(-1: Agrif_tabvars_i(2)%iarray0+2+ Agrif_tabvars_i(
     &13)%iarray0,Jend:Jend+1,0:NWEIGHT) :: Zeta_north4
      

        call Sub_Loop_zetabc_interp_tile(Istr,Iend,Jstr,Jend,Zeta_west4,
     &Zeta_east4,Zeta_west6,Zeta_east6,Zeta_south4,Zeta_north4,Zeta_sout
     &h6,Zeta_north6, Agrif_tabvars_i(13)%iarray0, Agrif_tabvars_i(2)%ia
     &rray0, Agrif_tabvars_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Ag
     &rif_tabvars(197)%array1, Agrif_tabvars(209)%array1, Agrif_tabvars(
     &173)%array1, Agrif_tabvars(185)%array1, Agrif_tabvars(211)%array2,
     & Agrif_tabvars_i(161)%iarray0, Agrif_tabvars(45)%array3, Agrif_tab
     &vars(60)%array2, Agrif_tabvars_i(240)%iarray0, Agrif_tabvars_i(214
     &)%iarray0, Agrif_tabvars(54)%array2, Agrif_tabvars_i(241)%iarray0,
     & Agrif_tabvars_i(152)%iarray0, Agrif_tabvars_l(13)%larray0, Agrif_
     &tabvars_l(14)%larray0, Agrif_tabvars_l(11)%larray0, Agrif_tabvars_
     &l(12)%larray0, Agrif_tabvars_i(8)%iarray0, Agrif_tabvars_i(7)%iarr
     &ay0)

      end


#include "Sub_Loop_zetabc_interp_tile.h"
      subroutine zetainterp(tabres,i1,i2,j1,j2,before)      


      use Agrif_Util
#include "Param_BeforeCall_zetainterp.h"
      integer(4) :: i1
      integer(4) :: i2
      integer(4) :: j1
      integer(4) :: j2
      real, dimension(i1:i2,j1:j2) :: tabres
      logical :: before
      

        call Sub_Loop_zetainterp(tabres,i1,i2,j1,j2,before, Agrif_tabvar
     &s_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif_tabvars_i(13)%i
     &array0, Agrif_tabvars_i(2)%iarray0, Agrif_tabvars(54)%array2, Agri
     &f_tabvars(60)%array2, Agrif_tabvars_i(150)%iarray0, Agrif_tabvars_
     &i(148)%iarray0, Agrif_tabvars(75)%array3, Agrif_tabvars_i(161)%iar
     &ray0, Agrif_tabvars(22)%array2, Agrif_tabvars_i(152)%iarray0, Agri
     &f_tabvars_i(8)%iarray0, Agrif_tabvars_i(7)%iarray0)

      end


#include "Sub_Loop_zetainterp.h"
