I am going to generate EVI from Sentinel-2, but I am getting the below error:
java.lang.AssertionError: assertion failed: Band 4 cell type does not match, float64 != float32’}]
To export them, I am using the following code, which is working for other indexes (e.g., “NDVI”,“NDMI”,“GNDVI”,“NMDI”), but I am getting the error only for EVI or EVI2.
I found an issue and prepared a fix which will take some time to go online. It is tracked in this issue:
I do not have a very easy workaround. I do think it is related to the use of array_create, so it might be that for instance appending the EVI would fix it, but it may be a hassle to change this, hence it’s easier to continue without evi until the fix is out, or to compute evi separately.
While working on your job, I also noticed:
using SENTINEL2_L2A might be a better choice, it is faster if data is available on terrascope
best to drop the use of resample_cube_spatial I don’t think it’s needed in your case
when you mask using SCL, I recommend to create a separate datacube for SCL, allowing to improve performance by only loading data of bands that are not masked.