% Matlab version of functions normally found in atmospheric forward models.