addVariable
add a new (real or complex) variable to the file
Declaration
variable = addVariable(name,data,dimNames,properties,ncType)
Parameters
namename of the variable (a string)datavariable datadimNamescell array containing the dimension namesproperties(optional)containers.MappropertiesncType
Returns
variablea NetCDFVariable object
Discussion
Immediately initializes and writes the given variable data to file.
ncfile.addVariable('fluid-tracer',myVariableData, {'x','y','t'},containers.Map({'isTracer'},{'1'}),'NC_DOUBLE');