esmvaltool/diag_scripts/ocean/diagnostic_tools.py
def match_model_to_key(model_type, cfg_dict, input_files_dict, ):
    """
    Match up model or observations dataset dictionairies from config file.

    This function checks that the control_model, exper_model and
    observational_dataset dictionairies from the recipe are matched with the
    input file dictionairy in the cfg metadata.
    """
    for input_file, intput_dict in input_files_dict.items():
        intersect_keys = intput_dict.keys() & cfg_dict.keys()
        match = True
        for key in intersect_keys:
            if intput_dict[key] == cfg_dict[key]:
                continue
            match = False
        if match:
            return input_file
    logger.warning("Unable to match model: %s", model_type)
    return ''

    Match up model or observations dataset dictionairies from config file.

    This function checks that the control_model, exper_model and
    observational_dataset dictionairies from the recipe are matched with the
    input file dictionairy in the cfg metadata.
    
Match up model or observations dataset dictionairies from config file.
This function checks that the control_model, exper_model and
observational_dataset dictionairies from the recipe are matched with the
input file dictionairy in the cfg metadata.
Match up model or observations dataset dictionairies from config file . This function checks that the control_model exper_model and observational_dataset dictionairies from the recipe are matched with the input file dictionairy in the cfg metadata .
def match_model_to_key(model_type, cfg_dict, input_files_dict, ):
    for input_file, intput_dict in input_files_dict.items():
        intersect_keys = intput_dict.keys() & cfg_dict.keys()
        match = True
        for key in intersect_keys:
            if intput_dict[key] == cfg_dict[key]:
                continue
            match = False
        if match:
            return input_file
    logger.warning("Unable to match model: %s", model_type)
    return ''
def match_model_to_key ( model_type , cfg_dict , input_files_dict , ) : for input_file , intput_dict in input_files_dict . items ( ) : intersect_keys = intput_dict . keys ( ) & cfg_dict . keys ( ) match = True for key in intersect_keys : if intput_dict [ key ] == cfg_dict [ key ] : continue match = False if match : return input_file logger . warning ( "Unable to match model: %s" , model_type ) return ''
Match up model or observations dataset dictionairies from config file.
Match up model or observations dataset dictionairies from config file .
"""
    Match up model or observations dataset dictionairies from config file.

    This function checks that the control_model, exper_model and
    observational_dataset dictionairies from the recipe are matched with the
    input file dictionairy in the cfg metadata.
    """
model_type
cfg_dict
input_files_dict