Commit Graph

47 Commits

Author SHA1 Message Date
Greg Sjaardema
28457cb570 Disable varible rename test
This PR adds the coordinate dimids to all variables; previously 1D
variables did not have it.  There is an issue with renaming variables
with the coordinate dimid which is now exposed in this test which
renames a 1D variable.

Disabling parts of this test until the variable renaming code can be
refactored.
2021-08-12 10:56:39 -06:00
Dennis Heimbigner
aeb3ac2809 Mostly revert the filter code to reduce its complexity of use.
re: https://github.com/Unidata/netcdf-c/issues/1836

Revert the internal filter code to simplify it. From the user's
point of view, the only visible changes should be:

1. The functions that convert text to filter specs have had their signature reverted and have been moved to netcdf_aux.h
2. Some filter API functions now return NC_ENOFILTER when inquiry is made about some filter.

Internally,the dispatch table has been modified to get rid of the filter_actions
entry and associated complex structures. It has been replaced with
inq_var_filter_ids and inq_var_filter_info entries and the dispatch table
version has been bumped to 3. Corresponding NOOP and NOTNC4 functions
were added to libdispatch/dnotnc4.c. Also, the filter_action entries
in dispatch tables were replaced for all dispatch code bases (HDF5, DAP2,
etc). This should only impact UDF users.

In the process, it became clear that the form of the filters
field in NC_VAR_INFO_T was format dependent, so I converted it to
be of type void* and pushed its management into the various dispatch
code bases. Specifically libhdf5 and libnczarr now manage the filters
field in their own way.

The auxilliary functions for parsing textual filter specifications
were moved to netcdf_aux.h and were renamed to the following:
* ncaux_h5filterspec_parse
* ncaux_h5filterspec_parselist
* ncaux_h5filterspec_free
* ncaux_h5filter_fix8

Misc. Other Changes:

1. Document NUG/filters.md updated to reflect the changes above.
2. All the old data types (structs and enums)
   used by filter_actions actions were deleted.
   The exception is the NC_H5_Filterspec because it is needed
   by ncaux_h5filterspec_parselist.
3. Clientside filters were removed -- another enhancement
   for which no-one ever asked.
4. The ability to remove filters was itself removed.
5. Some functionality needed by nczarr was moved from libhdf5
   to libsrc4 e.g. nc4_find_default_chunksizes
6. All the filterx code was removed
7. ncfilter.h and nc4filter.c no longer used

Misc. Unrelated Changes:

1. The nczarr_test makefile clean was leaving some directories; so
   add clean-local to take care of them.
2020-09-27 12:43:46 -06:00
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
Edward Hartnett
edea5e3552 now pass 0 for deflate_level if deflate not in use 2020-03-16 11:01:13 -06:00
Edward Hartnett
502336c2c7 now return NC_EINVAL on attempt to set chunking on scalar var 2020-03-03 11:57:16 -07:00
Dennis Heimbigner
73537603e2 Make scalar X filter return an error instead of ignoring it 2020-03-02 15:10:54 -07:00
Edward Hartnett
bf3407ce67 more tests 2020-02-04 05:38:15 -07:00
Ward Fisher
462ec93913 Whew! Updated copyright stanza in nc_test4. 2018-12-06 15:27:32 -07:00
Ed Hartnett
9a2782b56c got long working with master 2018-06-05 14:40:49 -06:00
luz.paz
74fbacdb82 Misc. source comment typos
Some are user-facing. Found via `codespell` and through the downstream FreeCAD.
2018-04-26 23:04:01 -04:00
Ward Fisher
8e169175e4
Merge branch 'master' into newhash0.dmh 2018-02-22 14:55:31 -07:00
Ward Fisher
f9f27c5ab7
Merge branch 'master' into newhash0.dmh 2018-02-21 14:19:43 -07:00
Ed Hartnett
b0a8d4ee30 fixed merge issue 2018-02-14 07:58:50 -07:00
Ed Hartnett
41eb0f26c1
Merge branch 'master' into ejh_extra_tests 2018-02-13 15:48:35 -07:00
Ed Hartnett
cb4722a0cf fix for memory problem in tst_vars2.c 2018-02-13 13:49:29 -07:00
Ward Fisher
878b107d36 Corrected overflow error in support of https://github.com/Unidata/netcdf-c/issues/861 2018-02-13 12:18:06 -07:00
Dennis Heimbigner
727b613459 This is the initial step in moving to the new higher performance
(I hope) metadata mechanism. This mostly just adds new pieces of
code (e.g. nclistmap) and does some minor fixes.

It should be transparent to everything else.
The next set of changes will be the big step.
2018-02-08 19:53:40 -07:00
Ward Fisher
e0577cb251 Merge branch 'ejh_fill_value_string_unidata' of https://github.com/NetCDF-World-Domination-Council/netcdf-c into ejh_batch 2018-02-05 11:47:34 -07:00
Greg Sjaardema
63b700c40c
Remove V2 code if V2 API not being built
Remove test code that uses the version 2 API if the version 2 API code is not being activated in the build.

This was originally proposed in #656 with a better fix in #755 which was removed.
2018-01-31 09:00:17 -07:00
Ed Hartnett
94c23712b7 extra tests, plus fill value fixes for string type 2018-01-30 14:39:47 -07:00
Ed Hartnett
2066232dc0 more tests, more interanl documentation 2017-12-03 06:05:37 -07:00
Ed Hartnett
9e4c564656 more tests 2017-12-02 18:00:22 -07:00
Ed Hartnett
8055c1cede more tests 2017-12-02 17:43:46 -07:00
Ed Hartnett
996e39373f more test 2017-12-02 15:52:49 -07:00
Ed Hartnett
1cf8177f45 more test 2017-12-02 15:43:40 -07:00
Ed Hartnett
ea63ff526f more tests 2017-12-02 08:05:17 -07:00
Ed Hartnett
bfeb8d4e0b more testing 2017-12-02 07:38:01 -07:00
Ed Hartnett
7cd344f7b0 removed redundant check in NC4_def_var() 2017-12-02 07:23:23 -07:00
Ed Hartnett
6c3aa79684 more testing of nc_set_var_chunk_cache_ints 2017-12-02 07:15:19 -07:00
Ed Hartnett
d840bc7160 starting adding testing for _int() functions for caching 2017-12-02 06:52:13 -07:00
Ed Hartnett
300236cd8c more tests 2017-12-01 15:08:22 -07:00
Ed Hartnett
58f422e2a8 more tests 2017-12-01 14:33:32 -07:00
Ed Hartnett
acbd3e259e more tests 2017-12-01 13:58:13 -07:00
Ed Hartnett
ded01e0aba more tests 2017-12-01 13:15:58 -07:00
Ed Hartnett
a8e9c196e2 more tests, fixed documentation warnings 2017-12-01 13:02:59 -07:00
Ed Hartnett
42c482d33c more tests 2017-12-01 11:20:09 -07:00
Ed Hartnett
ce1df112a5 more testing for nc4var.c functions 2017-12-01 09:38:32 -07:00
Ed Hartnett
2023ed6b7c fixed problems with bad inputs to nc_def_Var 2017-12-01 09:08:12 -07:00
Ed Hartnett
b257353b18 fixed commented out tests 2017-11-03 08:14:08 -06:00
Ed Hartnett
6363cae315 fixed warnings 2017-10-24 12:18:20 -06:00
Wei-keng Liao
73ccb364a9 To solve NC_ELATEFILL error for NetCDF-4 files, mark all variables written at enddef. 2017-03-24 20:55:00 -05:00
Ward Fisher
1c11fc5d59 More refactoring, pushing to avoid accidental loss. 2016-10-21 19:24:40 +00:00
tbeu
e2820e4d8a Fix common typos
Detected by https://github.com/vlajos/misspell_fixer
2015-08-20 11:42:05 +02:00
Ward Fisher
74209d373e Corrected an issue with disabling the V2 API support in cmake-based builds. 2014-04-03 10:45:22 -06:00
Ed Hartnett
a0e1b037e5 added nc_inq_path in dispatch tables 2010-08-18 15:11:17 +00:00
Ed Hartnett
0e855e0dc5 more changes to make netcdf-4 use less memory per variable 2010-07-01 11:39:34 +00:00
Ed Hartnett
0b54b49991 moved some tests which used v2 API from libsrc4 to nc_test4, to allow the library to be built before the tests 2010-06-15 15:24:28 +00:00