Project

General

Profile

change vertical coordinate from centimeter to meter

Added by Shizhu Wang about 4 years ago

Hi, I have the CESM2 output as enclosed. (so_Omon_CESM2_ssp126_r1i1p1f1_gn_201501-206412_2015_JAN.nc)
It has the vertical coordinate lev in the unit of centimeter.
How could I change it to meter?
I know there is a divc operator in cdo.
But as far as I know,

cdo divc,100 in.nc out.nc

only changes the data variable rather than the coordinate variable.

Thanks :)
Shizhu


Replies (2)

RE: change vertical coordinate from centimeter to meter - Added by Abhishek Savita over 3 years ago

Hi Sinzhu,
I have the same issue. Have you got the answer.
Can somebody helpuus with the above.
Thanks in advanve
Abhi

RE: change vertical coordinate from centimeter to meter - Added by Ralf Mueller over 3 years ago

hi!

CDO does not allow direct computation on coordinate variables, but only on data variables. you can to this with NCO though:

ncap2 -s 'lev=lev/100' in.nc out.nc
But keep in mind, this changes on only the values, but not the units in terms of meta-data. Therefore you should use ncatted afterwards.

hth
ralf

    (1-2/2)