def mount(subd, grid=False, overwrite=True):
    'Mount tar file `subd`'
    if grid:
        destdir = dirgrid.format(subd=subd)
        srcdir = dirgridtar.format(subd=subd)
        tarfile = targridtemplate.format(subd=subd)
    else:
        destdir = dirhis.format(subd=subd)
        srcdir = dirgigaref.format(subd=subd)
        tarfile = tarhistemplate.format(hisdate=hisdate, subd=subd)
    tomount = True
    if os.path.exists(destdir):
        if (len(os.listdir(destdir)) == 0):
            pass
        elif overwrite:
            command = f'fusermount -u {destdir}'
            try:
                os.system(command)
            except:
                pass
            assert (len(os.listdir(f'{destdir}')) == 0)
        else:
            tomount = False
    else:
        print(f'*** makedir {destdir}')
    if tomount:
        mount_tar(srcdir, tarfile, destdir)
        if (not grid):
            write_toc(destdir, subd, hisdate)
Mount tar file `subd`
def mount(subd, grid=False, overwrite=True):
    
    if grid:
        destdir = dirgrid.format(subd=subd)
        srcdir = dirgridtar.format(subd=subd)
        tarfile = targridtemplate.format(subd=subd)
    else:
        destdir = dirhis.format(subd=subd)
        srcdir = dirgigaref.format(subd=subd)
        tarfile = tarhistemplate.format(hisdate=hisdate, subd=subd)
    tomount = True
    if os.path.exists(destdir):
        if (len(os.listdir(destdir)) == 0):
            pass
        elif overwrite:
            command = f'fusermount -u {destdir}'
            try:
                os.system(command)
            except:
                pass
            assert (len(os.listdir(f'{destdir}')) == 0)
        else:
            tomount = False
    else:
        print(f'*** makedir {destdir}')
    if tomount:
        mount_tar(srcdir, tarfile, destdir)
        if (not grid):
            write_toc(destdir, subd, hisdate)