Inverse modeling of groundwater flow using model reduction