Using python and <filename> as your file you want to update:
import numpy as np import netCDF4 as nc with nc.Dataset(<filename>, mode="r+") as ds: np.int32(ds.variables['time'][:])