[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #NVU-263991]: Error when calculating temperature tendency



> Hi,
> 
> I'm trying to calculate this:
> 
> def TEST_LHomega(t, V, omega, theta, theta1, theta2):
> T_over_theta = quo(t, theta)
> dtheta = sub(theta1, theta2)
> p1 = extractPressureFromNWPGrid(theta1)
> p2 = extractPressureFromNWPGrid(theta2)
> dp = sub(p1, p2)
> dthetadp = quo(dtheta,dp)
> 
> return mul(mul(T_over_theta, dthetadp),omega)
> 
> where: t=temperature (K), theta = potential temperature (K), V=true wind
> vector (m/s), omega=vertical pressure velocity (Pa/s).
> 
> The final units should be K/s but I'm getting K*m/(kg*s^2), it seems that
> the units from the omega field are not reported correctly. How can I fix it?
> 
> Thank you,
> 
> Paula
> 

If only the unit of omega field incorrected, you can use the newUnit(..) to set 
the
correct unit. Example: newUnit(grid, "topo", "m")

Yuan

Ticket Details
===================
Ticket ID: NVU-263991
Department: Support IDV
Priority: High
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.