def persist(filename):
    """
    Append the digital elevation map projected (using lat lon) as variables of
    the netcdf file.

    Keyword arguments:
    filename -- the name of a netcdf file.
    """
    dem_projected = obtain_to(filename)
    with nc.loader(filename) as root:
        data = nc.getvar(root, 'data')
        dem = nc.getvar(root, 'dem', 'f4', source=data)
        stack = [dim for dim in dem.shape if dim not in dem_projected.shape]
        stack = stack[0] if stack else 1
        dem[:] = np.vstack(map(lambda x: [dem_projected], range(stack)))