temp_to_theta2.pro
Function temp_to_theta2, t, p, degC=degC ;Function to convert temperature (K) and pressure (hPa) to potential ;temperature (theta, K) using a reference pressure of 1000~hPa. ;If keyword degC is set then converts input/output from/to Deg C. RoverCp=0.286 p0=1000. IF keyword_set(degC) THEN t=t+273.15 theta=t*(p0/p)^RoverCp IF keyword_set(degC) THEN theta=theta-273.15 return,theta END