I have a netCDF file with 8 variables and 4 dimensions: latitude (dim: 26), longitude (dim:17), time (dim: a lot) and level (dim:1, pressure level). In order to use it in a specific program I need to have only 3 dimensions: latitude, longitude and time.
Is there an easy way to delete the level dimension in each variable?
I've found ncwa -a old_dim ifile.nc ofile.nc
but sometimes it converts the type from short to float. When it keeps the short type the attributes "scale factor" and "add.offset" are deleted. The problem is that I want to keep the short type with scale factor and add offset.