Routines (alphabetical) > Routines: N > NCDF Routines > NCDF_VARID

# NCDF_VARID

The NCDF_VARID function returns the ID of a NetCDF variable.

## Examples

See NCDF_VARDEF.

## Syntax

Result = NCDF_VARID(Cdfid, Name)

## Return Value

This function returns the variable ID or returns -1 if the variable does not exist.

## Arguments

### Cdfid

The NetCDF ID, returned from a previous call to NCDF_OPEN, NCDF_CREATE, or NCDF_GROUPDEF.

### Name

A scalar string containing the variable name.

## Keywords

None

## Version History

Pre 4.0 | Introduced