The
CDF_VARPUT procedure writes a value to a
variable in a Common Data Format file. This function provides equivalent functionality to the C routines
CDFvarPut
and
CDFvarHyperPut
.
An optional vector containing the counts to be used in writing Value . Note that counts do not have to match the dimensions of Value . The default count is to use the dimensions of Value .
A vector specifying the interval between values in each dimension. The default value is 1 in each dimension.
A vector specifying the array indices within the specified record(s) at which to begin writing. OFFSET is a 1-dimensional array containing one element per CDF dimension. The default value is zero in each dimension.
id= CDF_CREATE('mycdf', [5,10], /NETWORK_ENCODING, /ROW_MAJOR)
varid= CDF_VARCREATE(id, 'V1', [1,1], /CDF_FLOAT, /REC_VARY)
To write the value 42.0 into record 12, third row, fourth column:
CDF_VARPUT, id, varid, 42, REC_START=12, OFFSET=[2,3]
To write 3 records, skipping every other record, starting at record 2, writing every other entry of each record. Note that in this example we write 25 values into each record written: