Introduction

Animal space use is a fundamental aspect of ecology and conservation; it influences biotic (e.g. predation, competition, food web dynamics) and abiotic (e.g. nutrient cycling, land/seascape characteristics) interactions, scaling from individuals to populations and ecosystem level processes (Naiman 1988; Lima and Zollner 1996; Morris 2003; Morales et al. 2010). Animal movement patterns influence conservation plans by identifying essential habitats to protect or restore, as well as the spatial scale of population management required (Barton et al. 2015; Allen and Singh 2016; Cooke et al. 2016). Yet, animal behaviour and space use is complex, and can vary significantly over time due to diverse intrinsic (e.g. energetic, reproductive state), and extrinsic (e.g. temperature, predators) factors (Nathan et al. 2008). Therefore, the mechanistic drivers of animal movement and space use are valuable for understanding how populations and ecosystems function, and provide a strong predictive framework for how they will operate in the future. This is particularly important when developing conservation plans in the face of increasingly rapid environmental change due to the growing stress human populations are placing on natural ecosystems (Vitousek et al. 1997; Schlaepfer et al. 2002).

To characterize the mechanistic drivers of animal space use, it is necessary to track animal positions over extended periods of time (i.e. months to years). However, tracking animals underwater presents a unique set of challenges (reviewed in Hussey et al. 2015). Currently, the most effective and widely applied approach to tracking marine fish is acoustic telemetry (Donaldson et al. 2014; Hussey et al. 2015), which involves tagging fish (typically by surgical implantation) with acoustic transmitters that are detected by hydrophones (receivers) when within detection range (typically 100–1000 m; Kessel et al. 2014). By placing receivers throughout fish habitats, patterns of space use and regional connectivity can be delineated. Although this generates valuable knowledge on fish ecology that is often applicable to fisheries management (Cooke et al. 2016; Crossin et al. 2017), the data generated are on a coarse spatial scale. To address questions about finer-scale spatial ecology, recent advances in tracking systems and related analytical techniques such as the Vemco Positioning System (VPS; Vemco, Nova Scotia, Canada) are now enabling fine-scale (i.e. < 10 m2 accuracy) fish positioning (Espinoza et al. 2011). This technique has been used to characterize fine-scale fish habitat associations and movement pathways (e.g. Espinoza et al. 2011; McLean et al. 2014; Özgül et al. 2015).

In nearshore marine ecosystems, fish play an important role as key components of the food web (Dulvy et al. 2004), distributing nutrients (Allgeier et al. 2013; Williams et al. 2018) and influencing benthic habitat structure (Diehl 1992; Roberts 1995). Fish that move among habitats can play particularly vital roles in this respect. One such species is the bonefish (Albula vulpes), which occupies nearshore seas in diverse regions throughout the tropical and sub-tropical Western Atlantic Ocean, the Caribbean Sea, and Gulf of Mexico (Adams et al. 2008, 2012). Bonefish move among various nearshore habitats including sand banks, seagrass meadows, coral reefs, and mangrove creeks, including shallow intertidal zones to feed on invertebrates and small fishes (Crabtree et al. 1998; Murchie et al. 2013). Much research has focused on broad-scale bonefish movement patterns in shallow flats in The Bahamas, Florida, and Puerto Rico, where bonefish exhibited high fidelity to specific shallow water flats, but also migrated into deeper offshore water to spawn (Larkin et al. 2008; Danylchuk et al. 2011; Murchie et al. 2013, 2015; Finn et al. 2014). However, fine-scale bonefish habitat use, such as their association with certain types of benthos, is largely unexplored, as is the environmental drivers of their space use. Bonefish represent an interesting model for exploring how environmental factors influence habitat use because they occupy shallow intertidal and subtidal environments with highly heterogeneous and dynamic environmental conditions, and hence, have diverse options on when and where to take advantage of shallow nearshore resources.

The objective of this research was to characterize the environmental drivers of fine-scale habitat use by bonefish. To accomplish this, we used a fine-scale acoustic positioning system for multiple years on a fringing coral reef flat in Culebra, Puerto Rico, and applied multiple statistical approaches including machine learning algorithms and Bayesian inference. Based on previous research, we predicted that bonefish would occupy a seagrass meadow most frequently due to the high density of invertebrate prey this habitat supports (Heck and Orth 1980; Orth et al. 1984). Research also suggests bonefish feed most frequently at night (Brownscombe et al. 2014); we therefore predicted more frequent nocturnal occupation by bonefish of the nearshore flat. Further, we predicted bonefish would use shallow water habitats more often at higher tide periods when higher water levels enable access to intertidal resources (Murchie et al. 2013). Lastly, based on previous research on temperature-specific bonefish physiological performance (Brownscombe et al. 2017b), we predicted that bonefish would occupy the flat less frequently at upper thermal extremes due to increased energetic costs and reduced aerobic scope for the competing demands of exercise and digestion (Pörtner and Knust 2007).

Methods

Study site and tracking system

This study was conducted in a coastal region of the tropical island of Culebra, Puerto Rico (18.316ºN, − 65.284ºE; mean annual air temperature 27 °C) in the Caribbean Sea. This marine ecosystem consists of fringing coral reefs, seagrass meadows, sand beaches, and soft-sediment mangrove lagoons (Finn et al. 2014). This study focused on a small, isolated fringing reef and adjacent habitats in a region named Las Pelas (Fig. 1). Habitat mapping (benthic structure and water depth) was conducted by point sampling throughout the study region, and unique habitat types were delineated using a semi-automatic classification algorithm on satellite imagery of the region based on known habitat types from site sampling (see Brownscombe et al. 2017b for more details on habitat mapping). Habitat types consisted of Coral Reef (live coral, mean depth = 2.65 m), Reef Crest (coral rubble and sand, mean depth = 0.70 m), Seagrass (seagrass with sparse macroalgae and sand, mean depth = 0.73 m), Transition (sand with sparse macroalgae and seagrass, mean depth = 1.40 m), and Lagoon (soft sediment with sparse macroalgae, mean depth = 4.83 m). Seagrass consisted of primarily Thalassia testudinum, along with sparse Syringodium filiforme, and Halodule wrightii. Macroalgae included Penicillus and Halimeda. This region is influenced by semi-diurnal tides, but variation is relatively low (mean variation = 0.21 m, max = 0.52 m).

Fig. 1
figure 1

Map of Las Pelas, a fringing reef in Culebra Puerto Rico with unique habitat types delineated by colour. Red dots indicate acoustic receiver locations; black crosses indicate synchronization tag locations, comprising a Vemco Positioning System (VPS). Yellow areas indicate space where the VPS was capable of detecting bonefish (i.e. where bonefish were detected)

To track fine-scale bonefish space use, in July 2012 an array of 25 acoustic receivers (Vemco VR2W; Vemco Inc., Halifax, Nova Scotia) was established in a grid pattern with overlapping detection ranges (~ 50 m spacing; Fig. 1), interspersed with 15 synchronization tags (Vemco V13-1x, 500–700 transmission delay; 3330 day life) to establish a Vemco Positioning System (VPS) that estimated the fine-scale positions of tagged animals using hyperbolic positioning based on the detection timing at three or more receivers (Smith 2013). Thirteen of the synchronization tags were also equipped with temperature loggers (Hobo Pendant UA-002-64, Onset Computer Corp, Onset MA, USA), which measured water temperature hourly throughout the tracking system. Based on the derived fish locations, this system covered an 83,100 m2 region of Las Pelas.

Fish tagging

All procedures performed on bonefish were conducted in accordance with the Carleton University Animal Care Committee (application 11473), as well as the American Association for Laboratory Animal Science (IACUC protocol 2013-0031, University of Massachusetts Amherst). Bonefish (n = 29, 53 ± 5.4 cm mean ± SD fork length; 41–63 range) were tagged with Vemco acoustic transmitters (V13-1L or V13AP, 13 mm diameter, 36 mm long, 6.0 g in air, 45–135 s delay times; 880 and 323 day tag life, respectively) via surgical implantation in the coelomic cavity from 06-2012 to 05-2013. Bonefish were captured by angling with rod and reel and held in a floating net pen (1.5 × 1.5 × 1.5 m) for a minimum of 20 min prior to tagging. Bonefish were anesthetised with 100 ppm tricaine methanesulfonate (MS-222), placed ventral side up on a surgery table, and supplied with recirculating seawater with a maintenance dose of 50 ppm MS-222. A 3 cm incision was made with a scalpel 2 cm from the ventral midline posterior to the pectoral fins. A transmitter was inserted through the incision into the coelomic cavity, and the incision was closed with two to three interrupted sutures with absorbing monofilament suture material (Ethicon 3-0 PDS II, Johnson and Johnson, New Jersey). Bonefish were held in the net pen for 20–40 min to allow recovery from anaesthesia prior to release.

Data analysis

Raw detections in the VPS were used to estimate actual bonefish positions using hyperbolic positioning (Smith 2013). This resulted in 276,557 bonefish positions from 2012-07-18 to 2014-12-01. Data were filtered to retain the most reliable positions based on horizontal position error (HPE) values (a unitless measure of positioning error sensitivity, see Smith 2013), which were compared with twice the distance root mean square (2DRMS) of measured error (HPEm) from the first month (18-07-2012 to 18-08-2012) of synchronization tag positioning data (as per Meckley et al. 2014; Appendix I, Fig. 1). Bonefish positions were filtered by HPE values of ≤ 10, which retained 80% (222,457 positions). While HPE is a unitless measure, fish positioning error was assumed to follow a similar distribution to that of the HPE in synchronization tags (Steel et al. 2014); in synchronization tag data (with known tag locations), this filter resulted in a mean positioning error of 1.24 m ± 0.002 SE after applying the HPE ≤ 10 filter.

Due to constraints imposed by positioning system performance, we included data from 01-Aug-2012 to 31-Oct-2013, which had consistent data on detection efficiency and water temperature for each habitat type. This data set consisted of 161,058 bonefish positions from 29 individuals; however, the number of bonefish present in the system varied from 12 to 20 throughout the study (presence was defined as the time period between the first and last position of each individual; See Appendix 1, Fig. 2). Tracking periods varied amongst individuals (210 ± 23 SE; 1–456 day range), as did the number of positions (6042 ± 2085 SE; 6 to 48,627; Appendix I; Table 1). Individual bonefish also exhibited varied patterns of space use within the array (Appendix I; Fig. 3). Here we focused on environmental drivers of population-level habitat use; all bonefish detections were aggregated by habitat type (Lagoon, Transition, Seagrass, Reef Crest) and study hour (bonefish positions habitat−1 h−1, BfP) for the entire study period (n = 37,192 study hour and habitat combinations).

To account for variable habitat availability within our tracking system, BfP were corrected using the equation: \({\text{BfPcorr}} = \frac{\text{BfP}}{A\left( i \right)/A\mu }\) where BfPcorr is the corrected number of positions, A(i) is the area of each habitat, and is the mean area of all habitat types. By applying this correction, comparisons of habitat use result in similar results to traditional habitat selection indices (See Appendix I, Fig. 9). That is, if bonefish utilize a particular habitat significantly more often, they are selecting for this habitat over others. Next, to untangle the effects of positioning system performance from bonefish ecology, bonefish positions were corrected for detection efficiency of the system for each specific habitat and study hour (BfPcorr2) using the equation: \({\text{BfPcorr2 }} = \frac{\text{BfPcorr}}{{{\text{PE}}\left( i \right)/100}}\) where PE(i) is the positioning efficiency (0 to 100% of total potential positions based on tag transmission delay) of synchronization tags for the respective habitat and study hour. Lastly, bonefish positions were corrected for the number of fish detectable in the system (N) with the equation: \({\text{fPcorr}}3 = \frac{{{\text{BfPcorr}}2}}{N}\). Individual fish were considered detectable in the periods between tagging and the time their last position was recorded. \({\text{BfPcorr3}}\) was used for subsequent statistical analysis and visualization.

Statistical analysis

All data processing and statistical analysis was conducted using R (R Core Team 2017) via RStudio (RStudio Team 2016). Because this data set was complex, we elected to use multiple, complementary statistical techniques, of which each had specific advantages and disadvantages, to explore the drivers of bonefish habitat use. Firstly, decision tree algorithms were used, which are ideal for complex ecological data due to their resilience to traditional statistical assumptions, and ability to deal with nonlinear relationships and high-order interactions (Breiman et al. 1984; De’Ath and Fabricius 2000; Cutler et al. 2007). Initially, random forests (RF) algorithms were used to explore the influence of environmental factors on bonefish habitat selection. RF operate by fitting a series of data trees via binary recursive partitioning with subsets of randomly chosen predictors to optimize the prediction of the response values (Breiman 2001). Due to a large proportion of zeros in the data set, two separate RF were fitted to (1) binary presence/absence response (n = 37,192) and (2) zero-truncated (presence only) detection values (n = 13,942). Based on previous research on bonefish spatial and behavioural ecology (Murchie et al. 2011a, b; Danylchuk et al. 2011; Brownscombe et al. 2014, 2017b; Nowell et al. 2015), we included environmental predictors including habitat type (Transition, Lagoon, Seagrass, and Reef Crest), diel period (day, night), tide state (low, flooding, high, ebbing), tide height (metres), water temperature (°C, assigned from the spatially nearest temperature logger in the VPS system), and lunar phase (full, third quarter, new, first quarter). RF were fit without replacement to avoid issues related to predictor scaling. For (1), weights were assigned to balance prediction accuracy between classes. The number of trees was set to 1000 (although ~ 400 trees was sufficiently stable, i.e. error was consistent amongst the number of trees). Variable importance was assessed for (1) using the mean decrease in accuracy (MDA), which is the decrease in model prediction accuracy in non-training data resulting from removing the variable from the model. For (2), variable importance was assessed using the percent increase in mean squared error (%IncMSE), which is the increase in model error in non-training data predictions resulting from removing the variable from the model. Higher MDA and %IncMSE values indicate greater variable importance. RF models were implemented with the random forests package (Liaw and Wiener 2002).

We further assessed the environmental drivers of bonefish habitat use with Bayesian inference with integrated nested Laplace approximation (INLA; Rue et al. 2009; Beguin et al. 2012). Based on the findings on variable importance from the RF models, predictors included habitat type, diel period, water temperature, tide height, and lunar phase, and all two-way interactions. Tide state was excluded due to low variable importance scores in the RFs and autocorrelation with tide height. As with the RF models, INLA models were fit to (1) bonefish presence/absence and (2) zero-truncated bonefish detection frequency. Diffuse priors were used for all fixed effects and hyperparameters. While there was no evidence of spatial autocorrelation amongst the four habitat types (based on patterns in model residuals), temporal autocorrelation was accounted for by including random effects of time of day (0–23 h) and study day with order-1 random walks for each habitat type separately (i.e. 8 random terms). Using a deviance information criterion (DIC) cutoff of three as the criterion for variable inclusion, we implemented backward model selection to select the final fixed model structures. The posterior beta values of parameter estimates were used to assess variable importance based on whether the confidence intervals overlapped zero. INLA models were applied and validated following the protocols outlined in Zuur et al. (2017) and models were fit using the INLA package (Rue et al. 2009).

To explore the relative effects of the important environmental factors (identified using the statistical techniques described above) on bonefish habitat use at a finer scale, another machine learning approach, Conditional Inference Trees (CIT) was used (Hothorn et al. 2006). Similar to traditional decision tree algorithms, CIT use recursive partitioning via binary splits to predict the response, an approach that is less sensitive to traditional statistical assumptions and enables integration of hierarchical effects and numerous predictors (Breiman et al. 1984). Unlike basic decision trees, which are prone to overfitting, CITs employ statistical tests (e.g. ANOVA or Chi square, depending on the nature of the data at each split) to limit tree size to include significant splits (i.e. those that significantly improve prediction of the response). Separate trees were fit with habitat and each environmental factor (see Appendix I; Figs. 4-7 for examples of fitted trees). Conditional Inference Trees were fit using the ctree function (Hothorn et al. 2006) in the partykit package (Hothorn and Zeileis 2015). All plotting was done with the ggplot2 package (Wickham 2016).

Results

On Las Pelas fringing reef flat, the Vemco Positioning System (VPS) estimated bonefish positions in an 83,100 m2 area spanning four habitat types available to bonefish (Fig. 1). Random forests (RF) algorithms indicated habitat type was by far the strongest predictor of bonefish presence/absence, as well as positioning frequency in zero-truncated data (Table 1). Diel period and water temperature were the next strongest predictors for both response variables, while lunar phase, tide height, and tide state had a comparatively lesser influence on bonefish space use, with low predictor importance values (Table 1).

Table 1 Random forests model outputs for variable importance for (a) bonefish presence/absence, including mean decrease in accuracy (MDA; the decrease in model prediction accuracy from removing the variable), and mean decrease in Gini score (MDG; gain in node purity from variable splits), out of bag prediction error (OOB error; the proportion of values incorrectly predicted in non-training data), error in presence values, and error in absence values, (b) zero-truncated (presence only) data, including the percent increase in mean square error (%IncMSE; the increase in model error due to removing the variable), MDG, and % variance explained in out of bag predictions

Examining bonefish presence/absence in more detail, Bayesian inference via integrated nested Laplace approximation (INLA) and Conditional Inference Trees (CIT) findings generally agreed with the RF findings, where habitat was the most important predictor of bonefish space use (Figs. 2a, 3). Bonefish occupied Seagrass most frequently, followed by Transition and Lagoon; bonefish occupied Reef Crest the least often (Figs. 2a, 3). Bonefish were present throughout the flat more often at night, although this was only marginally important, while temperature and tide height were not important factors on their own (Fig. 2a). However, there were many important interactions (Table 1). Both INLA and CIT agreed that bonefish occupied the Seagrass and Transition habitats more often at night, moving to the Lagoon more frequently during the day (Figs. 2a, 3a, 4). Regarding water temperature, INLA revealed that bonefish occupied Seagrass more often at relatively cooler water temperatures, but other temperature–habitat interactions were not important (Fig. 2). Yet, CIT identified significant partitions in the data in both Seagrass and Transition habitats, where bonefish were present more frequently at cooler water temperatures, with occupancy declining rapidly above 30 °C (Figs. 3c, 5). Occupancy of the Lagoon was more consistent amongst temperatures, while occupancy of the Reef Crest was very seldom in general (Fig. 3c). Both RF and CIT algorithms found low importance for tide height in predicting bonefish space use (Table 1; Fig. 6a), yet INLA indicated bonefish were present more frequently in both the Seagrass and Transition habitats at higher tides (Fig. 2).

Fig. 2
figure 2

Parameter estimates (β ± 95% confidence interval) for predictors of a bonefish presence/absence, and b zero-truncated (presence only, log + 1 transformed) bonefish detection frequency, amongst habitats (Seagrass, Transition, Reef Crest; Lagoon serves as a reference), diel period (DielNight; Day serves as a reference), water temperature (Temp.std), tide height (TideHeight.std), and their interactions, estimated with integrated nested Laplace approximation. Variables are considered important predictors when the confidence intervals of the beta values do not overlap zero

Fig. 3
figure 3

a Probability of bonefish presence by diel period, b zero-truncated bonefish positioning frequency by diel period, with standard error bars, c probability of bonefish presence by water temperature, and d bonefish detection frequency by water temperature fit with a loess smoother ± 95% CI. Red lines and dissimilar letters indicate significant binary splits determined using Conditional Inference Tree algorithms, and corresponding numbers indicate the predicted values. Separate panels show the four habitat types on Las Pelas fringing reef

Fig. 4
figure 4

Maps of bonefish positioning frequency (log + 1 transformed) during the day and night on Las Pelas fringing reef. Detections are corrected for the number of bonefish in the tracking system, variation in system detection efficiency, and habitat availability (BfPcorr3)

Fig. 5
figure 5

Maps of bonefish positioning frequency (log + 1 transformed) by water temperature (< 27 °C, 27–30 °C, 30–32 °C, > 32 °C) on Las Pelas fringing reef. Data were separated into temperature categories based on significant temperature thresholds determined using Conditional Inference Trees (See Fig. 2)

Fig. 6
figure 6

a Probability of bonefish presence by tide height, b zero-truncated bonefish positioning frequency by tide height, fit with a loess smoother ± 95% CI. Red lines and dissimilar letters indicate significantly binary splits determined using Conditional Inference Tree algorithms, and corresponding numbers indicate the predicted values. Separate panels show the four habitat types on Las Pelas fringing reef

Varied patterns of occupancy were observed when using zero-truncated (presence only) bonefish positioning frequency as a measure of residency. Positioning frequency was higher in the Seagrass, Transition, and Reef Crest than the Lagoon (Fig. 2b), indicating that when bonefish were present, they remained resident for longer periods. CIT indicated bonefish residency was higher in all habitats during the day, with the exception of Seagrass (Fig. 3b); yet, INLA found the only important diel difference was higher residency in Seagrass at night (Fig. 2b). Regarding water temperature, overall, INLA found it had a positive effect on bonefish residency; yet, this effect was limited to the Lagoon habitat (Figs. 2b, 5). Meanwhile, CIT found additional significant partitions in the data, with higher residency in Seagrass at temperature extremes (Fig. 3d). Similar to occupancy, tide height had little influence on bonefish residency overall, yet residency was higher in Seagrass and Transition habitats at night (Figs. 2b, 6b).

Discussion

Understanding the mechanistic drivers of animal space use provides insights into how ecological systems will respond to changing conditions in the future, which is important at this time of rapid environmental change. Nearshore marine ecosystems are particularly interesting systems to explore these dynamics, because they are often heavily influenced by anthropogenic activities (Halpern et al. 2008) and have highly heterogeneous conditions that vary over space and time. Bonefish take advantage of nearshore marine resources, exploiting the high densities of benthic prey found in intertidal and subtidal zones (Ault 2008). Unlike previous bonefish spatial ecology studies that focused on expansive shallow sand flats and mangrove creeks in The Bahamas (Danylchuk et al. 2011; Murchie et al. 2013, 2015), and seagrass meadows in Florida (Larkin et al. 2008), in Culebra, Puerto Rico, bonefish occupy heterogeneous fringing reef flats with live and dead coral, seagrass, macroalgae, and soft sediment habitats. In support of our prediction, we found bonefish occupied seagrass most frequently, followed by deeper-water mixed bottom (seagrass and algae), and soft sediment lagoon, with less frequent use of the shallow coral rubble reef crest. Seagrass meadows are productive habitats, supporting high densities of diverse benthic invertebrates and vertebrates (Stoner 1980; Williams and Heck 2001), likely serving as essential foraging habitat for bonefish in Culebra. This is perhaps why bonefish growth rates are higher in Puerto Rico and Florida than The Bahamas, where sand flats and mangrove creeks are more prevalent (Adams et al. 2008). Furthermore, Murchie et al. (2018) found bonefish in The Bahamas may benefit energetically from seagrasses as foraging habitats when available in certain regions. Seagrass meadows are sensitive to human disturbances including pollution (Lapointe et al. 1994), direct damage from boat traffic (Sargent et al. 1995), and invasive seagrasses (Willette and Ambrose 2012). Because coastal habitats are highly protected in Culebra through the Culebra National Wildlife Reserve, in our observations coastal habitats are still relatively undisturbed. In other regions with greater disturbance such as Florida Bay, major losses in seagrass have occurred alongside declines in the bonefish population (Lapointe et al. 1994; Frezza and Clem 2015; Santos et al. 2017, 2018). Given the importance of seagrass meadows as a foraging habitat for bonefish, conservation and restoration of these habitats are of particular importance for this species.

The conditions in nearshore flats habitats are highly dynamic, with rapid daily changes in water depth and temperature. Although bonefish have been shown to occupy shallow flats at certain tidal periods (Murchie et al. 2013), counter to our prediction, we found tide period and tide height were not important predictors of bonefish habitat use on a fringing coral reef in Puerto Rico relative to other factors. This may be because tidal variations are low in Puerto Rico relative to other regions such as The Bahamas, and hence, have a lesser effect on environmental conditions that would influence bonefish habitat use. With limited tidal effects, diel period was the most important temporal predictor of bonefish space use. Consistent with our prediction, although present throughout the day, bonefish occupied the reef flat more often at night. Previous research has shown that bonefish feed most frequently at night (Brownscombe et al. 2014), which is likely why they were occupying this shallow flat. Bonefish may also be less vulnerable to predation under the cover of darkness. In Puerto Rico, the most common bonefish predator is great barracuda (Sphyraena barracuda), a visual predator that occupies nearshore flats more often during the day (AJ Danylchuk, unpublished data). Further, bonefish experience limited pressure from recreational anglers at night, as anglers primarily target bonefish during the day by sight fishing. The extent to which angling causes bonefish to alter their behaviour is unknown and would be an interesting avenue for future research. There are numerous examples of where fishing and hunting have altered the behaviour of animal populations. For example, white tailed deer (Odocoileus virginianus) contract their range and become more active at night in response to hunting pressure (Kilgo et al. 1998). If recreational angling alters bonefish behaviour in the same manner, this would fundamentally alter interactions between bonefish and other components of the food web, influencing resource competition, predator, and prey dynamics.

Water temperature was the second most important predictor of bonefish habitat use; bonefish were present on the reef flat most frequently at cooler water temperatures < 32 °C. Water temperature varied most by season, with relatively smaller variations by diel period (Appendix I, Fig. 8). Greater occupation of the flat at night could explain the utilization of lower water temperatures; however, bonefish also occupied the flat with high frequency during the day, suggesting temperature was also an important driver. As ectotherms, temperature plays an essential role in moderating fish metabolic rate and capacity for exercise and digestion (Fry 1947; Brett 1964). Hence, water temperature has a major influence on fish behaviour, growth rate, life history traits, and population dynamics (Brett 1969; Angilletta 2004). Further, the pattern of bonefish presence on the flat at < 32 °C is consistent with laboratory-derived measures of aerobic scope and swimming performance (Brownscombe et al. 2017b) whereby bonefish tended to select temperatures that were bounded by their pejus temperatures. Yet, in many other cases, thermal selection is not consistent with fish aerobic scope or swimming performance (Clark et al. 2013; Norin et al. 2014). This could be due to the influence of other ecological factors such as prey or predator distribution (Beitinger and Fitzpatrick 1979), or because optimal aerobic scope is not important in all ecological contexts (Brownscombe et al. 2017a). There is, however, evidence that fish are adapted to perform optimally at the temperature of their environment when challenges such as extreme exercise are relevant to fitness, as is the case with migrating Pacific salmon (Eliason et al. 2011). Our results support the notion that this is also the case with foraging bonefish in shallow water flats (also discussed in Brownscombe et al. 2017a). Because water temperature is so dynamic in these flats (e.g. commonly over 5 °C daily variation; Appendix I, Fig. 8), and bonefish occupy the flats intermittently, bonefish have the opportunity to select for a specific temperature range when feeding. Further, because bonefish forage actively in the substrate, aerobic scope is likely important when balancing the oxygen demands of exercise and digestion. As temperatures approach upper extremes, bonefish have less aerobic scope for these demands, as well as higher standard metabolic rates. It is therefore more energetically optimal for them to forage in relatively cooler water closer to their thermal optima (i.e. ~ 28 °C; Brownscombe et al. 2017b). When bonefish were present on the flat at upper thermal extremes, they were constricted to deeper-water habitats (Lagoon and the deeper edge of Seagrass; Figs. 3, 5). This could be the result of thermal refuging in deeper water.

In addition to a lack of tidal influence, it is also surprising that lunar phase had a limited influence on bonefish habitat use. Bonefish exhibit a spawning behaviour that involves aggregating in large numbers in deeper water (3–10 m) prior to moving offshore at night to spawn near the new and full moons (Danylchuk et al. 2011). It is intuitive that bonefish presence on shallow water flats would be lower around these moon phases, yet we did not detect this in our data. This may be because spawning behaviour occurs infrequently and was not captured in the overall trends in our broad-scale data set with the modelling techniques we applied. It is also possible that bonefish spawning behaviour in Puerto Rico differs from that observed in The Bahamas; their spawning behaviour has not been characterized in this region or habitat type, which represents an important knowledge gap relevant for their conservation.

The drivers of animal habitat use are relevant to applied habitat conservation (Allen and Singh 2016) and ecological interactions such as competition, predator, and prey dynamics (Mitchell and Lima 2002; Nathan et al. 2008). Here, we found that bonefish occupy Seagrass habitat most frequently, which likely serves as important foraging habitat for this species. Conservation of Seagrass habitat is of major importance for bonefish populations, as well as the integrity of diverse nearshore habitats that this fish occupies. Degradation of habitat quality, including seagrass loss, has been observed in Florida in concurrence with major declines in the bonefish population. We also found that bonefish occupied the shallow water flat most often at night and at cooler water temperatures, while other factors including tidal variation and lunar phase had a limited influence on their habitat use. Based on our findings, we have proposed a number of hypotheses related to the biological drivers of bonefish habitat use, which could be related to predator and recreational angler behaviour, tidal conditions, and temperature-specific physiological performance. These hypotheses are likely broadly applicable to fishes, especially those that occupy diverse and dynamic nearshore marine ecosystems. Understanding these mechanistic drivers of fish movement and behaviour, and how these influence ecological interactions such as predation and competition, is essential for predicting the impacts of rapid environmental changes on coastal ecosystems to develop effective ecosystem-based management and conservation strategies.