def get_datanode_fp_meta(fp):
    """Processes a datanode style file path.

    Section 3.2 of the `Data Reference Syntax`_ details:

        It is recommended that ESGF data nodes should layout datasets
        on disk mapping DRS components to directories as:

            <activity>/<product>/<institute>/<model>/<experiment>/
            <frequency>/<modeling_realm>/<mip_table>/<ensemble_member>/
            <version_number>/<variable_name>/<CMOR filename>.nc

    Arguments:
        fp (str): A file path conforming to DRS spec.

    Returns:
        dict: Metadata as extracted from the file path.

    .. _Data Reference Syntax:
       http://cmip-pcmdi.llnl.gov/cmip5/docs/cmip5_data_reference_syntax.pdf
    """

    # Copy metadata list then reverse to start at end of path
    directory_meta = list(CMIP5_DATANODE_FP_ATTS)

    # Prefer meta extracted from filename
    meta = get_dir_meta(fp, directory_meta)
    meta.update(get_cmor_fname_meta(fp))

    return meta
def get_datanode_fp_meta ( fp ) : directory_meta = list ( CMIP5_DATANODE_FP_ATTS ) meta = get_dir_meta ( fp , directory_meta ) meta . update ( get_cmor_fname_meta ( fp ) ) return meta
Processes a datanode style file path.

    Section 3.2 of the `Data Reference Syntax`_ details:

        It is recommended that ESGF data nodes should layout datasets
        on disk mapping DRS components to directories as:

            <activity>/<product>/<institute>/<model>/<experiment>/
            <frequency>/<modeling_realm>/<mip_table>/<ensemble_member>/
            <version_number>/<variable_name>/<CMOR filename>.nc

    Arguments:
        fp (str): A file path conforming to DRS spec.

    Returns:
        dict: Metadata as extracted from the file path.

    .. _Data Reference Syntax:
       http://cmip-pcmdi.llnl.gov/cmip5/docs/cmip5_data_reference_syntax.pdf