def potential_temperature(T,p):
theta = T*(ps/p)**kappa<EOL>return theta<EOL>
Compute potential temperature for an air parcel.

    Input:  T is temperature in Kelvin
            p is pressure in mb or hPa
    Output: potential temperature in Kelvin.