mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
added NC_VIRTUAL storage layout
This commit is contained in:
parent
4b80965491
commit
69fb44ec4b
@ -300,6 +300,7 @@ NOTE: The NC_MAX_DIMS, NC_MAX_ATTRS, and NC_MAX_VARS limits
|
||||
#define NC_CONTIGUOUS 1
|
||||
#define NC_COMPACT 2
|
||||
#define NC_UNKNOWN_STORAGE 3
|
||||
#define NC_VIRTUAL 4
|
||||
/**@}*/
|
||||
|
||||
/** In HDF5 files you can set check-summing for each variable.
|
||||
|
@ -1141,6 +1141,10 @@ get_chunking_info(hid_t propid, NC_VAR_INFO_T *var)
|
||||
{
|
||||
var->storage = NC_COMPACT;
|
||||
}
|
||||
else if (layout == H5D_VIRTUAL)
|
||||
{
|
||||
var->storage = NC_VIRTUAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
var->storage = NC_UNKNOWN_STORAGE;
|
||||
|
@ -1711,6 +1711,8 @@ rec_print_metadata(NC_GRP_INFO_T *grp, int tab_count)
|
||||
strcat(storage_str, "compact");
|
||||
else if (var->storage == NC_CHUNKED)
|
||||
strcat(storage_str, "chunked");
|
||||
else if (var->storage == NC_VIRTUAL)
|
||||
strcat(storage_str, "virtual");
|
||||
else
|
||||
strcat(storage_str, "unknown");
|
||||
LOG((2, "%s VARIABLE - varid: %d name: %s ndims: %d "
|
||||
|
@ -1002,6 +1002,9 @@ pr_att_specials(
|
||||
printf("%lu%s", (unsigned long)chunkp[i], i+1 < varp->ndims ? ", " : " ;\n");
|
||||
}
|
||||
free(chunkp);
|
||||
} else if(contig == NC_VIRTUAL) {
|
||||
pr_att_name(ncid, varp->name, NC_ATT_STORAGE);
|
||||
printf(" = \"virtual\" ;\n");
|
||||
} else {
|
||||
pr_att_name(ncid, varp->name, NC_ATT_STORAGE);
|
||||
printf(" = \"unknown\" ;\n");
|
||||
|
Loading…
Reference in New Issue
Block a user