netcdf-c/include
Dennis Heimbigner 231ae96c4b Add support for Zarr string type to NCZarr
* re: https://github.com/Unidata/netcdf-c/pull/2278
* re: https://github.com/Unidata/netcdf-c/issues/2485
* re: https://github.com/Unidata/netcdf-c/issues/2474

This PR subsumes PR https://github.com/Unidata/netcdf-c/pull/2278.
Actually is a bit an omnibus covering several issues.

## PR https://github.com/Unidata/netcdf-c/pull/2278
Add support for the Zarr string type.
Zarr strings are restricted currently to be of fixed size.
The primary issue to be addressed is to provide a way for user to
specify the size of the fixed length strings. This is handled by providing
the following new attributes special:
1. **_nczarr_default_maxstrlen** —
This is an attribute of the root group. It specifies the default
maximum string length for string types. If not specified, then
it has the value of 64 characters.
2. **_nczarr_maxstrlen** —
This is a per-variable attribute. It specifies the maximum
string length for the string type associated with the variable.
If not specified, then it is assigned the value of
**_nczarr_default_maxstrlen**.

This PR also requires some hacking to handle the existing netcdf-c NC_CHAR
type, which does not exist in zarr. The goal was to choose numpy types for
both the netcdf-c NC_STRING type and the netcdf-c NC_CHAR type such that
if a pure zarr implementation read them, it would still work and an
NC_CHAR type would be handled by zarr as a string of length 1.

For writing variables and NCZarr attributes, the type mapping is as follows:
* "|S1" for NC_CHAR.
* ">S1" for NC_STRING && MAXSTRLEN==1
* ">Sn" for NC_STRING && MAXSTRLEN==n

Note that it is a bit of a hack to use endianness, but it should be ok since for
string/char, the endianness has no meaning.

For reading attributes with pure zarr (i.e. with no nczarr
atribute types defined), they will always be interpreted as of
type NC_CHAR.

## Issue: https://github.com/Unidata/netcdf-c/issues/2474
This PR partly fixes this issue because it provided more
comprehensive support for Zarr attributes that are JSON valued expressions.
This PR still does not address the problem in that issue where the
_ARRAY_DIMENSION attribute is incorrectly set. Than can only be
fixed by the creator of the datasets.

## Issue: https://github.com/Unidata/netcdf-c/issues/2485
This PR also fixes the scalar failure shown in this issue.
It generally cleans up scalar handling.
It also adds a note to the documentation describing that
NCZarr supports scalars while Zarr does not and also how
scalar interoperability is achieved.

## Misc. Other Changes
1. Convert the nczarr special attributes and keys to be all lower case. So "_NCZARR_ATTR" now used "_nczarr_attr. Support back compatibility for the upper case names.
2. Cleanup my too-clever-by-half handling of scalars in libnczarr.
2022-08-27 20:21:13 -06:00
..
.gitignore Added a new .gitignore specific to include/. 2014-09-18 15:05:08 -06:00
ceconstraints.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
CMakeLists.txt Fix bad cmake install location 2022-07-06 15:01:23 -06:00
err_macros.h cleanup of whitespace in include directory 2019-02-19 06:09:10 -07:00
fbits.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
hdf4dispatch.h raised NC_MAX_HDF4_NAME length to NC_MAX_NAME 2020-02-08 09:21:01 -07:00
hdf5dispatch.h Revert "Revert "Fix nczarr-experimental: improve build support, disengage hdf5 vs netcdf4 flags, and find AWS libraries"" 2020-08-17 19:15:47 -06:00
hdf5internal.h Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
isnan.h Removed unneeded code on OSX. 2020-08-26 16:29:51 -06:00
Makefile.am Ensure that netcdf_json.h does not interfere with ncjson. 2022-07-05 22:03:52 -06:00
nc3dispatch.h Fixed Clang -Wstrict-prototypes warnings 2022-03-01 23:21:24 -05:00
nc3internal.h Make sure mode flags are properly defined in netcdf.h 2022-01-11 19:05:46 -07:00
nc4dispatch.h further preparation for try 2 at quantizing 2021-08-24 01:04:55 -06:00
nc4internal.h Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
nc_hashmap.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
nc_logging.h Additional Fixes to NCZarr 2020-12-16 20:48:02 -07:00
nc_provenance.h Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
nc_tests.h adding pre-processor constant NC_MAX_FILENAME to nc_tests.h 2022-07-08 07:27:54 -06:00
nc.h Change (again), and hopefully simplify, the file model inference algorithm. 2019-09-29 12:59:28 -06:00
ncauth.h Significantly Improve Amazon S3 Cloud Storage Support 2021-09-27 18:36:33 -06:00
ncbytes.h Significantly Improve Amazon S3 Cloud Storage Support 2021-09-27 18:36:33 -06:00
ncconfigure.h Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
nccrc.h Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
ncdap.h Make fillmismatch the default for DAP2 and DAP4 2021-01-07 13:17:53 -07:00
ncdimscale.h Updated to use H5O_info2_t for HDF5 1.12 and the use of H5Oget_info3 instead of H5Gget_objinfo 2020-03-12 15:50:24 +00:00
ncdispatch.h fixed parallel functions for netcdf-fortran build 2022-04-24 05:41:14 -06:00
ncexhash.h ncexhash: replace invalid UTF-8 sequence 2021-07-28 12:51:30 -04:00
ncexternl.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
nchashmap.h Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
nchttp.h Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
ncindex.h missinginclude 2020-07-09 13:30:33 -06:00
ncjson.h Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
nclist.h Significantly Improve Amazon S3 Cloud Storage Support 2021-09-27 18:36:33 -06:00
nclog.h 1. Fix an additional flaw in fill_value handling where non-atomic default values were not properly being handled. 2022-01-10 15:27:16 -07:00
ncmodel.h Change (again), and hopefully simplify, the file model inference algorithm. 2019-09-29 12:59:28 -06:00
ncoffsets.h Fix various problem around VLEN's 2022-01-08 18:30:00 -07:00
ncpathmgr.h Support MSYS2/Mingw platform 2021-12-23 22:18:56 -07:00
ncrc.h Make public a limited API for programmatic access to internal .rc tables 2022-06-17 14:35:12 -06:00
ncs3sdk.h Get signature of NC_s3sdk*ize correct 2021-11-26 13:59:10 -07:00
nctestserver.h restore 2022-04-29 12:36:33 -06:00
nctime.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
ncuri.h Add complete bitgroom support to NCZarr 2022-01-24 15:22:24 -07:00
ncurlmodel.h This PR adds EXPERIMENTAL support for accessing data in the 2020-06-28 18:02:47 -06:00
ncutf8.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
ncxcache.h Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
ncxml.h Fix dll exports for ncxml 2022-04-12 19:16:58 +10:00
netcdf_aux.h Fix various problem around VLEN's 2022-01-08 18:30:00 -07:00
netcdf_dispatch.h.in Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
netcdf_f.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
netcdf_filter_build.h Support installation of filters into user-specified location 2022-04-29 14:31:55 -06:00
netcdf_filter_hdf5_build.h Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
netcdf_filter.h added netcdf_filter.h to doxygen build 2022-05-04 13:12:48 -06:00
netcdf_json.h Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
netcdf_mem.h cleanup netcdf_mem.h and netcdf_dispatch.h 2019-10-28 10:56:24 -06:00
netcdf_meta.h.in added BENCHMARKS to the summary 2022-04-26 06:18:52 -06:00
netcdf_par.h fixed include issue 2019-12-20 07:43:39 -07:00
netcdf.h Provide a default enum const when fill value does not match any enum const. 2022-07-17 14:32:31 -06:00
onstack.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
rnd.h More standardizing of the copyright stanza. 2018-12-06 14:13:56 -07:00
XGetopt.h Fix undefined references when using Visual Studio 2020-05-18 19:36:28 -06:00