def get_data_source(name):
    """Guesses data source from file name.

    If the name contains 'terr' then we guess terrestrial data,
    otherwise we assume satellite.

    Arguments
    =========
    name : str
        File name

    Returns
    =======
    int
        0 if satellite, 1 if terrestrial

    """
    if name.find('terr') != -1:
        # terrestrial
        return 1
    else:
        # assume satellite
        return 0