This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
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 address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: WXF-497885 Department: Support netCDF Priority: Normal Status: Closed