!c Description: 
!c   Z $BJ}8~$N1?F0J}Dx<0$K$*$$$FD9$$;~4V%9%F%C%W$GI>2A$9$k9`$N7W;;(B
!c
!c Current Code Owner: 
!c   sugiyama@gfd-dennou.org
!c
!c Copyright (C) SUGIYAMA Ko-ichiro, 2004, All rights reserved

subroutine Buoyancy(ss_VTheta_B, sf_Buoy_B)

  !--- $B%b%8%e!<%k$NFI$_9~$_(B
  use gridset,  only: DimXMin, DimXMax, DimZMin, DimZMax, sf_Bc
  use basicprm, only: ss_VthetaBasicZ
  use physprm,  only: Grav
  use if_avr,   only: sf_avr_fs, sf_avr_ss
  use if_boundary
  
  !--- $B0EL[$N7?@k8@6X;_(B
  implicit none
  
  !--- $BF~=PNOJQ?t(B
  real(8), intent(in)     :: ss_Vtheta_B(DimXMin:DimXMax, DimZMin:DimZMax)
  real(8), intent(out)    :: sf_Buoy_B(DimXMin:DimXMax, DimZMin:DimZMax)
  

  !--- $BIbNO9`(B 
  sf_Buoy_B = &
       & Grav * sf_avr_ss( ss_Vtheta_B ) / sf_avr_ss( ss_VthetaBasicZ )
!       & 0.0d0

  !--- $B6-3&>r7o(B
  call boundary(sf_Bc, sf_Buoy_B)
  
end subroutine Buoyancy
