Subset image only converts values to NaNs, does not actually subset the image

We’re using GPT to do some processing on several S1B_IW_GRDH_1SDV_* files. In the last two steps we are subsetting and exporting to NetCDF4-CF. What we see is that subsetting selects the data within the subset area (as defined by a shapefile) and sets everything else to NaNs, which is correct. However, the NetCDF lat/lon extent is still the original image extent, rather than clipping to the bounding box of the shapefile. This results in a huge file when the NetCDF is uncompressed (for use in another software package).

Is there a way to subset and export images in SNAP which really subsets (i.e. reduces the lat/lon range) the data, rather than just changing cells to NaNs?

Is the subsetting based on a polygon or on coordinates?

Hello! In the mean time I realized we were using a land/water mask to subset rather than the actual subset tool, so that appears to be working now. We can remove this question from the forum (I wasn’t able to do it myself).

good to hear. I consider this issue solved but leave the topic here in case others have the same problem.

Indeed, the land/sea mask operator (using a poylgon) leaves the original size of the product while the subset operator reduces it to the entered bounding coordinates.