I am trying to create a new product from Sentinel 3 images, and delving deep into the SNAP API, trying to learn how to implement SNAP functions in Python. The learning curve is steep!
At the moment, I am opening a S3 image, reading a band, doing operations on it, then trying to save it using the readPixels and setPixels operators. As I am learning, I run the code a lot of times, tweaking different lines, but quickly run into memory problems. I can run my code fine at first, but after a few runs, get the following:
RuntimeError: java.lang.OutOfMemoryError: Java heap space
I use the dispose() command to close my opened image at the end. Is there a way to explicitely flush the memory used by Java after each run? Or am I missing something fundamental?
Edit: I have increased the memory in snappy.ini to 8G