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.
>From: address@hidden (CHENG M) >Organization: Oak Ridge National Laboratory >Keywords: 199402091449.AA14047 netCDF Meng-Dawn, >Pls add me to your mailing list <address@hidden>. Done. >I know MAX_VAR_DIMS specifies the max no. of records (i.e. the size) >of each variable dimension. Actully the maximum size of each variable dimension. >However, I have a problem determine or >knowing the actual <current> no. of records in each CDF file before >I put in the dimension size for "count" arg. to be use in the function >"ncvarget". Is there a quick way to retrieve the info I need? The call ncdiminq will return the current number of "records" in the netCDF file. The typical way you would use this call is to first call ncinquire to get the unlimited dimension id and then use this in the ncdiminq call. Tom Yoksas