added NC_VIRTUAL storage layout

This commit is contained in:
Tobias Kölling 2020-09-03 17:51:46 +02:00
parent 4b80965491
commit 69fb44ec4b
4 changed files with 10 additions and 0 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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 "

View File

@ -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");