0

I am converting some NetCDF files from Float32 to either 16bit or 8bit to safe space on a server. Since I Originally created these NetCDF using GeoTIFF´s this is where I apply the conversion before adding them into a new NetCDF file. This works without any problem.

The issue I have is that I need to add a scalefactor and offset using the ncatted unidata command. As far as I understand to add scale and offset information the following commands are used:

ncatted -O scale_factor,Variable,c,f,Value foo.nc
ncatted -O add_offset,Variable,c,f,Value foo.nc

However it just shows me the help or cheatsheet when I run it.

Am I missing something?

1

It seems to be a bit late but it may be helpful for others:

ncatted -O -h -a add_offset,sst,o,f,21 $filename 

Found here. It seems that you forgot options -h / -a, -O being used to specify "overwriting" of the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.