# Buggy code
def __call__(self, projectables, nonprojectables=None, **info):
    if len(projectables) != 5:
        raise ValueError("Expected 5 datasets, got %d" % (len(projectables),))

    # Collect information that is the same between the projectables
    info = combine_info(*projectables)
    # Update that information with configured information (including name)
    info.update(self.info)
    # Force certain pieces of metadata that we *know* to be true
    info["wavelength"] = None
    info["mode"] = self.info.get("mode", "RGB")

    m07 = projectables[0] * 255.0 / 160.0
    m08 = projectables[1] * 255.0 / 160.0
    m09 = projectables[2] * 255.0 / 160.0
    m10 = projectables[3] * 255.0 / 160.0
    m11 = projectables[4] * 255.0 / 160.0
    refcu = m11 - m10
    refcu[refcu < 0] = 0

    ch1 = m07 - refcu / 2.0 - m09 / 4.0
    ch2 = m08 + refcu / 4.0 + m09 / 4.0
    ch3 = m11 + m09

    return Dataset(data=[ch1, ch2, ch3], **info)


# Traceback (AttributeError)
[INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] Saving datasets to NetCDF4/CF.
[INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No longitude and latitude data to save.
[INFO: 2017-12-12 08:14:04 : satpy.writers.cf_writer] No grid mapping to save.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-24-58ece08c15f3> in <module>()
----> 1 lcl.save_datasets(writer='cf', filename='/tmp/foo.nc')

/home/lahtinep/Software/pytroll/packages/satpy/satpy/scene.pyc in save_datasets(self, writer, datasets, **kwargs)
632             datasets = self.datasets.values()
633         writer = self.get_writer(writer, **kwargs)
--> 634         writer.save_datasets(datasets, **kwargs)
635
636     def get_writer(self, writer="geotiff", **kwargs):

/home/lahtinep/Software/pytroll/packages/satpy/satpy/writers/cf_writer.pyc in save_datasets(self, datasets, filename, **kwargs)
176                     coords = [line_coord, pixel_coord]
177
--> 178                 domain = cf.Domain(dim=coords,
179                                    aux=aux,
180                                    ref=grid_mapping)

AttributeError: 'module' object has no attribute 'Domain'

# Fixed code
def __call__(self, projectables, nonprojectables=None, **info):
    if len(projectables) != 5:
        raise ValueError("Expected 5 datasets, got %d" % (len(projectables),))

    # Collect information that is the same between the projectables
    info = combine_metadata(*projectables)
    # Update that information with configured information (including name)
    info.update(self.attrs)
    # Force certain pieces of metadata that we *know* to be true
    info["wavelength"] = None
    info["mode"] = self.attrs.get("mode", "RGB")

    m07 = projectables[0] * 255.0 / 160.0
    m08 = projectables[1] * 255.0 / 160.0
    m09 = projectables[2] * 255.0 / 160.0
    m10 = projectables[3] * 255.0 / 160.0
    m11 = projectables[4] * 255.0 / 160.0
    refcu = m11 - m10
    refcu[refcu < 0] = 0

    ch1 = m07 - refcu / 2.0 - m09 / 4.0
    ch2 = m08 + refcu / 4.0 + m09 / 4.0
    ch3 = m11 + m09

    return Dataset(data=[ch1, ch2, ch3], **info)