mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
Fix for use with szip and also 1.8.21
This commit is contained in:
parent
f92b7a9505
commit
362b37b552
@ -81,7 +81,7 @@ writeszip()
|
||||
lcpl_id = H5Pcreate (H5P_LINK_CREATE);
|
||||
dapl_id = H5Pcreate (H5P_DATASET_ACCESS);
|
||||
|
||||
dataset32 = H5Dcreate1 (file, "datasetF32", H5T_NATIVE_FLOAT, data_space, lcpl_id, properties, dapl_id);
|
||||
dataset32 = H5Dcreate2 (file, "datasetF32", H5T_NATIVE_FLOAT, data_space, lcpl_id, properties, dapl_id);
|
||||
|
||||
/*
|
||||
* Write the array to the file. The datatype and dataspace
|
||||
@ -113,7 +113,7 @@ readszip()
|
||||
|
||||
file = H5Fopen (filename, H5F_ACC_RDONLY, H5P_DEFAULT);
|
||||
properties = H5Pcreate(H5P_DATASET_ACCESS);
|
||||
dataset32 = H5Dopen1(file, "datasetF32", properties);
|
||||
dataset32 = H5Dopen2(file, "datasetF32", properties);
|
||||
|
||||
/*
|
||||
* Read the array. This is similar to writing data,
|
||||
|
@ -211,7 +211,7 @@ main(int argc, char **argv)
|
||||
/* Open file and create group. */
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gcreate(fileid, GRP_NAME, 0)) < 0) ERR;
|
||||
if ((grpid = H5Gcreate1(fileid, GRP_NAME, 0)) < 0) ERR;
|
||||
|
||||
/* Write an array of bools, with szip compression. */
|
||||
if ((propid = H5Pcreate(H5P_DATASET_CREATE)) < 0) ERR;
|
||||
|
Loading…
Reference in New Issue
Block a user