isce-framework / nisar-workflows

3 stars 1 forks source link

NetCDF does not yet support complex data #8

Closed alex-s-gardner closed 1 month ago

alex-s-gardner commented 6 months ago

looking into the issues more it seems that NetCDF does not yet support complex datatypes: https://github.com/cf-convention/cf-conventions/issues/204

This limits the utility of the grid_mapping attribute which is a NetCDF convention that associates the porjection variable with corresponding raster.

The fact that the NISAR products are ahead of the NC4 spec: https://docs.unidata.ucar.edu/netcdf-c/current/file_format_specifications.html

Will likely cause issues across multiple tools and will slow adoption.

aivazis commented 6 months ago

The HDF folks claim that the upcoming release of HDF5 will have native support for complex numbers, which will probably cascade to NetCDF pretty quickly. So this may sort itself out in short order. Fingers crossed...

alex-s-gardner commented 6 months ago

Fingers crossed indeed... seems like this has been a lingering issue for at least 30 years: https://www.unidata.ucar.edu/software/netcdf/coords/0023.html

And NetCDF is not known for moving quickly.

vbrancat commented 1 month ago

Hi @alex-s-gardner, this is not an issue with our NISAR products but rather with the netCDF4 driver. At the moment, the netCDF4 driver does not have support for complex data.

However, it is still possible to use the netCDF4 driver and visualize the amplitude and phase of complex Datasets in our NISAR products using qGIS tool. If you are interested in how to manipulate complex datasets in qGIS, I recommend this visualization guide that our team member Seongsu Jeong has written for OPERA CSLC-S1 products. It should guide you through the necessary steps to display the amplitude and phase of complex HDF5 Datasets (e.g., the wrappedInterferogram Dataset in our RIFG and GUNW products).