Larval cross‐shore transport estimated from internal waves with a background flow: The effects of larval vertical position and depth regulation

Cross‐shore velocities in the coastal ocean typically vary with depth. The direction and magnitude of transport experienced by meroplanktonic larvae will therefore be influenced by their vertical position. To quantify how swimming behavior and vertical position in internal waves influence larval cross‐shore transport in the shallow (~ 20 m), stratified coastal waters off Southern California, we deployed swarms of novel, subsurface larval mimics, the Mini‐Autonomous Underwater Explorers (M‐AUEs). The M‐AUEs were programmed to maintain a specified depth, and were deployed near a mooring. Transport of the M‐AUEs was predominantly onshore, with average velocities up to 14 cm s−1. To put the M‐AUE deployments into a broader context, we simulated > 500 individual high‐frequency internal waves observed at the mooring over a 14‐d deployment; in each internal wave, we released both depth‐keeping and passive virtual larvae every meter in the vertical. After the waves' passage, depth‐keeping virtual larvae were usually found closer to shore than passive larvae released at the same depth. Near the top of the water column (3–5‐m depth), ~ 20% of internal waves enhanced onshore transport of depth‐keeping virtual larvae by ≥ 50 m, whereas only 1% of waves gave similar enhancements to passive larvae. Our observations and simulations showed that depth‐keeping behavior in high‐frequency internal waves resulted in enhanced onshore transport at the top of the water column, and reduced offshore dispersal at the bottom, compared to being passive. Thus, even weak depth‐keeping may allow larvae to reach nearshore adult habitats more reliably than drifting passively.

In vertically sheared estuarine and coastal currents, the vertical position and swimming behavior of larvae will influence both their direction and magnitude of cross-shore transport (Sulkin 1984;Kunze et al. 2013). Nonlinear internal waves of depression are an example of a shallow-water, vertically sheared coastal flow: above the pycnocline, wave velocities are in the direction of wave propagation, and opposite at depth (Apel et al. 1985). Larvae that adjust their depths to be above the pycnocline can therefore be transported onshore by shoreward-propagating internal waves (Shanks 1983(Shanks , 1985Pineda 1999). Recently, a swarm of novel, subsurface vehicles, the Mini-Autonomous Underwater Explorers (M-AUEs), provided the first direct evidence of such transport: the M-AUEs' 3-D underwater positions showed an internal wave propagating through the swarm and accelerating it toward shore . In general, the total transport distances experienced by larvae in a wave depend on the larva's maximum horizontal velocities along the wave propagation axis (Lamb 1997). Not only will larger velocities lead to greater larval transport distances in a given time, but residence time in the wave will increase as larval horizontal velocities approach the wave propagation speed, resulting in larvae experiencing wave-enhanced velocities for a longer time period (Lamb 1997).
Background velocities and horizontal swimming are two mechanisms that might enhance larval horizontal velocities in internal waves (Shanks 1995). Because both wave and background velocities can exhibit vertical structure, the two velocity profiles will combine to yield transport distances that typically vary with depth ). This internalwave/background-current interaction is complicated by the facts that background currents influence the shapes of the internal waves (Stastna and Lamb 2002), and internal waves deform along-isopycnal background currents (Klymak et al. 2006). Here, we focus on high-frequency internal waves with periods on the order of tens of minutes, and define "background velocities" to be those that fluctuate much more slowly, that is, over timescales > 1 h. In the coastal ocean, such currents are generated by barotropic and baroclinic tides, wind forcing, and larger scale geostrophic flows. We consider the effects of internal waves deforming these background flows on two larval vertical swimming behaviors: "passive" and "depth-regulating." Larvae that neither swim nor regulate their density over the timescale of the internal waves studied are considered "passive," while "depth-regulating" larvae are those that counter vertical velocities, at least partially. All larvae are fully advected by horizontal velocities. In much of what follows, we focus on an extreme of depth regulation: perfect depth-keeping.
Since background flows are directed along isopycnals, the Lagrangian trajectory of a passive larva will not be affected by the internal wave deformation of the background velocity field, although such organisms may still be transported in the direction of wave propagation Garwood et al. 2020). However, any subsurface larvae that resist the wave's vertical velocities, even weakly, will experience background velocities that vary over a wave period .
Field observations have shown that subsurface plankton, including dinoflagellates that swim vertically, can interact with internal waves (Lennert-Cody and Franks 2002;Omand et al. 2011). Measurements collected by the M-AUE swarm showed that even weak depth-keeping in a background flow field deformed by an internal wave could double larval crossshore transport compared to passive organisms . Moreover, vertical swimming speeds an order of magnitude smaller than the wave's maximum vertical velocities ($ 0.25 vs. $ 2 cm s −1 , respectively) were sufficient to yield maximum transport distances . In comparison, a similar increase in transport would have required horizontal swimming velocities closer to 10 cm s −1 , a velocity that cannot be sustained by most marine invertebrate larvae (Chia et al. 1984). Late-stage larval fishes would more easily reach such swimming speeds (Fisher 2005).
To regulate their depths in internal waves, larvae must be able to at least partially overcome a wave's vertical velocities (1-10 cm s −1 in high-frequency internal waves), and any existing turbulence (Kunze et al. 2013). Large, highly nonlinear internal waves have large vertical velocities and often generate turbulence (Sandstrom et al. 1989), providing a challenging environment for larvae to regulate their depths. Small, linear, or weakly nonlinear internal waves, on the other hand, are not as steep and thus have relatively weak vertical velocities (Woodson 2018), allowing efficient larval depth regulation. Because weakly nonlinear internal waves are common, even though their wave-averaged flow fields (i.e., their ability to transport mass) may be weak (Woodson 2018), their cumulative contributions to larval cross-shore transport could be significant. However, few such estimates exist given the difficultly of tracking individual larvae underwater in the coastal ocean.
To overcome this limitation and gather direct in situ measurements of the internal-wave-induced transport of larvaeinspired vertical swimmers, we deployed swarms of M-AUEs in the shallow, stratified coastal waters of Southern California . We showed that even a weakly nonlinear internal wave could significantly enhance the crossshore transport of depth-keeping larvae due to its deformation of a strong vertical shear in background velocity. To put those direct observations into the larger context of the persistent internal wave and background-flow conditions, here we investigate the transport of passive and depth-keeping larvae by simulating > 500 individual weakly nonlinear internal waves observed at a mooring over a 2-week period. We show that depth-keeping in the internal waves observed increased onshore transport at the top of the water column, while it limited offshore dispersal at depth, compared to being passive. This was primarily caused by the internal wave deformation of vertically sheared background velocities, which brought faster onshore-flowing waters to the depths of depth-keeping larvae (throughout the water column), or slower offshore-flowing waters (at depth). We also show that depth-keeping in weakly nonlinear internal waves can induce cross-shore transports of tens of meters, similar to those previously reported for passive organisms in highly nonlinear internal waves (Shroyer et al. 2010).

Materials and methods
Details of the field site and experimental setup are described in Garwood et al. (2020); only the information most pertinent to the current study is repeated here.

M-AUE deployments
To investigate the implications of background current and internal wave interactions on cross-shelf larval transport in situ, we deployed swarms of depth-holding, trackable, subsurface larval mimics, the M-AUEs (Jaffe et al. 2017). The M-AUEs are small vehicles (1.5 L) whose 3-D underwater position can be obtained postdeployment: their vertical positions are obtained from their pressure sensors, while their horizontal positions are derived from time-of-flight calculations for acoustic signals emitted by moored, GPS-localized and -synchronized pingers, which are then recorded by the M-AUEs' hydrophones (Jaffe et al. 2017). To emulate depthkeeping larval behavior (Genin et al. 2005;DiBacco et al. 2011), the M-AUEs can be programmed to maintain a target pressure/ depth (Jaffe et al. 2017;Garwood et al. 2020). Through small piston adjustments, the M-AUEs regulate their buoyancy relative to the programmed target pressure/depth. To avoid any feedback due to surface waves, the M-AUEs' proportional-integral-derivative control algorithm was set to smooth pressure perturbations with time scales < 20 s. Because the M-AUEs are relatively small, can be tracked at sub-minute intervals, and localized within 1 cm vertically and 5 m horizontally (Jaffe et al. 2017;Garwood et al. 2020), they are ideal for studying the effects of internal wave transport on larvae.
From 14-27 June 2016, swarms of 3-10 M-AUEs were deployed from small boats off Mission Beach, California, up to twice daily. M-AUEs were individually programmed to maintain a specific depth, ranging from 2 to 16 m, for 2-4 h. The M-AUE swarms were deployed to span the main pycnocline, estimated from salinity, temperature, and pressure data relayed in real-time by a nearby Wirewalker (Rainville and Pinkel 2001;Pinkel et al. 2011), moored on the 50-m isobath. The M-AUEs were deployed at various depths between the 25and 30-m isobaths, with a common start time and surfacing time. At the start time, the M-AUEs reduced the volume of their external casings and sank to their target depths. The target depths were then maintained for the duration of the deployments through small piston adjustments for buoyancy regulation. At a predetermined time, the process was reversed and the M-AUEs surfaced. They were located via radio and GPS signals, and recovered.
Underwater positions could not reliably be obtained when the M-AUE's hydrophone was saturated by piston motor noise or heavy boat traffic. Motor noise was problematic when M-AUEs had to correct their positions more regularly, perhaps due to weaker stratification at some depths, and/or frequent/ large surface swell. To maximize the number of deployments incorporated in this study, we thus rely only on the M-AUE's GPS positions immediately prior to their dive, and immediately upon surfacing. These positions matched well with the beginning and end of the tracks for the deployments with full underwater tracking (not shown). The M-AUE's cross-shelf displacements were calculated by differencing the two GPS readings along an axis perpendicular to the coast. Average M-AUE velocities were obtained from the time stamps of these two measurements. In general, the M-AUEs took $ 10 min to sink to their target depths and stabilize their control algorithms, while they took 1-2 min to surface during the 2-4-h deployments. Thus, during the bulk of the deployment, the M-AUEs were at their target depths.

Internal waves from time series
To characterize the hydrographic environment, a taut mooring thermistor chain (T-chain) was deployed on the 20-m isobath, next to a bottom-mounted, upward-looking acoustic Doppler current profiler (ADCP). All instruments sampled at a rate of 2 Hz. Sea-Bird Scientific SBE-56 temperature sensors were placed at the top and bottom of the T-chain, with 15 RBRsolo temperature sensors placed every meter in between, except for an RBRduo pressure/temperature recorder at the middle position. The Teledyne RD Instruments Sentinel V ADCP had vertical bin sizes of 0.25 m. Due to surface contamination, velocity measurements were reliable only up to 3-m below the surface.
To match the frame of reference of the M-AUEs, pressure measurements were used to convert both the ADCP and temperature time series from a frame of reference of meters above the bottom to meters below the surface. Both time series were linearly interpolated to a fixed depth grid with bin spacing of 0.25 and 0.5 m, respectively, and decimated to a common time vector with 1-min intervals. The time series were filtered using a second-order Butterworth filter, with a frequency threshold of 1 cycle per hour to separate low-and highfrequency signals. Background conditions were calculated from the low-passed time series, while internal waves were isolated from the high-passed temperature time series.
Solitary internal waves of depression, or solitons, and oscillatory internal wave troughs were identified from positive peaks in temperature anomalies (n = 3265 peaks). To eliminate instances of multiple waves traveling over each other, only single temperature peaks bounded by minimum temperature anomalies were retained (n = 1361 peaks). To limit our analyses to weakly nonlinear internal waves, we excluded waves with maximum vertical displacements, η max , greater than 20% of the water column height, or η max ≥ 4 m. Waves with vertical displacements less than our T-chain vertical resolution (1 m) were also excluded. A total of 538 individual weakly nonlinear internal waves were isolated and parameterized from our observations, and used in our simulations.

Wave simulations
Because the ADCP and thermistor chain were not precisely collocated, and the measured velocity field included nonwave induced flows, we used an analytical solution to the Korteweg-de Vries (KdV) equation to obtain 2-D velocity fields (cross-shore and depth) for the waves observed at the T-chain (Apel 2002). The KdV equation is commonly used to model shallow-water, weakly nonlinear internal waves. A detailed study of a wave event that propagated through the M-AUE swarm found that the observed wave characteristics and M-AUE transport could be reproduced by a cnoidal function, with a modulus much less than unity ($ 0.1) ). This wave event was almost as large as the largest waves simulated here (η max ≈ 3 m), thus we use an equivalent equation. However, to simplify our analysis, we use the linear limit of the cnoidal equation, which we parameterize using wave characteristics diagnosed from observations: where η is the wave-induced isopycnal displacement (m), η c is the crest elevation (m), ϕ(z) is the wave's vertical structure function, k is the horizontal wavenumber (m −1 ), ω is the wave frequency (s −1 ), and t is time (s). In this case, x (m) is positive in the direction of wave propagation, and z (m) is positive up. To match the frame of reference of the M-AUEs, all vertical coordinates are plotted as depth.
To ensure the best match to the in situ flow field, parameters such as η max , ϕ(z), ω, and k were diagnosed from the observations and used to generate the waves. The wave's vertical structure was set to −sin(πz/H), a reasonable approximation of the dominant vertical mode inferred from the high-frequency (< 1 cph) vertical velocities measured at the ADCP (Fig. 1). The wave frequency was calculated from the observed wave period, T, with ω = 2π/T, while the wavenumber k was calculated from the wavelength, λ, using k = 2π/λ. The wave propagation speed was necessary to estimate λ. Although it could not easily be observed, both linear and nonlinear internal wave propagation speeds were calculated from our observed background stratification and velocities using Smyth et al.'s (2010) Taylor-Goldstein equation solver, following the method of Shroyer et al. (2011). Overall, calculations for the nonlinear wave speeds were within 10% ± 10% of the linear wave speeds, but were more sensitive to the characterization of background velocities and stratification. Given the uncertainty in the top 3-m velocity field, we used the linear wave propagation speed, c 0 . Note that the wave propagation speed of highfrequency internal waves at our site was shown to agree well with linear theory (Lerczak 2000;Garwood et al. 2020). Finally, water height, H, was set to the minimal tidal height above bottom of 17.5 m, and η c was set to 0.
The velocity field used for each internal wave simulation included steady background cross-shore velocities, u B (z), while background vertical velocities were assumed negligible, that is, w B = 0. In a reference frame moving with the wave, streamlines follow isopycnals (Moum and Smyth, 2006). The wave and background flows were incorporated into a total stream function, ψ, by vertically interpolating the background stream function, ψ B = Ð u B (z) dz, such that it remained constant along streamlines/isopycnals, that is, ψ B (z − η) = const. (Stastna and Lamb, 2002;Moum and Smyth, 2006;Chang et al., 2011). Total velocities were calculated as , and converted to a stationary reference frame. In our analyses, wave-induced velocities are defined as velocity anomalies relative to the unperturbed background state, which includes contributions from the propagating wave, the vertically displaced background velocities, and the small effect of strain on background velocities (Stastna and Lamb 2002;Chang et al. 2011). Velocity contributions from the propagating wave will be positive at the surface (in the direction of wave propagation), and negative at depth (Apel et al., 1985), while contributions from background currents will vary. For weakly nonlinear internal waves, wave straining of background currents is small, thus we simplify our discussion by assuming background velocities to be constant along isopycnals.
Finally, we assumed no change to density over the timescale of a wave. Thus, the density fieldρ x,z,t ð Þassociated with each wave was simply the result of a wave-induced vertical deformation of the background density profile, ρ: For derivations and additional details on pairing KdV theory with observations, readers are referred to Moum and Smyth (2006). Local (in time) background horizontal velocity profiles were calculated from one-hour averages of the low-pass filtered cross-shore ADCP velocity data, centered on each wave trough. The velocity profiles were linearly extrapolated from 3-to 2.5-m depth, with velocities then held constant to the surface . Background temperature profiles were also calculated from the low-pass filtered signal, averaged over an hour centered on each wave trough. Wirewalker profiles showed that temperature dominated the variability in density; background stratification was thus calculated from temperature using the average salinity of 33.5.

Virtual larvae
To calculate the cross-shore larval transport associated with the combined background flows and internal waves observed, both passive and depth-keeping virtual larvae were released every meter in the vertical from 3-to 16-m depth, at the internal wave crests. Larval transport was assessed by differencing the virtual larvae's horizontal positions at each crest. Because η c (Eq. 1) was set to zero, as suggested by previous observations , all virtual larvae started and ended in a background flow that was unperturbed by the wave. The total average cross-shore velocity u T and transport Δx T experienced by each larva were quantified for each wave. Because these larvae moved with the flow, their residence time in the wave τ differed from the wave period T measured at the mooring. Residence times also varied with depth within a single wave. Average velocities and transports were therefore assessed over the time period each virtual larva spent in the wave, and not the intrinsic wave period.
The wave component of the average larval velocities u W was calculated from the simulated total velocities by subtracting the unperturbed background velocity at a virtual larva's initial depth: where the subscript org indicates that the value is calculated for a given organism and z org,t0 indicates the depth of the virtual larva at the start of the wave t 0 , that is, the larva's initial depth. The wave component of transport Δx W was calculated from the simulated total transport by subtracting the background velocity's associated transport over the larva's residence time τ in the wave: The average wave-induced larval transport, as defined here, thus includes both the transport associated with the wave velocities themselves, and the transport associated with the variable background velocity anomalies experienced by the depth-keeping larvae. These anomalies arise from the deformation of the background currents by the wave .

M-AUE cross-shore velocities
Over the 2-4 h they were deployed, the M-AUE larval mimics showed averaged in situ total cross-shore velocities ranging from −0.05 m s −1 (offshore) to 0.14 m s −1 (onshore), with variability among deployments and depths (Fig. 2b). Generally, average M-AUE cross-shore velocities were skewed to be onshore, with maximum velocities recorded by the shallowest M-AUEs, that is, those programmed to maintain depth 3-m below the surface. Although background velocities measured at the ADCP during each M-AUE deployment were predominantly onshore in surface waters, and offshore at depth (Fig. 2a), the median M-AUE velocities in excess of background currents (residual) were $ 2-3 cm s −1 onshore throughout the water column (Fig. 2c).

Total transport and velocities
Overall, 538 weakly nonlinear internal waves were isolated from a 14-d time series of temperature measurements at a moored T-chain. Depth-keeping and passive virtual larvae were seeded every meter vertically in wave flow fields parameterized using the observed properties of each of these wavesincluding the background currents. Predicted cross-shore transports over a virtual larva's residence time in individual waves ranged from −200 m (offshore) to more than 3000 m (onshore) (Fig. 3, top row). Above mid-water (upper 8 m), depth-keeping virtual larvae were transported onshore in 71% of the waves, while only 64% of waves transported passive virtual larvae onshore. Furthermore, onshore transport of depth-keeping virtual larvae was favored over a broader depth range (upper 11 m), compared to passive larvae (upper 8 m) (Fig. 3, top row). The largest onshore transport estimates occurred closer to the surface, and the lowest estimates near the bottom, where transports were often offshore.
Averaged cross-shore velocities calculated over the time period virtual larvae spent in the wave ranged from −0.3 to 0.25 m s −1 (Fig. 4, top row), again with larger, positive (onshore) estimates closer to the surface and lower, negative (offshore) estimates near the bottom. On average, the velocity of depth-keeping virtual larvae were 1 cm s −1 more positive than passive larvae, implying a faster onshore transport in surface waters, and a slower offshore transport at depth. This difference could reach nearly 4 cm s −1 for 10% of the waves. The in situ velocities measured by the M-AUEs (Fig. 4, open circles) fell well within the range of simulated total velocities, although the M-AUEs appear to have experienced preferentially positive (onshore) velocities.
In most simulations, virtual larvae spent more time in the wave than it took the wave to propagate through the mooring, that is, log 10 (τ/T) > 0 (Fig. 5). The frequency distribution of this ratio was shifted toward larger values for depth-keeping virtual larvae compared to passive larvae, indicating that depth-keeping larvae spent, on average, more time in the waves (Fig. 5).
Compared to passive virtual larvae in these wavebackground flow systems, depth-keeping larvae thus experienced more frequent onshore transport in the upper water column, slightly greater onshore velocities, and longer residence times in the waves.

Wave-induced transport and velocities
Wave-induced transport distances were calculated by subtracting the unperturbed background transport from the virtual larvae's total transports (Eq. 4). Averaged, wave-induced cross-shore larval velocities ranged from −0.2 to 0.2 m s −1 (Fig. 4, bottom row). Minimum wave-induced cross-shore transport distances were on the order of −100 m (offshore), while maximum values were closer to 100 and 500 m (onshore) for passive and depth-keeping virtual larvae, respectively (Fig. 3, bottom row). In general, both passive and depth-keeping virtual larvae experienced positive waveinduced onshore transport in the upper water column, and offshore transport below; net onshore transport extended deeper for depth-keeping virtual larvae (10 m) than for passive larvae (8 m) (Fig. 3). Cross-shore transport estimates for depthkeeping virtual larvae had higher variance than those calculated for passive larvae (Fig. 3).
Positive, onshore total transport was often associated with positive, onshore wave-induced transport, and vice-versa (Fig. 6). The wave-induced transport represents the wave's enhancement to transport, as a large total transport value could be due to a weak wave in a strong background flow (small Δx W /Δx T ) or a strong wave in a weak background flow (large Δx W /Δx T ) (Fig. 6). Because waves sometimes countered background velocities, wave-induced transports that opposed total transport were also seen (Fig. 6). For example, in cases in which total transport was negative (offshore), positive waveinduced transports reduced the offshore advection of virtual larvae, and thus contributed to nearshore retention.

Depth-keeping vs. passive virtual larvae
Depth-keeping virtual larvae throughout the water column experienced more positive (onshore) total and wave-induced transports than passive larvae (Fig. 6a [ depth-keeping] and 6b [passive]). For depth-keeping virtual larvae, 39% of the observations showed u T > 0 and u W > 0 , while this occurred only 30% of the time for passive larvae. Of all the waves simulated, 29% induced transports of depth-keeping virtual larvae with Δx W ≥ 50 m and Δx W /Δx T ≥ 10% at some depth of the water column (Fig. 7, dashed-dot section). In comparison, only 1% of the waves induced similar transport in passive virtual larvae ( Fig. 7; Table 1). These large wave-induced onshore transports occurred primarily in the top 5 m of the water column (Table 1).
Overall, for the same initial depth in a wave, depth-keeping significantly enhanced onshore transport and/or nearshore retention throughout the water column, compared to drifting  wave period (T), log-transformed, for each virtual larva. Passive and depth-keeping virtual larvae are in dark gray and white, respectively, with regions of overlap in light gray. Note that the frequency distribution for depth-keeping virtual larvae appears shifted to the higher values compared to passive virtual larvae, indicating that depth-keepers spent, on average, more time in the waves. Wave periods varied from 3 to 22 min. passively (Wilcoxon signed rank test, p-value < 0.01 at all depths) (Fig. 8a). This was particularly true 3-4 m below the surface, where 10% of the waves transported depth-keeping virtual larvae at least 70 m closer to shore than passive larvae (Fig. 8a, yellow line).
The maximum vertical velocities necessary for maintaining depth perfectly were generally < 1 cm s −1 , although they could reach as high as 4.5 cm s −1 (Fig. 8b). Because wave vertical velocities decrease toward the surface and bottom boundaries, the swimming speed required to perfectly depth-keep also decreased toward the boundaries (Fig. 8b). depth-keeping and (b) passive virtual larvae in the simulated weakly nonlinear internal waves observed (n = 538 waves, 14 depths). The logarithmic color bar shows the number of counts in each bin. (c) Parameter space where only (pink) depth-keeping or (blue) passive virtual larvae were reported. The black line shows where wave transport equals total transport, that is, where waves were responsible for the total transport calculated. The gray line shows where wave-induced transport is 10% and 1000% that of total transport, that is, where Δx W /Δx T = 0.1 and 10, respectively. Note that waves can contribute more than the total transport when they oppose background velocities, e.g., a wave can transport virtual larvae 100 m onshore, while background currents transport them 90 m offshore, for a total transport of 10 m. This can also lead to wave and total transports of opposite signs. In all plots, displacement bins are linear after an asinh() transformation. Positive values are onshore. Ocean conditions that strongly favored onshore transport of depth-keeping virtual larvae, compared to passive virtual larvae released at the same initial depth, included cross-shore velocities with a positive vertical shear, i.e., ∂u T /∂z > 0, indicating that total velocities decreased with depth (Fig. 9a). In mode-1 internal waves of depression, wave-induced velocities have a positive vertical shear; thus this effect was enhanced when background velocities also had a positive vertical shear (Fig. 9b). Above mid-water, these conditions implied that the internal waves deformed isopycnals with high background horizontal velocities downward to the depths of depthkeeping virtual larvae, thereby increasing the maximum velocities and residence time in the wave of depth-keeping larvae, compared to passive larvae (Figs. 5, 9d). As a result, depthkeeping larvae were transported greater distances toward shore than passive larvae (Fig. 9c). Below mid-water, the positive vertical shear usually implied that slower offshore-flowing waters were brought downward to the depths of depthkeeping virtual larvae thereby slowing their offshore advection, compared to passive virtual larvae. Conversely, onshore transport of passive virtual larvae was favored when there was a negative vertical shear in velocities (Fig. 9e-h).

Discussion
Our simulations and analyses have shown that depthkeeping virtual larvae were generally moved closer to shore than passive virtual larvae after the passage of weakly nonlinear internal waves of depression, in the presence of vertically sheared background currents. Above mid-water, this enhanced onshore transport was due to surface-intensified currents being brought down to the depths of depth-keeping virtual larvae by internal waves ). This internal-wave-induced deformation of the background currents both increased the cross-shore velocities experienced by depth-keepers, and their residence time in the waves as they propagated. The interaction of even weakly depth-keeping larvae with background flows and weakly nonlinear internal waves may be a significant mechanism for sustained onshore transport of meroplanktonic larvae to their nearshore adult habitats. At depths below mid-water, internal waves of depression often brought slower background currents to virtual depth-keeping larvae, thus reducing their offshore dispersal and promoting their nearshore retention, compared to passive virtual larvae. Given the common observation of trains of weakly nonlinear internal waves in the coastal ocean offshore of Southern California, the mooring observations of dozens of weakly nonlinear internal waves occurring over a typical 24-h period, "quasi-Eulerian" (i.e., depth-keeping) behavior appears to have the capacity to exercise strong control over larval transport in the coastal ocean.
That larvae can modulate their cross-shore position by adjusting their depths in vertically sheared flows, that is, in flows with horizontal velocities that vary with depth, has previously been appreciated (Sulkin 1984;Kunze et al. 2013). Such vertical shears in cross-shore velocities can be generated by a variety of physical processes, including both internal Table 1. Percentage of waves contributing at least 10% of total transport (Δx W /Δx T ≥ 0.1), and inducing horizontal displacements (Δx W ) of at least 10, 50, and 100 m above background. Results for depth-keeping and passive virtual larvae at the top (depth = 3-5 m), middle (depth = 6-10 m), and bottom (depth = 11-16 m) of the water column are shown.  Fig 8. (a) Horizontal transport (m) preferentially experienced by virtual depth-keeping larvae, compared to passive larvae with the same initial depth (Δx dk − Δx p ). Bins are linear in ± logarithmic space, with values from ± 1 m binned as 0. A paired Wilcoxon signed rank test shows the difference to be greater than zero at all depths at the 1% significance level. The diamond (passive advantage) and circle (depth-keeping advantage) highlight the waves shown in Fig. 9. (b) Maximum vertical swimming speed needed for virtual larvae to perfectly maintain depth. Bins are 0.001 m s −1 in size. In all plots, the white and yellow lines show the 50 th and 90 th percentiles, respectively, and the logarithmic color bar represents the counts in each bin.
waves and background currents. We have shown that the velocity profiles of internal waves and background currents can combine to yield variable transports throughout the water column (this study; Garwood et al. 2020). Of course, internal waves and background currents do not act in isolation: for example, background currents influence the shapes of the internal waves (Stastna and Lamb 2002), and internal waves deform along-isopycnal background currents vertically (Klymak et al. 2006).
Passive larvae will follow the internal-wave-induced deformation of isopycnals and thus the background velocity field, experiencing no change in background velocity as the wave passes (Lamb 1997). Depth-keeping larvae, on the other hand, will experience a range of background velocities during the passage of the wave . These changes in the background velocities are proportional to the product of the maximum wave-induced isopycnal vertical displacement (η max ), and the strength of the local vertical shear in the background velocity (∂u B /∂z). A large wave displacing a small vertical shear may induce a similar change in the background cross-shore velocities experienced by depth-keeping larvae as a small wave displacing a large vertical shear.
Background currents at our site were often surface-intensified and favored onshore transport of virtual depth-keeping larvae in the upper water column. Thus, ocean conditions may be particularly advantageous for onshore transport in high-frequency internal waves if they are generated when there are surfaceintensified, onshore-oriented currents from, for example, the internal tide (Alford et al. 2010), or in areas where the sea breeze excites a coastal near-inertial response (Lerczak 2000;Lucas et al. 2014). Wind-driven onshore-flowing surface waters and offshore-flowing bottom waters in the nearshore have been hypothesized to contribute to the local retention of fish larvae with diel vertical migrations (Smith et al. 1978;Brewer and Kleppel 1986). Our findings show that onshorepropagating weakly nonlinear internal waves could accentuate these dynamics. Our shallowest transport estimates are likely conservative, as the shear measured at 3-m depth was only extrapolated to 2.5 m, and not to the surface . Further surface intensification of the background horizontal velocities would have led to even greater onshore transports. High-resolution, near-surface velocity measurements showed that winds regularly induce strong, surfaceenhanced vertical shears in horizontal velocities that extend to depth (Lucas et al. 2014;Lund et al. 2015;Laxague et al. 2018), with important implications for the transport of oil, plastics, and larvae.
Cross-shore winds may not only influence larval transport by increasing horizontal velocities in surface water: they also generate surface waves that can induce Stokes drift Lentz et al. 2008;McPhee-Shaw et al. 2011). Although neglected here, the Stokes drift associated with surface waves may play a role in delivering larvae to the surf zone (Morgan et al. 2017). Using our ADCP data, we estimated Stokes drift from surface wave spectra for every 2-h period in our time series (Fig. 10), following the method of Lentz et al. (2008). This timescale was selected to match the minimum duration of the M-AUE deployments. At 3-m depth, the maximum 2-h-averaged Stokes velocities associated with surface waves were roughly half of the internal-wave-induced mean larval velocities we estimated (Figs. 4, 10). Stokes velocities decayed to zero at depth, while internal-wave-induced mean larval velocities reversed (Figs. 4, 10). Although our simulations did not include surface waves and therefore did not include the Stokes drift associated with these waves, by advecting virtual larvae in internal wave flow fields, our simulations included the Stokes drift associated with internal waves. Due to mass conservation, however, Stokes velocities may be canceled by equal and opposite Eulerian velocities, resulting in little to no net Lagrangian transport of water parcelsand consequently of passive larvae Henderson 2016, but see McPhee-Shaw et al. 2011Morgan et al. 2017;Franks et al. 2020). In contrast, the velocity enhancement associated with the internal-wave-induced deformation of background currents experienced by depth-keeping larvae is not constrained by mass conservation, and is therefore not associated with a counteracting flow. A complete picture of larval transport in coastal waters would consider the interaction of physical processes and larval behavior at various spatial and temporal scales (Levin 2006).
The internal wave field observed at our site showed both more frequent and larger onshore transports of virtual depthkeeping larvae in the upper water column than passive larvae. Although we focused on two extreme swimming behaviors: passive and depth-keeping, other analyses have shown that these behaviors define two ends of a continuum of the effects of swimming ability on transport Garwood et al. 2020). Thus, internal waves will not only sort plankton of varying swimming ability vertically, but also horizontally. This horizontal sorting could affect fundamental ecosystem processes, such as grazing, predation, and other trophic interactions (Macías et al. 2010;Greer et al. 2014).
In regions with even moderate vertical shear in cross-shore velocities, vertical swimming in internal waves is likely to be more effective and less energetically costly in generating crossshore transport than horizontal swimming. Larvae can relatively easily orient themselves vertically using the strong vertical gradients of properties such as pressure, light, or temperature (Cragg 1980;Zeldis and Jillett 1982;Daigle and Metaxas 2011). Turbulence associated with shallow, coastal environments suitable for growth may also trigger active downward swimming in oyster larvae ready to recruit (Fuchs et al. 2013). The cues for directed horizontal swimming, however, are not obvious. Indeed, horizontal swimming velocities of several cm s −1 would be necessary to produce horizontal transports similar to those estimated here for vertically swimming organisms (Drake et al. 2018).
Furthermore, even weakly swimming larvae can experience transport distances equivalent to those of a depth-keeper Garwood et al. 2020). For the internal waves measured in this study, organisms with vertical swimming speeds much less than 1 cm s −1 , such as crab zoeae and other invertebrate larvae (Chia et al. 1984), could still experience the maximum total transport distances reported. This is particularly true closer to the surface, where horizontal transport is high and internal wave vertical velocities are low. Thus many organismseven quite weak swimmerswith a tendency toward depth keeping could experience enhanced onshore transport through the interaction of swimming, weakly nonlinear internal waves, and a vertically sheared background current.
There is growing evidence of larval retention near adult habitats (Cowen 2000;Sponaugle et al. 2002Sponaugle et al. , 2005Jones et al. 2005). The regular onshore nudging by the constant weakly nonlinear internal wave field could reduce offshore dispersal and help maintain a pool of larvae near the coast. Indeed, most larvae tend to be found within 5 km of the coast (Shanks and Brink 2005;Morgan et al. 2009;Shanks and Shearman 2009). By more effectively trapping larvae in this coastal boundary layer, internal waves may also reduce alongshore dispersal (Largier 2003). Of the internal waves isolated at our mooring with η > 1 m, 90% were weakly nonlinear (those we included in our simulations), driving onshore total transport 57% of the time for virtual depth-keeping larvae, and 50% of the time for passive larvae (Fig. 6). Our simulations showed wave-induced onshore transports Δx W ≥ 50 m for virtual depth-keeping larvae near the surface roughly 20% of the time, but only 1% of the time for passive larvae. These results are consistent with a significantly enhanced probability of onshore transport for depth-keeping larvae compared to passive larvae in the upper water column. The sustained presence of these weakly nonlinear internal waves in coastal waters, therefore, presents a reliable mechanism for onshore meroplanktonic larval transport.
Our observations of large numbers of weakly nonlinear internal waves, however, were sometimes punctuated by relatively rare, large, highly nonlinear internal waves with isopycnal displacements > 20% of the water column depth. Shroyer et al. (2010) showed that large nonlinear internal waves on the New Jersey shelf induced surface cross-shore transport of passive tracers in excess of 1 km, though average values for the first three waves of a nonlinear internal wave train were $ 65 m per wave, comparable to the larger transports we have calculated for virtual depth-keeping larvae.
Large and infrequent nonlinear internal waves may account for significant, episodic larval transports to the nearshore (Shanks 1983;Pineda 1999). However, the effectiveness of these episodic events may depend on the retention of larvae near the coast by the sustained actions of the more frequent, smaller internal waves.
As they propagate upslope, internal waves will evolve and steepen prior to breaking or dissipating. This implies that larval transport will vary across shore (Shroyer et al. 2010). Though we have focused on data acquired at the 20-m isobath, the average cross-shore larval velocities estimated at this location were similar to those of M-AUEs deployed between the 30-and 25-m isobaths more than 1 km farther offshore. The 2-4-h M-AUE deployments included time periods without internal waves, implying that the M-AUE average velocities we observed were less than those we would have predicted using the wave simulationsparticularly in the upper water column where wave velocities were positive. Regardless of this difference in averaging, the M-AUE velocities fell well within the total predicted velocities from our wave-background simulations (Fig. 4), supporting our contention that our simulations provide sufficiently accurate predictions of the cross-shore movements of passive and depth-keeping larvae.
Because M-AUEs are much larger than meroplanktonic larvae, both may follow streamlines differently, begging the question of how cross-shore transport estimates derived from the M-AUEs (or from virtual larvae) apply to actual organisms. The Stokes number, Stk = τ 0 u/D, can be used to define how closely particles will follow streamlines, where τ 0 is the response time of the particle, u is the fluid velocity, and D is the particle diameter. Particles with a low Stokes number, such as virtual particles, track fluid velocities perfectly. Given internal wave velocities of $ 0.1 m s −1 , the fluid-tracking characteristics of millimeter-sized larvae (Stk ≈ 1) should fall between that of virtual particles and decimeter-sized M-AUEs (Stk ≈ 100). Therefore, if the horizontal displacements of both the M-AUEs and the virtual particles are comparable (this study; Garwood et al. 2020), it follows that larval displacements should be well estimated by either M-AUEs or virtual larvae.
Generally, our data and analyses showed that both passive and depth-keeping virtual larvae in the upper water column experienced onshore transport in high-frequency internal waves, while those at depth experienced offshore transport. Where internal wave trains appear regularly with respect to the internal tidal cycle (D'Asaro et al. 2007), larvae could exploit the ocean's reliable velocity profile for onshore dispersal and retention. For instance, after periods of highfrequency internal wave activity, Weidberg et al. (2019) showed that the vertical distribution in larval stages of various barnacle and decapod species shifted to greater depths, where bottom currents flowed onshore.
Barnacle larvae may provide the best test case for our findings, as multiple studies have characterized their vertical and horizontal distributions in shallow waters (< 30 m) near our site (Pineda 1991(Pineda , 1999Tapia and Pineda 2007;Tapia et al. 2010;Hagerty et al. 2018). If an internal wave field similar to the one we sampled dominated larval transport, we would expect stronger swimmers closer to shore than weaker swimmers. Indeed, barnacle cyprids were generally found closer to shore than nauplii, which likely drifted offshore following spawning at the coast (Tapia and Pineda 2007;Hagerty et al. 2018). Flume experiments also demonstrated the potential for barnacle cyprids to maintain depth (DiBacco et al. 2011). Larval vertical distributions, however, were sometimes opposite those we would expect from our internal wave field: cyprids were more abundant at depth, and nauplii at the top of the water column (Tapia et al. 2010). At other times, cyprids were sampled at or near the surface, with their shallowest occurrences during internal tidal bores (Pineda 1999). Barnacle cyprids and crab megalopae in other areas have also been sampled in surface waters during internal waves (Shanks and Wright 1987;Shanks 1995). Without vertical distribution profiles in the cross-shore and concurrent velocity measurements, it is impossible to know if cyprids may be absent from surface waters at certain locations because they were preferentially transported onshore, or simply because dominant circulation patterns differed from those we observed. The hypotheses presented here thus remain to be tested.
In contrast to meroplanktonic larvae seeking adult habitats, it may be disadvantageous for holoplankonic organisms to be transported onshore in coastal waters. The decreased onshore transport predicted for passive organisms in weakly nonlinear internal waves with a background flow suggests behaviors that might reduce onshore transport and enhance offshore dispersal: remaining passive, that is, following isopycnals (or temperature surfaces), and residing deeper in the water column (Morgan et al. 2017). Over tidal and developmental time scales, even passive plankton may be able to adjust their overall position in the water column via buoyancy adjustments (Richardson and Cullen 1995;Gemmell et al. 2016) to exploit the predominant internal-wave/background velocities.
Finally, although we focused on internal waves propagating onshore in a cross-shore current, internal waves propagating at all angles will deform the full background velocity field. Therefore, when a vertical shear in alongshore velocities is present, weakly nonlinear internal waves propagating in the cross-shore direction will also modulate the alongshore transport of depth-keeping organisms, and vice versa. In this full 3-D system, the direction of transport will be set by the background currents brought to the organisms' depths, while estimates of residence time will be based on velocities along the wave's propagation axis (Lamb 1997). Passive organisms will remain unaffected by these vertical shears.

Conclusions
The horizontal displacement of both passive and depthkeeping virtual larvae was simulated in > 500 weakly nonlinear internal waves observed in the shallow, stratified coastal waters of Southern California. Average cross-shore velocities of depth-keeping, horizontally drifting autonomous vehicles, the M-AUEs, were within the range of average larval velocities obtained in the simulations: −5 to 15 cm s −1 , over periods of 2-4 h. In the internal wave simulations, depth-keeping virtual larvae in the surface layer were moved farther onshore than passive larvae, while depth-keeping virtual larvae in the deeper layer experienced reduced offshore advection. In near surface waters, roughly 20% of shallow-water, weakly nonlinear internal waves displaced depth-keeping virtual larvae ≥ 50 m toward shore. In comparison, only 1% of the observed internal waves induced similar displacements of passive virtual larvae. The enhanced transport experienced by depth-keeping virtual larvae was caused by the internal waves of depression displacing surface-intensified currents to the larvae's depths. Depthkeeping in weakly nonlinear internal waves with a background flow was shown to induce similar onshore transport as drifting passively in stronger, highly nonlinear internal waves. Moreover, the vertical velocities associated with the simulated weakly nonlinear internal waves were well within the swimming ability of many larvae (< 1 cm s −1 ). Below mid-water, transport of both passive and depth-keeping larvae was predominantly offshore, but depth-keeping appeared to reduce offshore dispersal. Depth-keeping may therefore represent an adaptive behavior to promote retention of larvae in the nearshore environment, and their subsequent return to suitable, shallow-water adult habitats.