!---------------------------------------------------------------------
!     Copyright (C) GFD Dennou Club, 2004. All rights reserved.
!---------------------------------------------------------------------
                                                                 !=begin
!= Subroutine Integral
!
!   * Developer: SUGIYAMA Ko-ichiro (sugiyama@gfd-dennou.org)
!   * Version: $Id: integral.f90,v 1.2 2005/01/28 12:41:21 sugiyama Exp $ 
!   * Tag Name: $Name:  $
!   * Change History: 
!
!== Overview 
!
!長い時間ステップ TimeLong による数値積分. 
!
!== Error Handling
!
!== Known Bugs
!
!== Note
!
!傾きは別途評価されている必要がある. 
!
!== Future Plans
!
                                                                 !=end

subroutine Integral(Tendency_n, DelTime, Var_n, Var_a)
                                                                 !=begin
  !== Dependency
  use gridset,   only: DimXMin, DimXMax, DimZMin, DimZMax
                                                                 !=end  
  !--- 暗黙の型宣言禁止
  implicit none
                                                                 !=begin
  !== Input
  real(8), intent(in)     :: Tendency_n(DimXMin:DimXMax, DimZMin:DimZMax)
  real(8), intent(in)     :: Var_n(DimXMin:DimXMax, DimZMin:DimZMax)
  real(8), intent(in)     :: DelTime

  !== Output
  real(8), intent(out)    :: var_a(DimXMin:DimXMax, DimZMin:DimZMax)
                                                                 !=end
  
  !--- 積分
  var_a = var_n + DelTime * Tendency_n
  
end subroutine Integral
