I want to convert all subdatasets from an .nc4 file (Example file) to GeoTIFF files to work with in R (for visualisation). I try to do this with the following zsh script:
gdal_translate -unscale -sds -a_nodata -9999 -ot Float32 -of GTiff input.nc4 output.tif
The output, however, contains here and there negative values in the raster data (take subdataset 18 as an example), while there were no negative values in the input raster subdataset (check with gdalinfo).
I used cdo mergetime and cdo timmean for preprocessing, but I expect that this did not result in the errors.
What is the source of this 'error', and how can I solve this?