Project

General

Profile

potential temperature

Added by ch ch01 over 10 years ago

Hallo CDO

what kind a command that i can use to calculate potential temperature
if i have temperature data (time,level,lat,lon).

Thank you


Replies (14)

RE: potential temperature - Added by Matt Thompson over 10 years ago

I believe you'll also need the pressure to calculation potential temperature. Do you have a way to calculate the pressure from the level?

RE: potential temperature - Added by ch ch01 over 10 years ago

I think we can use the pressure from the level,
but I have no idea how to deal it with cdo,
do you have any example script to calculate potential temperature from the T datasets in isobaric level?
Thanks

RE: potential temperature - Added by Matt Thompson over 10 years ago

Let's say you know how to convert from level to pressure, then you should be able to convert temp to potential temp (http://glossary.ametsoc.org/wiki/Potential_temperature):

theta=temp*(press0/press)^(2.0/7.0)

where press0 is your standard pressure and 2/7 is the Poisson constant. (NB: I'm a code monkey, not an atmospheric scientist, so I'm just echoing that page.)

You can use the "expr" operator to do this calculation in CDO:

https://code.zmaw.de/embedded/cdo/1.6.1/cdo.html#x1-2270002.7.1

RE: potential temperature - Added by ch ch01 over 10 years ago

I still do not find a correct way to do this using "expr"
from my data T(time,lev,lat,lon), maybe the developer could share me
a suggestion to handle this?/

Thank you.
Xi..

RE: potential temperature - Added by Jaison-Thomas Ambadan over 10 years ago

there are two experimental undocumented operators for calculating the pressure from hybrid vertical co-ordinates: "pressure_hl" will compute the half-level pressure and "pressure_fl" that for the full level (provided CDO recognize the hybrid coefficients)

so you could first compute the pressure like "cdo -pressure_fl ifile ofile" and then use the pressure variable from the "ofile" in the "expr" operator for calculating the potential temperature as Matt suggested

Cheers,
J

RE: potential temperature - Added by Haile Xue almost 4 years ago

Hi

Is there a command that could calculate the potential temperature for the ERA5 on the model level, as I already have the geopotential height and temperature but have no pressure.

Best,
Haile

RE: potential temperature - Added by Ralf Mueller almost 4 years ago

hi!

There is no such command, soory. but with the given formular you can use CDO to compute it, e.g. with the 'expr' operators. I think you need the pressure in addition...

cheers
ralf

RE: potential temperature - Added by Guilherme Martins almost 4 years ago

What dou you thin?

7.19 Calculando a Temperatura Potencial, page 80.

Available at:

https://guilherme.readthedocs.io/en/latest/pages/tutoriais/cdo.html

==> Download alternativo para o tutorial acima. Versão sendo atualizada constantemente

Guilherme.

RE: potential temperature - Added by Ralf Mueller almost 4 years ago

hi Guilherme!

this looks VERY good (although I don't understand Portuguese)! I updated the link on the CDO main page.

cheers
ralf

RE: potential temperature - Added by Haile Xue almost 4 years ago

Hi Guiherme and Ralf

I have calculated potential temperature by using pressure (due to lnps am and bm) ant T with a python script

Best wishes
Haile

RE: potential temperature - Added by Ralf Mueller almost 4 years ago

hi Haile!

good to hear that you could solve it. In case you want to check the expr operator, this post might help.

cheers
ralf

RE: potential temperature - Added by Haile Xue almost 4 years ago

Hi Ralf,

Thanks, expr seems to be a very useful parameter

cheers,
Haile

RE: potential temperature - Added by Guilherme Martins almost 4 years ago

CDO is very powerful, you have no idea of ​​the things that can be done with this fantastic tool. It is possible to use Python and CDO together.

Good luck!

RE: potential temperature - Added by Guilherme Martins almost 4 years ago

Ralf,

Thanks for updating the link.

Guilherme.

    (1-14/14)