74 hid_t file_id = H5Fopen(dataset().c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
76 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the HDF5 file ID .");
81 dset_id = H5Dopen2(file_id,var_path.c_str(),H5P_DEFAULT);
83 dset_id = H5Dopen2(file_id,name().c_str(),H5P_DEFAULT);
87 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the datatype .");
90 hid_t dtypeid = H5Dget_type(dset_id);
94 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the datatype .");
97 hid_t memtype = H5Tget_native_type(dtypeid, H5T_DIR_ASCEND);
103 throw InternalErr(__FILE__, __LINE__,
"Cannot obtain the native datatype.");
107 if(
false == is_dap4()) {
108 if (1 == H5Tget_size(memtype) && H5T_SGN_2 == H5Tget_sign(memtype)) {
118 else if (get_dap_type(memtype,
false) ==
"Int16") {
137 if (H5Tclose(memtype) < 0) {
138 throw InternalErr(__FILE__, __LINE__,
"Unable to close the datatype.");
141 if (H5Dclose(dset_id) < 0) {
142 throw InternalErr(__FILE__, __LINE__,
"Unable to close the dset.");