Go to file
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
.github Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
cmake Fix szip handling 2022-04-30 19:06:01 -06:00
conda.recipe Attempting appveyor support. Based on work by @ocefpaf, see https://github.com/Unidata/netcdf-c/pull/347 for more information. 2018-04-24 11:28:22 -06:00
ctest_scripts Added a ctest script with DAP tests enabled. 2020-02-11 15:09:29 -07:00
dap4_test Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
docs Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
examples Improve filter installation process to avoid use of an extra shell script 2022-05-14 16:05:48 -06:00
fuzz Cleaning up make dist, it's generating tarballs that don't work with cmake. 2022-02-01 11:40:01 -07:00
h5_test Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
hdf4_test Spelling fixes 2019-09-18 08:03:01 -06:00
include Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
libdap2 Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
libdap4 Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
libdispatch Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
libhdf4 Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
libhdf5 Merge pull request #1701 from magnusuMET/bugfix/musl_build 2022-08-12 15:09:59 -06:00
liblib Fix AWS SDK linking errors 2022-08-03 09:59:06 -04:00
libncpoco Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
libncxml 1. Fix conflicts with current master. 2022-03-15 15:33:13 -06:00
libnczarr Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
libsrc Use int64_t instead of __int64 2022-07-20 08:45:55 +02:00
libsrc4 Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
libsrcp Enhance/Fix filter support 2022-03-14 12:39:37 -06:00
nc_perf Improve UTF8 Support On Windows 2022-02-08 20:53:30 -07:00
nc_test Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
nc_test4 Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
ncdap_test Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
ncdump Merge branch 'main' into enumdfalt.dmh 2022-07-26 15:23:40 -06:00
ncgen Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
ncgen3 Ensure that netcdf_json.h does not interfere with ncjson. 2022-07-05 22:03:52 -06:00
nctest Improve filter installation process to avoid use of an extra shell script 2022-05-14 16:05:48 -06:00
nczarr_test Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
NUG Removed NUG files, added a README.md file directing people to the correct location. 2020-10-06 11:13:56 -06:00
oc2 Merge pull request #2050 from e4t/strict-aliasing 2022-03-10 15:22:58 -07:00
plugins Specify correct plugin suffix 2022-06-08 07:45:03 -06:00
unit_test Support installation of filters into user-specified location 2022-04-29 14:31:55 -06:00
.gitignore intellij 2021-11-11 10:43:04 -07:00
acinclude.m4 Add support for setting HDF5 alignment property when creating a file 2022-01-29 15:27:52 -07:00
appveyor.yml unblock dmh appveyor 2020-12-02 18:17:07 -07:00
bootstrap Renamed autogen file. 2019-01-16 11:22:17 -07:00
cmake_uninstall.cmake.in Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
CMakeInstallation.cmake Update CMakeInstallation.cmake 2022-01-19 14:35:32 -07:00
CMakeLists.txt Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
COMPILE.cmake.txt Merging from CMake branch in preparation for 4.3.0 release. 2013-04-29 20:15:57 +00:00
config.h.cmake.in fix musl build 2022-07-20 08:45:55 +02:00
config.h.cmake.in.old-works c: remove __CHAR_UNSIGNED__ 2018-02-14 17:24:49 -05:00
configure.ac Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
COPYRIGHT Modifying COPYRIGHT to reflect a standardized license, the BSD 3-clause license. 2018-12-04 15:17:54 -07:00
CTestConfig.cmake.in Adding new security stance to cdash instance. 2019-11-18 10:58:44 -07:00
CTestCustom.cmake Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
dods.m4 Spelling fixes 2019-09-18 08:03:01 -06:00
FixBundle.cmake.in Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
INSTALL.md docs migration, part 2 2021-11-11 10:55:52 -07:00
lib_flags.am Merge branch 'tinyxml2.dmh' of https://github.com/DennisHeimbigner/netcdf-c into gh2170.wif 2022-03-29 11:31:31 -06:00
libnetcdf.settings.in Support installation of filters into user-specified location 2022-04-29 14:31:55 -06:00
Makefile.am Turned off plugin directory during CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash '/home/wfisher/Desktop/gitprojects/netcdf-c/missing' aclocal-1.16 -I m4 in support of https://github.com/Unidata/netcdf-c/pull/2348#issuecomment-1142649052 2022-05-31 15:50:37 -06:00
mclean Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
nc-config.cmake.in Improve the building of NCZARR S3 support in CMake and Autoconf 2020-10-16 15:04:51 -06:00
nc-config.in added some entries to nc-config 2022-04-30 06:48:16 -06:00
netcdf.pc.in Docs migration 2021-11-11 10:47:49 -07:00
netCDFConfig.cmake.in Correct typo. 2020-01-24 16:53:16 -07:00
PostInstall.cmake Reorganized postinstall scripts. 2014-11-18 12:52:41 -07:00
postinstall.sh.in Fix typo postinstall. 2020-08-06 15:27:20 -04:00
README.md Remove stale badges, add badge for Repology in support of https://github.com/Unidata/netcdf-c//pull/1350 2022-03-10 14:31:54 -07:00
RELEASE_NOTES.md Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
test_common.in Add support for Zarr string type to NCZarr 2022-08-27 20:21:13 -06:00
test_prog.c Misc. files updated with copyright stanza. 2018-12-06 15:51:35 -07:00
test-driver-verbose Support MSYS2/Mingw platform 2021-12-23 22:18:56 -07:00
wjna Backadded the fix of Jira-228 2014-06-13 13:41:11 -06:00

Unidata NetCDF

latest packaged version(s)

About

The Unidata network Common Data Form (netCDF) is an interface for scientific data access and a freely-distributed software library that provides an implementation of the interface. The netCDF library also defines a machine-independent format for representing scientific data. Together, the interface, library, and format support the creation, access, and sharing of scientific data. The current netCDF software provides C interfaces for applications and data. Separate software distributions available from Unidata provide Java, Fortran, Python, and C++ interfaces. They have been tested on various common platforms.

Properties

NetCDF files are self-describing, network-transparent, directly accessible, and extendible. Self-describing means that a netCDF file includes information about the data it contains. Network-transparent means that a netCDF file is represented in a form that can be accessed by computers with different ways of storing integers, characters, and floating-point numbers. Direct-access means that a small subset of a large dataset may be accessed efficiently, without first reading through all the preceding data. Extendible means that data can be appended to a netCDF dataset without copying it or redefining its structure.

Use

NetCDF is useful for supporting access to diverse kinds of scientific data in heterogeneous networking environments and for writing application software that does not depend on application-specific formats. For information about a variety of analysis and display packages that have been developed to analyze and display data in netCDF form, see

More information

For more information about netCDF, see

Latest releases

You can obtain a copy of the latest released version of netCDF software for various languages:

Copyright and licensing information can be found here, as well as in the COPYRIGHT file accompanying the software

Installation

To install the netCDF-C software, please see the file INSTALL in the netCDF-C distribution, or the (usually more up-to-date) document:

Documentation

A language-independent User's Guide for netCDF, and some other language-specific user-level documents are available from:

A mailing list, netcdfgroup@unidata.ucar.edu, exists for discussion of the netCDF interface and announcements about netCDF bugs, fixes, and enhancements. For information about how to subscribe, see the URL

Feedback

We appreciate feedback from users of this package. Please send comments, suggestions, and bug reports to support-netcdf@unidata.ucar.edu.