Generative assimilation and prediction for weather and climate