Did you know that Carmans River is approximately 14,000 years old? It was formed by a glacier thousands of years ago. The story starts with the Atlantic Coastal Plain — that area of the continental shelf that is above water, including Long Island. It is composed of Cretaceous and Tertiary period sedimentary rock that was deposited as the land sank and the Atlantic Ocean expanded, starting about 119 million years ago.
During the Pleistocene Epoch (a mere 15,000 years ago), the glacier — the Wisconsinan Stage of the Laurentide ice sheet — that covered the area to a depth of 1¼ miles had some rivers running underneath. The big rivers, like the Hudson River, created valleys that still exist in the continental shelf. Smaller rivers, like Carmans River, began as ice melt under the glacier. When it finally retreated about 10,000 years ago, the land it had pushed down rebounded, and it left behind the geology we know today. (Y.W. Isachsen, E. Landing, J.M. Lauber, L.V. Rickard, and W.B. Rogers, eds. Geology of New York : A Simplified Account. Albany, NY: New York State Museum/Geological Survey, 1991.)
Specifically, the glacier left behind a number of moraines. Moraines are piles of unsorted glacial drift deposited along the margin of a glacier — heaps of glacial clay, sand, gravel, and boulders that the glacier had scraped off of upstate New York and Connecticut and pushed along, and then left behind when it retreated. Long Island’s shape has often been compared to a fish. In the image below, you can see the Ronkonkoma moraine runs along the “spine” of the island, and

then out along the “tail” of the South Fork. It is the terminal moraine of the glacier — the farthest point the glacier reached. The Harbor Hill moraine runs along Long Island’s north shore and out into the ocean as the North Fork and Plum Island. It was formed during the glacier’s retreat, and its outwash forms the northern portion of Long Island.
Carmans River is the only river on Long Island to cut through the Ronkonkoma moraine. It runs through the moraine and down through the outwash plain. According to the Central Pine Barrens Comprehensive Land Use Plan (pdf):
The Carmans River flows south through a gap in the Ronkonkoma moraine from its headwaters located in the area of Artist Lake in Middle Island…. Farther south, the rate of discharge of groundwater to the river increases as it traverses the outwash plain, and by the time the river reaches the boundary of the CPB [Central Pine Barrens] at Route 27, some 12 miles south of its starting point, the average flow rate has increased to about 35 mgd [millions of gallons per day]. The southernmost 3 miles of the river are tidal, where it gains an estimated additional 11.5 mgd of groundwater, bringing the total freshwater discharge into Bellport Bay at the mouth of the river to 46.5 mgd. (Warren et al., 1968).
The image below was made by Dr. Gilbert Hanson by assembling digital elevation model (.dem) files downloaded from the Cornell University Geospatial Information Repository (CUGIR). It shows the area between C and D, C’ and D’ in the map above.

The Wertheim National Wildlife Refuge lies entirely within the Carmans River valley.
The upper portion of the river valley is actually created by several different outwash channels that joined up between Middle Island and Yaphank. They are broad and flat-bottomed, and are older than the lower stream. That portion is “believed to mark an intermediate outwash deposit laid down later than the Rokonkoma moraine but earlier than the Harbor Hill moraine and the outwash from ice along it.” (Myron L. Fuller, The Geology of Long Island, USGS, Washington, D.C., 1914)