Project

General

Profile

Interpolation of data on different levels

Added by James King over 6 years ago

Hi all!

I'm looking to subtract one dataset from another - both datasets are vertical cross-sections through an atmospheric field. I'm looking for a way to interpolate the data onto the same vertical resolution. I know that cdo intlevel is intended for this, but the problem is that the data have different units for vertical levels - one file is in hPa (1000, 925, 850...) and the other is in Pa (100000, 92500, 80000...). I can't use cdo divc,100 on the files in Pa because if obviously divides the data values as well as the z axis units. Is there a way I can convert the z axis from Pa to hPa?

Cheers,

James


Replies (3)

RE: Interpolation of data on different levels - Added by Karin Meier-Fleischer over 6 years ago

You can overwrite the level description with the CDO operator setzaxis. For example your data has 15 pressure level in Pa:

85000 70000 60000 50000 40000 30000 25000 20000 15000 10000 7000 5000 3000 2000 1000

Create a file which contains the new zaxis description, e.g. zaxis.txt:

zaxistype = pressure
size      = 15
name      = lev
longname  = pressure
units     = hPa
levels    = 850 700 600 500 400 300 250 200 150 100 70 50 30 20 10
cdo setzaxis,zaxis.txt infile outfile

-Karin

RE: Interpolation of data on different levels - Added by James King over 6 years ago

Thank you Karin! Will give this a try.

RE: Interpolation of data on different levels - Added by James King over 6 years ago

Additionally, the data have different Z axis sizes. Can this command change the size of the z axis?

    (1-3/3)