NEP 4.3.0
NetCDF Expansion Pack
Loading...
Searching...
No Matches
nxcdf_internal.h
Go to the documentation of this file.
1
9#ifndef NXCDF_INTERNAL_H
10#define NXCDF_INTERNAL_H
11
12#include <hdf5.h>
13#include "nep_nc4.h"
14#include "nep.h"
15#include "nxcdf/nxcdf.h"
16#include "nxcdf_err.h"
17
18#ifdef HAVE_NXCDF_PARALLEL
19#include <mpi.h>
20#include <netcdf_par.h>
26typedef struct NXCDF_MPI_INFO
27{
28 MPI_Comm comm;
29 MPI_Info info;
30} NXCDF_MPI_INFO;
31#endif /* HAVE_NXCDF_PARALLEL */
32
40#define NXCDF_CLOSE_WEAK 0x40000000
41
43int NXCDF_check_mode(int mode);
44int NXCDF_var_par_access(int ncid, int varid, int par_access);
46int NXCDF_set_fill(int ncid, int fillmode, int *old_modep);
48int NXCDF_rename_grp(int grpid, const char *name);
50int NXCDF_set_var_chunk_cache(int ncid, int varid, size_t size,
51 size_t nelems, float preemption);
53int NXCDF_get_var_chunk_cache(int ncid, int varid, size_t *sizep,
54 size_t *nelemsp, float *preemptionp);
55
60extern int NXCDF_create(const char *path, int cmode, size_t initialsz, int basepe,
61 size_t *chunksizehintp, void *parameters,
62 const NC_Dispatch *dispatch, int ncid);
63
68extern int NXCDF_open(const char *path, int mode, int basepe,
69 size_t *chunksizehintp, void *parameters,
70 const NC_Dispatch *dispatch, int ncid);
71
75extern int NXCDF_abort(int ncid);
76
80extern int NXCDF_close(int ncid, void *parameters);
81
85extern int NXCDF_sync(int ncid);
86
91extern int NXCDF_inq_format(int ncid, int *formatp);
92
96extern int NXCDF_inq_format_extended(int ncid, int *formatp, int *modep);
97
100extern const NC_Dispatch *NXCDF_dispatch_table;
101
106#define NXCDF_BACKEND_ATT "_NxcdfBackend"
109#define NXCDF_MODEL_ATT "_NxcdfModel"
111#define NXCDF_BACKEND_VALUE "nxCDF/1.0"
112
115#define NXCDF_DIMID_ATT "_Netcdf4Dimid"
118#define NXCDF_VARID_ATT "_NxcdfVarid"
122#define NXCDF_VARDIMIDS_ATT "_Netcdf4Coordinates"
125#define NXCDF_DIMCLASS "DIMENSION_SCALE"
127#define NXCDF_DIMNAME_ATT "NAME"
132#define NXCDF_NON_COORD_PREPEND "_nc4_non_coord_"
133
139typedef struct NXCDF_FILE_INFO
140{
141 hid_t hdfid;
142 hid_t rootid;
143 char *path;
144 int mode;
161#ifdef HAVE_NXCDF_PARALLEL
162 int parallel;
163 MPI_Comm comm;
165 MPI_Info info;
168 int comm_duped;
169 int info_duped;
170#endif /* HAVE_NXCDF_PARALLEL */
172
173int nxcdf_swmr_validate(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file);
174int nxcdf_swmr_activate(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file);
175int nxcdf_swmr_flush(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file);
176int nxcdf_swmr_refresh(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file);
177int nxcdf_swmr_read_aliases(NC_GRP_INFO_T *grp);
178
189
197
221
229
232int NXCDF_add_file(int ncid, const char *path, int mode,
233 NXCDF_FILE_INFO_T **filep);
236int NXCDF_get_file(int ncid, NC_FILE_INFO_T **h5p,
237 NXCDF_FILE_INFO_T **filep);
241int nxcdf_ref_file(int ncid, NC_FILE_INFO_T **h5p,
242 NXCDF_FILE_INFO_T **filep);
247int nxcdf_build_ncproperties(char **out);
253int nxcdf_get_att_special(NXCDF_FILE_INFO_T *file, const char *name,
254 nc_type *xtypep, nc_type mem_type, size_t *lenp,
255 int *attnump, void *data);
256
263
266int NXCDF_check_write_define(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file);
267
270int NXCDF_map_hdf_type(nc_type xtype, hid_t *typep);
271
275void nxcdf_close_group_hdf(NC_GRP_INFO_T *grp);
276void nxcdf_scrub_extended_atomic_data(NC_GRP_INFO_T *grp);
277
278int nxcdf_find_type(NC_GRP_INFO_T *grp, nc_type xtype,
279 NC_TYPE_INFO_T **typep);
282int nxcdf_type_size(NC_GRP_INFO_T *grp, nc_type xtype, size_t *sizep);
285int nxcdf_file_type(NC_GRP_INFO_T *grp, nc_type xtype, hid_t *typep);
288int nxcdf_memory_type(NC_GRP_INFO_T *grp, nc_type xtype, hid_t *typep);
289int nxcdf_storage_memory_type(hid_t memory, hid_t storage, hid_t *typep);
290int nxcdf_copy_data(NC *nc, nc_type xtype, const void *src, size_t count, void *dst);
294int nxcdf_hdf_type_match(NC_GRP_INFO_T *grp, hid_t htype,
295 NC_TYPE_INFO_T **typep);
299void nxcdf_free_type_info(NC_TYPE_INFO_T *type);
303int nxcdf_flush_pending_atts(NC_GRP_INFO_T *grp);
304
307int NXCDF_type_size(nc_type xtype, size_t *sizep);
308
310hid_t NXCDF_memory_type(nc_type type, int *closep);
311
313int nxcdf_convert_type(const void *src, void *dest, nc_type src_type,
314 nc_type dest_type, size_t len, int *range_error,
315 const void *fill_value, int strict_nc3,
316 int quantize_mode, int nsd, int fill_on_overflow);
317
320const char *NXCDF_type_name(nc_type xtype);
321
324int NXCDF_check_atomic_type(NXCDF_FILE_INFO_T *file, nc_type xtype);
325
328int NXCDF_load_metadata(NXCDF_FILE_INFO_T *file, NC_FILE_INFO_T *h5);
329
332int NXCDF__enddef(int ncid, size_t h_minfree, size_t v_align,
333 size_t v_minfree, size_t r_align);
334
337int NXCDF_redef(int ncid);
338
341int NXCDF_def_dim(int ncid, const char *name, size_t len, int *idp);
342
345int NXCDF_inq_dim(int ncid, int dimid, char *name, size_t *lenp);
346
349int NXCDF_def_var(int ncid, const char *name, nc_type xtype, int ndims,
350 const int *dimidsp, int *varidp);
351
355int nxcdf_find_var_for_write(int ncid, int varid, NC_FILE_INFO_T **h5,
356 NXCDF_FILE_INFO_T **file, NC_GRP_INFO_T **grp,
357 NC_VAR_INFO_T **var);
360int nxcdf_create_var_dataset(NC_VAR_INFO_T *var, NC_FILE_INFO_T *h5,
361 NXCDF_FILE_INFO_T *file, NC_GRP_INFO_T *grp);
364int nxcdf_apply_filters(hid_t dcpl, NC_VAR_INFO_T *var);
368int nxcdf_load_filters(hid_t dcpl, NC_VAR_INFO_T *var,
369 NXCDF_VAR_INFO_T *vinfo);
370
372int NXCDF_def_var_chunking(int ncid, int varid, int storage,
373 const size_t *chunksizesp);
376int NXCDF_def_var_deflate(int ncid, int varid, int shuffle,
377 int deflate, int deflate_level);
380int NXCDF_def_var_fletcher32(int ncid, int varid, int fletcher32);
383int NXCDF_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value);
386int NXCDF_def_var_endian(int ncid, int varid, int endianness);
389int NXCDF_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd);
392int NXCDF_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams,
393 const unsigned int *params);
394
397int NXCDF_inq_var(int ncid, int varid, char *name, nc_type *xtypep,
398 int *ndimsp, int *dimidsp, int *nattsp);
401int NXCDF_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
402 int *ndimsp, int *dimidsp, int *nattsp,
403 int *shufflep, int *deflatep, int *deflate_levelp,
404 int *fletcher32p, int *contiguousp, size_t *chunksizesp,
405 int *no_fillp, void *fill_valuep, int *endiannessp,
406 unsigned int *idp, size_t *nparamsp, unsigned int *params);
409int NXCDF_inq_var_filter_ids(int ncid, int varid, size_t *nfiltersp,
410 unsigned int *ids);
413int NXCDF_inq_var_filter_info(int ncid, int varid, unsigned int id,
414 size_t *nparamsp, unsigned int *params);
417int NXCDF_inq_filter_avail(int ncid, unsigned int id);
418
420int NXCDF_get_vara(int ncid, int varid, const size_t *startp, const size_t *countp, void *data, nc_type memtype);
423int NXCDF_put_vara(int ncid, int varid, const size_t *startp, const size_t *countp, const void *data, nc_type memtype);
426int NXCDF_get_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, void *data, nc_type memtype);
429int NXCDF_put_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const void *data, nc_type memtype);
432int NXCDF_get_varm(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, void *data, nc_type memtype);
435int NXCDF_put_varm(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const void *data, nc_type memtype);
436
439int NXCDF_put_att(int ncid, int varid, const char *name, nc_type xtype,
440 size_t len, const void *value, nc_type memtype);
441
444int NXCDF_inq_att(int ncid, int varid, const char *name,
445 nc_type *xtypep, size_t *lenp);
446
449int NXCDF_inq_attid(int ncid, int varid, const char *name, int *attnump);
450
453int NXCDF_get_att(int ncid, int varid, const char *name, void *value,
454 nc_type memtype);
455
458int NXCDF_rename_att(int ncid, int varid, const char *name,
459 const char *newname);
460
463int NXCDF_rename_dim(int ncid, int dimid, const char *name);
464
467int NXCDF_rename_var(int ncid, int varid, const char *name);
468
471int NXCDF_del_att(int ncid, int varid, const char *name);
472
473/* Group and type operations. */
476int NXCDF_def_grp(int ncid, const char *name, int *grpidp);
479int NXCDF_inq_ncid(int ncid, const char *name, int *grpidp);
482int NXCDF_inq_grps(int ncid, int *numgrps, int *grpidsp);
485int NXCDF_inq_grpname(int ncid, char *name);
488int NXCDF_inq_grpname_full(int ncid, size_t *lenp, char *name);
491int NXCDF_inq_grp_parent(int ncid, int *parentidp);
494int NXCDF_inq_grp_full_ncid(int ncid, const char *full_name, int *grpidp);
497int NXCDF_inq_typeids(int ncid, int *ntypes, int *typeids);
498
499/* User-defined type operations. */
502int NXCDF_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp);
505int NXCDF_insert_compound(int ncid, nc_type typeid, const char *name, size_t offset, nc_type xtype);
508int NXCDF_insert_array_compound(int ncid, nc_type typeid, const char *name,
509 size_t offset, nc_type xtype, int ndims, const int *dim_sizesp);
512int NXCDF_inq_compound_field(int ncid, nc_type typeid, int fieldid, char *name,
513 size_t *offsetp, nc_type *fieldtypep, int *ndimsp, int *dim_sizesp);
516int NXCDF_inq_compound_fieldindex(int ncid, nc_type typeid, const char *name, int *fieldidxp);
519int NXCDF_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *typeidp);
522int NXCDF_put_vlen_element(int ncid, int typeid, void *vlen_element,
523 size_t len, const void *data);
526int NXCDF_get_vlen_element(int ncid, int typeid, const void *vlen_element,
527 size_t *lenp, void *data);
530int NXCDF_def_enum(int ncid, nc_type base_typeid, const char *name, nc_type *typeidp);
533int NXCDF_insert_enum(int ncid, nc_type typeid, const char *name, const void *value);
536int NXCDF_inq_enum_member(int ncid, nc_type typeid, int idx, char *name, void *value);
539int NXCDF_inq_enum_ident(int ncid, nc_type typeid, long long value, char *identifier);
542int NXCDF_def_opaque(int ncid, size_t size, const char *name, nc_type *typeidp);
545int NXCDF_write_types(NC_FILE_INFO_T *h5);
548int NXCDF_inq_user_type(int ncid, nc_type typeid, char *name, size_t *sizep,
549 nc_type *base_typep, size_t *nfieldsp, int *classp);
552int NXCDF_inq_typeid(int ncid, const char *name, nc_type *typeidp);
555int NXCDF_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, nc_type typeid2, int *equalp);
556
557/* String and user-defined type I/O helpers. */
558int NXCDF_get_type_size(nc_type xtype, size_t *sizep);
559
560#endif
NetCDF Expansion Pack (NEP) - Public API.
Public API for the nxCDF UDF backend.
const NC_Dispatch * NXCDF_dispatch_table
The active nxCDF dispatch table.
Definition nxcdf_dispatch.c:126
Error-handling macros for the nxCDF backend.
int nxcdf_storage_memory_type(hid_t memory, hid_t storage, hid_t *typep)
Preserve storage string character sets in a native memory layout.
Definition nxcdf_type.c:2058
const char * NXCDF_type_name(nc_type xtype)
Return the short name for an atomic nc_type.
Definition nxcdf_meta.c:620
int NXCDF_put_vlen_element(int ncid, int typeid, void *vlen_element, size_t len, const void *data)
Write a vlen element value — the nc_put_vlen_element() dispatch entry.
Definition nxcdf_type.c:1198
int NXCDF_get_vara(int ncid, int varid, const size_t *startp, const size_t *countp, void *data, nc_type memtype)
Read a hyperslab — the nc_get_vara_* dispatch entry.
Definition nxcdf_io.c:639
int NXCDF_def_var_fill(int ncid, int varid, int no_fill, const void *fill_value)
Set fill behavior — the nc_def_var_fill() dispatch entry.
Definition nxcdf_meta.c:2383
int NXCDF_inq_enum_ident(int ncid, nc_type typeid, long long value, char *identifier)
Get an enum member name by value — the nc_inq_enum_ident() dispatch entry.
Definition nxcdf_type.c:1445
int nxcdf_hdf_type_match(NC_GRP_INFO_T *grp, hid_t htype, NC_TYPE_INFO_T **typep)
Resolve an HDF5 datatype to a registered committed user type by object identity.
Definition nxcdf_type.c:366
int NXCDF_create(const char *path, int cmode, size_t initialsz, int basepe, size_t *chunksizehintp, void *parameters, const NC_Dispatch *dispatch, int ncid)
Dispatch-table entry behind nc_create() with NC_NXCDF: creates the HDF5 file and writes the backend m...
Definition nxcdf_create.c:74
int NXCDF_inq_type_equal(int ncid1, nc_type typeid1, int ncid2, nc_type typeid2, int *equalp)
Compare two types for equality — the nc_inq_type_equal() dispatch entry.
Definition nxcdf_type.c:1994
int NXCDF_open(const char *path, int mode, int basepe, size_t *chunksizehintp, void *parameters, const NC_Dispatch *dispatch, int ncid)
Dispatch-table entry behind nc_open() with NC_NXCDF: opens the HDF5 file, validates the marker attrib...
Definition nxcdf_open.c:47
int NXCDF_type_size(nc_type xtype, size_t *sizep)
Return the in-memory size, in bytes, of an atomic nc_type.
Definition nxcdf_meta.c:543
int NXCDF_rename_var(int ncid, int varid, const char *name)
Rename a variable and update its HDF5 link.
Definition nxcdf_meta.c:3798
int NXCDF_inq_format(int ncid, int *formatp)
Dispatch-table entry behind nc_inq_format(): reports NC_FORMAT_NETCDF4 — nxCDF files are in the NetCD...
Definition nxcdf_file.c:923
int nxcdf_swmr_read_aliases(NC_GRP_INFO_T *grp)
Collapse coordinate-variable alias handles to a single dataset id.
Definition nxcdf_file.c:315
void nxcdf_close_group_hdf(NC_GRP_INFO_T *grp)
Recursively close the HDF5 objects belonging to a group.
Definition nxcdf_file.c:405
int NXCDF_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, const unsigned int *params)
Define an HDF5 filter on a variable — the nc_def_var_filter() dispatch entry.
Definition nxcdf_filter.c:48
int nxcdf_convert_type(const void *src, void *dest, nc_type src_type, nc_type dest_type, size_t len, int *range_error, const void *fill_value, int strict_nc3, int quantize_mode, int nsd, int fill_on_overflow)
NEP's internal numeric conversion engine for nxCDF.
Definition nxcdf_convert.c:441
int NXCDF_inq_grp_parent(int ncid, int *parentidp)
Get a group's parent ncid — the nc_inq_grp_parent() dispatch entry.
Definition nxcdf_group.c:414
int NXCDF_map_hdf_type(nc_type xtype, hid_t *typep)
Map an atomic nc_type to its on-disk HDF5 datatype.
Definition nxcdf_meta.c:430
int NXCDF_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems, float preemption)
Set session cache parameters and reopen an existing dataset.
Definition nxcdf_meta.c:222
int NXCDF_def_enum(int ncid, nc_type base_typeid, const char *name, nc_type *typeidp)
Define an enum type — the nc_def_enum() dispatch entry.
Definition nxcdf_type.c:1284
int nxcdf_file_type(NC_GRP_INFO_T *grp, nc_type xtype, hid_t *typep)
Produce an owned HDF5 datatype with the type's file layout.
Definition nxcdf_type.c:162
int NXCDF_add_file(int ncid, const char *path, int mode, NXCDF_FILE_INFO_T **filep)
Allocate per-file state and attach it to netcdf-c's open-file list.
Definition nxcdf_file.c:596
int nxcdf_apply_filters(hid_t dcpl, NC_VAR_INFO_T *var)
Apply a variable's filter list to a dataset creation property list.
Definition nxcdf_filter.c:340
int NXCDF_inq_user_type(int ncid, nc_type typeid, char *name, size_t *sizep, nc_type *base_typep, size_t *nfieldsp, int *classp)
Inquire a user-defined type — the nc_inq_user_type() dispatch entry.
Definition nxcdf_type.c:1815
int NXCDF_get_type_size(nc_type xtype, size_t *sizep)
Return the in-memory size of an atomic type — a thin public wrapper over NXCDF_type_size().
Definition nxcdf_type.c:24
int nxcdf_ref_file(int ncid, NC_FILE_INFO_T **h5p, NXCDF_FILE_INFO_T **filep)
Map a public ncid to the internal file state, rejecting any file not opened through the nxCDF backend...
Definition nxcdf_ref.c:62
int NXCDF_def_var_deflate(int ncid, int varid, int shuffle, int deflate, int deflate_level)
Set deflate compression — the nc_def_var_deflate() dispatch entry.
Definition nxcdf_filter.c:145
int NXCDF_get_varm(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, void *data, nc_type memtype)
Mapped hyperslab read (nc_get_varm_*); not implemented.
Definition nxcdf_io.c:702
int NXCDF_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp, int *shufflep, int *deflatep, int *deflate_levelp, int *fletcher32p, int *contiguousp, size_t *chunksizesp, int *no_fillp, void *fill_valuep, int *endiannessp, unsigned int *idp, size_t *nparamsp, unsigned int *params)
Inquire about all supported properties of a variable — the nc_inq_var_all() dispatch entry.
Definition nxcdf_meta.c:2555
int NXCDF_load_metadata(NXCDF_FILE_INFO_T *file, NC_FILE_INFO_T *h5)
Load all metadata for an open nxCDF file — the entry point NXCDF_open() calls after checking the mark...
Definition nxcdf_meta.c:5544
int NXCDF_del_att(int ncid, int varid, const char *name)
Delete an attribute from a group or variable.
Definition nxcdf_meta.c:3953
int NXCDF_inq_compound_field(int ncid, nc_type typeid, int fieldid, char *name, size_t *offsetp, nc_type *fieldtypep, int *ndimsp, int *dim_sizesp)
Inquire a field of a compound type — the nc_inq_compound_field() dispatch entry.
Definition nxcdf_type.c:970
int NXCDF_put_varm(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const void *data, nc_type memtype)
Mapped hyperslab write (nc_put_varm_*); not implemented.
Definition nxcdf_io.c:720
int NXCDF_set_fill(int ncid, int fillmode, int *old_modep)
Set the session fill default for subsequently defined variables.
Definition nxcdf_file.c:1138
int nxcdf_type_size(NC_GRP_INFO_T *grp, nc_type xtype, size_t *sizep)
Resolve the in-memory element size of any supported type.
Definition nxcdf_type.c:135
int NXCDF_rename_att(int ncid, int varid, const char *name, const char *newname)
Rename an attribute — the nc_rename_att() dispatch entry.
Definition nxcdf_meta.c:3306
int NXCDF_rename_dim(int ncid, int dimid, const char *name)
Rename a dimension and update its HDF5 link.
Definition nxcdf_meta.c:3682
int NXCDF_get_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, void *data, nc_type memtype)
Read a strided hyperslab — the nc_get_vars_* dispatch entry.
Definition nxcdf_io.c:667
int NXCDF_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp)
Inquire about an attribute — the nc_inq_att() dispatch entry.
Definition nxcdf_meta.c:3064
int NXCDF_free_file(NXCDF_FILE_INFO_T *file)
Close a NXCDF_FILE_INFO_T's HDF5 handles and free it.
Definition nxcdf_file.c:547
int NXCDF_insert_compound(int ncid, nc_type typeid, const char *name, size_t offset, nc_type xtype)
Insert a scalar field into a compound type — the nc_insert_compound() dispatch entry.
Definition nxcdf_type.c:830
int NXCDF_get_file(int ncid, NC_FILE_INFO_T **h5p, NXCDF_FILE_INFO_T **filep)
Resolve both the shared and nxCDF-private file state for an ncid.
Definition nxcdf_file.c:653
int NXCDF_def_var(int ncid, const char *name, nc_type xtype, int ndims, const int *dimidsp, int *varidp)
Define a variable — the nc_def_var() dispatch entry.
Definition nxcdf_meta.c:1605
int NXCDF_get_att(int ncid, int varid, const char *name, void *value, nc_type memtype)
Read an attribute's value — the nc_get_att_* dispatch entry.
Definition nxcdf_meta.c:3193
int NXCDF_def_var_endian(int ncid, int varid, int endianness)
Set the on-disk byte order — the nc_def_var_endian() dispatch entry.
Definition nxcdf_meta.c:2456
int NXCDF_check_atomic_type(NXCDF_FILE_INFO_T *file, nc_type xtype)
Check whether an atomic type is allowed for the file's compatibility mode.
Definition nxcdf_meta.c:669
int NXCDF_def_opaque(int ncid, size_t size, const char *name, nc_type *typeidp)
Define an opaque type — the nc_def_opaque() dispatch entry.
Definition nxcdf_type.c:1505
int NXCDF_inq_var_filter_info(int ncid, int varid, unsigned int id, size_t *nparamsp, unsigned int *params)
Inquire the parameters of one variable filter — the nc_inq_var_filter_info() dispatch entry.
Definition nxcdf_filter.c:280
int NXCDF_sync(int ncid)
Dispatch-table entry behind nc_sync(): flushes a writable file to storage.
Definition nxcdf_file.c:829
struct NXCDF_GRP_INFO NXCDF_GRP_INFO_T
nxCDF-private state hung off NC_GRP_INFO_T::format_grp_info: the group's open HDF5 handle.
int nxcdf_create_var_dataset(NC_VAR_INFO_T *var, NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file, NC_GRP_INFO_T *grp)
Create or re-create the HDF5 dataset for a variable.
Definition nxcdf_meta.c:2019
hid_t NXCDF_memory_type(nc_type type, int *closep)
Map a netCDF atomic type to the HDF5 datatype describing the caller's memory buffer.
Definition nxcdf_io.c:40
int NXCDF_inq_enum_member(int ncid, nc_type typeid, int idx, char *name, void *value)
Inquire an enum member by index — the nc_inq_enum_member() dispatch entry.
Definition nxcdf_type.c:1410
int NXCDF_redef(int ncid)
Return the file to define mode — the nc_redef() dispatch entry.
Definition nxcdf_file.c:1094
int NXCDF_inq_typeid(int ncid, const char *name, nc_type *typeidp)
Get a type's id by name — the nc_inq_typeid() dispatch entry.
Definition nxcdf_type.c:1860
struct NXCDF_FILE_INFO NXCDF_FILE_INFO_T
Per-file state owned by the nxCDF dispatch layer.
int nxcdf_find_var_for_write(int ncid, int varid, NC_FILE_INFO_T **h5, NXCDF_FILE_INFO_T **file, NC_GRP_INFO_T **grp, NC_VAR_INFO_T **var)
Common prologue for the def-var setter dispatch functions.
Definition nxcdf_meta.c:2286
int NXCDF_close(int ncid, void *parameters)
Dispatch-table entry behind nc_close(): ends define mode if needed, flushes, closes all HDF5 objects ...
Definition nxcdf_file.c:861
int NXCDF_var_par_access(int ncid, int varid, int par_access)
Select a variable's session-only parallel transfer mode.
Definition nxcdf_io.c:225
int NXCDF_inq_grps(int ncid, int *numgrps, int *grpidsp)
Get the ncids of all subgroups — the nc_inq_grps() dispatch entry.
Definition nxcdf_group.c:309
int NXCDF_write_markers(NXCDF_FILE_INFO_T *file)
Write the hidden marker attributes identifying the file as nxCDF.
Definition nxcdf_file.c:728
int NXCDF_inq_grpname_full(int ncid, size_t *lenp, char *name)
Get a group's full path name — the nc_inq_grpname_full() dispatch entry.
Definition nxcdf_group.c:364
int nxcdf_swmr_validate(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file)
Preflight native serial SWMR without changing definitions or file bounds.
Definition nxcdf_file.c:50
void nxcdf_scrub_extended_atomic_data(NC_GRP_INFO_T *grp)
Release attribute data and variable fill values that netcdf-c's teardown cannot reclaim.
Definition nxcdf_file.c:490
int NXCDF_rename_grp(int grpid, const char *name)
Rename a non-root enhanced-model group and flush its link.
Definition nxcdf_group.c:456
int nxcdf_find_type(NC_GRP_INFO_T *grp, nc_type xtype, NC_TYPE_INFO_T **typep)
Find the user-defined type record an nc_type id refers to.
Definition nxcdf_type.c:98
int NXCDF_inq_grpname(int ncid, char *name)
Get a group's (short) name — the nc_inq_grpname() dispatch entry.
Definition nxcdf_group.c:338
int nxcdf_read_ncproperties(NXCDF_FILE_INFO_T *file)
Read an existing _NCProperties attribute at open.
Definition nxcdf_provenance.c:104
int NXCDF_def_var_chunking(int ncid, int varid, int storage, const size_t *chunksizesp)
Set storage and chunk sizes — the nc_def_var_chunking() dispatch entry.
Definition nxcdf_meta.c:2329
int nxcdf_build_ncproperties(char **out)
Build the _NCProperties value for a new file.
Definition nxcdf_provenance.c:58
int nxcdf_memory_type(NC_GRP_INFO_T *grp, nc_type xtype, hid_t *typep)
Produce an owned HDF5 memory datatype for any supported type.
Definition nxcdf_type.c:322
int NXCDF_get_var_chunk_cache(int ncid, int varid, size_t *sizep, size_t *nelemsp, float *preemptionp)
Inquire effective live chunk-cache settings or pending requests.
Definition nxcdf_meta.c:258
int NXCDF_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *typeidp)
Define a variable-length type — the nc_def_vlen() dispatch entry.
Definition nxcdf_type.c:1064
int NXCDF_inq_grp_full_ncid(int ncid, const char *full_name, int *grpidp)
Get the ncid of a group given its full path — the nc_inq_grp_full_ncid() dispatch entry.
Definition nxcdf_group.c:441
int NXCDF_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp)
Define a compound type — the nc_def_compound() dispatch entry.
Definition nxcdf_type.c:548
int NXCDF_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd)
Set quantization — the nc_def_var_quantize() dispatch entry.
Definition nxcdf_meta.c:2490
int NXCDF__enddef(int ncid, size_t h_minfree, size_t v_align, size_t v_minfree, size_t r_align)
Materialize pending metadata and leave define mode — the nc_enddef() dispatch entry.
Definition nxcdf_file.c:1046
int NXCDF_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
Inquire about a dimension — the nc_inq_dim() dispatch entry.
Definition nxcdf_meta.c:1562
int NXCDF_inq_attid(int ncid, int varid, const char *name, int *attnump)
Learn an attribute's index by name — the nc_inq_attid() dispatch entry.
Definition nxcdf_meta.c:3132
int nxcdf_write_provenance(NXCDF_FILE_INFO_T *file)
Write _NCProperties and _nc3_strict to a file nxCDF created.
Definition nxcdf_provenance.c:157
int nxcdf_swmr_flush(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file)
Publish all variable data before flushing dimension scales and the file.
Definition nxcdf_file.c:157
int NXCDF_def_var_fletcher32(int ncid, int varid, int fletcher32)
Enable the Fletcher32 checksum — the nc_def_var_fletcher32() dispatch entry.
Definition nxcdf_filter.c:202
int NXCDF_def_dim(int ncid, const char *name, size_t len, int *idp)
Define a dimension — the nc_def_dim() dispatch entry.
Definition nxcdf_meta.c:1422
int nxcdf_swmr_activate(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file)
Activate a committed session without recursively entering enddef.
Definition nxcdf_file.c:95
int NXCDF_put_vara(int ncid, int varid, const size_t *startp, const size_t *countp, const void *data, nc_type memtype)
Write a hyperslab — the nc_put_vara_* dispatch entry.
Definition nxcdf_io.c:652
int NXCDF_write_types(NC_FILE_INFO_T *h5)
Commit every pending user-defined type — called by NXCDF__enddef() before the metadata writer runs,...
Definition nxcdf_type.c:1797
int NXCDF_put_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const void *data, nc_type memtype)
Write a strided hyperslab — the nc_put_vars_* dispatch entry.
Definition nxcdf_io.c:682
int nxcdf_load_filters(hid_t dcpl, NC_VAR_INFO_T *var, NXCDF_VAR_INFO_T *vinfo)
Read a variable's filter pipeline from a dataset creation property list.
Definition nxcdf_filter.c:392
int nxcdf_swmr_refresh(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file)
Refresh all variable data before reloading dimension-scale extents.
Definition nxcdf_file.c:361
int NXCDF_inq_ncid(int ncid, const char *name, int *grpidp)
Get the ncid of a named subgroup — the nc_inq_ncid() dispatch entry.
Definition nxcdf_group.c:256
int NXCDF_read_markers(NXCDF_FILE_INFO_T *file)
Read and validate the hidden marker attributes at open.
Definition nxcdf_file.c:772
int NXCDF_check_write_define(NC_FILE_INFO_T *h5, NXCDF_FILE_INFO_T *file)
Check that a file is writable and currently in define mode.
Definition nxcdf_meta.c:395
int nxcdf_flush_pending_atts(NC_GRP_INFO_T *grp)
Materialize attributes deferred while their datatype or dataset was pending — called at _enddef.
Definition nxcdf_meta.c:2788
int NXCDF_get_vlen_element(int ncid, int typeid, const void *vlen_element, size_t *lenp, void *data)
Read a vlen element value — the nc_get_vlen_element() dispatch entry.
Definition nxcdf_type.c:1234
int nxcdf_get_att_special(NXCDF_FILE_INFO_T *file, const char *name, nc_type *xtypep, nc_type mem_type, size_t *lenp, int *attnump, void *data)
Answer a name lookup for a provenance attribute.
Definition nxcdf_provenance.c:298
int NXCDF_inq_var(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp)
Inquire about a variable's name, type, dimensions, and attributes — the nc_inq_var() dispatch entry.
Definition nxcdf_meta.c:2643
int NXCDF_inq_format_extended(int ncid, int *formatp, int *modep)
Dispatch-table entry behind nc_inq_format_extended(): reports NC_FORMATX_NXCDF and the effective mode...
Definition nxcdf_file.c:949
int NXCDF_check_mode(int mode)
Validate unsupported create/open flags; return NC_EINVAL if present.
Definition nxcdf_file.c:1121
int NXCDF_insert_enum(int ncid, nc_type typeid, const char *name, const void *value)
Insert a member into an enum type — the nc_insert_enum() dispatch entry.
Definition nxcdf_type.c:1359
int NXCDF_inq_filter_avail(int ncid, unsigned int id)
Test whether an HDF5 filter is available — the nc_inq_filter_avail() dispatch entry.
Definition nxcdf_filter.c:312
void nxcdf_free_type_info(NC_TYPE_INFO_T *type)
Release a type's nxCDF-private record and its HDF5 datatype handle, if any.
Definition nxcdf_type.c:453
int NXCDF_inq_var_filter_ids(int ncid, int varid, size_t *nfiltersp, unsigned int *ids)
Inquire the filter ids applied to a variable — the nc_inq_var_filter_ids() dispatch entry.
Definition nxcdf_filter.c:244
struct NXCDF_TYPE_INFO NXCDF_TYPE_INFO_T
nxCDF-private state hung off NC_TYPE_INFO_T::format_type_info: the user-defined type's HDF5 datatype ...
int NXCDF_abort(int ncid)
Dispatch-table entry behind nc_abort(): releases the file's resources; shares the close path.
Definition nxcdf_file.c:905
struct NXCDF_DIM_INFO NXCDF_DIM_INFO_T
nxCDF-private state hung off NC_DIM_INFO_T::format_dim_info: the dimension's scale dataset handle.
struct NXCDF_VAR_INFO NXCDF_VAR_INFO_T
nxCDF-private state hung off NC_VAR_INFO_T::format_var_info: the variable's dataset handle plus statu...
int NXCDF_put_att(int ncid, int varid, const char *name, nc_type xtype, size_t len, const void *value, nc_type memtype)
Create or replace an attribute — the nc_put_att_* dispatch entry.
Definition nxcdf_meta.c:2848
int NXCDF_insert_array_compound(int ncid, nc_type typeid, const char *name, size_t offset, nc_type xtype, int ndims, const int *dim_sizesp)
Insert a scalar or fixed-size array field into a compound type — the nc_insert_array_compound() dispa...
Definition nxcdf_type.c:856
int NXCDF_def_grp(int ncid, const char *name, int *grpidp)
Create a subgroup — the nc_def_grp() dispatch entry.
Definition nxcdf_group.c:154
int NXCDF_inq_compound_fieldindex(int ncid, nc_type typeid, const char *name, int *fieldidxp)
Get a compound field's index by name — the nc_inq_compound_fieldindex() dispatch entry.
Definition nxcdf_type.c:1013
int nxcdf_copy_data(NC *nc, nc_type xtype, const void *src, size_t count, void *dst)
Deep-copy values with initialized, reclaim-safe partial results.
Definition nxcdf_type.c:2118
int NXCDF_inq_typeids(int ncid, int *ntypes, int *typeids)
Get the type ids of the user-defined types in a group — the nc_inq_typeids() dispatch entry.
Definition nxcdf_type.c:2027
nxCDF-private state hung off NC_DIM_INFO_T::format_dim_info: the dimension's scale dataset handle.
Definition nxcdf_internal.h:194
hid_t hdf_dataset
Definition nxcdf_internal.h:195
Per-file state owned by the nxCDF dispatch layer.
Definition nxcdf_internal.h:140
int swmr_requested
Definition nxcdf_internal.h:147
int no_write
Definition nxcdf_internal.h:145
hid_t rootid
Definition nxcdf_internal.h:142
hid_t hdfid
Definition nxcdf_internal.h:141
int created_by_us
Definition nxcdf_internal.h:154
int define_mode
Definition nxcdf_internal.h:146
char * ncproperties
Definition nxcdf_internal.h:158
int mode
Definition nxcdf_internal.h:144
int netcdf4_model
Definition nxcdf_internal.h:152
int swmr_read
Definition nxcdf_internal.h:149
int swmr_active
Definition nxcdf_internal.h:148
char * path
Definition nxcdf_internal.h:143
int backend_marked
Definition nxcdf_internal.h:153
nxCDF-private state hung off NC_GRP_INFO_T::format_grp_info: the group's open HDF5 handle.
Definition nxcdf_internal.h:182
int atts_pending
Definition nxcdf_internal.h:184
hid_t hdf_group
Definition nxcdf_internal.h:183
nxCDF-private state hung off NC_TYPE_INFO_T::format_type_info: the user-defined type's HDF5 datatype ...
Definition nxcdf_internal.h:226
hid_t hdf_type
Definition nxcdf_internal.h:227
nxCDF-private state hung off NC_VAR_INFO_T::format_var_info: the variable's dataset handle plus statu...
Definition nxcdf_internal.h:203
int dcpl_dirty
Definition nxcdf_internal.h:211
int atts_pending
Definition nxcdf_internal.h:215
int flags
Definition nxcdf_internal.h:207
int parallel_access
Definition nxcdf_internal.h:205
hid_t hdf_dataset
Definition nxcdf_internal.h:204