aWgt = 0.3
bWgt = 0.7
print((np.where(a1.mask, 0.0, a1.data * aWgt) + np.where(b1.mask, 0.0, b1.
    data * bWgt)) / (np.where(a1.mask, 0.0, aWgt) + np.where(b1.mask, 0.0,
    bWgt)))
How to aggregate timeseries in Python?