Email Record: Automated programming of explicit shallow-water models. Part I, Linearized models with linear or quadratic friction /