28 hid_t group = H5Gcreate2(f, path, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
34 int arrlen = data->
Nmrk;
37 for(
integer i=0; i < arrlen; i++) {
38 mask[i] = coefarr[i] > 0;
47 for(
integer i = 0; i < arrlen; i++) {
49 idarr[j] = coefarr[i];
59 for(
integer i = 0; i < arrlen; i++) {
61 dataarr[j] = coefarr[i + arrlen];
68 for(
integer i = 0; i < arrlen; i++) {
70 dataarr[j] = coefarr[i + 2*arrlen];
79 H5LTset_attribute_string(group,
"ids",
"unit",
"1");
81 H5LTset_attribute_string(group,
"k",
"unit",
"1/s");
82 H5LTset_attribute_string(group,
"d",
"unit",
"1/s");
85 H5LTset_attribute_string(group,
"k",
"unit",
"m/s");
86 H5LTset_attribute_string(group,
"d",
"unit",
"m^2/s");
herr_t hdf5_write_extendible_dataset_long(hid_t group, const char *datasetname, int length, long *data)
Create and write to an extendible dataset for long data.
herr_t hdf5_write_extendible_dataset_double(hid_t group, const char *datasetname, int length, double *data)
Create and write to an extendible dataset for double data.
int hdf5_transcoef_write(hid_t f, char *path, diag_transcoef_offload_data *data, real *coefarr)
Write transport coefficients to a HDF5 file.