Next: , Previous: , Up: Variables   [Index]


4.1 Introduction

Variables for a netCDF file are defined when the dataset is created, while the netCDF file is in define mode. Other variables may be added later by reentering define mode. A netCDF variable has a name, a type, and a shape, which are specified when it is defined. A variable may also have values, which are established later in data mode.

Ordinarily, the name, type, and shape are fixed when the variable is first defined. The name may be changed, but the type and shape of a variable cannot be changed. However, a variable defined in terms of the unlimited dimension can grow without bound in that dimension.

A netCDF variable in an opened netCDF file is referred to by a small integer called a variable ID.

Variable IDs reflect the order in which variables were defined within a netCDF file. Variable IDs are 0, 1, 2,..., in the order in which the variables were defined. A function is available for getting the variable ID from the variable name and vice-versa.

Attributes (see Attributes) may be associated with a variable to specify such properties as units.

Operations supported on variables are:


Next: , Previous: , Up: Variables   [Index]