!---------------------------------------------------------------------
!     Copyright (C) GFD Dennou Club, 2004. All rights reserved.
!---------------------------------------------------------------------
                                                                 !=begin
!= Subroutine NumDiffusionVelZ
!
!   * Developer: SUGIYAMA Ko-ichiro (sugiyama@gfd-dennou.org)
!   * Version: $Id$ 
!   * Tag Name: $Name:  $
!   * Change History: 
!
!== Overview 
!
!数値粘性項を評価する. 
!
!== Error Handling
!
!== Known Bugs
!
!== Note
!
!粘性係数は arareprm 中で, \nu = \frac{\alpha \DeltaX}{\Delta t} で決める. 
!\alpha < 1/8 である. 
!CReSS マニュアル参照. 
!
!== Future Plans
!
                                                                 !=end

subroutine NumDiffusionVelZ(sf_VelZ_n, sf_NumDiffVelZ_n)
                                                                 !=begin  
  !== Dependency 
  use gridset,  only: DimXMin, DimXMax, DimZMin, DimZMax
  use differentiate,  only: sf_dx_ff, ff_dx_sf, sf_dz_ss, ss_dz_sf
  use arareprm, only: Cm, NuH, NuV
                                                                 !=end  
  !--- 暗黙の型宣言禁止
  implicit none
                                                                 !=begin    
  !== Input 
  real(8), intent(in) :: sf_VelZ_n(DimXMin:DimXMax, DimZMin:DimZMax) !速度 w
  
  !== Output
  real(8), intent(out) :: sf_NumDiffVelZ_n(DimXMin:DimXMax, DimZMin:DimZMax) !s数値粘性項
                                                                 !=end

  !--- 拡散項 
  sf_NumDiffVelZ_n = &
       &   NuH * ( sf_dx_ff( ff_dx_sf( sf_VelZ_n) ) ) &
       & + NuV * ( sf_dz_ss( ss_dz_sf( sf_VelZ_n) ) ) 
  
end subroutine NumDiffusionVelZ
