def build_mu(mut, grid, full_levels=False):
    """Build 3D mu on full or half-levels from 2D mu and grid constants."""
    if full_levels:
        mu = grid["C1F"] * mut + grid["C2F"]
    else:
        mu = grid["C1H"] * mut + grid["C2H"]
    return mu