Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

How to convert sigma-levels to geometric height?

jdorrington

Josh Dorrington
New Member
Hi,

I am analysing some CESM2 atmospheric temperature data, stored on sigma levels. In order to ultimately compute lapse rate, I am trying to interpolate the data to geometric height.
I have tried the following procedure:

#relates ilev to lev for purposes of vertical interpolation. ncatted comes from NCO
ncatted -a bounds,lev,c,c,"ilev" test_3d_T.nc

#attempt to use cdo to go from model levels to height
cdo -ml2hl,1000,2000,3000 -selname,T test_3d_T.nc test_height_data.nc

This fails with the error
cdo ml2hl (Abort): surface_air_pressure not found!

If I don't try to select a variable first, I get a different error:


cdo -ml2hl,1000,2000,3000 test_3d_T.nc test_height_data.nc

Warning (cdfCheckVars): Unsupported data type (char/string), skipped variable date_written!
Warning (cdfCheckVars): Unsupported data type (char/string), skipped variable time_written!
cdo ml2hl: This operator requires all variables on the same horizontal grid.
cdo ml2hl: Horizontal grids found:
cdo ml2hl: grid=1 type=lonlat points=192
cdo ml2hl: grid=2 type=generic points=1
cdo ml2hl: grid=3 type=lonlat points=55296

cdo ml2hl (Abort): The input stream contains variables on different horizontal grids!

Any help would be much appreciated, I'm tearing my hair out with this one!!
 
Top