!c Description:
!c  温度から希ガスの比熱, 比熱の積分値, 比熱/温度の積分値を求める
!c
!c Current Code Owner: 
!c   sugiyama@gfd-dennou.org
!c
!c Histry: 
!c   Version    Date          Comment
!c   -------    ----------    --------
!c   1.0        2003-02-05    作成
!c
!c Copyright (C) SUGIYAMA Ko-ichiro, 2003, All rights reserved

module interface_cp_noblegas
  interface

     subroutine Cp_NobleGas(temp, cp, cp_int, cp_dvt_int)
       real(8), intent(in)            :: temp     !温度
       real(8), intent(out), optional :: cp       !比熱
       real(8), intent(out), optional :: cp_int   !比熱の積分 
       real(8), intent(out), optional :: cp_dvt_int  !比熱/温度の積分
     end subroutine Cp_NobleGas

  end interface
end module interface_cp_noblegas

subroutine Cp_NobleGas(temp, cp, cp_int, cp_dvt_int)
  use prm_phys, only: temp_ref
  implicit none
  real(8), intent(in)            :: temp     !温度
  real(8), intent(out), optional :: cp       !比熱
  real(8), intent(out), optional :: cp_int   !比熱の積分 
  real(8), intent(out), optional :: cp_dvt_int  !比熱/温度の積分
  
  !比熱
  if(present(cp)) cp = 20.786d0
 
  !比熱の積分
  if(present(cp_int)) cp_int = 20.786D0 * (temp - temp_ref)

  !比熱/温度の積分
  if(present(cp_dvt_int)) cp_dvt_int = 20.786D0 * dlog(temp / temp_ref)
  

end subroutine Cp_NobleGas
