// add the time coordinate variable
String typeName = useRun ? "run" : "forecast";
String desc = typeName + " time coordinate";
VariableDS timeCoordinate = new VariableDS(newds, g, null, dimName, DataType.DOUBLE, dimName,
"hours since " + formatter.toDateTimeStringISO(baseDate), desc);
timeCoordinate.setCachedData(offsetData, true);
timeCoordinate.addAttribute(new Attribute("long_name", desc));
timeCoordinate.addAttribute(new Attribute("standard_name", useRun ? "forecast_reference_time" : "time"));
timeCoordinate.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Time.toString()));
newds.addVariable(g, timeCoordinate);