CHICAGO (Dow Jones)--Chicago Board of Trade corn futures got swept up in a widespread commodity surge Wednesday, ending higher as the market also got support from soggy weather forecasts.

December corn ended up 13 3/4 cents to $3.98 1/4 per bushel and March corn ended up 13 1/4 cents to $4.10.

A weaker dollar and stronger crude oil helped set the tone, traders said. Funds were heavily involved, buying an estimated 18,000 contracts, and soybeans and wheat also surged.

"Pick a commodity, any commodity, and it seems like it wants to be higher," says Dave Marshall, independent broker and advisor in Nashville, Ill.

December corn moved above $4 for the first time since June before retreating later in the day. The contract also surged past and closed above the 200-day moving average.

The push past recent resistance triggered buy stops, traders said, which accelerated the climb.

"We filled gaps from the June planting intentions report today," Marshall said, referring to a late June break prompted when the U.S. Department of Agriculture projected higher-than-expected corn acreage this year.

Traders also noted that corn had support from weather forecasts filled with rain through next week, which will further delay the harvest.

Forecasts are calling for rain through the end of the week and more rain at the end of the weekend into Monday, likely followed by soggy weather later next week. The weather is likely to stall harvest for the next several days after a few days of progress.

While some analysts say that early yield reports have been good, the harvest delays are exacerbating quality concerns about the crop, analysts said.

Daniel Pavilonis, senior market strategist for Lind Waldock, thinks the market has more upside potential. The weaker dollar is the biggest factor in the market, but he also said that corn is undervalued compared to wheat and soybeans.

CBOT oats futures ended higher Wednesday. December oats ended up 4 cents to $2.63 per bushel and March oats ended up 4 cents to $2.75 3/4.

Ethanol futures were also higher. November ethanol ended up $0.058 to $1.981 per gallon and December ethanol closed up $0.045 to $1.922.

-By Ian Berry, Dow Jones Newswires; 312-341-5778;