def mount_stats(grid=False):
    ' Print statistics on mounted tar files'
    print(('-' * 40))
    print(BB('statistics on mounted tar files'))
    print(f'mounting point: {dirmounted}')
    for subd in subdomains:
        if grid:
            destdir = dirgrid.format(subd=subd)
        else:
            destdir = dirhis.format(subd=subd)
        if os.path.exists(destdir):
            filelist = os.listdir(f'{destdir}')
            nbfiles = len(filelist)
            if (nbfiles > 0):
                tiles = set([int(f.split('.')[(- 2)]) for f in filelist])
                nbtiles = len(tiles)
                tile = list(tiles)[0]
                fs = [f for f in filelist if (f'{tile:04}.nc' in f)]
                if grid:
                    msg = f'  - {subd:02} : {nbtiles:03} tiles'
                else:
                    _hisdate = read_toc(destdir, subd)
                    bbhisdate = BB(_hisdate)
                    msg = f'  - {subd:02} : {bbhisdate} with {nbtiles:03} tiles'
            else:
                msg = f'  - {subd:02} : empty'
        else:
            warning = BB('destroyed')
            msg = f'  - {subd:02} : {warning}'
        print(msg)
Print statistics on mounted tar files
def mount_stats(grid=False):
    ' '
    print(('-' * 40))
    print(BB('statistics on mounted tar files'))
    print(f'mounting point: {dirmounted}')
    for subd in subdomains:
        if grid:
            destdir = dirgrid.format(subd=subd)
        else:
            destdir = dirhis.format(subd=subd)
        if os.path.exists(destdir):
            filelist = os.listdir(f'{destdir}')
            nbfiles = len(filelist)
            if (nbfiles > 0):
                tiles = set([int(f.split('.')[(- 2)]) for f in filelist])
                nbtiles = len(tiles)
                tile = list(tiles)[0]
                fs = [f for f in filelist if (f'{tile:04}.nc' in f)]
                if grid:
                    msg = f'  - {subd:02} : {nbtiles:03} tiles'
                else:
                    _hisdate = read_toc(destdir, subd)
                    bbhisdate = BB(_hisdate)
                    msg = f'  - {subd:02} : {bbhisdate} with {nbtiles:03} tiles'
            else:
                msg = f'  - {subd:02} : empty'
        else:
            warning = BB('destroyed')
            msg = f'  - {subd:02} : {warning}'
        print(msg)