Temperature determines the sex of the developing embryos. In cases where the embryo is kept warm, the resulting hatchling will be a female. Where the nests are cool, the offspring will be male. Typically a nest contains warm and cool areas, so each nest can produce males and females.
However, sometimes if turtles nest late in a season, when the weather starts to cool down, the entire nest might be male. Similarly, if a turtle nests at the height of a warm summer, the entire nest might be female.
The matter is compounded by location, for if a turtle nests under the shade of a tree the nest will be cooler than if the nest were laid out in the open. For this reason it is not recommended that we intervene with turtle nesting and nest location, as natural variability ensures a mixture of sexes and long-term viability of discreet populations.