def get_subdmap(directory):
    'Reconstruct how netCDF files are stored in fused directory\n\n    directory == dirgrid | dirhis '
    _subdmap = {}
    for subd in subdomains:
        fs = glob.glob((directory.format(subd=subd) + '/*.nc'))
        tiles = [int(f.split('.')[(- 2)]) for f in fs]
        for t in tiles:
            _subdmap[t] = subd
    return _subdmap
Reconstruct how netCDF files are stored in fused directory

directory == dirgrid | dirhis
def get_subdmap(directory):
    'Reconstruct how netCDF files are stored in fused directory\n\n    directory == dirgrid | dirhis '
    _subdmap = {}
    for subd in subdomains:
        fs = glob.glob((directory.format(subd=subd) + '/*.nc'))
        tiles = [int(f.split('.')[(- 2)]) for f in fs]
        for t in tiles:
            _subdmap[t] = subd
    return _subdmap