Fix output of integer array to NetCDF file.