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
ceconstraints.h
CMakeLists.txt Fix bad cmake install location 2022-07-06 15:01:23 -06:00
err_macros.h
fbits.h
hdf4dispatch.h
hdf5dispatch.h
hdf5internal.h Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
isnan.h
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
nc4internal.h Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
nc_hashmap.h
nc_logging.h
nc_provenance.h
nc_tests.h adding pre-processor constant NC_MAX_FILENAME to nc_tests.h 2022-07-08 07:27:54 -06:00
nc.h
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
ncdap.h
ncdimscale.h
ncdispatch.h fixed parallel functions for netcdf-fortran build 2022-04-24 05:41:14 -06:00
ncexhash.h
ncexternl.h
nchashmap.h
nchttp.h Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
ncindex.h
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
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
ncuri.h Add complete bitgroom support to NCZarr 2022-01-24 15:22:24 -07:00
ncurlmodel.h
ncutf8.h
ncxcache.h
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
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
netcdf_meta.h.in added BENCHMARKS to the summary 2022-04-26 06:18:52 -06:00
netcdf_par.h
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
rnd.h
XGetopt.h