|
NEP 4.0.0
NetCDF Expansion Pack
|
NEXTCDF-4 Sprint 3 metadata model: dimensions, variables, attributes, type mapping, and on-disk discovery. More...
#include "config.h"#include <stdlib.h>#include <string.h>#include <assert.h>#include <hdf5_hl.h>#include "nclist.h"#include "nxt4internal.h"Data Structures | |
| struct | dim_list_t |
| struct | var_list_t |
| struct | resolve_scale_t |
| struct | att_iter_data_t |
| struct | load_children_data_t |
Functions | |
| static int | is_reserved_att (const char *name) |
| static void | free_name_list (char **names, size_t n) |
| 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) |
| static hid_t | native_hdf_type (nc_type xtype) |
| static int | set_var_type (NC_VAR_INFO_T *var, nc_type xtype) |
| static int | write_string_att (hid_t loc, const char *name, const char *value) |
| static int | write_int_att (hid_t loc, const char *name, int value) |
| static int | write_int_array_att (hid_t loc, const char *name, const int *values, size_t len) |
| static int | map_nc_type (hid_t htype, nc_type *xtypep) |
| static int | get_att_context (NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var, NCindex **listp, hid_t *locp) |
| static NC_ATT_INFO_T * | find_att (NCindex *list, const char *name) |
| static int | add_att (NCindex *list, NC_OBJ *container, const char *name, nc_type xtype, size_t len, const void *data, NC_ATT_INFO_T **attp) |
| static int | read_hdf5_att (hid_t loc, const char *name, NCindex *list, NC_OBJ *container) |
| 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) |
| static int | create_var_dataset (NC_VAR_INFO_T *var, NC_FILE_INFO_T *h5, NEXTCDF4_FILE_INFO_T *file, NC_GRP_INFO_T *grp) |
| static int | find_var_for_write (int ncid, int varid, NC_FILE_INFO_T **h5, NEXTCDF4_FILE_INFO_T **file, NC_GRP_INFO_T **grp, NC_VAR_INFO_T **var) |
| 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_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 (int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp) |
| 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_put_att (int ncid, int varid, const char *name, nc_type datatype, 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) |
| static NC_VAR_INFO_T * | find_coord_var (NC_GRP_INFO_T *grp, NC_DIM_INFO_T *dim) |
| static NC_DIM_INFO_T * | coord_var_dim (NC_VAR_INFO_T *var) |
| 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) |
| static herr_t | find_dim_cb (hid_t loc, const char *name, const H5L_info_t *info, void *op_data) |
| static int | load_one_dim (NEXTCDF4_FILE_INFO_T *file, NC_GRP_INFO_T *grp, const char *name, int dimid) |
| static int | load_dimensions (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5, NC_GRP_INFO_T *grp) |
| static herr_t | find_var_cb (hid_t loc, const char *name, const H5L_info_t *info, void *op_data) |
| static NC_DIM_INFO_T * | find_dim_by_name (NC_GRP_INFO_T *grp, const char *name) |
| static int | scale_resolve_visitor (hid_t did, unsigned int dim, hid_t dsid, void *op_data) |
| static int | resolve_var_dimids (NC_GRP_INFO_T *grp, hid_t dset, int ndims, int *dimids) |
| static int | load_one_var (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5, NC_GRP_INFO_T *grp, const char *name, int varid) |
| static herr_t | load_att_cb (hid_t loc, const char *attr_name, const H5A_info_t *ainfo, void *op_data) |
| static int | load_variables (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5, NC_GRP_INFO_T *grp) |
| static int | load_group_attributes (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5, NC_GRP_INFO_T *grp) |
| static int | load_children (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5, hid_t parent_hdf, NC_GRP_INFO_T *parent) |
| static int | load_one_type (NC_GRP_INFO_T *grp, hid_t htype, const char *name) |
| static int | load_group_metadata (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5, NC_GRP_INFO_T *grp, hid_t hdf_grp) |
| static int | load_one_group (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5, NC_GRP_INFO_T *parent, hid_t parent_hdf, const char *name) |
| static herr_t | load_children_cb (hid_t loc, const char *name, const H5L_info_t *info, void *op_data) |
| int | NEXTCDF4_load_metadata (NEXTCDF4_FILE_INFO_T *file, NC_FILE_INFO_T *h5) |
Variables | |
| static const char * | reserved_atts [] |
NEXTCDF-4 Sprint 3 metadata model: dimensions, variables, attributes, type mapping, and on-disk discovery.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| int NEXTCDF4_check_atomic_type | ( | NEXTCDF4_FILE_INFO_T * | file, |
| nc_type | xtype | ||
| ) |
Validate a fixed-size atomic type for the active model.
| file | NEXTCDF-4 file state. |
| xtype | Candidate NetCDF type. |
NC_NOERR or NC_EBADTYPE/NC_ENOTNC4. | int NEXTCDF4_check_write_define | ( | NEXTCDF4_FILE_INFO_T * | file | ) |
Verify the file is in define mode and not read-only.
| file | NEXTCDF-4 file state. |
NC_NOERR or an appropriate NetCDF error code. | int NEXTCDF4_def_dim | ( | int | ncid, |
| const char * | name, | ||
| size_t | len, | ||
| int * | idp | ||
| ) |
Define a dimension in the root group.
| ncid | NetCDF file identifier. |
| name | Dimension name. |
| len | Dimension length, or 0 for unlimited. |
| idp | Destination for the assigned dimension id. |
NC_NOERR on success, or a NetCDF error code. | 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.
| ncid | NetCDF file identifier. |
| name | Variable name. |
| xtype | NetCDF atomic type. |
| ndims | Number of dimensions. |
| dimidsp | Array of dimension ids. |
| varidp | Destination for the assigned variable id. |
NC_NOERR on success, or a NetCDF error code. | int NEXTCDF4_def_var_chunking | ( | int | ncid, |
| int | varid, | ||
| int | storage, | ||
| const size_t * | chunksizesp | ||
| ) |
Variable storage-property dispatch callbacks.
| int NEXTCDF4_def_var_deflate | ( | int | ncid, |
| int | varid, | ||
| int | shuffle, | ||
| int | deflate, | ||
| int | deflate_level | ||
| ) |
| int NEXTCDF4_def_var_endian | ( | int | ncid, |
| int | varid, | ||
| int | endianness | ||
| ) |
| int NEXTCDF4_def_var_fill | ( | int | ncid, |
| int | varid, | ||
| int | no_fill, | ||
| const void * | fill_value | ||
| ) |
| int NEXTCDF4_def_var_filter | ( | int | ncid, |
| int | varid, | ||
| unsigned int | id, | ||
| size_t | nparams, | ||
| const unsigned int * | params | ||
| ) |
| int NEXTCDF4_def_var_fletcher32 | ( | int | ncid, |
| int | varid, | ||
| int | fletcher32 | ||
| ) |
| int NEXTCDF4_def_var_quantize | ( | int | ncid, |
| int | varid, | ||
| int | quantize_mode, | ||
| int | nsd | ||
| ) |
| int NEXTCDF4_del_att | ( | int | ncid, |
| int | varid, | ||
| const char * | name | ||
| ) |
Delete an attribute.
| ncid | NetCDF file identifier. |
| varid | Variable id or NC_GLOBAL. |
| name | Attribute name. |
NC_NOERR on success, or a NetCDF error code. | 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.
| ncid | NetCDF file identifier. |
| varid | Variable id or NC_GLOBAL. |
| name | Attribute name. |
| value | Destination buffer. |
| memtype | Requested in-memory type. |
NC_NOERR on success, or a NetCDF error code. | int NEXTCDF4_inq_dim | ( | int | ncid, |
| int | dimid, | ||
| char * | name, | ||
| size_t * | lenp | ||
| ) |
Inquire a dimension by id.
| ncid | NetCDF file identifier. |
| dimid | Dimension id. |
| name | Destination for the dimension name. |
| lenp | Destination for the dimension length. |
NC_NOERR on success, or a NetCDF error code. | int NEXTCDF4_inq_var | ( | int | ncid, |
| int | varid, | ||
| char * | name, | ||
| nc_type * | xtypep, | ||
| int * | ndimsp, | ||
| int * | dimidsp, | ||
| int * | nattsp | ||
| ) |
Inquire a variable by id.
| ncid | NetCDF file identifier. |
| varid | Variable id. |
| name | Destination for the variable name. |
| xtypep | Destination for the variable type. |
| ndimsp | Destination for the rank. |
| dimidsp | Destination for the dimension ids. |
| nattsp | Destination for the number of attributes. |
NC_NOERR on success, or a NetCDF error code. | 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_load_metadata | ( | NEXTCDF4_FILE_INFO_T * | file, |
| NC_FILE_INFO_T * | h5 | ||
| ) |
Load all root-group metadata from an open HDF5 file.
| file | Open NEXTCDF-4 state. |
| h5 | Common NetCDF-4 file metadata. |
NC_NOERR on success, or a NetCDF error code. | int NEXTCDF4_map_hdf_type | ( | nc_type | xtype, |
| hid_t * | typep | ||
| ) |
Map a fixed-size NetCDF atomic type to its HDF5 datatype.
| xtype | NetCDF atomic type. |
| typep | Destination for an HDF5 datatype identifier. |
NC_NOERR or NC_EBADTYPE. | 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.
| ncid | NetCDF file identifier. |
| varid | Variable id or NC_GLOBAL. |
| name | Attribute name. |
| xtype | NetCDF atomic type. |
| len | Number of elements. |
| value | Attribute data. |
| memtype | In-memory type for the attribute value. |
NC_NOERR on success, or a NetCDF error code. | int NEXTCDF4_rename_att | ( | int | ncid, |
| int | varid, | ||
| const char * | name, | ||
| const char * | newname | ||
| ) |
Rename an attribute.
| ncid | NetCDF file identifier. |
| varid | Variable id or NC_GLOBAL. |
| name | Current attribute name. |
| newname | New attribute name. |
NC_NOERR on success, or a NetCDF error code. | int NEXTCDF4_rename_dim | ( | int | ncid, |
| int | dimid, | ||
| const char * | name | ||
| ) |
Rename a dimension.
| ncid | NetCDF file identifier. |
| dimid | Dimension id. |
| name | New dimension name. |
NC_NOERR on success, or a NetCDF error code. | int NEXTCDF4_rename_var | ( | int | ncid, |
| int | varid, | ||
| const char * | name | ||
| ) |
Rename a variable.
| ncid | NetCDF file identifier. |
| varid | Variable id. |
| name | New variable name. |
NC_NOERR on success, or a NetCDF error code. | const char * NEXTCDF4_type_name | ( | nc_type | xtype | ) |
Return a display name for a fixed-size NetCDF atomic type.
| xtype | NetCDF atomic type. |
| int NEXTCDF4_type_size | ( | nc_type | xtype, |
| size_t * | sizep | ||
| ) |
Return the in-memory size of a fixed-size NetCDF atomic type.
| xtype | NetCDF atomic type. |
| sizep | Destination for the size in bytes. |
NC_NOERR or NC_EBADTYPE.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |