Project

General

Profile

Treatment of hybrid levels from CESM

Added by Oskar Landgren about 7 years ago

Dear cdo team,
I just noticed that with later versions (from 1.7.0 I think) there are some changes in handling of hybrid sigma-pressure coordinates.
I have NetCDF files from the CESM Large Ensemble and want to extract some data and convert to GRIB but run into a problem with the hybrid coefficients.
I have attached a sample file T_0.nc (containing only one time step to save space).
Any manipulation or even just time selection using cdo, such as
cdo -O -selyear,1990 T_0.nc tmp_172.nc # (using cdo 1.7.2)
will change the metadata for the hybrid levels.
From CESM (my T_0.nc example file) the parameters are hyam, hyai, hybm, hybi etc.
while after processing with cdo they are ap, ap_bnds, b, b_bnds etc.
This was not the case with cdo 1.6.9 (see attached file tmp_cdo169.nc), where the old variables are left untouched.

If I am not mistaken I think that the ap and ap_bnds variables should have been multiplied with the value of variable P0 (in the case of my file it is 100000 but I suppose it may vary with different model setups). Right now it seems the values are just copied from hyam and hyai.
The hybm and hybi (b and b_bnds) parameters seem to be treated correctly though.
The metadata from the original file is a little confusing, and I do not know if it follows conventions (CF?) so it is possible that that is the reason cdo does not manage to treat it correctly.
Here is a short summary of how the levels are defined in CESM:
http://www.cesm.ucar.edu/models/atm-cam/docs/usersguide/node25.html

On a side note, is there any flag or environment variable to make cdo (1.7.0 or newer I guess) treat these variables the same way as in the old versions?
(I tried export IGNORE_ATT_COORDINATES=1, but it does not make any difference here, so I assume it only impacts horizontal coordinates.)

Finally, thank you for the great tool that cdo is! I am using it a lot and it saves a tremendous amount of time! The manual and wiki also usually makes it very easy to find examples and solutions to problems!

tmp_cdo172.nc (6.43 MB) tmp_cdo172.nc Treated with cdo 1.7.2
tmp_cdo169.nc (10.4 MB) tmp_cdo169.nc Treated with cdo 1.6.9
T_0.nc (3.67 MB) T_0.nc Original file from CESM LENS (first timestep only)