2018-04-05 04:11:44 +08:00
|
|
|
/* Copyright 2018, UCAR/Unidata See netcdf/COPYRIGHT file for copying
|
|
|
|
* and redistribution conditions.*/
|
|
|
|
/**
|
|
|
|
* @file
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal This file contains functions that
|
|
|
|
* can be used in dispatch tables to handle
|
|
|
|
* such things as unimplemented functions.
|
|
|
|
* As a rule, these functions will return NC_ENOTNC4.
|
|
|
|
* In some cases, the function may succeed and set
|
|
|
|
* appropriate output parameter values. These are indicated
|
|
|
|
* by the NC_NOOP prefix to the function name.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @author Ed Hartnett, Dennis Heimbigner
|
2018-04-05 04:11:44 +08:00
|
|
|
*/
|
|
|
|
|
2020-02-17 03:59:33 +08:00
|
|
|
#include "netcdf.h"
|
|
|
|
#include "netcdf_filter.h"
|
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-29 08:02:47 +08:00
|
|
|
#include "netcdf_aux.h"
|
2018-04-05 04:11:44 +08:00
|
|
|
#include "ncdispatch.h"
|
2020-02-17 03:59:33 +08:00
|
|
|
#include "nc4internal.h"
|
2018-04-05 04:11:44 +08:00
|
|
|
|
2021-08-24 14:45:38 +08:00
|
|
|
/**
|
|
|
|
* @internal Not implemented in some dispatch tables
|
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param quantize_mode Ignored.
|
|
|
|
* @param nsd Ignored.
|
|
|
|
*
|
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table
|
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
2021-08-24 15:26:44 +08:00
|
|
|
/**
|
|
|
|
* @internal Not implemented in some dispatch tables
|
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param quantize_modep Ignored.
|
|
|
|
* @param nsdp Ignored.
|
|
|
|
*
|
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table
|
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_var_quantize(int ncid, int varid, int *quantize_modep,
|
|
|
|
int *nsdp)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
2018-04-05 04:11:44 +08:00
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented in some dispatch tables
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param id Ignored.
|
|
|
|
* @param nparams Ignored.
|
|
|
|
* @param parms Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
2020-09-28 02:43:46 +08:00
|
|
|
NC_NOTNC4_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, const unsigned int* parms)
|
2018-04-05 04:11:44 +08:00
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
2020-09-28 02:43:46 +08:00
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_var_filter_ids(int ncid, int varid, size_t* nfilters, unsigned int* filterids)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_var_filter_info(int ncid, int varid, unsigned int id, size_t* nparams, unsigned int* params)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
NC_NOOP_inq_var_filter_ids(int ncid, int varid, size_t* nfilters, unsigned int* filterids)
|
|
|
|
{
|
|
|
|
if(nfilters) *nfilters = 0;
|
|
|
|
return NC_NOERR;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
NC_NOOP_inq_var_filter_info(int ncid, int varid, unsigned int id, size_t* nparams, unsigned int* params)
|
|
|
|
{
|
|
|
|
return NC_ENOFILTER;
|
|
|
|
}
|
2018-04-05 04:11:44 +08:00
|
|
|
|
Enhance/Fix filter support
re: Discussion https://github.com/Unidata/netcdf-c/discussions/2214
The primary change is to support so-called "standard filters".
A standard filter is one that is defined by the following
netcdf-c API:
````
int nc_def_var_XXX(int ncid, int varid, size_t nparams, unsigned* params);
int nc_inq_var_XXXX(int ncid, int varid, int* usefilterp, unsigned* params);
````
So for example, zstandard would be a standard filter by defining
the functions *nc_def_var_zstandard* and *nc_inq_var_zstandard*.
In order to define these functions, we need a new dispatch function:
````
int nc_inq_filter_avail(int ncid, unsigned filterid);
````
This function, combined with the existing filter API can be used
to implement arbitrary standard filters using a simple code pattern.
Note that I would have preferred that this function return a list
of all available filters, but HDF5 does not support that functionality.
So this PR implements the dispatch function and implements
the following standard functions:
+ bzip2
+ zstandard
+ blosc
Specific test cases are also provided for HDF5 and NCZarr.
Over time, other specific standard filters will be defined.
## Primary Changes
* Add nc_inq_filter_avail() to netcdf-c API.
* Add standard filter implementations to test use of *nc_inq_filter_avail*.
* Bump the dispatch table version number and add to all the relevant
dispatch tables (libsrc, libsrcp, etc).
* Create a program to invoke nc_inq_filter_avail so that it is accessible
to shell scripts.
* Cleanup szip support to properly support szip
when HDF5 is disabled. This involves detecting
libsz separately from testing if HDF5 supports szip.
* Integrate shuffle and fletcher32 into the existing
filter API. This means that, for example, nc_def_var_fletcher32
is now a wrapper around nc_def_var_filter.
* Extend the Codec defaulting to allow multiple default shared libraries.
## Misc. Changes
* Modify configure.ac/CMakeLists.txt to look for the relevant
libraries implementing standard filters.
* Modify libnetcdf.settings to list available standard filters
(including deflate and szip).
* Add CMake test modules to locate libbz2 and libzstd.
* Cleanup the HDF5 memory manager function use in the plugins.
* remove unused file include//ncfilter.h
* remove tests for the HDF5 memory operations e.g. H5allocate_memory.
* Add flag to ncdump to force use of _Filter instead of _Deflate
or _Shuffle or _Fletcher32. Used for testing.
2022-03-15 02:39:37 +08:00
|
|
|
int
|
|
|
|
NC_NOOP_inq_filter_avail(int ncid, unsigned id)
|
|
|
|
{
|
|
|
|
NC_UNUSED(ncid);
|
|
|
|
return NC_ENOFILTER;
|
|
|
|
}
|
|
|
|
|
2018-04-05 04:11:44 +08:00
|
|
|
/**
|
|
|
|
* @internal Not allowed for classic model.
|
|
|
|
*
|
|
|
|
* @param parent_ncid Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param new_ncid Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_grp(int parent_ncid, const char *name, int *new_ncid)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param grpid Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_rename_grp(int grpid, const char *name)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param size Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param typeidp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param offset Ignored.
|
|
|
|
* @param field Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_insert_compound(int ncid, nc_type typeid1, const char *name, size_t offset,
|
|
|
|
nc_type field_typeid)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param offset Ignored.
|
|
|
|
* @param field Ignored.
|
|
|
|
* @param ndims Ignored.
|
|
|
|
* @param dim Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
extern int
|
|
|
|
NC_NOTNC4_insert_array_compound(int ncid, int typeid1, const char *name,
|
|
|
|
size_t offset, nc_type field_typeid,
|
|
|
|
int ndims, const int *dim_sizesp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param fieldid Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param offsetp Ignored.
|
|
|
|
* @param field Ignored.
|
|
|
|
* @param ndimsp Ignored.
|
|
|
|
* @param dim Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_compound_field(int ncid, nc_type typeid1, int fieldid, char *name,
|
|
|
|
size_t *offsetp, nc_type *field_typeidp, int *ndimsp,
|
|
|
|
int *dim_sizesp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param fieldidp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_compound_fieldindex(int ncid, nc_type typeid1, const char *name, int *fieldidp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Opaque type. */
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param datum Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param typeidp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_opaque(int ncid, size_t datum_size, const char *name,
|
|
|
|
nc_type *typeidp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param base_typeid Ignored.
|
|
|
|
* @param typeidp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_vlen(int ncid, const char *name, nc_type base_typeid,
|
|
|
|
nc_type *typeidp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param base_typeid Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param typeidp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_enum(int ncid, nc_type base_typeid, const char *name,
|
|
|
|
nc_type *typeidp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param xtype Ignored.
|
|
|
|
* @param value Ignored.
|
|
|
|
* @param identifier Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_enum_ident(int ncid, nc_type xtype, long long value, char *identifier)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param idx Ignored.
|
|
|
|
* @param identifier Ignored.
|
|
|
|
* @param value Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_enum_member(int ncid, nc_type typeid1, int idx, char *identifier,
|
|
|
|
void *value)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param identifier Ignored.
|
|
|
|
* @param value Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_insert_enum(int ncid, nc_type typeid1, const char *identifier,
|
|
|
|
const void *value)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param vlen_element Ignored.
|
|
|
|
* @param len Ignored.
|
|
|
|
* @param data Ignored.
|
|
|
|
*
|
|
|
|
* @return ::NC_NOERR No error.
|
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_put_vlen_element(int ncid, int typeid1, void *vlen_element,
|
|
|
|
size_t len, const void *data)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param vlen_element Ignored.
|
|
|
|
* @param len Ignored.
|
|
|
|
* @param data Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_get_vlen_element(int ncid, int typeid1, const void *vlen_element,
|
|
|
|
size_t *len, void *data)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param size Ignored.
|
|
|
|
* @param nelems Ignored.
|
|
|
|
* @param preemption Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
|
|
|
|
float preemption)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param sizep Ignored.
|
|
|
|
* @param nelemsp Ignored.
|
|
|
|
* @param preemptionp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_get_var_chunk_cache(int ncid, int varid, size_t *sizep,
|
|
|
|
size_t *nelemsp, float *preemptionp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param shuffle Ignored.
|
|
|
|
* @param deflate Ignored.
|
|
|
|
* @param deflate_level Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett, Dennis Heimbigner
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_var_deflate(int ncid, int varid, int shuffle, int deflate,
|
|
|
|
int deflate_level)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param fletcher32 Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett, Dennis Heimbigner
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_var_fletcher32(int ncid, int varid, int fletcher32)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param contiguous Ignored.
|
|
|
|
* @param chunksizesp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett, Dennis Heimbigner
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_var_chunking(int ncid, int varid, int contiguous, const size_t *chunksizesp)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_EPERM;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param endianness Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_def_var_endian(int ncid, int varid, int endianness)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param varid Ignored.
|
|
|
|
* @param par_access Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2018-04-05 04:11:44 +08:00
|
|
|
* @author Ed Hartnett, Dennis Heimbigner
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_var_par_access(int ncid, int varid, int par_access)
|
|
|
|
{
|
2019-08-04 07:19:13 +08:00
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param grp_ncid Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_ncid(int ncid, const char *name, int *grp_ncid)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param numgrps Ignored.
|
|
|
|
* @param ncids Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_grps(int ncid, int *numgrps, int *ncids)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_grpname(int ncid, char *name)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param lenp Ignored.
|
|
|
|
* @param full_name Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_grpname_full(int ncid, size_t *lenp, char *full_name)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param parent_ncid Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_grp_parent(int ncid, int *parent_ncid)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param full_name Ignored.
|
|
|
|
* @param grp_ncid Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param nvars Ignored.
|
|
|
|
* @param varids Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_varids(int ncid, int *nvars, int *varids)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param ndims Ignored.
|
|
|
|
* @param dimids Ignored.
|
|
|
|
* @param include_parents Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param ntypes Ignored.
|
|
|
|
* @param typeids Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 07:19:13 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_typeids(int ncid, int *ntypes, int *typeids)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
2018-04-05 04:11:44 +08:00
|
|
|
}
|
2019-08-04 08:33:43 +08:00
|
|
|
|
|
|
|
/**
|
2020-04-16 04:44:58 +08:00
|
|
|
* @internal Not implemented for a dispatch table.
|
2019-08-04 08:33:43 +08:00
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param typeid1 Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param size Ignored.
|
|
|
|
* @param base_nc_typep Ignored.
|
|
|
|
* @param nfieldsp Ignored.
|
|
|
|
* @param classp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 08:33:43 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_user_type(int ncid, nc_type typeid1, char *name, size_t *size,
|
|
|
|
nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
|
|
|
|
{
|
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @internal Get the id of a type from the name.
|
|
|
|
*
|
|
|
|
* @param ncid Ignored.
|
|
|
|
* @param name Ignored.
|
|
|
|
* @param typeidp Ignored.
|
|
|
|
*
|
2020-04-16 04:44:58 +08:00
|
|
|
* @return ::NC_ENOTNC4 Not implemented for a dispatch table.
|
2019-08-04 08:33:43 +08:00
|
|
|
* @author Ed Hartnett
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
NC_NOTNC4_inq_typeid(int ncid, const char *name, nc_type *typeidp)
|
|
|
|
{
|
2020-04-16 04:44:58 +08:00
|
|
|
/* Note that this should actually work for atomic types */
|
2019-08-04 08:33:43 +08:00
|
|
|
return NC_ENOTNC4;
|
|
|
|
}
|