Project

General

Profile

How to delete extra variable in CDO

Added by Kaleigh Ross over 2 years ago

I have a ERA5 Netcdf file. If I open the file in Panoply, there's an extra variable "expver" which I want to get rid of. This variable seems to act like its z-axis. Expver has two values, 1 and 5. I want to get rid of 5 because it just contains blank data. Please help me delete this extra level. Thank you.

File format : NetCDF2
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter ID
1 : unknown unknown v instant 2 1 48441 1 I16 : -1
Grid coordinates :
1 : lonlat : points=48441 (241x201)
longitude : 90 to 150 by 0.25 degrees_east
latitude : 50 to 0 by -0.25 degrees_north
Vertical coordinates :
1 : generic : levels=2
expver : 1 to 5
Time coordinate : 31486 steps
RefTime = 1900-01-01 00:00:00 Units = hours Calendar = gregorian

Replies (2)

RE: How to delete extra variable in CDO - Added by Karin Meier-Fleischer over 2 years ago

Hi Kaleigh,

try selecting the z-axis level by value

cdo -sellevel,1 infile outfile

or use the z-axis level id

cdo -sellevidx,1 infile outfile

-Karin

RE: How to delete extra variable in CDO - Added by Kaleigh Ross over 2 years ago

Worked like magic! Thank you soooo much, Karin :)

    (1-2/2)