Commit Graph

101 Commits

Author SHA1 Message Date
Dennis Heimbigner
59e04ae071 This PR adds EXPERIMENTAL support for accessing data in the
cloud using a variant of the Zarr protocol and storage
format. This enhancement is generically referred to as "NCZarr".

The data model supported by NCZarr is netcdf-4 minus the user-defined
types and the String type. In this sense it is similar to the CDF-5
data model.

More detailed information about enabling and using NCZarr is
described in the document NUG/nczarr.md and in a
[Unidata Developer's blog entry](https://www.unidata.ucar.edu/blogs/developer/en/entry/overview-of-zarr-support-in).

WARNING: this code has had limited testing, so do use this version
for production work. Also, performance improvements are ongoing.
Note especially the following platform matrix of successful tests:

Platform | Build System | S3 support
------------------------------------
Linux+gcc      | Automake     | yes
Linux+gcc      | CMake        | yes
Visual Studio  | CMake        | no

Additionally, and as a consequence of the addition of NCZarr,
major changes have been made to the Filter API. NOTE: NCZarr
does not yet support filters, but these changes are enablers for
that support in the future.  Note that it is possible
(probable?) that there will be some accidental reversions if the
changes here did not correctly mimic the existing filter testing.

In any case, previously filter ids and parameters were of type
unsigned int. In order to support the more general zarr filter
model, this was all converted to char*.  The old HDF5-specific,
unsigned int operations are still supported but they are
wrappers around the new, char* based nc_filterx_XXX functions.
This entailed at least the following changes:
1. Added the files libdispatch/dfilterx.c and include/ncfilter.h
2. Some filterx utilities have been moved to libdispatch/daux.c
3. A new entry, "filter_actions" was added to the NCDispatch table
   and the version bumped.
4. An overly complex set of structs was created to support funnelling
   all of the filterx operations thru a single dispatch
   "filter_actions" entry.
5. Move common code to from libhdf5 to libsrc4 so that it is accessible
   to nczarr.

Changes directly related to Zarr:
1. Modified CMakeList.txt and configure.ac to support both C and C++
   -- this is in support of S3 support via the awd-sdk libraries.
2. Define a size64_t type to support nczarr.
3. More reworking of libdispatch/dinfermodel.c to
   support zarr and to regularize the structure of the fragments
   section of a URL.

Changes not directly related to Zarr:
1. Make client-side filter registration be conditional, with default off.
2. Hack include/nc4internal.h to make some flags added by Ed be unique:
   e.g. NC_CREAT, NC_INDEF, etc.
3. cleanup include/nchttp.h and libdispatch/dhttp.c.
4. Misc. changes to support compiling under Visual Studio including:
   * Better testing under windows for dirent.h and opendir and closedir.
5. Misc. changes to the oc2 code to support various libcurl CURLOPT flags
   and to centralize error reporting.
6. By default, suppress the vlen tests that have unfixed memory leaks; add option to enable them.
7. Make part of the nc_test/test_byterange.sh test be contingent on remotetest.unidata.ucar.edu being accessible.

Changes Left TO-DO:
1. fix provenance code, it is too HDF5 specific.
2020-06-28 18:02:47 -06:00
Dennis Heimbigner
44d0dcaad2 Add support for multiple filters per variable.
re: https://github.com/Unidata/netcdf-c/issues/1584

Support has been added for multiple filters per variable.  This
affects a number of components in netcdf. The new APIs are
documented in NUG/filters.md.

The primary changes are:
* A set of new functions are provided (see __include/netcdf_filter.h__).
    - Obtain a list of the filters associated with a variable
    - Obtain the parameters for a specific filter.
* The existing __nc_inq_var_filter__ function now returns info
  about the first defined filter.
* The utilities (ncgen, ncdump, and nccopy) now support
  an extended format for specifying a sequence of filters.
  The general form is __<filter>|<filter>..._.
* The ncdump **_Filter** attribute now dumps a list of all the
  filters associated with a variable using the above new format.
* Filter specifications can now use a filter name instead of number
  for filters known to the netcdf library, which in turn is taken
  from the HDF5 filter registration page.
* New errors are defined: NC_EFILTER and NC_ENOFILTER. The latter
  is returned if an attempt is made to access an unknown filter.
* Internally, the dispatch table has been extended to add a function
  to handle all of the filter functions.
* New, filter-related, tests were added to nc_test4.
* A new plugin was added to the plugins directory to help with testing.

Notes:
1. The shuffle and fletcher32 filters are not part of the multifilter system.

Misc. changes:
1. A debug module was added to libhdf5 to help catch error locations.
2020-02-16 12:59:33 -07:00
edwardhartnett
26020e2f14 fixed Makefile.am 2019-08-13 16:35:54 -06:00
edwardhartnett
978707c319 only run slow nclist test if --enable-large-file-tests is used 2019-08-13 10:55:44 -06:00
edwardhartnett
88077fe26e more comments 2019-08-13 06:31:06 -06:00
edwardhartnett
821b749186 removed unnecessary checking in find_in_NCList() 2019-08-13 06:03:48 -06:00
edwardhartnett
298136a73a starting to add unit tests 2019-08-09 09:31:24 -06:00
Ed Hartnett
e5e3105aee adding nc_perf directory 2019-03-17 08:06:02 -06:00
Ed Hartnett
7902615b1c adding nc_perf directory 2019-03-17 08:03:27 -06:00
Ed Hartnett
c824ad9ec9 further removal of libhdf5 code from libsrc4 2018-11-28 15:48:08 -07:00
Wei-keng Liao
48da78e133 Use PnetCDF instead of parallel-netcdf to avoid confusion with
parallel netcdf4. Also, update PnetCDF web page.
2018-09-17 17:18:48 -05:00
Ed Hartnett
5526ca65d1 created libhdf5, moved some files 2018-05-08 11:58:01 -06:00
Dennis Heimbigner
d3b309722e re: gh issue https://github.com/Unidata/netcdf-c/issues/911
I took Ed's advice and moved the plugin stuff to its own
top-level directory. This is an attempt to solve the problem of
copying files that we have experienced. In any case, it will
serve as a place to stick additional plugins.
2018-04-21 20:10:47 -06:00
Ward Fisher
1e0cf1136c
Merge branch 'master' into ncpyfilter.dmh 2018-03-08 15:48:40 -07:00
Ed Hartnett
016049e509 fixed makefile for hdf4_test 2018-03-05 05:53:41 -07:00
Dennis Heimbigner
dd4e71c150 1. Solve issue raised on netcdfgroup mailing list:
https://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2018/msg00020.html
See docs/filters.md for a detailed description of the solution.
Basically we add nccopy flags "-F none" and "-F <varname>:none"
to suppress output compression as desired.

2. Add tests to nc_test4/tst_filter.sh to test out the solution.
2018-03-02 16:55:58 -07:00
Ed Hartnett
2358d4a910 moved HDF4 to its own dispatch layer 2018-02-08 06:20:58 -07:00
Ed Hartnett
3ba04ac337 updated year 2018-02-02 08:45:03 -07:00
Ed Hartnett
23af1a98e8 Makefile.am cleanup 2018-02-02 08:42:49 -07:00
Ed Hartnett
4f983e5803 autotools cleanup 2017-11-30 05:29:22 -07:00
Ed Hartnett
76cd491426 clean up 2017-11-19 06:56:44 -07:00
Ed Hartnett
21053f5c49 clean up and removal of extra_tests 2017-11-17 15:35:14 -07:00
Ward Fisher
8dddd222a3 Merged master, DAP4 support into branch. 2017-04-19 09:29:35 -06:00
Dennis Heimbigner
3db4f013bf Primary change: add dap4 support
Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
   Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
	configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
   the handling of the locations of various
   things in the build tree: e.g. where is
   ncgen.exe located. See nc_test/test_common.sh
   for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
   netcdf-c. This means replacing code with netcdf-c
   equivalents.
5. Add --with-testserver to configure.ac to allow
   override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
   centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
   a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
   .../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
	- #include <config.h> -> #include "config.h"
	- Add some no-install headers to /include
	- extern -> EXTERNL and vice versa as needed
	- misc header cleanup
	- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
2017-03-08 17:01:10 -07:00
Wei-keng Liao
beac085c7d more updates due to renaming test_read.c and test_write.c to m4 files 2016-10-13 02:56:50 -05:00
Dennis Heimbigner
cd7a06b193 pull request 2015-10-12 17:09:37 -06:00
dmh
181f87048c update mm4 target 2015-10-09 10:27:35 -06:00
dmh
9f65c3b808 cleanup and squash changes vav master 2015-10-09 10:26:49 -06:00
dmh
b87799955e update mm4 target 2015-10-09 10:12:11 -06:00
dmh
087ae58ffd cleanup and squash changes vav master 2015-10-09 10:12:11 -06:00
dmh
027d330e05 update mm4 target 2015-08-17 13:29:25 -06:00
dmh
2bfe9bba32 cleanup and squash changes vav master 2015-08-16 21:44:18 -06:00
dmh
fab66699d1 Moved libsrc5 to libsrcp
because pnetcdf is used for
more than CDF-5 files.
2015-08-14 20:39:56 -06:00
xantares
76740232d7 install .def to /bin 2015-08-03 23:31:37 +02:00
Ward Fisher
f8276353d7 Changed EXTRA_DIST to include the new INSTALL.md file. 2015-04-06 14:36:00 -06:00
Ward Fisher
21cf17845e Added a missing file to EXTRA_DIST statement in Makefile.am 2015-01-14 11:13:34 -07:00
Ward Fisher
f20baaf19c Added custom targets for autotools-based builds. Added some checks to the postinstall script template so that it would exit if git wasn't found on the system. Also changed it to specify LIBS in case of static-only build. 2014-11-19 16:57:51 -07:00
Ward Fisher
57b5f15297 First pass at script to install netcdf-fortran automatically is completed. 2014-11-18 15:33:16 -07:00
Ward Fisher
69d487e57a Added DESTDIR compatibility for netcdf builds that generate a dll via autotools. 2014-10-29 16:09:37 -06:00
Ward Fisher
abeba6753d Fixed an issue regarding which files are included in 'make dist'. 2014-08-25 12:38:38 -06:00
Ward Fisher
cf87b409fe Removed stray comment characters, updated autotools-based build to package cmake export file template. 2014-08-20 12:33:49 -06:00
Ward Fisher
3b62a3bba1 Fixed automake based builds so that libnetcdf.settings would be properly installed. 2014-07-23 14:48:36 -06:00
Ward Fisher
0ef220c9c7 Bumped required hdf5 version. 2014-07-23 14:26:15 -06:00
Ward Fisher
6c0e34f89a Added skeleton for libnetcdf.settings. See JIRA ticket at https://bugtracking.unidata.ucar.edu/browse/NCF-303 2014-05-30 13:36:35 -06:00
Ward Fisher
94fda7630b Made template naming convention more uniform. 2014-05-29 13:23:24 -06:00
Ward Fisher
05aaa4b376 Renamed man4 directory to docs. 2014-05-21 14:40:39 -06:00
Ward Fisher
3e9ab21fcb Corrected missing files in the package generated by 'make dist' 2014-04-16 16:16:05 -06:00
dmh
98d27e838d [NCF-299]
When a .dodsrc file is present, and
specifies user name and password,
it is being ignored after the first time.

Fix required a major rewrite of ocrc.c because
it was mishandling a number of .dodsrc entries.
2014-04-16 14:08:12 -06:00
Ward Fisher
74ed07a086 Replaced missing character. 2014-02-06 11:34:13 -07:00
Ward Fisher
16400df5e0 Resolved Conflict when cherry-picking patches. 2014-02-06 11:33:31 -07:00