netcdf-c/oc2
Dennis Heimbigner 724128ad3b Add hack to deal with DAP2 signed byte hack.
re: issue https://github.com/Unidata/netcdf-c/issues/1316

The DAP2 data model does not have a signed byte type,
but netcdf-3 does have (only) a signed byte type.
So, when converting a netcdf-3 signed byte typed variable to
a DAP2 unsigned byte, the following actions are taken by thredds:
1. The variable type is marked as DAP2 (unsigned) byte.
2. A special attribute, "_Unsigned=false" is set for the variable
3. The corresponding "_FillValue" attribute, if any, is up-converted
   to the DAP2 Int16 type in order to hold, with sign, any signed byte
   fill value.

On the netcdf-c side, this looks like a fillvalue type mismatch and causes
an error. Instead, the netcdf-c dap2 conversion code needs to recognize
this hack and undo it locally.

So this change looks for the above case, and if found, then it properly
converts the _FillValue type to netcdf-3 signed byte.

Since DAP2 supports both signed and unsigned integers of sizes 16 and 32 bits,
this should be the only hack needed (famous last words).

It may later be desirable for the thredds DAP2 converter to modify its
behavior as well.
2019-02-13 14:36:14 -07:00
..
auth.html.in Misc. source comment typos 2018-04-26 23:04:01 -04:00
CMakeLists.txt nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
dap.y nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
daplex.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
dapparse.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
dapparselex.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
dapy.c Fix for github issue https://github.com/Unidata/netcdf-c/issues/310. 2017-06-28 13:51:01 -06:00
dapy.h Fix for Github issue 314. 2016-09-01 22:06:07 -06:00
dodsrc.example move from oc1.0 to oc2.0; create new dir oc2 2012-07-31 20:34:13 +00:00
Makefile.am nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
oc.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
oc.css Github issue 152: https://github.com/Unidata/netcdf-c/issues/152 2015-11-29 20:38:12 -07:00
oc.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
occompile.c Fix errors when building on big-endian machine 2019-01-31 21:13:06 -07:00
occompile.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
occonstraints.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
occurlflags.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
occurlfunctions.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
occurlfunctions.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocdata.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocdata.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocdatatypes.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocdebug.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocdebug.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocdump.c merge master and fix conflicts 2018-12-12 11:47:54 -07:00
ocdump.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ochttp.c Add hack to deal with DAP2 signed byte hack. 2019-02-13 14:36:14 -07:00
ochttp.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocinternal.c Add missing updates from bigend.tmp 2019-02-10 14:00:40 -07:00
ocinternal.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocnode.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocnode.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocread.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocread.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocutil.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocutil.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
ocx.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
xxdr.c nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00
xxdr.h nctest, oc2 files updated. 2018-12-06 15:47:47 -07:00