non linear regression for the lapse rates
For large areas, the lapse rates should depend on the coordinates (in order to be able to represent East/West or North/South gradients). Therefore, the regression would become non-linear. This would be implemented through a generic non-linear regression class, for example using the Gauss-Newton algorithm (see https://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_algorithm). In this case, it required the computation of a pseudo-inverse matrix (see https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse).