def METHOD_NAME(cube, field, filename):
    """
    A function which adds an "Experiment" coordinate which comes from the
    filename.
    """
    # Extract the experiment name (such as A1B or E1) from the filename (in
    # this case it is just the start of the file name, before the first ".").
    fname = os.path.basename(filename)  # filename without path.
    experiment_label = fname.split(".")[0]
    # Create a coordinate with the experiment label in it...
    exp_coord = coords.AuxCoord(
        experiment_label, long_name="Experiment", units="no_unit"
    )
    # ...and add it to the cube.
    cube.add_aux_coord(exp_coord)