def twopercent(station_code):
    """Two percent high design temperature for a location.

    Degrees in Celcius

    Args:
        station_code (str): Weather Station Code

    Returns:
        float degrees Celcius
    """
    # (DB=>MWB) 2%, MaxDB=
    temp = None
    try:
        fin = open('%s/%s' % (env.WEATHER_DATA_PATH,
                              _basename(station_code, 'ddy')))
        for line in fin:
            value = re.search("""2%, MaxDB=(\\d+\\.\\d*)""", line)
            if value:
                temp = float(value.groups()[0])
    except IOError:
        pass

    if not temp:
        # (DB=>MWB) 2%, MaxDB=
        try:
            fin = open('%s/%s' % (env.WEATHER_DATA_PATH,
                                  _basename(station_code, 'stat')))
            flag = 0
            tdata = []
            for line in fin:
                if line.find('2%') is not -1:
                    flag = 3
                if flag > 0:
                    tdata.append(line.split('\t'))
                    flag -= 1
            temp = float(tdata[2][5].strip())
        except IOError:
            pass
    if temp:
        return temp
    else:
        raise Exception("Error: 2% High Temperature not found")