NEP 4.0.0
NetCDF Expansion Pack
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
nxt4internal.h File Reference

Private state and shared helpers for the NEXTCDF-4 backend. More...

#include <hdf5.h>
#include "nep_nc4.h"
#include "nep.h"
#include "nextcdf4dispatch.h"

Go to the source code of this file.

Data Structures

struct  NEXTCDF4_FILE_INFO
 
struct  NEXTCDF4_GRP_INFO
 
struct  NEXTCDF4_DIM_INFO
 
struct  NEXTCDF4_VAR_INFO
 
struct  NEXTCDF4_TYPE_INFO
 

Macros

#define NEXTCDF4_BACKEND_ATT   "_Nextcdf4Backend"
 
#define NEXTCDF4_MODEL_ATT   "_Nextcdf4Model"
 
#define NEXTCDF4_BACKEND_VALUE   "NEXTCDF-4/1.0"
 
#define NEXTCDF4_DIMID_ATT   "_Netcdf4Dimid"
 
#define NEXTCDF4_VARID_ATT   "_Nextcdf4Varid"
 
#define NEXTCDF4_VARDIMIDS_ATT   "_Netcdf4Coordinates"
 
#define NEXTCDF4_DIMCLASS   "DIMENSION_SCALE"
 
#define NEXTCDF4_DIMNAME_ATT   "NAME"
 

Typedefs

typedef struct NEXTCDF4_FILE_INFO NEXTCDF4_FILE_INFO_T
 
typedef struct NEXTCDF4_GRP_INFO NEXTCDF4_GRP_INFO_T
 
typedef struct NEXTCDF4_DIM_INFO NEXTCDF4_DIM_INFO_T
 
typedef struct NEXTCDF4_VAR_INFO NEXTCDF4_VAR_INFO_T
 
typedef struct NEXTCDF4_TYPE_INFO NEXTCDF4_TYPE_INFO_T
 

Functions

int NEXTCDF4_add_file (int ncid, const char *path, int mode, NEXTCDF4_FILE_INFO_T **filep)
 
int NEXTCDF4_get_file (int ncid, NC_FILE_INFO_T **h5p, NEXTCDF4_FILE_INFO_T **filep)
 
int NEXTCDF4_free_file (NEXTCDF4_FILE_INFO_T *file)
 
int NEXTCDF4_write_markers (NEXTCDF4_FILE_INFO_T *file)
 
int NEXTCDF4_read_markers (NEXTCDF4_FILE_INFO_T *file)
 
int NEXTCDF4_hdf_error (void)
 
int NEXTCDF4_check_write_define (NEXTCDF4_FILE_INFO_T *file)
 
int NEXTCDF4_map_hdf_type (nc_type xtype, hid_t *typep)
 
int NEXTCDF4_type_size (nc_type xtype, size_t *sizep)
 
const char * NEXTCDF4_type_name (nc_type xtype)
 
int NEXTCDF4_check_atomic_type (NEXTCDF4_FILE_INFO_T *file, nc_type xtype)
 
int NEXTCDF4_load_metadata (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5)
 
int NEXTCDF4__enddef (int ncid, size_t h_minfree, size_t v_align, size_t v_minfree, size_t r_align)
 
int NEXTCDF4_redef (int ncid)
 
int NEXTCDF4_def_dim (int ncid, const char *name, size_t len, int *idp)
 
int NEXTCDF4_inq_dim (int ncid, int dimid, char *name, size_t *lenp)
 
int NEXTCDF4_def_var (int ncid, const char *name, nc_type xtype, int ndims, const int *dimidsp, int *varidp)
 
int NEXTCDF4_def_var_chunking (int ncid, int varid, int storage, const size_t *chunksizesp)
 
int NEXTCDF4_def_var_deflate (int ncid, int varid, int shuffle, int deflate, int deflate_level)
 
int NEXTCDF4_def_var_fletcher32 (int ncid, int varid, int fletcher32)
 
int NEXTCDF4_def_var_fill (int ncid, int varid, int no_fill, const void *fill_value)
 
int NEXTCDF4_def_var_endian (int ncid, int varid, int endianness)
 
int NEXTCDF4_def_var_quantize (int ncid, int varid, int quantize_mode, int nsd)
 
int NEXTCDF4_def_var_filter (int ncid, int varid, unsigned int id, size_t nparams, const unsigned int *params)
 
int NEXTCDF4_inq_var (int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp)
 
int NEXTCDF4_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)
 
int NEXTCDF4_inq_var_filter_ids (int ncid, int varid, size_t *nfiltersp, unsigned int *ids)
 
int NEXTCDF4_inq_var_filter_info (int ncid, int varid, unsigned int id, size_t *nparamsp, unsigned int *params)
 
int NEXTCDF4_get_vara (int, int, const size_t *, const size_t *, void *, nc_type)
 
int NEXTCDF4_put_vara (int, int, const size_t *, const size_t *, const void *, nc_type)
 
int NEXTCDF4_get_vars (int, int, const size_t *, const size_t *, const ptrdiff_t *, void *, nc_type)
 
int NEXTCDF4_put_vars (int, int, const size_t *, const size_t *, const ptrdiff_t *, const void *, nc_type)
 
int NEXTCDF4_get_varm (int, int, const size_t *, const size_t *, const ptrdiff_t *, const ptrdiff_t *, void *, nc_type)
 
int NEXTCDF4_put_varm (int, int, const size_t *, const size_t *, const ptrdiff_t *, const ptrdiff_t *, const void *, nc_type)
 
int NEXTCDF4_put_att (int ncid, int varid, const char *name, nc_type xtype, size_t len, const void *value, nc_type memtype)
 
int NEXTCDF4_get_att (int ncid, int varid, const char *name, void *value, nc_type memtype)
 
int NEXTCDF4_rename_att (int ncid, int varid, const char *name, const char *newname)
 
int NEXTCDF4_rename_dim (int ncid, int dimid, const char *name)
 
int NEXTCDF4_rename_var (int ncid, int varid, const char *name)
 
int NEXTCDF4_del_att (int ncid, int varid, const char *name)
 
int NEXTCDF4_write_attributes (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5)
 
int NEXTCDF4_def_grp (int ncid, const char *name, int *grpidp)
 
int NEXTCDF4_inq_ncid (int ncid, const char *name, int *grpidp)
 
int NEXTCDF4_inq_grps (int ncid, int *numgrps, int *grpidsp)
 
int NEXTCDF4_inq_grpname (int ncid, char *name)
 
int NEXTCDF4_inq_grpname_full (int ncid, size_t *lenp, char *name)
 
int NEXTCDF4_inq_grp_parent (int ncid, int *parentidp)
 
int NEXTCDF4_inq_grp_full_ncid (int ncid, const char *full_name, int *grpidp)
 
int NEXTCDF4_inq_typeids (int ncid, int *ntypes, int *typeids)
 
int NEXTCDF4_def_compound (int ncid, size_t size, const char *name, nc_type *typeidp)
 
int NEXTCDF4_insert_compound (int ncid, nc_type typeid, const char *name, size_t offset, nc_type xtype)
 
int NEXTCDF4_insert_array_compound (int ncid, nc_type typeid, const char *name, size_t offset, nc_type xtype, int ndims, const int *dim_sizesp)
 
int NEXTCDF4_inq_compound_field (int ncid, nc_type typeid, int fieldid, char *name, size_t *offsetp, nc_type *fieldtypep, int *ndimsp, int *dim_sizesp)
 
int NEXTCDF4_inq_compound_fieldindex (int ncid, nc_type typeid, const char *name, int *fieldidxp)
 
int NEXTCDF4_def_vlen (int ncid, const char *name, nc_type base_typeid, nc_type *typeidp)
 
int NEXTCDF4_put_vlen_element (int ncid, int typeid, void *vlen_element, size_t len, const void *data)
 
int NEXTCDF4_get_vlen_element (int ncid, int typeid, const void *vlen_element, size_t *lenp, void *data)
 
int NEXTCDF4_def_enum (int ncid, nc_type base_typeid, const char *name, nc_type *typeidp)
 
int NEXTCDF4_insert_enum (int ncid, nc_type typeid, const char *name, const void *value)
 
int NEXTCDF4_inq_enum_member (int ncid, nc_type typeid, int idx, char *name, void *value)
 
int NEXTCDF4_inq_enum_ident (int ncid, nc_type typeid, long long value, char *identifier)
 
int NEXTCDF4_def_opaque (int ncid, size_t size, const char *name, nc_type *typeidp)
 
int NEXTCDF4_write_types (NC_FILE_INFO_T *h5)
 
int NEXTCDF4_inq_user_type (int ncid, nc_type typeid, char *name, size_t *size, nc_type *base_typep, size_t *nfieldsp, int *classp)
 
int NEXTCDF4_inq_typeid (int ncid, const char *name, nc_type *typeidp)
 
int NEXTCDF4_inq_type_equal (int ncid1, nc_type typeid1, int ncid2, nc_type typeid2, int *equalp)
 
int NEXTCDF4_get_type_size (nc_type xtype, size_t *sizep)
 

Detailed Description

Private state and shared helpers for the NEXTCDF-4 backend.

Author
Edward Hartnett
Date
2026-08-28

Macro Definition Documentation

◆ NEXTCDF4_BACKEND_ATT

#define NEXTCDF4_BACKEND_ATT   "_Nextcdf4Backend"

Hidden root attribute identifying a NEXTCDF-4-created file.

◆ NEXTCDF4_BACKEND_VALUE

#define NEXTCDF4_BACKEND_VALUE   "NEXTCDF-4/1.0"

Backend version stored in the NEXTCDF-4 provenance attribute.

◆ NEXTCDF4_DIMCLASS

#define NEXTCDF4_DIMCLASS   "DIMENSION_SCALE"

HDF5 dimension scale class marker.

◆ NEXTCDF4_DIMID_ATT

#define NEXTCDF4_DIMID_ATT   "_Netcdf4Dimid"

Hidden attribute storing a dimension's stable NetCDF dimid.

◆ NEXTCDF4_DIMNAME_ATT

#define NEXTCDF4_DIMNAME_ATT   "NAME"

Optional dimension scale name attribute.

◆ NEXTCDF4_MODEL_ATT

#define NEXTCDF4_MODEL_ATT   "_Nextcdf4Model"

Hidden root attribute identifying NetCDF-4 compatibility mode.

◆ NEXTCDF4_VARDIMIDS_ATT

#define NEXTCDF4_VARDIMIDS_ATT   "_Netcdf4Coordinates"

Hidden attribute storing a variable's dimension id list.

◆ NEXTCDF4_VARID_ATT

#define NEXTCDF4_VARID_ATT   "_Nextcdf4Varid"

Hidden attribute storing a variable's stable NetCDF varid.

Typedef Documentation

◆ NEXTCDF4_DIM_INFO_T

Format-specific information attached to an NC_DIM_INFO_T.

◆ NEXTCDF4_FILE_INFO_T

Per-file state owned by the NEXTCDF-4 dispatch layer.

◆ NEXTCDF4_GRP_INFO_T

Format-specific information attached to an NC_GRP_INFO_T.

◆ NEXTCDF4_TYPE_INFO_T

Format-specific information attached to an NC_TYPE_INFO_T.

◆ NEXTCDF4_VAR_INFO_T

Format-specific information attached to an NC_VAR_INFO_T.

Function Documentation

◆ NEXTCDF4__enddef()

int NEXTCDF4__enddef ( int  ncid,
size_t  h_minfree,
size_t  v_align,
size_t  v_minfree,
size_t  r_align 
)

Materialize pending root-group metadata to HDF5 and exit define mode.

Parameters
ncidNetCDF file identifier.
h_minfreeIgnored (reserved for future alignment control).
v_alignIgnored (reserved for future alignment control).
v_minfreeIgnored (reserved for future alignment control).
r_alignIgnored (reserved for future alignment control).
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_add_file()

int NEXTCDF4_add_file ( int  ncid,
const char *  path,
int  mode,
NEXTCDF4_FILE_INFO_T **  filep 
)

Allocate and register per-file NEXTCDF-4 state.

Parameters
ncidNetCDF file identifier.
pathFile-system path.
modeEffective NetCDF mode.
filepDestination for the allocated state.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_check_atomic_type()

int NEXTCDF4_check_atomic_type ( NEXTCDF4_FILE_INFO_T file,
nc_type  xtype 
)

Validate a fixed-size atomic type for the active model.

Parameters
fileNEXTCDF-4 file state.
xtypeCandidate NetCDF type.
Returns
NC_NOERR or NC_EBADTYPE/NC_ENOTNC4.

◆ NEXTCDF4_check_write_define()

int NEXTCDF4_check_write_define ( NEXTCDF4_FILE_INFO_T file)

Verify the file is in define mode and not read-only.

Parameters
fileNEXTCDF-4 file state.
Returns
NC_NOERR or an appropriate NetCDF error code.

◆ NEXTCDF4_def_compound()

int NEXTCDF4_def_compound ( int  ncid,
size_t  size,
const char *  name,
nc_type *  typeidp 
)

◆ NEXTCDF4_def_dim()

int NEXTCDF4_def_dim ( int  ncid,
const char *  name,
size_t  len,
int *  idp 
)

Define a dimension in the root group.

Parameters
ncidNetCDF file identifier.
nameDimension name.
lenDimension length, or 0 for unlimited.
idpDestination for the assigned dimension id.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_def_enum()

int NEXTCDF4_def_enum ( int  ncid,
nc_type  base_typeid,
const char *  name,
nc_type *  typeidp 
)

◆ NEXTCDF4_def_grp()

int NEXTCDF4_def_grp ( int  ncid,
const char *  name,
int *  grpidp 
)

◆ NEXTCDF4_def_opaque()

int NEXTCDF4_def_opaque ( int  ncid,
size_t  size,
const char *  name,
nc_type *  typeidp 
)

◆ NEXTCDF4_def_var()

int NEXTCDF4_def_var ( int  ncid,
const char *  name,
nc_type  xtype,
int  ndims,
const int *  dimidsp,
int *  varidp 
)

Define a fixed-size atomic variable in the root group.

Parameters
ncidNetCDF file identifier.
nameVariable name.
xtypeNetCDF atomic type.
ndimsNumber of dimensions.
dimidspArray of dimension ids.
varidpDestination for the assigned variable id.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_def_var_chunking()

int NEXTCDF4_def_var_chunking ( int  ncid,
int  varid,
int  storage,
const size_t *  chunksizesp 
)

Variable storage-property dispatch callbacks.

◆ NEXTCDF4_def_var_deflate()

int NEXTCDF4_def_var_deflate ( int  ncid,
int  varid,
int  shuffle,
int  deflate,
int  deflate_level 
)

◆ NEXTCDF4_def_var_endian()

int NEXTCDF4_def_var_endian ( int  ncid,
int  varid,
int  endianness 
)

◆ NEXTCDF4_def_var_fill()

int NEXTCDF4_def_var_fill ( int  ncid,
int  varid,
int  no_fill,
const void *  fill_value 
)

◆ NEXTCDF4_def_var_filter()

int NEXTCDF4_def_var_filter ( int  ncid,
int  varid,
unsigned int  id,
size_t  nparams,
const unsigned int *  params 
)

◆ NEXTCDF4_def_var_fletcher32()

int NEXTCDF4_def_var_fletcher32 ( int  ncid,
int  varid,
int  fletcher32 
)

◆ NEXTCDF4_def_var_quantize()

int NEXTCDF4_def_var_quantize ( int  ncid,
int  varid,
int  quantize_mode,
int  nsd 
)

◆ NEXTCDF4_def_vlen()

int NEXTCDF4_def_vlen ( int  ncid,
const char *  name,
nc_type  base_typeid,
nc_type *  typeidp 
)

◆ NEXTCDF4_del_att()

int NEXTCDF4_del_att ( int  ncid,
int  varid,
const char *  name 
)

Delete an attribute.

Parameters
ncidNetCDF file identifier.
varidVariable id or NC_GLOBAL.
nameAttribute name.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_free_file()

int NEXTCDF4_free_file ( NEXTCDF4_FILE_INFO_T file)

Close HDF5 identifiers and free per-file state.

Parameters
fileState to release; may be NULL.
Returns
NC_NOERR or NC_EHDFERR if an HDF5 close fails.

◆ NEXTCDF4_get_att()

int NEXTCDF4_get_att ( int  ncid,
int  varid,
const char *  name,
void *  value,
nc_type  memtype 
)

Get an attribute from the root group or a variable.

Parameters
ncidNetCDF file identifier.
varidVariable id or NC_GLOBAL.
nameAttribute name.
valueDestination buffer.
memtypeRequested in-memory type.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_get_file()

int NEXTCDF4_get_file ( int  ncid,
NC_FILE_INFO_T **  h5p,
NEXTCDF4_FILE_INFO_T **  filep 
)

Resolve registered NEXTCDF-4 state from a NetCDF identifier.

Parameters
ncidNetCDF file identifier.
h5pOptional destination for common NetCDF-4 state.
filepOptional destination for NEXTCDF-4 state.
Returns
NC_NOERR on success, or NC_EBADID for invalid state.

◆ NEXTCDF4_get_type_size()

int NEXTCDF4_get_type_size ( nc_type  xtype,
size_t *  sizep 
)

◆ NEXTCDF4_get_vara()

int NEXTCDF4_get_vara ( int  ncid,
int  varid,
const size_t *  start,
const size_t *  count,
void *  value,
nc_type  memtype 
)

Fixed-size atomic variable hyperslab I/O callbacks.

◆ NEXTCDF4_get_varm()

int NEXTCDF4_get_varm ( int  ncid,
int  varid,
const size_t *  s,
const size_t *  c,
const ptrdiff_t *  st,
const ptrdiff_t *  im,
void *  v,
nc_type  t 
)

◆ NEXTCDF4_get_vars()

int NEXTCDF4_get_vars ( int  ncid,
int  varid,
const size_t *  start,
const size_t *  count,
const ptrdiff_t *  stride,
void *  value,
nc_type  memtype 
)

◆ NEXTCDF4_get_vlen_element()

int NEXTCDF4_get_vlen_element ( int  ncid,
int  typeid,
const void *  vlen_element,
size_t *  lenp,
void *  data 
)

◆ NEXTCDF4_hdf_error()

int NEXTCDF4_hdf_error ( void  )

Return the NetCDF error used for an HDF5-layer failure.

Returns
NC_EHDFERR.

◆ NEXTCDF4_inq_compound_field()

int NEXTCDF4_inq_compound_field ( int  ncid,
nc_type  typeid,
int  fieldid,
char *  name,
size_t *  offsetp,
nc_type *  fieldtypep,
int *  ndimsp,
int *  dim_sizesp 
)

◆ NEXTCDF4_inq_compound_fieldindex()

int NEXTCDF4_inq_compound_fieldindex ( int  ncid,
nc_type  typeid,
const char *  name,
int *  fieldidxp 
)

◆ NEXTCDF4_inq_dim()

int NEXTCDF4_inq_dim ( int  ncid,
int  dimid,
char *  name,
size_t *  lenp 
)

Inquire a dimension by id.

Parameters
ncidNetCDF file identifier.
dimidDimension id.
nameDestination for the dimension name.
lenpDestination for the dimension length.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_inq_enum_ident()

int NEXTCDF4_inq_enum_ident ( int  ncid,
nc_type  typeid,
long long  value,
char *  identifier 
)

◆ NEXTCDF4_inq_enum_member()

int NEXTCDF4_inq_enum_member ( int  ncid,
nc_type  typeid,
int  idx,
char *  name,
void *  value 
)

◆ NEXTCDF4_inq_grp_full_ncid()

int NEXTCDF4_inq_grp_full_ncid ( int  ncid,
const char *  full_name,
int *  grpidp 
)

◆ NEXTCDF4_inq_grp_parent()

int NEXTCDF4_inq_grp_parent ( int  ncid,
int *  parentidp 
)

◆ NEXTCDF4_inq_grpname()

int NEXTCDF4_inq_grpname ( int  ncid,
char *  name 
)

◆ NEXTCDF4_inq_grpname_full()

int NEXTCDF4_inq_grpname_full ( int  ncid,
size_t *  lenp,
char *  name 
)

◆ NEXTCDF4_inq_grps()

int NEXTCDF4_inq_grps ( int  ncid,
int *  numgrps,
int *  grpidsp 
)

◆ NEXTCDF4_inq_ncid()

int NEXTCDF4_inq_ncid ( int  ncid,
const char *  name,
int *  grpidp 
)

◆ NEXTCDF4_inq_type_equal()

int NEXTCDF4_inq_type_equal ( int  ncid1,
nc_type  typeid1,
int  ncid2,
nc_type  typeid2,
int *  equalp 
)

◆ NEXTCDF4_inq_typeid()

int NEXTCDF4_inq_typeid ( int  ncid,
const char *  name,
nc_type *  typeidp 
)

◆ NEXTCDF4_inq_typeids()

int NEXTCDF4_inq_typeids ( int  ncid,
int *  ntypes,
int *  typeids 
)

◆ NEXTCDF4_inq_user_type()

int NEXTCDF4_inq_user_type ( int  ncid,
nc_type  typeid,
char *  name,
size_t *  size,
nc_type *  base_typep,
size_t *  nfieldsp,
int *  classp 
)

◆ NEXTCDF4_inq_var()

int NEXTCDF4_inq_var ( int  ncid,
int  varid,
char *  name,
nc_type *  xtypep,
int *  ndimsp,
int *  dimidsp,
int *  nattsp 
)

Inquire a variable by id.

Parameters
ncidNetCDF file identifier.
varidVariable id.
nameDestination for the variable name.
xtypepDestination for the variable type.
ndimspDestination for the rank.
dimidspDestination for the dimension ids.
nattspDestination for the number of attributes.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_inq_var_all()

int NEXTCDF4_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 
)

◆ NEXTCDF4_inq_var_filter_ids()

int NEXTCDF4_inq_var_filter_ids ( int  ncid,
int  varid,
size_t *  nfiltersp,
unsigned int *  ids 
)

◆ NEXTCDF4_inq_var_filter_info()

int NEXTCDF4_inq_var_filter_info ( int  ncid,
int  varid,
unsigned int  id,
size_t *  nparamsp,
unsigned int *  params 
)

◆ NEXTCDF4_insert_array_compound()

int NEXTCDF4_insert_array_compound ( int  ncid,
nc_type  typeid,
const char *  name,
size_t  offset,
nc_type  xtype,
int  ndims,
const int *  dim_sizesp 
)

◆ NEXTCDF4_insert_compound()

int NEXTCDF4_insert_compound ( int  ncid,
nc_type  typeid,
const char *  name,
size_t  offset,
nc_type  xtype 
)

◆ NEXTCDF4_insert_enum()

int NEXTCDF4_insert_enum ( int  ncid,
nc_type  typeid,
const char *  name,
const void *  value 
)

◆ NEXTCDF4_load_metadata()

int NEXTCDF4_load_metadata ( NEXTCDF4_FILE_INFO_T file,
NC_FILE_INFO_T *  h5 
)

Load all root-group metadata from an open HDF5 file.

Parameters
fileOpen NEXTCDF-4 state.
h5Common NetCDF-4 file metadata.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_map_hdf_type()

int NEXTCDF4_map_hdf_type ( nc_type  xtype,
hid_t *  typep 
)

Map a fixed-size NetCDF atomic type to its HDF5 datatype.

Parameters
xtypeNetCDF atomic type.
typepDestination for an HDF5 datatype identifier.
Returns
NC_NOERR or NC_EBADTYPE.

◆ NEXTCDF4_put_att()

int NEXTCDF4_put_att ( int  ncid,
int  varid,
const char *  name,
nc_type  xtype,
size_t  len,
const void *  value,
nc_type  memtype 
)

Put an attribute on the root group or a variable.

Parameters
ncidNetCDF file identifier.
varidVariable id or NC_GLOBAL.
nameAttribute name.
xtypeNetCDF atomic type.
lenNumber of elements.
valueAttribute data.
memtypeIn-memory type for the attribute value.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_put_vara()

int NEXTCDF4_put_vara ( int  ncid,
int  varid,
const size_t *  start,
const size_t *  count,
const void *  value,
nc_type  memtype 
)

◆ NEXTCDF4_put_varm()

int NEXTCDF4_put_varm ( int  ncid,
int  varid,
const size_t *  s,
const size_t *  c,
const ptrdiff_t *  st,
const ptrdiff_t *  im,
const void *  v,
nc_type  t 
)

◆ NEXTCDF4_put_vars()

int NEXTCDF4_put_vars ( int  ncid,
int  varid,
const size_t *  start,
const size_t *  count,
const ptrdiff_t *  stride,
const void *  value,
nc_type  memtype 
)

◆ NEXTCDF4_put_vlen_element()

int NEXTCDF4_put_vlen_element ( int  ncid,
int  typeid,
void *  vlen_element,
size_t  len,
const void *  data 
)

◆ NEXTCDF4_read_markers()

int NEXTCDF4_read_markers ( NEXTCDF4_FILE_INFO_T file)

Read and validate NEXTCDF-4 provenance and compatibility markers.

Parameters
fileOpen NEXTCDF-4 state.
Returns
NC_NOERR on success, or NC_EFILEMETA for invalid markers.

◆ NEXTCDF4_redef()

int NEXTCDF4_redef ( int  ncid)

Return the file to define mode.

Parameters
ncidNetCDF file identifier.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_rename_att()

int NEXTCDF4_rename_att ( int  ncid,
int  varid,
const char *  name,
const char *  newname 
)

Rename an attribute.

Parameters
ncidNetCDF file identifier.
varidVariable id or NC_GLOBAL.
nameCurrent attribute name.
newnameNew attribute name.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_rename_dim()

int NEXTCDF4_rename_dim ( int  ncid,
int  dimid,
const char *  name 
)

Rename a dimension.

Parameters
ncidNetCDF file identifier.
dimidDimension id.
nameNew dimension name.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_rename_var()

int NEXTCDF4_rename_var ( int  ncid,
int  varid,
const char *  name 
)

Rename a variable.

Parameters
ncidNetCDF file identifier.
varidVariable id.
nameNew variable name.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_type_name()

const char * NEXTCDF4_type_name ( nc_type  xtype)

Return a display name for a fixed-size NetCDF atomic type.

Parameters
xtypeNetCDF atomic type.
Returns
A pointer to a constant string.

◆ NEXTCDF4_type_size()

int NEXTCDF4_type_size ( nc_type  xtype,
size_t *  sizep 
)

Return the in-memory size of a fixed-size NetCDF atomic type.

Parameters
xtypeNetCDF atomic type.
sizepDestination for the size in bytes.
Returns
NC_NOERR or NC_EBADTYPE.

◆ NEXTCDF4_write_attributes()

int NEXTCDF4_write_attributes ( NEXTCDF4_FILE_INFO_T file,
NC_FILE_INFO_T *  h5 
)

Write all in-memory attributes to their HDF5 group or dataset.

Parameters
fileNEXTCDF-4 file state.
h5Common NetCDF-4 file metadata.
Returns
NC_NOERR on success, or a NetCDF error code.

◆ NEXTCDF4_write_markers()

int NEXTCDF4_write_markers ( NEXTCDF4_FILE_INFO_T file)

Write NEXTCDF-4 provenance and compatibility markers.

Parameters
fileOpen writable NEXTCDF-4 state.
Returns
NC_NOERR on success, or NC_EHDFERR.

◆ NEXTCDF4_write_types()

int NEXTCDF4_write_types ( NC_FILE_INFO_T *  h5)