A Generic Software Framework for Data Assimilation and Model Calibration