Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

[netCDF #WXF-497885]: About nf90_inq_nvars



Hi Yaosheng,

The function nf90_inquire was actually available as early as 
the 3.5.0 release (April 2000) and in all versions since then.  
It can be used to get the number of variables in the file as
follows:

  integer status, nvar

  status = nf90_inquire(ncid, nvariables = nvar)
  ! check status of call, if OK, then nvar has number of variables
  ! in file (or in the group if ncid is a group id)
  if (status .ne. nf90_noerr)
    ! handle error

--Russ

Russ Rew                                         UCAR Unidata Program
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: WXF-497885
Department: Support netCDF
Priority: Normal
Status: Closed


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690