Reputation: 835
I have a .nc file that I convert to text using the following command :
ncdump in.nc > out.txt
However, this particular file has thousands of "-999" values (for nodata). Is there a way to stop ncdump from adding these to the output?
Upvotes: 0
Views: 840
Reputation: 6352
Use sed, e.g.,
ncdump in.nc | sed -e 's/ -999,//g' > out.txt
ncks in.nc | sed -e 's/_, //g' -e 's/ -999,//g' > out.txt
Add -e
commands until all unwanted patterns disappear.
Upvotes: 2