Project

General

Profile

set lower and upper borderl for level type 112 field

Added by Frank Lunkeit almost 11 years ago

Hallo,
I would like to set the upper and the lower border for a level type 112 (layer between to depths below surface) field (grib1 data set) using cdo. unfortunately, setlevel appears not to work in this case (or I do not use it in an appropriate way)...

any idea?

Beste!
Frank


Replies (4)

RE: set lower and upper borderl for level type 112 field - Added by Uwe Schulzweida almost 11 years ago

Hi Frank,

You have to set/overwrite the hole description of the vertical structure of the variable with the CDO operator setzaxis. Here is an example to set the lower and upper bounds of 5 depths below land layers:

cat > myzaxis << EOR
zaxistype = depth_below_land
size      = 5
units     = cm
lbounds   = 0  5 10 30  80 
ubounds   = 5 10 30 80 150 
EOR

cdo setzaxis,myzaxis ifile.grb ofile.grb
Use the same procedure also for variables with only one layer:
cat > myzaxis << EOR
zaxistype = depth_below_land
size      = 1
units     = cm
lbounds   = 0
ubounds   = 5
EOR

cdo setzaxis,myzaxis ifile.grb ofile.grb

Beste zurück!
Uwe

RE: set lower and upper borderl for level type 112 field - Added by Frank Lunkeit almost 11 years ago

Hallo Uwe,
super, Danke!
Frank

RE: set lower and upper borderl for level type 112 field - Added by Giorgia Verri almost 10 years ago

Hi Uwe and Frank,
I tried to follow the strategy you suggest but without success..
In my case
Script .sh (I attached) includes the strategy I followed to convert ecmwf netcdf file into grib1 format.
It works well for all fields except "soil layer temperature" and "volumetric soil water". There are 4 soil layers: 0-7 , 7-28, 28-100, 100-255 cm
As you can see in fileslt1.grib the attribute level is wrong:
"level: (0, 0)"
instead of
"level: (0, 7)"
and the same happens for the other soil layers.
$cdo setzaxis,myzaxis gives me the following error:

cdo setzaxis (Warning): No zaxis with 4 levels found!

Thanks for your help!
Giorgia

RE: set lower and upper borderl for level type 112 field - Added by Uwe Schulzweida almost 10 years ago

The file filestl1.grib contains only one layer. In this case myzaxis should also only describe 1 soil layer.

    (1-4/4)