Notwithstanding Section 872.810, the court shall order that the property be sold and the proceeds be divided among the parties in accordance with their interests in the property as determined in the interlocutory judgment in the following situations:
(a) The parties agree to such relief, by their pleadings or otherwise.
(b) The court determines that, under the circumstances, sale and division of the proceeds would be more equitable than division of the property. For the purpose of making the determination, the court may appoint a referee and take into account his report.
(Added by Stats. 1976, Ch. 73.)