I’m trying to use python to process products output by SNAP as NetCDF4-BEAM files using xarray and NetCDF4-python, and I’ve found something odd in the way the output is formatted. Some of the metadata is stored in the global attribute space, but some is stored in the attribute fields of two specific data variables, ‘crs’ and ‘metadata’. Since these variables are just single integers, they cause routines which expect the data variables to be made up of 2-dimensional arrays to trip up. This means they need to be dropped from the structure before any methods such as, say, masking, can be applied.
This isn’t a huge problem, it just seems odd that this was the method chosen to store the metadata for NetCDF4-BEAM. I was curious as to the rationale behind storing it this way. I also can’t find any documentation on the BEAM profile for NetCDF, and if there are any specification documents or similar floating around then it’d be great to be able to see them.