set lower and upper borderl for level type 112 field
Added by Frank Lunkeit over 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 over 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.grbUse 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 over 11 years ago
Hallo Uwe,
super, Danke!
Frank
RE: set lower and upper borderl for level type 112 field - Added by Giorgia Verri almost 11 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
ecmwf2d_preprocess.sh (2.8 KB) ecmwf2d_preprocess.sh | |||
filestl1.grib (1.78 MB) filestl1.grib |
RE: set lower and upper borderl for level type 112 field - Added by Uwe Schulzweida almost 11 years ago
The file filestl1.grib contains only one layer. In this case myzaxis should also only describe 1 soil layer.