It is tested whether machine learning methods can be used for preconditioning\nto increase the performance of the linear solver -- the backbone of the\nsemi-implicit, grid-point model approach for weather and climate models.\nEmbedding the machine-learning method within the framework of a linear solver\ncircumvents potential robustness issues that machine learning approaches are\noften criticized for, as the linear solver ensures that a sufficient, pre-set\nlevel of accuracy is reached. The approach does not require prior availability\nof a conventional preconditioner and is highly flexible regarding complexity\nand machine learning design choices. Several machine learning methods are used\nto learn the optimal preconditioner for a shallow-water model with\nsemi-implicit timestepping that is conceptually similar to more complex\natmosphere models. The machine-learning preconditioner is competitive with a\nconventional preconditioner and provides good results even if it is used\noutside of the dynamical range of the training dataset.\n