inconsistent types in google earth engine with Export.image.toDrive()

Cast the whole darn thing to a 32-bit float: withNDVI.float(). Of course, make sure you're not getting any overflow, but looks safe here.


The issue is that you are attempting to export two bands that have different data datatypes (float vs. double):

enter image description here

and because the format of the output file (GeoTIFF) does not (at least in practice) support mixing data types, because the libtiff library does not support it. Given this, Earth Engine does not support exporting images with mixed band types.

The solution, as Nicholas suggests, is to make sure that all of the exported bands have a consistent data type. This is probably best accomplished by using ee.Image.float() to convert your "time" band into a float:

var addTime = function(image) {
  return image.addBands(
    image.metadata('system:time_start')
      .divide(1000 * 60 * 60 * 24 * 365).float()
      .rename('time')
    );
};