netcdf-c/ncdap_test
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
..
expected3
expectremote3
expecttds3
nocacheremote3
special3
testdata3
CMakeLists.txt Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
findtestserver.c.in Cleanup the CMake inter-test dependencies 2021-12-20 15:13:08 -07:00
Makefile.am Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
manyurls.h Adding missing file ncdap_test/manyurls.h 2021-08-24 12:27:54 -06:00
pingurl.c
run_ncdap_tests.sh
t_auth.c Use env variable USERPROFILE instead of HOME for windows and mingw. 2022-06-14 14:44:23 -06:00
t_dap3a.c
t_dap3b.c
t_dap3c.c
t_dap.c
t_misc.c Support MSYS2/Mingw platform 2021-12-23 22:18:56 -07:00
t_ncf330.c
t_srcdir.h
test_cvt.c
test_environment.c
test_manyurls.c Added missing file. 2021-06-01 15:05:42 -06:00
test_nstride_cached.c
test_partvar2.c
test_partvar.c
test_vara.c
test_varm3.c
testauth.old
testauth.sh Add filter support to NCZarr 2021-09-02 17:04:26 -06:00
testauth.sh.old
testbasicauth.sh
testcontainerauth.sh
testurl.sh
tst_ber.sh
tst_curlopt.sh
tst_encode.sh
tst_filelists.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00
tst_fillmismatch.sh
tst_formatx.sh
tst_longremote3.sh
tst_ncdap3.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00
tst_ncdap_shared.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00
tst_ncdap.sh Attempt at test orchestration to avoid a race condition when running tests in parallel. 2021-08-25 13:33:49 -06:00
tst_nocache3.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00
tst_remote3.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00
tst_remote.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00
tst_special.sh Attempt at test orchestration to avoid a race condition when running tests in parallel. 2021-08-25 13:33:49 -06:00
tst_tds.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00
tst_urls.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00
tst_utils.sh Removed precision fiddling with OSX to correct issues that resulted in remote testing. Also integrated the one-line change from https://github.com/Unidata/netcdf-c/pull/2347, which is proving problematic (for some reason). 2022-05-19 12:28:43 -06:00
tst_zero_len_var.sh Clean up some ncdap tests. 2022-03-18 21:01:40 -06:00