Reading-eScience-Centre / edal-java

Environmental Data Abstraction Layer libraries
Other
39 stars 30 forks source link

Add support for unsigned data types #166

Open tdrwenski opened 8 months ago

tdrwenski commented 8 months ago

I found an old discussion of unsigned data here: https://github.com/Reading-eScience-Centre/edal-java/issues/126.

Since that discussion, unsigned bytes, shorts and ints were added to the CF data types in CF 1.9.

This PR would add support for Netcdf-java's unsigned datatypes. The numeric datatypes handled here include the ones previously handled (FLOAT, DOUBLE, BYTE, INT, SHORT, LONG) and adds support for UBYTE, UINT, USHORT, ULONG.

Additionally, this PR adds a test for reading unsigned data and a small refactor of an existing test.