1 Introduction

Offspring sex ratio in animal species has been a subject of study over decades due to the implications on population survival (Hamilton 1967; Ewen et al. 2001; Quinn et al. 2007). In most vertebrate species, sex is determined genetically, during or before conception, by Genotypic Sex Determination (GSD) (Korpelainen 1990; Janzen 1994). However, some species, including many reptiles, have Environmental Sex Determination (ESD) with sex being determined mainly or exclusively by environmental factors.

One of the most common types of ESD is Temperature-dependent Sex Determination (TSD), in which the offspring sex ratio is determined by temperature during egg development (Janzen and Krenz 2004; Valenzuela and Lance 2004). Sex in species with TSD is determined during the thermosensitive period (TSP). During this time, environmental temperature induces the production of sexual hormones that determine the sex of the embryo (Merchant-Larios and Diaz-Hernandez 2013). The range of temperatures over which both sexes are produced is known as the transitional range of temperature (TRT) and the temperature that produces 1:1 males and females as the Pivotal Temperature (PT) (Yntema and Mrosovsky 1980; Morreale et al. 1982).

All sea turtle species exhibit TSD type Ia in which, higher temperatures produce female hatchlings and lower temperatures male hatchlings (Standora and Spotila 1985), as opposed to tuataras (TSD type Ib) that produce females at low temperatures (Mitchell et al. 2010) and some freshwater turtles and crocodiles (TSD II) that produce females at both high and low temperatures and males at intermediate temperatures (Ewert et al. 2004).

Nest site selection has been defined as the process of nesting in locations that are not chosen randomly within a given area (Wilson 1998). Because egg development depends on the environmental conditions encountered in the egg chamber, the selection of the nesting site by the mother could influence the nest environment during development. Sea turtles exhibit different selection patterns that can vary among species or locations. For example, Stoneburner and Richardson (1981) found that nest site selection in loggerhead turtles (Caretta caretta) in Florida was related to temperature in the sand. Hawksbill turtles (Eretmochelys imbricata) in Guadeloupe also significantly repeated nest choice with some females preferring to nest in the low-lying vegetation, while others repeatedly nested in the forest border or the forest itself (Kamel 2005). Likewise, leatherback turtles (Dermochelys coriacea) in French Guyana showed a tendency for individuals to nest at particular distances from the water lines (Kamel and Mrosovsky 2004).

Sea turtles lack parental care and the environmental conditions that eggs encounter during development influence offspring fitness (Woods and Bjorndal 2000; Broderick et al. 2003; Kamel and Mrosovsky 2005) and sex ratio (Mrosovsky and Yntema 1980; Whitmore and Dutton 1985; Mrosovsky and Provancha 1989; Mrosovsky 1994). Thus, active nest-site selection could potentially result in an indirect selection of the offspring sex ratio if nesting females tended to nest in areas of particular thermal characteristics.

East Pacific green turtles (Chelonia mydas) distribute along the west coast of America, from Baja California to southern Peru and the Galapagos islands (Senko et al. 2010). The most important nesting beaches are located in Michoacán, Mexico, but nesting frequently occurs along the Mexican and Central American coasts. The Gulf of Papagayo in Costa Rica is abundant in sea turtles that use both the productive marine areas and the nesting beaches (Blanco et al. 2012a; Valverde-Cantillo et al. 2019). In this area, green turtles tend to nest under trees where nests are shaded (Santidrián Tomillo et al. 2015a, b), as opposed to other species like leatherback and olive ridley turtles (Lepidochelys olivacea) that nest on the open beach between the high tide and vegetation lines (Cornelius 1976; Reina et al. 2002).

The aim of this study was to study nest-site selection in east Pacific green turtles and to assess how their selection could affect sex ratio of hatchlings. In particular, we aimed to determine if (1) turtles exhibited nest-site repeatability, (2) there were different nesting strategies within the population, and (3) nest-site selection affected nest temperature and ultimately sex ratio of hatchlings. It has been suggested that one of the mechanisms by which species with TSD can adapt to climate change is through behavioral adaptation to nesting in cooler areas (Morjan 2003). Understanding the drivers of nest-site selection in sea turtles will help to determine how female turtles can indirectly influence the sex ratio of their offspring and how they can adapt to climate change.

2 Methods

Cabuyal (10°400 N, 85°390 W) is located in the Gulf of Papagayo, in Northwest Costa Rica. It is a high energy beach, highly dynamic, with frequent occurrence of erosion and accretion events. The north end is mainly rocky with few sand spots and the south end has an estuary that connects with a mangrove that extends behind most of the beach (Yaney-Keller et al. 2019). Climatic conditions in the area alternate between a rainy season (May to November) and a dry season (December to April) with biggest storms occurring in September and October coinciding with the onset of the nesting season.

We placed markers in the vegetation to divide the length of the beach (1.4 km long) into 14 sectors (North to South) separated by 100 m (numbers 1 to 14). We further divided each sector by 25 m (e.g., 1.0, 1.25, 1.50, 1.75, and 2.0). We registered the GPS coordinates of each marker with a georeferenced device GARMIN 64. We also divided the beach into 3 zones, considering the perpendicular axis of the high tide line (from the water to the vegetation): zone 1 — below high tide line, zone 2 — open beach area (between high tide line and vegetation), and zone 3 — in the vegetation. Zone 3 was further classified into 2 different sub-areas: under trees or bushes (3-UT), which was generally shaded and in the grass area (3-GA), which was sun exposed.

We patrolled the beach each night of the nesting season (September to March) over eight nesting seasons (2011–2012 to 2018–2019). Patrolling times extended from 20:00 to 4:00 during the high nesting season (October to February) and from 21:00 to 3:00 during the low nesting season (September and March). We additionally conducted morning surveys at 5:30 every day to verify nesting activities from the night before and to identify emergence of hatchlings from nests. Beach coverage (ratio between the number of turtles identified to the number of nesting attempts) at Cabuyal ranged from 67 to 88% (mean 79% ± 8%) between 2011–2012 and 2017–2018 (Valverde-Cantillo et al. 2019).

We collected data on the turtles after they had nested. Any new turtle received an INCONEL tag and a Passive Integrated Transponder (PIT) tag on the right front flipper to be identified in later encounters. After the turtle was gone, we marked the position of the nest by triangulation, measuring the distance from the closer sector marks placed to the north and south. Each nest received a sequential number beginning with 1 and the identity of the female was recorded.

2.1 Nest-site selection

To assess if turtles were faithful to particular locations of the beach, we conducted an analysis on nest-site selection for each nesting season independently (intra-annual analysis). To further assess if turtles maintained nest-site repeatability to particular locations of the beach in different nesting seasons, we repeated the analysis including all nests placed by a turtle in all nesting seasons combined (inter-annual analysis). Because metal tags have a high rate of tag loss between nesting seasons (50% loss), we excluded turtles that had only been marked with INCONEL tags. For the intra-annual analysis, we included turtles that had nested at least two times in Cabuyal. For the inter-annual analysis, we included turtles that had nested in two different nesting seasons. Two turtles had nested in three different nesting seasons. In this case, we only included the first two nesting seasons the turtles were seen.

To pinpoint the exact location of each nest in a map, we first transformed the GPS coordinates of every marker to UTM coordinates and second, we calculated the exact distance in meters between the markers. This was necessary because some markers were not placed at 25 m exactly, since we used nearby trees or rocks as they are permanent markers. Then, we determined the position (X,Y) of each nest by solving the following equation system:

$$\left\{\begin{array}{c}{(X-{X}_{n})}^{2}+({Y-{Y}_{n})}^{2}={R}_{n}^{2}\\ {(X-{X}_{s})}^{2}+({Y-{Y}_{s})}^{2}={R}_{s}^{2}\end{array}\right.$$

where Rn and Rs are the circumference radius corresponding to the distances in meters from the nest to the north and south markers and (Xn, Yn) and (Xs, Ys) are the coordinates of the north and south markers, respectively. In each case, we obtained two solution points (one toward the water and the other one toward the vegetation). We chose as nest location, the one in accordance with the zone information recorded when the nest was marked (1, 2, 3-UT or 3-GA). We generated a map using software QGIS that allowed us to calculate distances between nests.

We hypothesized that turtles could show different nesting strategies based on the distances between successive nests. Testing this hypothesis involved three steps: (1) we selected turtles for which we had observed at least three nests, (2) for each turtle, we determined the distance between the first and second nests and the distance between the second and third nests, and (3) we conducted a cluster analysis — with Euclidean distance as similarity measure — to identify groups of turtles with a similar nesting behavior. Two different clustering algorithms were used to verify the replicability of the results: X-means and K-means. The adequate number of clusters was decided, respectively, with the Bayesian information criterion and the Davies-Bouldin index. Cluster analyses were performed using RapidMiner Studio 9.9002.

2.1.1 Nest-site selection data analyses

To assess if turtles tended to nest in areas closer to their previous nests in the intra-annual analysis, we tested the null hypothesis that turtles randomly chose the nesting site. To do so: (1) we obtained the sample mean by calculating the distances between nests of the same turtle and repeating the process for all turtles obtaining a set of distances from which we calculated the mean corresponding to the sample mean (Table 1), (2) we calculated the mean under the null hypothesis by calculating the distances between all nests, regardless of the turtle they belong to and then randomly selecting the same number of random distances as empirical distances, from which we calculated the mean. We repeated this process 1,000,000 times until we obtained a stable mean that would correspond to the population mean obtained under the null hypothesis (Table 1), and (3) we compared the sample mean with its corresponding mean under the null hypothesis by a Student’s t test.

Table 1 Number of turtles registered (nesting at least two times in a season), number of nests, number of distances estimated, mean distance between the nests of individual turtles and the mean hypothetical distance (a “simulated” mean distance of nests from randomly picking 1,000,000 distances between any two nests on the beach, regardless the identity of the turtle) and statistical results from the comparison between the two means (T- Student, p-value and degrees of freedom) for each season (intra-seasonal analysis) and for all seasons combined (inter-seasonal analysis)

In the inter-annual analysis, we first calculated the mean position of all nests placed by the same turtle in the first nesting season she was seen and the mean position of her nests placed in following nesting season. We calculated the distance between these two means and repeated the process for the 24 turtles that nested in two nesting seasons. As in the intra-annual analysis, we compared the sample mean to the mean under the null hypothesis. The 2016–2017 nesting season was excluded from this analysis because we only had two distances due to the very low number of nests recorded that year (Table 1).

We used Kolmogorov–Smirnov and Shapiro–Wilk tests for normality in nesting seasons with sample sizes greater and lower than 50, respectively, and Student’s t-test to compare the mean distances. Data were normally distributed in the intra-annual analysis. Despite data not following a normal distribution in the inter-annual analysis, we also used a Student’s t test as it can be recommended when sample sizes are over 40 (Posten 1979; Pearson and Please 1975; Boos and Hughes-Oliver 2000; Sawilowsky and Blair 1992). We used software IBM SPSS Statistics, v25 to determine nesting frequencies by sectors and zones and to run the Student’s t-tests.

We used spatial correlations to assess if there were changes throughout the nesting season in the proximity of nests placed by a turtle. High correlation values would indicate that nests were close to each other and a change in proximity between early and late nests could indicate that the turtles were able to adjust their nesting behavior. We used the methodology of Tobler (1965) to test the relationship between two sets of geographic points. This method is an extension of Pearson’s linear correlation to two-dimensional observations, given in our case by the x and y coordinates of each nest position. The correlation was calculated with equation:

$${R}_{wz}=\frac{{\sigma }_{u}^{2}\left({r}_{xu}^{2}+{r}_{yu}^{2}-2{r}_{xu}{r}_{yu}{r}_{xy}\right)+{\sigma }_{v}^{2}\left({r}_{xv}^{2}+{r}_{yv}^{2}-2{r}_{xv}{r}_{yv}{r}_{xy}\right)}{({\sigma }_{u}^{2}+{\sigma }_{v}^{2})(1-{r}_{xy}^{2})},$$

where x and y are the coordinates of the first nest, u and v are the coordinates of the second nest, \({\sigma }_{u}^{2}\) is the variance of u, \({\sigma }_{v}^{2}\) is the variance of v and \({r}_{ij}\) is the Pearson correlation among the variables given as subscripts i and j.

To determine if there were changes in proximity of nests between the first and last nests of turtles, we compared for each turtle the spatial correlation between her first and second nests and between her third and fourth nests (mean number of nests at Cabuyal is 4.3 nests, Santidrián Tomillo et al. 2015a, b). Thus, we selected turtles that nested at least four times within a nesting season. For the spatial correlation analysis, we used the BiDimRegression package for the R-studio software, which is available in the CRAN R repository (http://CRAN.R-project.org/package=BiDimRegression) (see Carbon 2013).

2.2 Sex ratios

Temperature dataloggers (HOBO pendant UA-001–08 (± 0.5 °C)) were placed in some nests while the turtle was laying eggs to register temperatures during the incubation period. We assessed the suitability of the dataloggers at the beginning of each nesting season by comparing their readings at ambient temperature (maximum, minimum, and mean temperatures). We only used those loggers that were reading within 0.5 °C (accuracy level) of the means (typically all loggers were between 0.0 °C and 0.2 °C). The battery typically lasted for the whole nesting season and was replaced when the program indicated a low battery. No selection of nests was done, except for nests that were expected to survive tidal inundation and erosion. Dataloggers were distributed throughout the nesting season to capture seasonal differences in temperature, proportionally to the number of nests placed in each month. Dataloggers were set to record temperature once every hour and were carefully placed in the middle of the clutch. After hatchlings emerged from the nest or enough time had passed so that emergence was no longer expected, the nest was excavated and the datalogger was retrieved for the data to be downloaded.

For each nest with temperature data, we calculated mean temperature registered during the second third of the incubation period (TSP in sea turtles). We estimated sex ratios using the TSD curve defined for the green turtle population that nest at Tortuguero, Costa Rica. Since sacrificing hatchlings to extract their gonads has ethical implications, it is currently a common practice to estimate sex ratios indirectly from incubation temperatures, using the TSD curve of the population of study. When this is not available, the TSD curve of a nearby population is often used (Santidrián Tomillo and Spotila 2020). The population of green turtles that nest at Tortugero has a PT of 28.3 °C, with temperatures below 28 °C resulting in 100% male hatchlings and temperatures above 30.2 °C producing 100% females (Morreale et al.1982; Standora and Spotila 1985. Within the TRT, we estimated sex ratios as the proportion of female hatchlings for every increment of 0.1 °C between 28.0 °C and 30.2 °C. We had temperature data for 112 nests. We used an ANOVA of several factors to assess the effect of sector, zone, month and nesting season on the mean temperature and primary sex ratio of nests.

Finally, we excavated nests 2 days after hatchling emerged or 65 days after the clutch was laid and was no longer expected to hatch. We estimated hatching success for nests for which we had temperature data using the formula H = S/ (S + U), where S was the number of hatched eggshells and U the number of unhatched eggs that did not develop (Santidrián Tomillo et al. 2017a). We used generalized additive models (GAM) to analyze the effect of temperature on hatching success as done in previous studies (Santidrián Tomillo et al. 2017a). Statistical analyses for sex ratio and hatching success were done in R-studio Version 1.2.1335.

3 Results

3.1 Nest-site selection

On average 80.9%, 15.2%, and 3.9% of nests were placed in zones 3 (vegetation), 2 (open beach), and 1 (below high tide line) respectively, but with differences between nesting seasons (Table 2). The majority of nests were placed in zone 3 in every nesting season ranging from a minimum of 59.8% of nests in 2011–2012 to a maximum of 91.6% of nests in 2015–2016, and was greater than 80% in five of the eight nesting seasons. Within zone 3, 78.2% of the turtles nested under trees (range: 73.0–83.6%), while 21.8% nested on the open vegetation areas (range: 16.4–27%) (Table 3).

Table 2 Number and percentage of green turtle nests placed in zones 1, 2, and 3 per season at Cabuyal, Costa Rica
Table 3 Number and percentage of green turtle nests registered in zone 3 under trees (UT) and in the grass area (GA) per season at Cabuyal, Costa Rica

Considering all nesting seasons together, the least frequent sectors were located at the north end of the beach, with no nests located at marker 0 and very few nests located between 0 and 2.25 (with the exception of nesting season 2015–2016). In general, sectors in the center (surrounding markers 7 and 9) and south (between 12.50 and 13.75) of the beach had a higher number of nests (Fig. 1). There were some particularities in some nesting seasons. For example, in 2014–2015, the highest percentage of nests was recorded in sector 4.25 and in 2017–2018, no nests were recorded at locations further north than marker 5.00. Due to the very low number of nests registered in 2016–2017, no nesting patterns were clearly observed that year (Fig. 1).

Fig. 1
figure 1

Percentage of green turtle nests by beach sector (markers 0–14.25 from North to South) separated by 25 m at Cabuyal, Costa Rica over eight nesting seasons (2011–2012 to 2018–2019)

We found nest-site repeatability among the green turtles of Cabuyal. In the intra-annual analysis, the nests of a female were separated by a mean (± SD) distance of 237.4 ± 45.6 m on average, whereas the mean distance assuming that nests are randomly placed on the beach was 411.0 ± 62.2 m. There were statistically significant differences between the mean distances of nests placed by a female and the mean distances of all nests regardless the identity of the female in all nesting seasons (p < 0.01) except in 2011–2012 (p = 0.16) (Table 1), indicating that turtles do not choose nesting sites randomly. In the inter-annual analysis, the nests of a female placed in different nesting seasons were separated by a mean (± SD) distance of 141.1 ± 146.4 m in comparison to a mean (± SD) distance of 411.2 ± 304.8 if nests were randomly placed. The differences between both means were also statistically significant in the inter-annual analysis (p < 0.001) (Table 1), indicating that turtles maintained nest-site repeatability to particular areas between different nesting seasons.

The two clustering methods (K-means and X-means with Davies-Bouldin and Bayesian information criteria, respectively) were first carried out with data from 2014 to 2015, the nesting season that had the highest number of turtles with three or more nests. The results from the two methods fully agreed that the adequate number of clusters was 3 and they also agreed in the number of turtles that made each cluster (Fig. 2a). The cluster analysis was then repeated with data from the 73 different turtles observed in all nesting seasons. When the same turtle placed three or more nests in two or more seasons, we only included data from the first nesting season she was seen. The results of this analysis paralleled those of the previous one (Fig. 2b). The first cluster (circles in the figure) included turtles that each time placed their nests close to the previous one; the second cluster (crosses) corresponded to turtles whose second nest was distant from the first one but the third one was close to the second one; the third cluster (squares) mainly included turtles whose third nest was far from the second one (Fig. 2). In general, the cluster analyses indicated that a great majority of turtles placed all their nests in the vicinity of previous ones, some turtles “adjusted” their nest-site selection placing later nests closer than their earlier ones, and few turtles did not follow any identified pattern in the distribution of their nests.

Fig. 2
figure 2

Results of the cluster analyses. Scatter plot of the distances between first and second nests and second and third nests of green turtles at Cabuyal in (a) 2014–2015 (nesting season with the highest number of turtles nesting three or more times) and (b) all nesting seasons combined. Different dots represent different turtles. Symbols show the clustering results. Each cluster may reveal a specific nesting strategy

The spatial correlation was lower between the set of points corresponding to the first and second nests [Rwz = 0.587, F = 45.45, p < 0.0001] than between the set of points corresponding to the third and fourth nest [Rwz = 0.734, F = 88.50, p < 0.0001], indicating that the third and fourth nests were located close to each other than the first and second nests.

3.2 Nest temperature and sex ratios

We obtained temperature data for a total of 112 nests (9, 15, 31, 18, 12, 2, 13, and 12 nests, respectively, for nesting seasons between 2011–2012 and 2018–2019). Mean (± SD) temperature during the thermosensitive period (TSP) was 30.7 ± 1.2 °C and ranged between 28.8 ± 0.4 °C and 33.4 ± 1.1 °C per nesting season (Fig. 3). The mean estimated primary sex ratio (PSR) was 79.4% ± 34.2% female, with 68% of nests possibly producing 100% females (Fig. 3).

Fig. 3
figure 3

(A) Mean (± SD) temperature (°C) during the thermosensitive period for sex determination, and (B) Primary Sex Ratio (PSR) (as female ratio) of green turtle nests at Cabuyal by nesting season. The peripheral values are marked with a circle and the extreme values with an asterisk. A hyphen is used when there is a single value

We found statistically significant effects of nesting season on PSR and mean temperature during the TSP [F = 2.77; p < 0.05]. Nesting seasons with the highest mean nest temperatures and consequently, highest PSR were 2012–2013 and 2015–2016 both with 96.2% ± 14.2% and 92.3% ± 26.6% of females, respectively, while the nesting seasons with the lowest temperatures and lowest percentage of female hatchlings were 2011–2012 and 2016–2017 with 59.1% ± 44.6% and 42.0% ± 53.7% females, respectively (Table 4, Fig. 3). We did not detect seasonal changes in nest temperature and PSR as there was not a statistically significant effect of month on temperature and PSR [F = 1.99; p = 0.084] for any of the nesting seasons.

Table 4 Mean (± SD) nest temperature (°C) during the middle third of the incubation period and mean (± SD) estimated primary sex ratio (PSR), as percentage female hatchlings, of green turtle nests per season at Cabuyal

There was also a statistically significant effect of zone on temperature and PSR [F = 2.92; p < 0.05], without differences between zones 1, 2 and 3 in general (p = 0.32), but with statistically significant differences between zone 3-UT and 3-GA (p < 0.001). Mean nest temperatures and mean PSR were higher in zone 3-GA than in zone 3-UT, with mean nest temperatures of 31.2 ± 1.3 °C and 30.6 ± 1.1 °C in zones 3-GA and 3-UT, respectively, and mean PSR of 84.3% ± 32.2% female and 79.0% ± 34.8% female in zones 3-GA and 3-UT, respectively. Of the 32 nests marked with dataloggers in zone 3-GA, 25 nests resulted in 100% females. In zone 3-UT, out of 65 nests, 44 of them resulted in 100% females. Only two of the 112 nests were placed in zone 1, one with 10% females and the other one with 80% females. Mean PSR for zone 2 and 3 were 75.1% ± 34.5% and 80.7% ± 33.9% females, respectively. Of the 13 nests placed in zone 2 that we had temperature data for, we estimated that seven of them produced 100% female, while the other six had variable percentages of males.

Although there were differences in temperature and PSR by sector, these were not statistically significant [F = 1.44; p = 0.095]. We had no temperature data for nests located between sectors 0.00 and 2.00 or in sectors 3.00, 7.25, 9.50, 11.75, and 14.25 (Fig. 4). By 100 m, sectors with the highest number of nests with dataloggers were those between 13.00 and 14.00, with an average PSR of 81.7% ± 32.8% female and sectors between 12.00 and 13.00, with an average PSR of 77.6% ± 37.9% female (Fig. 4). We had three nests between sectors 2.25 to 2.75, an area frequently inundated, with a mean PSR of 30.0% ± 18.0% female (Fig. 4). In addition, there were 9 nests between sector 4.00 and 5.00 with a mean PSR of 77.1% ± 42.5% female. In sectors 4.00 and 4.25, an area that also gets inundated during the rainy season, we had 2 male-biased nests that were 15% and 2% female. On the contrary, in nine nests located between 10.00 and 11.00, the mean PSR was highly skewed to female (97.6% ± 6.6%). All four nests located between markers 11.00 and 11.50 were 100% female. In the rest of group sectors, PSR ranged between 70 and 80% female (Fig. 4).

Fig. 4
figure 4

(A) Mean (± SD) temperature (°C) during the thermosensitive period, and (B) Primary Sex Ratio (PSR) (as female ratio) of green turtle nests at Cabuyal by beach sector. Marker 0 is at the North end and marker 14 at the South end of the beach. The peripheral values are marked with a circle and the extreme values with an asterisk. A hyphen is used when there is a single value

Hatching success seemed to decline at temperatures higher than 33 °C (Fig. S1). However, we found no statistically significant effect of mean temperature on hatching success (GAM: adjusted R2 = 0.02, p = 0.457).

4 Discussion

4.1 Nest-site selection

Green turtles exhibited a high level of nest-site repeatability with a tendency to nest near previous nests. Some level of nest-site repeatability has been previously described for leatherback turtles in Costa Rica (Nordmoe et al. 2004), loggerheads in Florida (Bjorndal et al. 1983), green turtles in Guinea-Bissau (Patrício et al. 2018), flatback turtles (Natator depressus) in Australia (Bannister et al. 2016), and hawksbills in Guadaloupe (Kamel and Mrosovsky 2005). Nest-site repeatability between years has also been previously documented in hawksbill turtles in Guadeloupe, where turtles maintained a preference for nesting in particular areas of the beach even when the beach had changed (Kamel and Mrosovsky 2006). A high level of repeatability could indicate some fixation in the nest-site selection process in sea turtles. On the one hand, fixation would favor turtles that find good conditions for egg development but on the other, it could be detrimental if conditions become unfavorable (Bowen and Karl 2007). At least in some populations, experienced turtles seem to nest in areas where their clutches have higher success than those of less experienced turtles (Pfaller et al. 2009), indicating that turtles somehow choose better locations with time. Our results suggest that turtles may also narrow nest-site selection during a single nesting season, possibly adjusting their behavior to nest in good locations. The spatial regression method that we followed has been mainly used in the area of social sciences, but our results suggest that it could also be very useful in ecological studies.

Although nest-site repeatability is very common in sea turtles, it has been suggested that turtles in a population could have mixed strategies with some individuals distributing their nests, but with most individuals nesting within a narrow range (Bowen and Karl 2007). This was the case at Cabuyal, where a majority of turtles placed their nests close to each other (~ 59%), or placed later nests closer than earlier nests (~ 21%), but there were also some turtles (~ 20%) that placed their nests at relatively long distances from each other, not following any clear patterns. As beaches are dynamic with varying environmental conditions, individuals that spread their nests could benefit when conditions in a particular area become detrimental, since at least some nests would survive. Most often, sea turtle populations comprise a majority of individuals that tend to nest in a particular area with some individuals dispersing over longer distances (Miller et al. 2003). However, this may not always be the case and weak nest-site repeatability has also been observed in some populations (Pfaller et al. 2022), possibly in response to local beach dynamics. Some turtles from Cabuyal have sporadically been found nesting at other beaches (unpublished data). This suggests that turtles occasionally spread their nests over longer distances, possibly in relation to the environmental uncertainty associated to a high-energy beach. However, most nests seemed to be placed on the same beach. Inter-beach dispersals are also suggested by the occasional occurrence of long inter-nesting intervals (> 20 days) between nests and the relatively high number of turtles that are seen only once (Santidrián Tomillo et al. 2015b). In addition, the estimated clutch frequency (ECF) for green turtles in this area when studied with ultrasonography was higher (5.1 clutches) (Blanco et al. 2012b) than when it was based on beach encounters (4.3 clutches), suggesting that at least some turtles occasionally switch beaches, as it is commonly seen in other populations of sea turtles (Esteban et al. 2017; Pfaller et al. 2022).

A majority of turtles at Cabuyal placed their nests in the vegetation zone and within this zone, turtles preferred to nest underneath the trees. Green turtles also prefer to nest in vegetated areas in Suriname (Whitmore and Dutton 1985) or near vegetated areas in Guinea-Bissau where they nest close to the forest border (Patrício et al. 2018). Hawksbill turtles nest in similar areas (Kamel 2013). Turtles preferring the vegetation area are likely using this as a cue to select the nesting site. However, some beaches lack dune vegetation (Hays et al. 2001) and on these beaches, turtles may crawl inland until they get well above the spring high tide line (Hays et al. 1995). Nesting in vegetated areas also has clear implications for the nest environment as clutches can be shaded. Since high temperatures increase embryo mortality (Valverde et al. 2012, Pike 2013) and female-biased sex ratios (Standora and Spotila 1985), nesting in the vegetation could increase hatchling output under detrimental conditions and produce more male hatchlings. Kamel (2013) found that hawksbill nests in vegetated areas had lower and less fluctuating temperatures than those in the open beach area, and also had a lower metabolic heating. However, this did not translate into an increase in hatching success. At Cabuyal on the contrary, a previous study showed that nests located underneath trees had higher hatching success than those placed in exposed areas (Santidrián Tomillo et al. 2015a, b). In areas where the vegetation has been removed, nests could experience higher temperatures than they would under natural conditions (Fuentes et al. 2012), possibly impacting hatching success (causing declines) and sex ratios (increasing feminization). Tree shading could especially benefit the incubation of sea turtle clutches in locations where temperatures will increase due to climate change, as climate models currently project for several locations (Butt et al. 2016; Reneker and Kamel 2016a).

Whitmore and Dutton (1985) suggested that green turtles could nest near the vegetation to avoid competitions with leatherback turtles that use the same nesting beaches in Suriname. Although the number of leatherback turtles in Pacific Costa Rica is nowadays very low (Santidrián Tomillo et al. 2017b), Cabuyal was an important leatherback nesting beach in the past (Mayor 1998), so pushing green turtles towards nesting on the vegetation could have been possible. However, olive ridley turtles, which are smaller in size than green turtles and dig shallower nests, also share beaches with leatherback turtles (Dornfeld et al. 2015). More important for nest-site selection than competition avoidance or the positive effect provided by shade on egg development, could be the low erosion risk that characterizes high-beach areas. Cabuyal is a high-energy beach with frequent erosion and accretion events exacerbated during heavy storms. Thus, nests on the open beach area are at a high-risk of erosion and inundation, which could explain the preference of turtles for nesting on the upper beach (grass or shaded area). As erosion results in the death of the whole clutch, it seems that the risk of whole-clutch loss would be more reproductively costly to green turtles than a reduction in hatching success, possibly acting as a strong selective force.

Within zone 3, turtles clearly preferred nesting underneath the trees than in the open grass area. Although shading could provide a clear advantage to turtles as climate gets warmer, other reasons may have been more important to favor selection of shaded areas through evolutionary times. Turtles that nest in the grass often struggle digging an egg chamber, as it is more likely to encounter roots and compacted sand, whereas sand under the trees is typically softer.

4.2 Nest temperature and implications for sex ratios

Although it is known that hatching success of clutches declines at high temperatures in sea turtles (Patrício et al. 2021), we did not find an effect of nest temperatures on hatching success. High temperatures in northwest Costa Rica reduce hatching success in leatherback (Santidrián Tomillo et al. 2009) and olive ridley (Valverde et al. 2012) turtle nests, especially in years of regular (Valverde et al. 2012) or extreme (Santidrián Tomillo et al. 2020) El Niño events, which are characterized by droughts and high temperatures. Interestingly, green turtle eggs in the area seem to be tolerant to the range of temperatures at which eggs of other species are negatively affected (Santidrián Tomillo et al. 2020). Whereas hatching success in leatherback and olive ridley turtles seem to start declining at temperatures above 30° C and 32° C, respectively, green turtle eggs in the same area may only start declining at temperatures greater than 33° C (Fig. S1). This lack of effect suggests that the range of temperatures that negatively affect green turtle eggs is not currently encountered at Cabuyal. Some populations of sea turtles have higher thermal tolerances than others with hatchlings even being produced at temperatures of ~ 35° C (Howard et al. 2014). Flatback turtles in the Gulf of Carpentaria, for example, are also characterized by a high tolerance to high incubation temperature (Howard et al. 2015). These populations could exhibit higher resilience than others to climate on the beach although, climate change can also affect sea turtles in the ocean (Patrício et al. 2021).

Unexpectedly, we did not detect an effect of time in the nesting season on nest temperature. Temperature in sea turtle nests normally increases as the nesting season progresses (Mrosovsky et al. 1984a) and is typically lower during the rainiest months of the nesting season when most male hatchling are produced (Mrosovsky et al. 1984b). The lack of seasonality in nest temperatures that we found here could be explained by the nest-site preference green turtles exhibit. However, the low sample size per month that we had in most years (there was only 1 year with more than 4 nests marked in October, the rainiest month) likely explains the atypical lack of seasonality in nest temperature and PSR that we found at Cabuyal.

Nest-site selection of green turtles influences the sex ratio of their offspring. When turtles nest underneath trees, they are indirectly selecting for a lower female-biased sex ratio. Reneker and Kamel (2016b) also found that female identity was a good predictor of offspring sex ratio in loggerhead turtles at least partially, because of nest-site preferences. The effect of nest-site selection on incubation temperature and offspring sex ratios in species with TSD has also been found in freshwater turtles (Kolbe and Janzen 2002; Mitchell et al. 2013, but see Schwarzkopf and Brooks 1987), crocodiles (López-Luna et al. 2020), and lizards (Shine and Harlow 1996; Bragg et al. 2000). Thus, nest-selection may be generally present in species with TSD allowing them to indirectly influence the sex of their offspring. In addition, nest-site selection in relation to vegetation cover may vary geographically in turtles suggesting that there is adaptation to local conditions (Janzen and Morjan 2001).

Shading currently seems to reduce female-biased sex ratios in green turtles and if climate continued warming, turtles could indirectly mitigate extremely biased sex ratios by increasingly nesting in shaded areas. In fact, it has been suggested that behavioral plasticity in nesting could compensate for climate change in long-lived species with TSD (Refsnider and Janzen 2012), considering that physiological adaption could take decades or centuries. In Central America, model projections show an increase in air temperature between 0.8 °C–2.2 °C (RCP 4.5) and 1.0 °C–2.5 °C (RCP8.5) by the mid twenty-first century (Hidalgo et al. 2017). Such a change can also be expected in nest temperatures because of the high correlation that exists between air and nest temperatures (Hays et al. 2003; Santidrián Tomillo et al. 2015a). Using the equation for leatherback turtles from northwest Costa Rica (~ R2 = 0.64, Santidrián Tomillo et al. 2015a), an increase of 0.5 °C in air temperature would translate into an increase in 0.6 °C in nest temperature. This is the same difference (0.6 °C) that we found between the temperatures of shaded and exposed areas. Thus, a half-degree temperature rise in air temperatures could result in close to 100% PSR unless turtles had other mechanisms for adaptation.

Rainfall has a cooling effect on sea turtle nests (Houghton et al. 2007; Esteban et al. 2016; Staines et al. 2020). High levels of precipitation in northwest Costa Rica increase hatching success, while reducing the percentage of female hatchlings due to the cooling effect of rain (Santidrián Tomillo et al. 2012, 2020; Sieg 2010). Thus, a shift (1) toward wetter conditions in the area due to climate change or (2) to nesting earlier in the nesting season when precipitation is higher, could allow turtles to produce some male hatchlings. If temperatures increased to the levels that increased egg mortality, nesting during the rainiest months could also mitigate its effects. Although the effect of climate change on precipitation is uncertain for Central America (Hidalgo et al. 2017), temporal shifts in the nesting seasons in response to raising temperatures have been observed in sea turtles in temperate areas, where there is marked seasonality in nesting (Almpanidou et al. 2018; Mazaris et al. 2009). Thus, similar adjustments to nesting during the rainiest months could be possible in green turtles if it increased the outcome of nests and the production of male hatchlings.

We found large differences between nest temperatures and PSR at Cabuyal among years. Inter-annual variability in nest temperatures has also been found for other species that nest in the same area (Santidrián Tomillo et al. 2020). Northwest Costa Rica is an area highly influenced by ENSO and of variable climatic conditions, typically having hot and dry years during El Niño events and cooler and wetter conditions during La Niña events (Santidrián Tomillo et al. 2012). In 2015–2016, there was an extreme El Niño event that resulted in the highest temperatures and lowest precipitation levels since the 1970s. This event reduced hatching success of nests in several sea turtle species, but only marginally in green turtles (Santidrián Tomillo et al. 2020). Some male hatchlings were produced even during the extreme El Niño event. This indicates that even in years with a majority of nests producing 100% females, there is some heterogeneity in thermal conditions that allow development of male hatchlings.

Primary sex ratios of sea turtles are naturally female-biased on most nesting beaches around the world (Hays et al. 2014). However, they seem to follow boom-bust cycles. In the leatherback turtles that nest in North Pacific Costa Rica, there is approximately 1 year per decade that results in male-biased sex ratios (Sieg 2010; Santidrián Tomillo et al. 2014). Our results suggest that this may also be the case for the green turtles of Cabuyal, since PSR were generally female-biased but there was a male-biased sex ratio in one (2016–2017) of the 8 years (Table 4).

Finally, the high level of repeatability in nest-site selection in sea turtles suggests that nesting behavior may have some genetic basis (Patrício et al. 2018). Additionally, the occurrence of variability in nesting preferences in species with TSD indicates that these species could behaviorally adapt to climate change. Under warm detrimental conditions, those individuals with a tendency to nest in cooler areas would be favored, passing their genes to the following generations. In consequence, cool nest-site selection would become a more frequent nesting behavior in the population.