Page 1 of 1

ARRAY MEMORY ERROR

Posted: Tue Oct 17, 2023 9:18 pm
by NatalyaRV
Hi, Quinten

I'm working with an inland water body in Cartagena, Colombia; I'm trying to run 2018's images of this water body but the program show up the next error:
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 920. MiB for an array with shape (10980, 10980) and data type float64

I don't understand it, could you help me?

Before hand, thank you for answer.

Re: ARRAY MEMORY ERROR

Posted: Wed Oct 18, 2023 4:21 am
by quinten
Hi Natalya

This error occurs because your computer ran out of memory, and it could not allocate a large enough chunk of memory to hold a 10 metre full Sentinel-2 tile dataset. You could increase available memory by closing other applications, or change the required amount of memory by changing the processing parameters.

Is it an option to subset the image using a region of interest around the lake? In this case the whole image does not need to be processed, and less memory will be required. An other option is to process at 20 or 60 metres rather than at 10 metres (default) by setting s2_target_res=20 or s2_target_res=60. This will reduce memory use approximately by a factor 4 or a factor 36.

I hope this helps!

Quinten