def salinity_unit_check(cube):
    """Check CMIP5 salinity units.

    Most modeling groups store their salinity data
    in units of g/kg (typically ranging from 5 to 45 g/kg)
    and label that unit "psu" (which iris doesn't 
    recognise and converts to unknown).

    Some random data files in some runs have some stored 
    with units of kg/kg and the unit is labelled 1.

    This function converts to g/kg and unknown.

    Args:
      cube (iris.cube.Cube) 

    """

    if cube.units == '1':
        cube.data = cube.data * 1000

    data_max = cube.data.max()
    data_min = cube.data.min()
    
    assert data_max < 100.0, 'Data max is %f' %(data_max)
    assert data_min >= 0.0 , 'Data min is %f' %(data_min)

    cube.units = 'g/kg'   #cf_units.Unit('unknown')

    return cube