from warnings import warn


def mf_sname_to_wmo_number(radar_name):
    """
    returns de WMO radar number when given the short radar name used at MF

    Parameters
    ----------
    radar_name : str
        The radar name

    Returns
    -------
    radar_num : str
        The WMO radar number

    """
    if radar_name == 'ABBE':  # Abbeville
        radar_num = '07005'
    elif radar_name == 'AJAC':  # Ajaccio
        radar_num = '07760'
    elif radar_name == 'ALER':  # Aleria
        radar_num = '07774'
    elif radar_name == 'TROY':  # Arcis
        radar_num = '07168'
    elif radar_name == 'AVES':  # Avesnes
        radar_num = '07083'
    elif radar_name == 'BLAI':  # Blaisy
        radar_num = '07274'
    elif radar_name == 'BOLL':  # Bollene
        radar_num = '07569'
    elif radar_name == 'BORD':  # Bordeaux
        radar_num = '07510'
    elif radar_name == 'BOUR':  # Bourges
        radar_num = '07255'
    elif radar_name == 'CHER':  # Cherves
        radar_num = '07336'
    elif radar_name == 'COLL':  # Collobrieres
        radar_num = '07671'
    elif radar_name == 'CAEN':  # Falaise
        radar_num = '07027'
    elif radar_name == 'GREZ':  # Grezes
        radar_num = '07436'
    elif radar_name == 'MOMU':  # Momuy
        radar_num = '07606'
    elif radar_name == 'MTCY':  # Montancy
        radar_num = '07291'
    elif radar_name == 'MCLA':  # Montclar
        radar_num = '07637'
    elif radar_name == 'NANC':  # Nancy
        radar_num = '07180'
    elif radar_name == 'NIME':  # Nimes
        radar_num = '07645'
    elif radar_name == 'OPOU':  # Opoul
        radar_num = '07745'
    elif radar_name == 'PLAB':  # Plabennec
        radar_num = '07108'
    elif radar_name == 'LEPU':  # Sembadel
        radar_num = '07471'
    elif radar_name == 'NIZI':  # StNizier
        radar_num = '07381'
    elif radar_name == 'TOUL':  # Toulouse
        radar_num = '07629'
    elif radar_name == 'TRAP':  # Trappes
        radar_num = '07145'
    elif radar_name == 'TREI':  # Treillieres
        radar_num = '07223'
    elif radar_name == 'MAUR':  # Maurel
        radar_num = '07572'
    elif radar_name == 'COBI':  # Colombis
        radar_num = '07578'
    elif radar_name == 'VARS':  # Vars
        radar_num = '07714'
    elif radar_name == 'MOUC':  # Moucherotte
        radar_num = '07468'
    elif radar_name == 'REMY':  # StRemy
        radar_num = '07366'
    elif radar_name == 'NOYA':  # Noyal
        radar_num = '07122'
    elif radar_name == 'LEMO':  # Le Moule
        radar_num = '78891'
    elif radar_name == 'DIAM':  # Diamant
        radar_num = '78924'
    elif radar_name == 'CORA':  # Colorado
        radar_num = '61979'
    elif radar_name == 'PVIL':  # Villers
        radar_num = '61978'
    elif radar_name == 'NOUM':  # Noumea
        radar_num = '91592'
    elif radar_name == 'LIFO':  # Lifou
        radar_num = '91582'
    elif radar_name == 'TIEB':  # Tiebaghi
        radar_num = '91571'
    elif radar_name == 'JERS':  # Jersey
        radar_num = '03897'
    elif radar_name == 'LDOL':  # Ladole
        radar_num = '06699'
    elif radar_name == 'VIAL':  # Vial
        radar_num = '07694'
    else:
        warn('Unable to find radar number for radar name '+radar_name)
        radar_num = ''

    return radar_num