NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi, I wanted to try some compression on a dataset whilst converting to netcdf4/hdf5 to see if we can save some space. I have my compound type defined as such: if (nc_def_compound(grp2id, sizeof(struct elements), "sample_elements", &typeid)) ERR(retval); if (nc_insert_compound(grp2id, typeid, "elem", offsetof(struct elements, elem), NC_INT64)) ERR(retval); if (nc_insert_compound(grp2id, typeid, "type", offsetof(struct elements, type), NC_INT)) ERR(retval); if (nc_insert_compound(grp2id, typeid, "x", offsetof(struct elements, x), NC_INT)) ERR(retval); if (nc_insert_compound(grp2id, typeid, "y", offsetof(struct elements, y), NC_INT)) ERR(retval); if (nc_insert_compound(grp2id, typeid, "z", offsetof(struct elements, z), NC_INT)) ERR(retval); and then I call: if ((retval = nc_def_var(grp2id, "data", typeid, 2, dimids, &varid2))) ERR(retval); which works fine. If add in the following, before my call to nc_put_var: if (retval = nc_def_var_deflate(ncid, varid2, 0, 1, 1)) ERR(retval) I get the error: Error: NetCDF: Variable not found which is odd as "varid2" is a legal variable id. Any thoughts? -- Nick Johnson, Applications Developer, EPCC 2407 JCMB, King's Buildings, Mayfield Road, Edinburgh, EH9 3JF e: Nick.Johnson@xxxxxxxx t: 0131 651 3388 -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
netcdfgroup
archives: