I have put together a script in earth engine with the purpose of producing an NDVI max time-series collection with relevant masks applied from 1984-2022, then reducing this using Kendall's correlation for detecting trends for a small region in Greenland.
https://code.earthengine.google.com/502b260b2c4ba6df56a3b2da867e594a?noload=true
The script functions perfectly fine, and with line 144 uncommented, produces a map of Kendall's tau for the region of interest relatively quickly (15-20 seconds). However, when I attempt to export the same image, it fails every time after 5 attempts with 'Error: Internal Error. (Error code: 13)'.
I have also attempted this with a median reducer to ensure it wasn't an issue with the kendallsCorrelation reducer, but this also produced the same error. I also get this error when the size of the region of interest is changed. The only other stack exchange question I have seen regarding this error was told to consider google drive space, however I have 14 GB available which is significantly greater than the export image could possibly be.
Am I clearly doing something wrong, or is this some sort of bug?
Map.addLayer(kendall_tau.select('NDVI_max_tau'),{},'tau') // Works
Export.image.toDrive({ // Fails
image: kendall_tau.select('NDVI_max_tau'),
description: 'TEST_normal_3413_eastroi_median',
folder: 'Greenland_Exports',
crs: 'EPSG:3413',
scale: 30,
region: ROI,
maxPixels: 1e13
})