!=======================================
! 2D cumulus model - kaminari
!  - subroutine prss2pi
! 
! Author    : TAKAHASHI Koko
! Date      : 2003/12/09  $B:G=*99?7(B
!             2003/11/01  $B?75,:n@.(B
! Note      : $B05NO$+$iL5<!8505NO$X$NJQ49(B
! 
!=======================================
!---------------------------------------
subroutine prss2pi(i,k,im,km,prss_sfc,rd,cp,prss,pi)

  implicit none

  integer(8), intent(in) :: i, k
  integer(8), intent(in) :: im, km

  real(8), intent(in) :: prss_sfc, rd, cp
  real(8), intent(in) :: prss(-2:im+2,-2:km+2)

  real(8), intent(out) :: pi(-2:im+2,-2:km+2)


  pi(i,k) = (prss(i,k)/prss_sfc)**(rd/cp)

end subroutine prss2pi
