In any action brought by a riparian owner to enjoin the diversion of water appropriated or proposed to be appropriated, or the use thereof, against any person or persons appropriating or proposing to appropriate such waters, the defendant may set up in his answer that the water diverted or proposed to be diverted is for the irrigation of land or other public use, and, in such case, he shall also in such answer set forth the quantity of water desired to be taken and necessary to such irrigation of land or the public use, the nature of such use, the place where the same is used or proposed to be used, the duration and extent of the diversion or the proposed diversion, including the stages of the flow of the stream at and during the time in which the water is to be diverted, and that the same may be diverted without interfering with the actual and necessary beneficial uses of the plaintiff, and that such defendant so answering desires that the court shall ascertain and fix the damages, if any, that will result to the plaintiff or to his riparian lands from the appropriation of the water so appropriated or intended to be appropriated by defendant.
The plaintiff may serve and file a reply to the defendant's answer stating plaintiff's rights to the water and the damage plaintiff will suffer by the defendant's taking of the water, and plaintiff may implead as parties to the action all persons necessary to a full determination of the rights of plaintiff to the water and the damages plaintiff will suffer by the proposed taking by defendant, and the court shall have jurisdiction to hear and determine all the rights to water of the plaintiff and other parties to the action, and said parties shall have a right to state and prove their rights, and shall be bound by the judgment rendered the same as though made parties plaintiff at the commencement of the action.
Upon the trial of the case the court shall receive and hear evidence on behalf of the respective parties, and if the court finds that the allegations of such answer are true as to the aforesaid matters, and that the appropriation and diversion of such waters is for irrigation of land or other public use and that, after allowing sufficient water for the actual and necessary beneficial uses of the plaintiff and other parties, there is water available to be beneficially appropriated by such defendant so answering, the court shall fix the time and manner and extent of such appropriation and the actual damages, if any, resulting to the plaintiff or other parties on account of the same, and in fixing such damages the court shall be guided by Article 5 (commencing with Section 1263.410) of Chapter 9 of Title 7 of Part 3, and if, upon the ascertainment and fixing of such damages the defendant, within the time allowed in Section 1268.010 for the payment of damages in proceedings in eminent domain, shall pay into court the amount of damages fixed and the costs adjudged to be paid by such defendant, or give a good and sufficient bond to pay the same upon the final settlement of the case, the injunction prayed for by the plaintiff shall be denied to the extent of the amount the defendant is permitted to appropriate, as aforesaid, and the temporary injunction, if any has been granted, shall be vacated to the extent aforesaid; provided, that any of the parties may appeal from such judgment as in other cases; and provided, further, that if such judgment is in favor of the defendant and if he upon and pending such appeal shall keep on deposit with the clerk of said court the amount of such damages and costs, or the bond, if it be given, so awarded to be paid to the plaintiff or other parties in the event such judgment shall be affirmed, no injunction against the appropriation of the amount the defendant is permitted to appropriate as aforesaid shall be granted or enforced pending such appeal, and, upon the acceptance by the plaintiff or other parties of such amount so awarded or upon the affirmation of such decision on appeal so that such judgment shall become final, the defendant shall have the right to divert and appropriate from such stream, against such plaintiff or other parties and his successors in interest, the quantity of water therein adjudged and allowed. Upon the filing of such answer as is herein provided for, the parties plaintiff or other parties and defendant shall be entitled to a jury trial upon the issues as to damages so raised, as provided in Title 7 (commencing with Section 1230.010) of Part 3, applying to proceedings in eminent domain.
Ca. Civ. Proc. Code § 534