Yes, you can search for the _Unsigned = "true" attribute, or you can call Variable.isUnsigned ().
Since Java does not support unsigned types, this was a complex design decision. In the end, we decided not to automatically expand the type, for efficiency. Therefore, the application must check and do the right thing. Take a look at the helper methods ucar.nc2.DataType.unsignedXXX ().
When you read the data, you get an Array object. you can call Array.isUnsigned (). Also extractors such as Array.getDouble () will correctly convert.
The netCDF-Java library supports an advanced data model called the "General Data Model" to abstract the differences in file formats. Therefore, we do not adhere to the limitations of the netCDF-3 file format or data model. But we are in Java
John
John Caron May 01 '13 at 14:05 2013-05-01 14:05
source share