program pothom
 implicit none
 real :: teta, p, p0, R, cp, t

 R=8.314  ! J/molK
 cp=1004. ! J/kgK
 p0=1000. ! hPa
 p=500.   ! hPa
 t=263.   ! K

 teta=t*(p0/p)**(R/cp)

 write(*,*) teta, 'K (potencialis homerseklet)'

end program pothom
!/Niki
