Commit Graph

471 Commits

Author SHA1 Message Date
Ward Fisher
ccd1e6a633 Updated for next release cycle. 2022-10-17 13:34:11 -06:00
Dennis Heimbigner
1a45ee025f Fix some addtional errors in NCZarr
re: Issue https://github.com/Unidata/netcdf-c/issues/2502

H/T Charlie Zender

* Fix NCZarr handling of endianness value NC_ENDIAN_NATIVE. This now matches how it is handled in libhdf5
* Fix NCZarr handling of char typed attribute with value "". This now matches how it is handled in libhdf5
* Add test for various char attribute values
* Change the mapping of NC_CHAR and NC_STRING to dtype; requires changing some test files also.
* Optimize the testing for NC_ENOTBUILT in NC_open.
* Turn off debugging left on accidentally
* Fix memory leak in tst_pnetcdf.c
* Fix blosc test
2022-09-09 14:25:24 -06:00
Ward Fisher
4fdfb6c911
Merge pull request #2501 from WardF/error-code-list.wif
Adding all-error-codes.md back in to distribution documentation.
2022-09-08 17:06:00 -06:00
Ward Fisher
9c09966896
Merge pull request #2482 from WardF/gh2481.wif
Changed attribute case in documentation
2022-09-08 16:38:29 -06:00
Ward Fisher
0c5fc4c2cd Doxygen update, reorganizing. 2022-09-08 16:36:53 -06:00
Ward Fisher
60552dbc65 Updating doxygen files. 2022-09-08 16:28:43 -06:00
Ward Fisher
6cf6677b2c Remove obsolete tags from Doxyfile. 2022-09-08 16:21:39 -06:00
Ward Fisher
0d24a1c278 Adding all-error-codes.md back in to distribution documentation. 2022-09-08 16:16:21 -06:00
Dennis Heimbigner
6abaab967b Fix some problems with PR https://github.com/Unidata/netcdf-c/pull/2492
re: PR https://github.com/Unidata/netcdf-c/pull/2492
re: Issue https://github.com/Unidata/netcdf-c/issues/2494

This PR fixes some problems with the pull request https://github.com/Unidata/netcdf-c/pull/2492 in response to Issue https://github.com/Unidata/netcdf-c/issues/2494.

* Found and fixed more scalar handling problems and add a test case for scalars.
* Cleanup nczarr_test/run_string.sh test
* Document *_nczarr_default_maxstrlen* and *_nczarr_maxstrlen*.

* Support both "Nan" and *Nan* as being floating point constants
  for attributes. It is unclear from the Zarr V2 spec if
  unquoted *Nan* is legal or not, but support for reading.
  Write the quoted versions when writing an attribute.  Similar
  for Infinity constants.
  So NCZarr supports the following constants for use in Attributes
    * *Nan*, "Nan", *-Nan*, "-Nan"
    * *Nanf*, "Nanf", *-Nanf*, "-Nanf"
    * *Infinity*, "Infinity", *-Infinity*, "-Infinity"
    * *Infinityf*, "Infinityf", *-Infinityf*, "-Infinityf"
2022-09-03 14:21:48 -06:00
Dennis Heimbigner
f4e181bc99 Update nczarr documentation 2022-08-29 12:01:23 -06:00
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
Ward Fisher
435769f248 Changed attribute case in documentation in support of https://github.com/Unidata/netcdf-c/issues/2481 2022-08-19 13:28:51 -06:00
Edward Hartnett
e45292f6ca moved quantize error documentation 2022-06-23 09:51:09 +02:00
Ward Fisher
545ce88476
Merge pull request #2377 from edwardhartnett/ejh_update_doxyfile
Updating Doxyfile.in with doxygen-1.8.17, turned on WARN_AS_ERROR, added doxygen build to CI run
2022-06-22 13:31:25 -06:00
Ward Fisher
c879f710f5 Incorporated GitHub-generated release notes into the manually managed release notes, and updated the list of included dependencies for Windows installer downloads. 2022-06-10 14:43:50 -06:00
Ward Fisher
0ff56543b4 Correct error in make dist 2022-06-10 14:08:57 -06:00
Ward Fisher
2021ceeb68 Merge branch 'main' into v4.9.0-wellspring.wif 2022-06-09 14:43:57 -06:00
Rostislav Kouznetsov
8715fcac53 Fix typo 2022-06-08 19:35:16 +03:00
Edward Hartnett
c051209f8b turned on WARN_AS_ERROR and added documentation build to CI 2022-06-07 15:24:21 +03:00
Edward Hartnett
581b1c1c4d updated Doxyfile.in 2022-06-07 15:10:20 +03:00
Rostislav Kouznetsov
7564e7e797 Add doc on errors introduced by lossy compression
Also references to relevant papers
2022-06-07 11:13:15 +03:00
Ward Fisher
9db9ccdd46 Merge branch 'main' into v4.9.0-wellspring.wif 2022-06-06 14:37:12 -06:00
Ward Fisher
b2097a77aa
Merge pull request #2373 from edwardhartnett/ejh_docs_5
fixed documentation warnings in filters.md
2022-06-06 14:36:10 -06:00
Ward Fisher
b8f352e96b
Merge pull request #2363 from edwardhartnett/ejh_doc_2
fixed some doxygen warnings
2022-06-06 14:35:28 -06:00
Ward Fisher
054c392fee
Merge pull request #2362 from edwardhartnett/ejh_doc
adding quantize documentation
2022-06-06 14:35:04 -06:00
Ward Fisher
e38f1250fe Updated doxygen version, added target release date to RELEASE_NOTES 2022-06-03 11:03:00 -06:00
Edward Hartnett
db9b097da9 change to trigger CI 2022-06-01 12:15:12 +03:00
Edward Hartnett
b6c105fc12 fixed documentation warnings in filters.md 2022-06-01 07:24:06 +03:00
Edward Hartnett
31c7b7a6ac more detail on which algorithm to choose 2022-05-31 09:09:25 +03:00
Edward Hartnett
c5ad809e0d fixed some doxygen warnings 2022-05-28 19:12:52 +03:00
Edward Hartnett
21f44a29d4 fixed some doxygen warnings 2022-05-28 19:11:37 +03:00
Edward Hartnett
edf28a4335 fixed some doxygen warnings 2022-05-28 18:54:08 +03:00
Edward Hartnett
aba1f76f72 adding quantize documentation 2022-05-28 13:48:16 +03:00
Dennis Heimbigner
d7e57d261a Update to default --with-plugin-dir to yes 2022-05-24 20:05:19 -06:00
Dennis Heimbigner
7bf06df1c3 rebuild 2022-05-22 16:40:55 -06:00
Dennis Heimbigner
aaa7be64d7 Update docs again 2022-05-22 16:16:41 -06:00
Dennis Heimbigner
aa7d9524e0 Update documentation 2022-05-20 14:08:53 -06:00
Dennis Heimbigner
6ae3289701 I made a major update to this PR with the following changes:
## Overwriting
I think I solved the file overwrite problem by doing light name
mangling of the shared library names. With this change the probabilty
is very small that installing our filter wrappers in a directory will
overwrite code produced by others.

## Default Install Location
I have setup the --with-plugin-dir option default to install in
the following locations in order of preference

1. If HDF5_PLUGIN_PATH is defined (at build time remember), then the last directory in that path will be where the filter wrapper shared libraries will be installed.
2. Otherwise the default is "/usr/local/hdf5/lib/plugin" (on *nix*) or "%ALLUSERSPROFILE%\\hdf5\\lib\\plugin" for Windows or Mingw.

Currently, --with-plugin-dir is disabled by default.
I should note that even if I enable it by default, installing
netcdf-c will still not run "out of the box" because the hypothetical
naive user will not know which compressor libraries need to be
pre-installed before netcdf is installed. Nor will that user have any
way to find out what needs to be installed.
2022-05-19 22:00:40 -06:00
Ward Fisher
375e5adfe4
Merge branch 'main' into alwaysxarray.dmh 2022-05-17 13:23:19 -06:00
Ward Fisher
e5f1d0846b correct links for gliderscope and netcdfninja in software.html 2022-05-12 15:07:42 -06:00
Edward Hartnett
c3d201a8b9
Merge branch 'main' into ejh_doc_4 2022-05-05 08:16:40 -06:00
Ward Fisher
821f69f669
Merge branch 'main' into updatedocs.dmh 2022-05-04 17:01:06 -06:00
Edward Hartnett
7a61c9a8d4 added netcdf_filter.h to doxygen build 2022-05-04 13:12:48 -06:00
Edward Hartnett
955b77f831 removed all-error-codes.md 2022-05-04 10:05:38 -06:00
Edward Hartnett
0d7cbf1911 doxygen for filter functions 2022-05-04 08:04:54 -06:00
Edward Hartnett
6849f44896 more doxygen warning fixes 2022-05-03 12:54:14 -06:00
Edward Hartnett
14e80b4673 fixing doxygen warnings 2022-05-03 09:41:45 -06:00
Edward Hartnett
1b0ca07a3c added nc4cache.c to list of doxygen input files 2022-05-03 08:56:02 -06:00
Dennis Heimbigner
f897b458ea Fix szip handling 2022-04-30 19:06:01 -06:00
Dennis Heimbigner
126b3f9423 Support installation of filters into user-specified location
re: https://github.com/Unidata/netcdf-c/issues/2294

Ed Hartnett suggested that the netcdf library installation process
be extended to install the standard filters into a user specified
location. The user can then set HDF5_PLUGIN_PATH to that location.

This PR provides that capability using:
````
configure option: --with-plugin-dir=<absolute directory path>
cmake option: -DPLUGIN_INSTALL_DIR=<absolute directory path>
````

Currently, the following plugins are always installed, if
available: bzip2, zstd, blosc.
If NCZarr is enabled, then additional plugins are installed:
fletcher32, shuffle, deflate, szip.

Additionally, the necessary codec support is installed
for each of the above filters that is installed.

## Changes:
1. Cleanup handling of built-in bzip2.
2. Add documentation to docs/filters.md
3. Re-factor the NCZarr codec libraries
4. Add a test, although it can only be exercised after
   the library is installed, so it cannot be used during
   normal testing.
5. Cleanup use of HDF5_PLUGIN_PATH in the filter test cases.
2022-04-29 14:31:55 -06:00