<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_fname_meta(fp):
 """Processes a CMIP3 style file name. Filename is of pattern: <model>-<experiment>-<variable_name>-<ensemble_member>.nc Arguments: fp (str):
 A file path/name conforming to DRS spec. Returns: dict: Metadata as extracted from the filename. .. _Data Reference Syntax: http://cmip-pcmdi.llnl.gov/cmip5/docs/cmip5_data_reference_syntax.pdf """


    # Strip directory, extension, then split
    if '/' in fp:
        fp = os.path.split(fp)[1]
    fname = os.path.splitext(fp)[0]
    meta = fname.split('-')

    res = {}

    try:
        for key in FNAME_ATTS:
            res[key] = meta.pop(0)
    except IndexError:
        raise PathError(fname)

    return res