% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/netcdf.R
\name{netcdfTOC}
\alias{netcdfTOC}
\title{Print an overview of the contents of a NetCDF file}
\usage{
netcdfTOC(file, level = 1L, debug = getOption("oceDebug"))
}
\arguments{
\item{file}{character value naming a NetCDF file.}

\item{level}{integer indicating the level of the overview.  If \code{level} is 1,
which is the default, then a list holding the names of variables and
dimensions is printed (and returned, silently).  If \code{level} is 2, then more
information is printed.}

\item{debug}{an integer specifying whether debugging information is
to be printed during the processing. This is a general parameter that
is used by many \code{oce} functions. Generally, setting \code{debug=0}
turns off the printing, while higher values suggest that more information
be printed. If one function calls another, it usually reduces the value of
\code{debug} first, so that a user can often obtain deeper debugging
by specifying higher \code{debug} values.}
}
\value{
If \code{level} is 1, then the printed list of variables and dimensions
is returned.  Otherwise, more information is printed, but
the return value is the same as for \code{level} 1.
}
\description{
This prints an overview of the variables in a NetCDF file, along with time,
longitude and latitude, if the last three are stored as dimensions.
}
\details{
An alternative to this is to examine what is printed by running
\code{\link[ncdf4:nc_open]{ncdf4::nc_open()}} with the given filename, but this output can be a bit
confusing to read, especially for files that have voluminous global
attributes.
}
\examples{
library(oce)
# Use an Argo file that comes with the package.
if (requireNamespace("ncdf4") && requireNamespace("jsonlite")) {
    file <- system.file("extdata/D4902337_219.nc", package = "oce")
    netcdfTOC(file)
}

}
\author{
Dan Kelley
}
