import json


def read_yyyy_tides_data(yyyy, station, f_path):
    """ Loads specific tides data & minmax dicts from a json file.

    Args:
        yyyy (int or str): year value as four digits.
        station (int or str): NOAA station ID.
        f_path (str): path to the config file.

    Returns:
        json_data (str from file), f_path (str with file name)
        None, f_path if file is not found.
        None, None if a catastrophic read file error.
    """
    f_path = '{0}/{1}_{2}_data.json'.format(f_path, station, yyyy)
    json_data = None
    try:
        with open(f_path, 'r') as json_file:
            json_data = json.load(json_file)
    except FileNotFoundError:
        return None, f_path # json_data is None == file not found
    except:
        print('catastrophic error reading: {0}'.format(f_path))
        return None, None # None in f_path position == catastrophy
    return json_data, f_path