ncks error when variable name has spaces

485 Views Asked by At
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?

1

There are 1 best solutions below

0
Charlie Zender On BEST ANSWER

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