def phase(flags):
    """
    Returns the layer thermodynamical phase, as identified from the
    feature classification flag

    0 = unknown / not determined 1 = randomly oriented ice
    2 = water
    3 = horizontally oriented ice
    """
    # 96 = 0b1100000, bits 6 to 7
    return (flags & 96) >> 5