Unidata / netcdf-cxx4

Official GitHub repository for netCDF-C++ libraries and utilities.
Other
124 stars 49 forks source link

How do I get format type #49

Closed Weiming-Hu closed 7 years ago

Weiming-Hu commented 7 years ago

It looks like there is no getFormat as in NetCDF 4.4.1

So can I do it in NetCD 4.3?

Thank you

DennisHeimbigner commented 7 years ago

You man have to use the C function nc_inq_format directly.

Weiming-Hu commented 7 years ago

Thank you.

Weiming-Hu commented 7 years ago

A follow up question.

I'm reading a NetCDF file with unknown structure, and I'd like to read the values of the attribtues. I'm aware that I can use getAttType to get the type, and then allocate memory. But what would the proper way to do this automatically. Do I need to write a template?

Thank you.