NetCDF bug

Hello,

I’m using SNAP as a NetCDF viewer for some processing files and I expected the generic NetCDF reader/visualizer to work fine.
I however experience a problem which is reproduced in the attached example. This can be also recreated from the CDL (Creating the file through “ncgen -k 3 IOM_SLIT_BKP_v2.cdl” with IOM_SLIT_BKP_v2.cdl below):

netcdf IOM_SLIT_BKP_v2 {
dimensions:
n_bands = 2101 ;
n_frames = 30 ;
n_columns = 30 ;
n_psf_lines = 109 ;
n_psf_columns = 109 ;
variables:
float SLIT_image(n_bands, n_frames, n_columns) ;
double PSF(n_bands, n_psf_lines, n_psf_columns) ;
}

When viewing in SNAP only one of the variable displays into a subset of 2D rasters (PSF in this case) in the “Bands” layer of the product.

In a more general case much more parameters remain invisible (only visible as empty attributes, not in the bands).

Thanks very much !

Nicolas

SNAP is intended for specific remote sensing products. Many NetCDF4-CF files are not usable in SNAP. I assume SNAP’s internal data structures were designed around remote sensing use cases, and even then there are limitations (NASA level-3 binned data are one example). Level-4 products I work with need some in situ data products, so the calculations are done using general purpose languages like C++ and Fortran.

As a user of SNAP over many years I understand it perfectly. I have finally understood the problem.
SNAP generic NetCDF functionality cannot handle rasters of different sizes when provided from one single file.
For instance this works, SNAP sees the three products:

netcdf test_good {
dimensions:
nbands = 300 ;
lines = 1000 ;
lines_v2 = 1000;
cols = 2000 ;
variables:
float field1(nbands, lines, cols) ;
float field2(nbands, lines_v2, cols) ;
float field3(lines, cols) ;
}

This does not work:
netcdf test_bad {
dimensions:
nbands = 300 ;
lines = 1000 ;
lines_v2 = 1500;
cols = 2000 ;
variables:
float field1(nbands, lines, cols) ;
float field2(nbands, lines_v2, cols) ;
float field3(lines, cols) ;
}

SNAP no longer sees “field2” because “lines_v2” is not the same as “lines”.

Is there a workaround ? Thanks

Sorry, but there is now workaround for this.
We know that there are some aspects of the NetCDF support should be improved.
For example the multi-size support, multi-dimension support or storing map projected data.
We have it in mind for the future.