[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #HGQ-329307]: Does A netCDF4 "File Information" Program Exist?

Hi Tony,

> I'm searching for a C program that gathers information about netCDF4
> files.  This C program knows nothing about the particular netCDF4 file
> it's reading and therefore must make inquiries to the file to find out
> the number of groups/sub-groups, dimensions, variables, attributes it
> contains, the names of all the above, the variable shapes, etc.  My
> question: Does such a C program exist?  Can you tell me where I can
> download it?  If it does not exist I will take a crack at writing one.
> I've been searching online but so far haven't found anything.

The two utilities "ncdump" and "nccopy" both gather all that information.
"ncdump -h" outputs just the metadata information in CDL, a small language
for representing netCDF data in text form.  If you have netCDF installed,
the ncdump man page shows all the options.

The nccopy utility makes a copy of a netCDF-4 file using only the netCDF-4 
API, so it also has to inquire about everything.  It might be easiest to
modify nccopy source to just report what you want.


Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: HGQ-329307
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.