Exemplo n.º 1
0
def v2_sources():
    """Return (and cache) a sources dictionary that maps from 12-digit
    GHCN record ID to source.

    If the source files cannot be found (or read) then an empty
    dictionary is returned.
    """
    global _v2_sources
    if _v2_sources is None:
        try:
            _v2_sources = read_config.v2_get_sources()
        except IOError:
            _v2_sources = {}
            warnings.warn(
                "Could not load GHCN source metadata (mcdw.tbl) files.")
    return _v2_sources
def v2_sources():
    """Return (and cache) a sources dictionary that maps from 12-digit
    GHCN record ID to source.

    If the source files cannot be found (or read) then an empty
    dictionary is returned.
    """
    global _v2_sources
    if _v2_sources is None:
        try:
            _v2_sources = read_config.v2_get_sources()
        except IOError:
            _v2_sources = {}
            warnings.warn(
              "Could not load GHCN source metadata (mcdw.tbl) files.")
    return _v2_sources
Exemplo n.º 3
0
def v2_sources():
    global _v2_sources
    if _v2_sources is None:
        _v2_sources = read_config.v2_get_sources()
    return _v2_sources
Exemplo n.º 4
0
def v2_sources():
    global _v2_sources
    if _v2_sources is None:
        _v2_sources = read_config.v2_get_sources()
    return _v2_sources