Development of the New Zealand Earth System Model