cdo ERA5 model levels to heights
Added by Olivia Bentley 10 months ago
Hi,
I'm trying to use ml2hl to convert ERA5 model level data to heights, however I am getting an error "ml2hl (Warning): No 3D variable with hybrid sigma pressure coordinate found!" I've tried a few things including adding the a and b values to the netcdf file however I still get this error. I haven't managed to find guidance of the formatting required for the netcdf, are there specific names I should use for a and b? Or do any additional parameters need to be within the netcdf? I have wind speed, temperature and Logarithm of surface pressure currently
Replies (2)
RE: cdo ERA5 model levels to heights - Added by Karin Meier-Fleischer 10 months ago
You need some variables to do the conversion: paramid 129, 130, 152, and 133
Example:
cdo -P 8 -sp2gpl -setgridtype,regular -merge \ E5ml00_1M_2020_129.grb \ E5ml00_1M_2020_130.grb \ E5ml00_1M_2020_152.grb \ E5ml00_1M_2020_133.grb \ merged_129_130_133_152_2020.grb levels="73727.2891,71235.4219,68814.0938,66443.7891" cdo -f nc4 -intlevel,level=${levels},zvarname=zh \ -merge \ -gheight merged_129_130_133_152_2020.grb \ merged_129_130_133_152_2020.grb \ outfile.nc
RE: cdo ERA5 model levels to heights - Added by Olivia Bentley 9 months ago
Hi,
Thank you for your help. Please could you explain what the 2 lines of code are doing and what the options mean? Does this convert from model levels (i.e. hybrid sigma pressure levels) to geometric heights? I believe that is what ml2hl does but I can't see that being used in your cdo calls? Do I replace sp2gl with ml2hl? Does cdo understand if I have the variables in two files? with 129 and 152 ( the surface layer variables in one and the others in another). Will it also take wind speeds and return these on regular height levels. In your list of heights are these floats for certain heights above sea level or are these codes?
Thanks