Subset function retrieve NaN values

Hello everybody,

I’m actually processing a large amount of Sentinel-1 and 2 images on a server.
For Sentinel-1 i’m making all the pre-processing needed for GRD and everything is ok, for Sentinel-2 i’m computing LAI via the biofactor option.
But in both i’m trying to apply a subseting at the end of every step to avoid issues (i’m using the subset option based on a WKT format), but when i’m checking a saved image it is just full of NaN values … as if it wasn’t keeping any information in it. I checked if the problem was happening before but at every steps of processing I got good images with the right values.

I’m on Python 3.6.9 on the server and with the latest version of SNAP.

On my personal desktop I don’t have this problem and i’m on 3.6.11. Could it be a problem from Python version ?

By the way here my subset function if you think something should change between different version of python :

def subset(product,wkt):
parameters = HashMap()
return GPF.createProduct('Subset',parameters,product)

If anyone has an idea it would be amazing :slight_smile:

It is more likely to be a java version difference than python version difference, but platform differences may also be involved. What JVM’s are used on the two systems?

Images full of NaN’s have been seen when a file is opened by a different process before Java has finished writing the data, so it could be a function of differences in processor and storage performance (which, particularly on server, may depend on what other tasks are running) or garbage collection (GC) algorithms. GC depends on the Java memory settings used by jpy. Different JVM’s may use different GC strategies. If the server is using a network file system write caching can add delays before the data values are actually available to other processes/machines.

Timing problems can appear when a task involving a sequence of steps is first implemented as a series of separate jobs that are later merged into one multi-step job.