How can I use the CDO delete
operator to remove variable-specific and/or global attributes of a NetCDF?
As far as I understand from the help pages of the operator, I should provide a comma-separated list of attributes, keyed by param
, but:
$ cdo delete,param="pr@missing_value,Title" ifile.nc ofile.n
cdo delete (Warning): Parameter >pr:missing_value< not found!
cdo delete (Warning): Parameter >Title< not found!
NOTE: this is the list of attributes of my test file:
$ cdo showattribute ifile.nc
pr:
long_name = "precipitation"
units = "mm"
missing_value = -999
Global:
Conventions = "CF-1.5"
Title = "Ninja Title"
Created on = "Wed Aug 25 03:29:12 2021"
Using CDO version 1.9.9