Skip to main content

Diurnal thermally driven cross‐shore exchange in steady alongshore currents

Cite this dataset

Davis, Kristen A.; Safaie, Aryan; Pawlak, Geno (2023). Diurnal thermally driven cross‐shore exchange in steady alongshore currents [Dataset]. Dryad.


Idealized numerical modeling of thermally-driven baroclinic exchange is performed to understand how cross-shore flow is modulated by steady alongshore currents and associated shear-generated turbulence. In general, we find that shear-driven vertical mixing reduces the temperature gradients responsible for establishing the baroclinic flow, such that cross-shore thermal exchange diminishes with alongshore current speed. Circulation in a base-case simulation of thermal exchange with no alongshore forcing contains a cooling response consisting of a midday flow in the form of a downslope current with a compensating onshore near-surface flow driving cross-shore exchange, followed by an afternoon warming response flow via an offshore-directed surface warm front, with a compensating return flow at the bottom. Nighttime convective cooling enhances vertical mixing and decelerates the warming response, and the diurnal cycle is renewed. In this base-case scenario, representative of tropical reef environments with optically clear water and weak alongshore flow, surface heating and cooling can drive cross-shore circulation with O(1) cm s-1 velocities. Alongshore flow forcing is implemented to induce upwelling- and downwelling-favorable cross-shore circulation. For mild alongshore forcing, the baroclinic cross-shore exchange flow is enhanced due to an increase in the horizontal temperature gradient. Stronger alongshore flow leads to diminished thermally-driven exchange, ultimately reaching a regime where the cross-shore exchange is due predominantly to Ekman dynamics. Though exchange velocities are relatively small (O(1) cm s-1), these persistent exchange flows are capable of flushing the nearshore region multiple times per day, with important implications for water properties of nearshore ecosystems.


We use the Regional Ocean Modeling System (ROMS), a terrain-following, free-surface model that solves finite differences of the Reynolds Averaged Navier Stokes equations using hydrostatic and Boussinesq approximations (Haidvogel et al., 2008; Shchepetkin & McWilliams, 2005).

The model grid ("") is an alongshore uniform wedge, of 10 m lateral (Δx, Δy) resolution, extending 1,000 m in the alongshore and 5,000 m in the cross-shore. The grid has 30 vertical S-coordinate layers with control parameters (Song & Haidvogel, 1994) chosen for sufficient resolution near the surface and bottom. Horizontal viscosity and diffusivity coefficients are set to dampen noise occurring on a time scale of 120 s, with a horizontal Prandtl number of 7 following Marques and Özgökmen (2014). The bottom slope, β, and minimum depth are 3% and 1 m, respectively, resulting in a maximum domain depth of 151 m. At the onshore and alongshore boundaries, all prognostic fields are set to closed and periodic boundary conditions, respectively.

At the offshore boundary, the free surface and barotropic momentum boundary conditions are set to those of Chapman (1985) and Mason et al. (2010), respectively, to allow signals moving at the shallow water speed to radiate out normal to the boundary; the offshore 3D momentum and tracer (temperature and salinity) boundaries are set to the radiation condition of Orlanski (1976).

Finally, the offshore mixing turbulent kinetic energy field has a gradient boundary condition. To attenuate numerical noise associated with open (offshore) boundary conditions, a sponge layer that linearly increases the horizontal viscosity and diffusivities by a factor of 10 is inserted in the offshore 500 m of the domain. We implement a modification of the two-equation k − ϵ (Rodi, 1987) version of the Generic Length Scale (Umlauf & Burchard, 2003; Warner et al., 2005) parameterization, in which the minimum turbulent kinetic energy value is 1E−12 m 2 s −2, and we use the multidimensional positive-definite advection transport algorithm (MPDATA). The domain is initially quiescent, with uniform temperature and salinity fields of 24°C and 35 psu, respectively.

All model runs have a baroclinic time step of 2 s, with 35 barotropic time steps in between each baroclinic time step, and are run for a 28 day simulation. The thermal forcing common to all runs is an idealized analytical expression representing surface heat fluxes for a periodic diurnal cycle of heating and cooling, with periods and amplitudes of both phases informed by meteorological observations (see Section 2.3 of the publication). The baseline scenario, BA, is forced only by the diurnally periodic surface heat flux forcing, and additional simulations were forced with the same surface heat flux as that in BA, as well as with steady alongshore currents of varying magnitudes (see Table 1 of the publication). Within ROMS, the steady alongshore forcing was implemented by applying an alongshore-directed kinematic momentum flux with a magnitude scaled by the local depth; this is equivalent to a cross-shore uniform alongshore pressure gradient. The kinematic momentum flux was then applied as a bodyforce throughout the water column by activating the ROMS “BODYFORCE” C-preprocessor directive to distribute the stress vertically. At the 20 m isobath, this alongshore forcing is equivalent to an alongshore pressure gradient ranging from 9.9E−6 m s −2 for the weakest alongshore forcing to 9.0E−4 m s −2 for the strongest alongshore forcing.

Simulations are identified by the ratio of u*/uf at the 20 m isobath in Table 1, where the value of u* is computed within the model using a logarithmic drag formulation with a uniform hydrodynamic roughness (i.e., “z0”) set to 2 cm. A final group of simulations was run with the same range of alongshore forcing, but with zero buoyancy flux to isolate cross-shore exchange driven solely by the Coriolis contribution to the cross-shore momentum budget. These simulations achieved equilibrium flow more quickly than the simulations with diurnal heating and cooling, so were run for only 10 days, and are identified with the prefix “N” in Table 1.

Model output was analyzed using MATLAB ( Analysis is performed on the final 14 days of simulated output and all variables are averaged in the alongshore direction, from which a diurnal phase-averaged canonical day is computed.

Usage notes

The files within "" contain the code to be used with the Regional Ocean Modeling System (Haidvogel et al., 2008; Shchepetkin & McWilliams, 2005).

The file "" is the model grid domain. It is a NetCDF file that can be viewed with MATLAB, or alternatively, the freely available NCview from David W. Pierce (


National Science Foundation, Award: 1436254

National Science Foundation, Award: 1436522