Development of an algorithm for relating pasture nitrogen status to yield response curves