      subroutine u3dbc_tile (Istr,Iend,Jstr,Jend,grad)
      use Agrif_Types, only : Agrif_tabvars

      use AGRIF_Util

#include "Param_BeforeCall_u3dbc_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      real, dimension(Istr-2:Iend+2,Jstr-2:Jend+2) :: grad

                     
                                    
                                             
      if (AGRIF_Root()) then
        call u3dbc_parent_tile (Istr,Iend,Jstr,Jend,grad)
      else
        call u3dbc_child_tile (Istr,Iend,Jstr,Jend,grad)
      endif
      return
      end
      subroutine u3dbc_parent_tile (Istr,Iend,Jstr,Jend,grad)      


      use Agrif_Util
#include "Param_BeforeCall_u3dbc_parent_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      real, dimension(Istr-2:Iend+2,Jstr-2:Jend+2) :: grad
      

        call Sub_Loop_u3dbc_parent_tile(Istr,Iend,Jstr,Jend,grad, Agrif_
     &tabvars_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif_tabvars_i
     &(13)%iarray0, Agrif_tabvars_i(2)%iarray0, Agrif_tabvars(167)%array
     &2, Agrif_tabvars(179)%array2, Agrif_tabvars(191)%array2, Agrif_tab
     &vars(79)%array2, Agrif_tabvars(203)%array2, Agrif_tabvars_i(155)%i
     &array0, Agrif_tabvars(80)%array2, Agrif_tabvars_i(153)%iarray0, Ag
     &rif_tabvars(150)%array4, Agrif_tabvars_r(34)%array0, Agrif_tabvars
     &_r(33)%array0, Agrif_tabvars_r(3)%array0, Agrif_tabvars_l(13)%larr
     &ay0, Agrif_tabvars_l(14)%larray0, Agrif_tabvars_l(11)%larray0, Agr
     &if_tabvars_l(12)%larray0)

      end


#include "Sub_Loop_u3dbc_parent_tile.h"
      subroutine u3dbc_child_tile (Istr,Iend,Jstr,Jend,grad)      


      use Agrif_Util
#include "Param_BeforeCall_u3dbc_child_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      real, dimension(Istr-2:Iend+2,Jstr-2:Jend+2) :: grad
      

        call Sub_Loop_u3dbc_child_tile(Istr,Iend,Jstr,Jend,grad, Agrif_t
     &abvars_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif_tabvars_i(
     &13)%iarray0, Agrif_tabvars_i(2)%iarray0, Agrif_tabvars(167)%array2
     &, Agrif_tabvars(179)%array2, Agrif_tabvars(191)%array2, Agrif_tabv
     &ars(79)%array2, Agrif_tabvars(203)%array2, Agrif_tabvars_i(155)%ia
     &rray0, Agrif_tabvars(150)%array4, Agrif_tabvars_r(34)%array0, Agri
     &f_tabvars_r(33)%array0, Agrif_tabvars_r(3)%array0, Agrif_tabvars_l
     &(13)%larray0, Agrif_tabvars_l(14)%larray0, Agrif_tabvars_l(11)%lar
     &ray0, Agrif_tabvars_l(12)%larray0)

      end


#include "Sub_Loop_u3dbc_child_tile.h"
