subroutine grid_step(grid,dt,dr,nr,gflb,gfrb,level,p)
!----------------------------------------------------------------
! this is a wrapper routine to user supplied update functions
! 
!NOTE: user routines in this context require explicit interface
!
!-----------------------------------------------------------------

use types
use coord_param
use amr

type(GF3TL), pointer :: grid
real(SP)             :: dt
real(SP), dimension(3) :: dr
integer(I4B), dimension(3):: nr,gflb,gfrb
integer(I4B) :: loopvar,level
type(ADAPTIVE_MESH), pointer    :: p

integer(I4B) igf,it
real(SP) newt

!INTERFACE
! subroutine update(...)
! ...
! end subroutine update
! subroutine boundaries(...)
! ...
! end subroutine boundaries
! subroutine impose_fine_boundaries(...)
! ...
! end subroutine impose_fine_boundaries
!END INTERFACE

write(6,*) "WARNING: DUMMY_gridstep.f90 is used"

!typically this subroutine will look like that:

!      shift time levels: 1 is the most advanced
!      ===========================================

!DO igf=1,grid%n_gfcn
!   IF(grid%gfcn(igf)%n_t.eq.1) cycle
!   DO it=grid%gfcn(igf)%n_t,2,-1
!     grid%gfcn(igf)%tlev(it)%data=grid%gfcn(igf)%tlev(it-1)%data
!     grid%gfcn(igf)%t(it)=grid%gfcn(igf)%t(it-1)
!   ENDDO
!ENDDO

!t=grid%gfcn(1)%t(1) 
!newt=grid%gfcn(1)%t(1)+dt

!DO igf=1,grid%n_gfcn
!   grid%gfcn(igf)%t(1)=newt
!ENDDO



!      driver for updates
!      =====================

!call update(grid%gfcn(phi)%tlev(1)%data(:,:,:),  &
!            grid%gfcn(phit)%tlev(1)%data(:,:,:), &
!            grid%gfcn(phix)%tlev(1)%data(:,:,:), &
!            grid%gfcn(phiy)%tlev(1)%data(:,:,:), &
!            grid%gfcn(phiz)%tlev(1)%data(:,:,:), &
!            grid%gfcn(phi)%tlev(2)%data(:,:,:),  &
!            grid%gfcn(phit)%tlev(2)%data(:,:,:), &
!            grid%gfcn(phix)%tlev(2)%data(:,:,:), &
!            grid%gfcn(phiy)%tlev(2)%data(:,:,:), &
!            grid%gfcn(phiz)%tlev(2)%data(:,:,:), &
!            dt,dr(1),dr(2),dr(3),nr(1),nr(2),nr(3))
! (or more realistically, the update routine will be splitted into
!  several partial updates)

!      set boundaries
!      ================   

!if(level .eq. 1) then
!  ENFORCE BASE GRID BOUNDARY CONDITIONS
!   do loopvar=phi,phiz
!      call boundaries(grid%gfcn(loopvar)%tlev(1)%data(:,:,:),& 
!                nr(1),nr(2),nr(3))
!   enddo
!else
!  ENFORCE FINE GRID BOUNDARY CONDITIONS
!   call impose_fine_boundaries(p)
!endif


return
end


