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.

Problem finding the dimension name

Hi
  I am using the netcdf library calls to write programs
to read data in a netcdf format. Here is a problem i am facing.

I want to be able to find out the dimension name in a netcdf file.
Your manual suggests the 2 calls 

ncdimid(int cdfid, char* name)

this calls tells me what the dimension id is given the "name"

ncdiminq(int cdfid, int dimid, char *name, long* size)

this calls returns the name of dimension in "name".. but i have
to give the dimension id in dimid..

This is like  a loop.. My question is how do i find out
the name of a dimension if i dont know its dimid..

Satish