!---------------------------------------------------------------------
!     Copyright (C) GFD Dennou Club, 2004. All rights reserved.
!---------------------------------------------------------------------
                                                                 !=begin
!= Subroutine AsselinTimeFilter
!
!   * Developer: SUGIYAMA Ko-ichiro (sugiyama@gfd-dennou.org)
!   * Version: $Id: $
!   * Tag Name: $Name:  $
!   * Change History: 
!
!== Overview
!
!$B%"%C%;%j%s$N;~4V%U%#%k%?(B. leap-frog $B$N8e$KE,MQ(B. 
! 
!== Error Handling
!
!== Bugs
!
!== Note
!
!== Future Plans
!
!
                                                                 !=end

subroutine AsselinTimeFilter(var_a, var_n, var_b)
                                                                 !=begin
  !== Dependency
  use gridset,   only: DimXMin, DimXMax, DimZMin, DimZMax
  use arareset,  only: tfil
                                                                 !=end
  !--- $B0EL[$N7?@k8@6X;_(B
  implicit none
                                                                 !=begin  
  !== Input
  real(8), intent(in)     :: var_a(DimXMin:DimXMax, DimZMin:DimZMax)
  real(8), intent(in)     :: var_b(DimXMin:DimXMax, DimZMin:DimZMax)
                                                                 !=end
                                                                 !=begin
  !== In/Out
  real(8), intent(inout)  :: var_n(DimXMin:DimXMax, DimZMin:DimZMax)
                                                                 !=end

  real(8) :: vartfil_n(DimXMin:DimXMax, DimZMin:DimZMax)
  

  !--- $B;~4V%U%#%k%?(B
  vartfil_n = var_n + tfil * ( var_b  - 2.0d0 * var_n + var_a ) 

  !--- $B%U%#%k%?$r$+$1$?JQ?t$r=PNO(B
  var_n = vartfil_n
  
end subroutine AsselinTimeFilter
