NetCDF: Name contains illegal characters error
Added by Richard Dixon about 7 years ago
Hello,
Am trying to run cdo on ctl/grib file pairing with the follow cdo command to convert to netcdf.
bash-4.1$ cdo -f nc import_binary sfc_max_day_HPB_m050_201112_WIND_subset.ctl out.nc
However I get the error below:
---------------------------------------------------------------
Warning: OPTIONS keyword "template" is used, but the
DSET entry contains no substitution templates.
cdf_def_var : ncid = 65536 name = wind 1 xtype = 5 ndims = 4 varid = -1
Error (cdf_def_var) : NetCDF: Name contains illegal characters
---------------------------------------------------------------
Doing some digging around I don't find much replication of this error online but I've found a note to say that much older versions of cdo have a problem with carriage returns in files. I've tried to remove these but to no avail. I believe I'm using cdo 1.7.2.
Any help appreciated! I've attached the .ctl file as well.
Best wishes
Richard
Replies (1)
RE: NetCDF: Name contains illegal characters error - Added by Richard Dixon about 7 years ago
Just wanted to provide closure on this - it turns out that the title of the variable had a tab directly after the word WIND that the routine didn't like.
WIND 1 253,100,0 Surface Air Wind Speed at 10m m/s 1
^^
TAB
Hope someone might find this beneficial in the future !
Richard