Dimension ncDim = new Dimension(name, nl, true);
ncFile.addDimension(null, ncDim);
Variable vz = new Variable(ncFile, null, null, name,
DataType.DOUBLE, name);
vz.addAttribute(new Attribute("long_name", name));
vz.addAttribute(new Attribute("units",
zDim.getUnit()));
addZAttributes(zDim, vz);
ArrayDouble.D1 varArray = new ArrayDouble.D1(nl);
for (int i = 0; i < nl; i++) {
varArray.set(i, vals[i]);