Costco Wholesale agreed to a $335,000 fine and to an overhaul in its management of refrigeration equipment in more than half of its U.S. stores in a settlement with U.S. authorities over alleged Clean Air Act violations.

The Environmental Protection Agency and the Department of Justice contend that between 2004 and 2007 Costco violated federal laws by failing to repair leaks of a refrigerant that causes ozone depletion and creates powerful greenhouse gasses.

The company also didn’t keep proper records of servicing for its refrigeration equipment as required by law, said the agencies, which announced the settlement Wednesday.

Over the next three years, Costco will put in place at 274 stores a new refrigerant management system that’s expected to help prevent and fix leaks. The company will also install high-end refrigerant leak detection systems at all new stores it opens for three years, and will retrofit refrigeration equipment at 30 stores. The cost of the new controls is expected to reach $2 million, the EPA said in a news release.

Costco didn’t immediately respond to a request for comment.

Ángel González: 206-464-2250 or agonzalez@seattletimes.com. On Twitter @gonzalezseattle