First implementation of weather algorithm