0
ncks -v name of var inp.nc out.nc

I have a netCDF file with a hyperslab called name of var However, since the hyperslab has a space in the name, it leads to an error"

ncks: ERROR recieved 3 filenames; need no more than two

How to fix this?

user308827
  • 21,227
  • 87
  • 254
  • 417

1 Answers1

1

Elethan is right. Quoting the variable is the simplest solution. Both of these will work:

ncks -v "name of var" in.nc out.nc
ncks -v 'name of var' in.nc out.nc
Charlie Zender
  • 5,929
  • 14
  • 19