Variable timeVar = new Variable(ncfile, null, null, "time");
timeVar.setDataType(DataType.INT);
timeVar.setDimensions("time");
timeVar.addAttribute(new Attribute("units",
"seconds since "
+ df.toDateTimeString(nomTime)));
timeVar.addAttribute(new Attribute("long_name", "time"));
varArray = new ArrayInt.D1(1);
((ArrayInt.D1) varArray).set(0, 0);
timeVar.setCachedData(varArray, false);
ncfile.addVariable(null, timeVar);