For the purposes of this section, the following terms have the meanings given them:
(a) "Agricultural operation" means a facility and its appurtenances for the production of crops, livestock, poultry, dairy products or poultry products, but not a facility primarily engaged in processing agricultural products.
(b) "Established date of operation" means the date on which the agricultural operation commenced. If the agricultural operation is subsequently expanded or significantly altered, the established date of operation for each expansion or alteration is deemed to be the date of commencement of the expanded or altered operation. As used in this paragraph, "expanded" means an expansion by at least 25 percent in the number of a particular kind of animal or livestock located on an agricultural operation.
"Significantly altered" does not mean:
(1) a transfer of an ownership interest to and held by persons or the spouses of persons related to each other within the third degree of kindred according to the rules of civil law to the person making the transfer so long as at least one of the related persons is actively operating the farm, or to a family farm trust under section 500.24;
(2) temporary cessation or interruption of cropping activities;
(3) adoption of new technologies; or
(4) a change in the crop product produced.
(c) "Generally accepted agricultural practices" means those practices commonly used by other farmers in the county or a contiguous county in which a nuisance claim is asserted.
(a) An agricultural operation is not and shall not become a private or public nuisance after two years from its established date of operation as a matter of law if the operation:
(1) is located in an agriculturally zoned area;
(2) complies with the provisions of all applicable federal, state, or county laws, regulations, rules, and ordinances and any permits issued for the agricultural operation; and
(3) operates according to generally accepted agricultural practices.
(b) For a period of two years from its established date of operation, there is a rebuttable presumption that an agricultural operation in compliance with the requirements of paragraph (a), clauses (1) to (3), is not a public or private nuisance.
(c) The provisions of this subdivision do not apply:
(1) to an animal feedlot facility with a swine capacity of 1,000 or more animal units as defined in the rules of the Pollution Control Agency for control of pollution from animal feedlots, or a cattle capacity of 2,500 animals or more;
(2) to any prosecution for the crime of public nuisance as provided in section 609.74 or to an action by a public authority to abate a particular condition which is a public nuisance; or
(3) to any enforcement action brought by a local unit of government related to zoning under chapter 394 or 462.
This section shall not be construed to invalidate any contracts or commitments made before January 1, 1983.
If a provision of this section, or application thereof to any person or set of circumstances, is held invalid or unconstitutional, the invalidity shall not affect other provisions or applications of this section which can be given effect without the invalid provision or application. To that end, the provisions of this section are declared to be severable.