Open Wave Height Logger: An open source pressure sensor data logger for wave measurement

Wave‐generated flows, associated hydrodynamic forces, and disturbances created by them play critical roles in determining the structure and health of near‐shore coastal ecosystems. Oscillatory motions produced by waves increase delivery of nutrients and food to benthic organisms, and can enhance vertical mixing to facilitate delivery of larvae and spores to the seafloor. At the same time, wave disturbances can remove individuals and biomass with far‐reaching effects on critical coastal ecosystems and the biodiversity within them. Commercial instruments designed to measure wave characteristics and the effects of wave energy can be expensive to purchase and deploy, limiting their use in large quantities or in areas where they may be lost. We have developed an inexpensive open‐source pressure transducer data logger based on an Arduino microcontroller that can be used to characterize wave conditions for deployments lasting multiple months. Our design criteria centered around simplicity, longevity, low cost, and ease of use for researchers. Housed in ubiquitous polyvinylchloride (PVC) plumbing and constructed primarily with readily available materials, the Open Wave Height Logger (OWHL) can be fabricated in a college setting with basic shop tools. The OWHL performs comparably to commercial pressure‐based wave height data loggers during tests in the field, creating the opportunity to expand the use of these sensors for applications where sufficient spatial replication or risk of instrument loss would otherwise be cost prohibitive.

Water motion induced by wind-generated waves and ocean swell can be an important structuring agent of benthic and intertidal zone ecosystems (Koehl 1984;Denny 1988). The interaction of swells with coastal topography, and in some cases biogenic structures such as kelp forests and coral reefs, can induce breaking waves, high velocity water flows, erosion, and drag on these structures (Denny 2016). Wave-induced flows can benefit biological communities through the delivery of nutrients, food, gametes, or new recruits (Koehl and Alberte 1988;Koehl 1999;Denny and Roberson 2002;Gaylord et al. 2006;Gaylord 2008;Reidenbach et al. 2009;Morgan et al. 2016;Morgan et al. 2017). Rapid water velocities can also cause disturbances that reshape biological communities through damage or removal of organisms from the habitat (Woodley et al. 1981;Seymour et al. 1989;Madin and Connolly 2006;Byrnes et al. 2011). The impacts of high water velocities on biological communities may be direct, via scouring or burial (Dayton et al. 1984;Duggins et al. 1990;Konar and Iken 2005), battering and impact by projectiles (Shanks and Wright 1986;Taylor 2016), or drag-induced damage and dislodgement (Dayton et al. 1984;Denny et al. 1985), but indirect impacts of water velocity can also stem from effects on the strength of species interactions (Menge and Sutherland 1976).
Ocean observing systems, such as wave-measuring buoys and weather satellites, can be combined to give a large-scale view of ocean swell across the globe, and numerical models can give forecasts and hindcasts of swell and sea (local windwave) height down to relatively small spatial scales of approximately 100 m in regions of the coast where high resolution models have been implemented (Rogers et al. 2007;Settelmaier et al. 2011;van der Westhuysen et al. 2013). Difficulties in forecasting and hindcasting swell heights or wave heights often arise at smaller spatial scales in coastal areas with complex topography such as offshore islands, reefs, and bays or fjords that can block, refract, or attenuate the wave energy that ultimately impinges on a particular portion of the benthos or shoreline (O'Reilly et al. 2016). In locations characterized by strong currents, interactions between waves and currents may also complicate prediction. These difficulties arise in large part from a lack of empirical data that could help parameterize swell model behavior in these more difficult cases.
Drawing connections between wave action and biological community structure or function relies on adequate measures (or models) of the wave heights or water velocities in those habitats. Qualitative judgments of wave exposure are typically too crude to provide adequate predictive power for ecological models . Offshore buoy observations are often freely available, and give good representation of offshore swell height and direction, but they often do not accurately reflect wave conditions at smaller spatial scales in topographically complex littoral zones. The relevant spatial scale of measurement also depends in large part on the organism or community being studied. Indeed, as water velocities have been measured at smaller and smaller spatial scales, there continues to be high observed variability in maximum water velocities driven by waves interacting with increasingly diminutive topographic features (Denny et al. , 2004Helmuth and Denny 2003;O'Donnell 2008;O'Donnell and Denny 2008).
Empirical measurements of wave height and period at the field site of interest are often the most desirable product, but measurements typically require expensive equipment. Moored surface buoys (Waverider™, Datawell BV, Haarlem, The Netherlands) can cost multiple tens of thousands of dollars. Pressure-transducer data loggers, which measure the fluctuating height of the ocean surface while mounted near the seafloor, offer a more affordable solution for estimating surface wave conditions, although commercial units may cost several thousand dollars. For the biologist or oceanographer desiring to measure wave heights at small spatial scales, or in difficult settings where the risk of instrument loss is high, lower-cost solutions can provide an attractive alternative. It is possible to build a low-cost surface buoy that uses an accelerometer to judge vertical movements of the buoyant device and convert these data to estimates of swell height and period, similar to the function of a Waverider buoy (Yurovsky and Dulov 2017). Surface buoys can present problems in vessel navigation lanes or where visibility of the device is undesirable (Lee and Wang 1984). We present another solution, the Open Wave Height Logger (OWHL), which is based on an open-source hardware and software pressure sensor data logger system that allows researchers to build and deploy long-duration, continuous-sampling bottom-mounted wave height sensors that cost about US $100 to $200 each in 2020. The OWHL opens up the possibility for researchers to gather in situ wave data at their field sites rather than relying on remote swell sensors or numerical models that might not accurately reflect conditions at unique microsites. Direct measurements acquired at the sites of interest will improve the ability to link physical processes driven by wave action to biological function and community structure. The OWHL joins a growing suite of do-it-yourself wave height and water velocity sensors (Evans and Abdo 2010;Figurski et al. 2011;Yurovsky and Dulov 2017;Beddows and Mallon 2018) being used to characterize conditions in situ at field sites for much lower costs than have traditionally been available from commercial manufacturers.
The Open Wave Height Logger enables collection of data over durations of months to more than a year, during which it continuously records pressure, to be converted to sea surface elevation, from a submerged position on a rigid mounting or on the seafloor. By sampling pressure four times per second, the profile of waves passing overhead can be quantified, and for these "raw" pressure data, corrections for signal attenuation can be applied (Lee and Wang 1984;Bishop and Donelan 1987;Demirbilek and Vincent 2008), and statistical summaries of sea state can be calculated. In creating an open source hardware and software system, the system becomes extensible and adaptable by other researchers to their own research needs, including integration with other sensor types (for example, temperature, light, dissolved oxygen). The key component of the OWHL is an Arduino-based microcontroller system that can be programmed and modified using the opensource Arduino software development environment (https:// arduino.cc), which has a broad user base that can be leveraged for more sophisticated applications.

Materials overview
A complete listing of electronic parts and hardware designs is provided in the electronic archive associated with the OWHL project (https://doi.org/10.5281/zenodo.3477584), and housing parts and assembly steps are detailed in Data S1 and at http://owhl.org. The OWHL uses a Measurement Specialties MS5803-14BA chip (TE Connectivity Measurement Specialties, Schaffhausen, Switzerland) to detect pressure. The sensor is small (< 6 mm in diameter), has low power usage (1 μA in use and standby <0.15 μA), exhibits high resolution (20 Pa, equivalent to approximately 0.2 cm of seawater depth) and possesses a maximum depth rating of 130 m. It also measures temperature in order to allow pressure readings to be corrected as sensor temperature changes.
Because the OWHL is designed for multiple-month deployments, a real time clock with temperature-compensated crystal oscillator (DS3231S, Maxim Integrated, San Jose, California) provides long-term accuracy (± 2 ppm) for time stamps associated with each pressure reading. A microcontroller (ATmega 328P, Microchip Technology, Chandler, Arizona) controls the OWHL, taking readings from the pressure sensor, calculating temperature-corrected pressure, and writing the pressure data and time stamps into a comma separated value (.CSV) file stored on an onboard microSD card. CSV files are a standard spreadsheet format, allowing the data to be read into software programs such as R or Excel for processing. The pressure data are written to a daily CSV file so as to prevent corruption of any single data set. Pressure readings are collected at a rate of 4 Hz continuously for the duration of the deployment.

Electronics details
The OWHL electronics are mounted on three small custom fabricated printed circuit boards which are interconnected via standard header pins. The schematic and physical layout files for these boards are provided in the open-source repository for the OWHL project, and can be uploaded directly to companies that manufacture small batches of circuit boards for a cost of approximately $30 or less (see Data S1 for vendor options). The first board holds the MS5803 pressure sensor. This board is sealed to a custom PVC puck (details below) using marinerated adhesive (5200 Marine Adhesive, 3M). The sensor chip is not rated for continuous use in salt water, so the sensor's environmentally exposed face is protected by a small oil-filled reservoir. It is this oil reservoir that translates the ambient water pressure to the MS5803 and allows for continuous, long-term salt water exposure. This configuration also minimizes the chances of fouling organisms interfering with the pressure reading by preventing the small pressure port of the MS5803 from being occluded.
The second PCB board holds the ATmega 328P microcontroller and real time clock (RTC). The ATmega 328P is a low power 8-bit microcontroller with 32Kb of flash memory allowing for complex instruction sets to be stored internally. The DS3231S RTC is an accurate and stable reference clock with internal temperature compensation to counteract timing drift. This chip provides the time stamp with date for each data point.
The third board holds the power control circuitry and microSD card. This board has a standard micro JST PH-series connector used to connect a battery pack. The board converts the battery pack's higher voltage to the 3.0 V needed by the system components. Obtaining quality microSD cards from reputable manufacturers is paramount to the long endurance of the OWHL. We discuss methods for evaluating microSD card efficiency in the Supplemental Information. The quality of the microSD card can impact performance in two ways. First, microSD cards vary substantially in their power consumption, and so high-quality name brand cards are generally recommended. Less power-efficient cards can drain batteries much faster than efficient cards. Second, microSD cards may occasionally experience prolonged interruptions, up to 1 s, that can cause data to be missed. In the OWHL, these interruptions manifest as 1 s gaps in the data file that may occur a few times per hour. Because 1 s of missing data is relatively short compared to the period of surface gravity waves in the wind-chop to swell band (4-25 s), we fill in missing 1 s gaps using linear interpolation during data post-processing conducted on a computer.

Procedures
To accomplish our goal of providing a low cost and simple instrument, we designed waterproof housings using primarily PVC plumbing fittings. Complete housing assembly instructions and parts lists are provided in Data S1. The OWHL electronics boards are designed to fit within a 3.8 cm internal diameter PVC pipe (nominal "1.5 in." schedule 40 PVC pipe). A threaded union fitting in the middle of the housing provides a way to repeatedly open and close the housing without damaging threads. Although plumbing fittings are meant to be watertight, we typically coat the outside of any assembled threaded joints (e.g., the barbed fitting and union fitting) with polyurethane glue (Goop glue, Eclectic Products, Eugene, Oregon) as an additional barrier against leaks.
The housing must provide a port through a bulkhead to expose the pressure sensor to outside water pressure. The small aperture of the MS5803 sensor would likely become easily occluded by fouling organisms such as a hard-shelled barnacle, so we recommend a design that isolates the pressure sensor port from direct seawater contact, using an oil-filled bladder as an intermediate connection between the outside seawater and the surface of the pressure sensor. Using a 5.08 cm (2 in.) diameter holesaw, we cut a circular piece from 1.9 cm thick PVC flat plate to serve as the bulkhead. A barbed fitting threaded into the bulkhead of the housing allows attachment of tubing that can be attached to a bladder. We construct small bladders out of used intravenous fluid bags, cut down and re-sealed with a heat sealer. The bladder is filled with nonelectrically-conductive mineral oil, and we purge air bubbles from the bladder, hose, and barbed fitting when assembling the pieces. When assembled, the bladder should not be stretched taught, as keeping it relaxed ensures that no additional pressure is exerted on the pressure sensor by the elastic walls of a fully-filled bladder. The baseline pressure reported by an assembled OWHL at the ocean surface should be equivalent to the atmospheric pressure at that location, nominally 101,325 Pa (reported as 1013.25 mbar in the OWHL software, ± 20 mbar depending on the accuracy of the factory-calibrated sensor) at sea level, depending on local weather. If there is a measurable offset in recorded sea level pressure at the start of a deployment due to either factory variation of the pressure sensor or residual pressure in the oil reservoir system, this offset can be removed during post-processing using sea level pressure data from a nearby weather station.

Programming
The microcontroller for the OWHL is programmed using the Arduino (https://arduino.cc) open source software toolchain and development environment. By using the Arduino software, setting up a programming environment on Linux, Mac, or Windows computers is easily accomplished. We provide the relevant programs (firmware) needed to initialize a newly built OWHL, set the onboard clock, and run the main data collection program (https://github.com/millerlp/OWHL, https://doi.org/ 10.5281/zenodo.3477584).
Newly-assembled OWHL units must first have the microcontroller initialized with a bootloader program that allows subsequent uploading of different firmware programs. The Arduino software provides a mechanism to burn the bootloader onto the chip using one of several available In-System Programmers (see Data S1). After burning a bootloader onto the microcontroller, a standard USB-to-serial converter chip (FTDI FT232RL) is hooked to the 6-pin serial communications header on the circuit board. The Arduino software can then be used to upload new firmware to the OWHL, and allows monitoring of the output from the sensor via a serial monitor program for testing purposes. Initially the real time clock needs to be programmed using the provided program in our software repository for the real time clock (settime_Serial.ino, https://doi.org/10. 5281/zenodo.3468452). Once the real time clock is set, the main data logging program (OWHL.ino, https://doi.org/10. 5281/zenodo.3477584) can be uploaded to the OWHL's microcontroller to begin the data collection process.
The main data collection program automatically initiates data recording at a rate of 4 Hz and continues to collect data until power is disconnected. Raw data from the pressure transducer are converted to units of millibar via the manufacturer's algorithm implemented in the microcontroller's software using a software library written for the MS5803-14BA sensor (https://doi.org/10.5281/zenodo.3451526), using the pressure transducer's onboard temperature sensor to implement a temperature correction. These temperature values are recorded in the same data file as the pressure values.

Post-processing
Detailed instructions for processing the raw CSV data files into summary wave statistics are given in a tutorial provided with the owhlR package if the user chooses to use R for postprocessing. The installation instructions for the owhlR and oceanwaves R packages can be found in the Supplemental Information, along with instructions for launching the tutorial vignette. Raw data files from the microSD card arrive as separate CSV files for each day, each about 16 MB in size. These files are concatenated into a single time series, and any 1 s gaps in the data (due to microSD write delays) are linearly interpolated using the function joinOWHLfiles in the R package owhlR (http://doi.org/10.5281/zenodo.3677559). The atmospheric pressure above the deployment site will affect the pressure readings registered by the OWHL, which ultimately affects the estimate of sea surface elevation, so it is desirable to obtain sea level air pressure data from a local weather station to correct for any residual pressure offset that might be present in the OWHL and to account for fluctuating high and low pressure weather systems moving over the area. With the sea level pressure offset reading obtained from a local weather station, known water depth, and sensor height above the seafloor (all of which are required to reconstitute surface elevations from the raw data), we process the raw pressure data into corresponding sea surface elevations, using algorithms in the R packages oceanwaves (Miller and Neumeier 2019) and oce (Kelley and Richards 2019).
Because the pressure signal created by dynamic changes in surface elevation due to waves is attenuated with increasing depth (a primary drawback of bottom-mounted pressure sensors, as compared to surface buoys, Bishop and Donelan 1987;Driver 1980;Lee and Wang 1984), a pressure attenuation correction must be applied to the pressure signal based on water depth and height of the sensor above the seafloor, using the prCorr function provided in the oceanwaves package. This correction term varies with the period of each wave component that is contributing to the overall sea surface elevation time series at the measurement location, and so is not a simple constant (see, e.g., Denny 1988; Gaylord and Denny 1997;Gaylord et al. 2003). We caution that the 4 Hz sampling rate of the OWHL and frequency-based pressure attenuation correction approach set a practical limit on the accurate characterization of highfrequency waves with periods shorter than approximately 3 s, such as those generated by boat wakes or wind waves in smallfetch bodies of water. For situations where the primary focus is on measuring high frequency waves, the OWHL code could be modified to sample at a rate faster than 4 Hz, and a shallow mounting depth would minimize, but not necessarily eliminate, the correction needed, but ultimately other wave sensing methods may be more appropriate in these settings.
Converting sea surface elevation time series into summary statistics can be accomplished using spectral analysis to determine spectrally significant wave height, H m0 , and the peak wave period, T p (Demirbilek and Vincent 2008). Alternatively, a zerocrossing algorithm that identifies individual waves (also known as wave-by-wave or wave-train analysis) can be used to estimate the statistically significant wave height, H 1/3 , and T sig , the mean period of the largest 1/3 of wave heights (Demirbilek and Vincent 2008). The two quantities H m0 and H 1/3 are often very close in value, and are meant to approximate what a trained observer would consider to be the wave height. The oceanwaves package provides methods for both the spectral analysis and zero-crossing approaches, and in the results discussed below we focus primarily on the spectrally significant wave height and period because these mirror the metrics typically reported by other wave observing systems. Because R holds datasets in the computer's RAM during processing, very long time series (multiple months) may require partitioning into smaller time intervals (i.e., monthly) in order to fit in a particular computer's memory space. One month of continuous 4 Hz pressure data and estimated surface elevations occupies approximately 1 GB of RAM during processing. We were able to process 39 d of CSV files from the OWHL through to 30 min interval summary wave statistics in less than 9 min on an older Windows PC (Intel i7-3700 CPU with 32 GB RAM). If needed, the csv files produced by the OWHL should be easily imported into other programs that could handle large data sets more efficiently.

Sensor calibration
We initially evaluated the accuracy of the OWHL pressure readings by mounting the device in the bottom of a 6.5 m tall vertical water pipe. The pipe was filled to known heights with water, which produced an expected pressure reading that we compared with the output of the OWHL. A similar calibration process could be accomplished by lowering an OWHL into a swimming pool to precisely known depths.
Pressure data from the MS5803-14BA pressure sensor were within factory specifications, and corresponded well during calibration based on the physical weight of water (see Calibration section in Data S1). The pressure sensor in the OWHL is set to report values with a resolution of 60 Pa by default, equivalent to approximately 0.5-1 cm of seawater depth depending on density. The MS5803-14BA pressure sensors are factory calibrated, and the impact of small variations on sensor-to-sensor accuracy, on the order of 100-300 Pa, should be relatively minor, given that the statistical summary values generated to describe sea state are based on fluctuations in surface elevation around a slowly-shifting mean that do not necessarily require sub-centimeter estimates of surface height. In applications where the goal would be to use the OWHL to precisely measure water surface elevation relative to a known benchmark, individual calibration of the OWHL would be desirable, as well as using the available higher resolution sampling mode (20 Pa resolution, equivalent to approximately 0.2 cm of seawater depth).

Long-term stability
The MS5803-14BA pressure sensor in the OWHL is specified to drift less than 2000 Pa yr −1 . We assessed drift empirically by running a set of three OWHL units (A, B, and C) for 297 to 488 d in the laboratory, measuring air pressure. Nearby airport weather station pressure sensors that were part of the US National Oceanic and Atmospheric Administration's Automated Surface Observing System (ASOS) located in Monterey CA (station KMRY) and San Jose CA (station KSJC) were used as long-term stable references. ASOS pressure sensors report the average pressure from six 10 s intervals sampled during a minute. For 1 d in each month of the long-term pressure records, we extracted and averaged pressure readings from OWHL units for the minute corresponding to each available hourly ASOS pressure data point on that day, typically yielding 20-22 pressure records through a day. The average pressure offset for the day of each OWHL unit from its reference ASOS station in each monthly sample was used to evaluate drift in the pressure sensor by fitting a linear regression model to the pressure offset values against elapsed time to estimate the pressure drift in Pa yr −1 .
Two OWHL units were compared to the local Monterey airport ASOS pressure record for 297 d, and over that time exhibited a rate of drift in the pressure sensor of 47 ± 22 Pa yr −1 (mean slope ± 1SE) for unit A and − 140 ± 18 Pa yr −1 for unit B. OWHL unit A was also run in San Jose for 238 d, and showed a drift of 58 ± 32 Pa yr −1 during that time, while OWHL unit C ran in San Jose for 488 d and drifted at a rate of 125 ± 16 Pa yr −1 . Test durations for pressure sensor stability and battery life (discussed below) differed due to the corresponding author's change of institutions during the development process.

Battery life
Battery life was assessed using OWHL units housed in the laboratory, running the same data collection program used for field data collection. One unit was housed in a laboratory −20 C freezer and one was kept at room temperature at approximately 25 C. Both units were powered by sets of three "D" cell alkaline batteries in series. An additional OWHL unit, held at room temperature, was powered with three "AA" size alkaline batteries. All battery packs started at an initial voltage of 4.8 V, and the units ran continuously until the battery voltage reached a lower limit of approximately 3.1 V, at which point the voltage regulator of the OWHL would shut down and data collection ceased.
OWHL units powered by three D-cell alkaline batteries ran continuously for 450 d at −20 C and 492 d at room temperature. A set of three AA-sized alkaline batteries powered the OWHL for approximately 120 d at room temperature. Battery life will vary depending on temperature, battery self-discharge rates, and micro SD card power efficiency (see Data S1 for a discussion of assessing micro SD card power efficiency).

Field deployments and comparisons to commercial sensor
An assembled OWHL should be attached to an immovable object on the ocean bottom or in the water column. Because the instrument is meant to measure a moving sea surface, the instrument itself must be stationary as waves move over it. We have used a variety of methods, including fixing the OWHL to an existing mooring weight, strapping it to other stationary deployed instruments, to sand anchors, or using concrete pier blocks as a platform for attachment. Once the OWHL is mounted, the height of the OWHL above the local seafloor must be measured (± 10 cm is sufficient accuracy), as this height difference affects the estimation of surface wave characteristics (Van Rijn et al. 2000).
A test deployment of the OWHL was carried out at Marguerite Reef (33.75712 , −118.41842 ) near the Palos Verdes peninsula in southern California from 18 August 2016 through 9 September 2016. At Marguerite Reef, the OWHL was attached to the seabed using a hose clamp to attach the unit to a stainless steel eye bolt that was drilled and epoxied (A788 Splash Zone Epoxy, Pettit, Rockaway, New Jersey) into the bedrock, at a depth of 9 m, and located 1 m horizontally away from a SBE-26 Seagauge Wave & Tide Recorder (Sea-Bird Scientific, Bellevue, Washington). This placement allowed data from the OWHL to be directly compared to that from the SBE-26. The OWHL sat 30 cm above the seafloor for the deployment at Marguerite Reef.
The daily raw data files produced by the OWHL were concatenated into continuous time series of 40 d duration for the Marguerite Reef. A baseline sea level pressure reading was obtained from the OWHL immediately prior the deployment, and this pressure value was compared to the nearest weather station (KLGB -Long Beach Airport) to assess any offset in the pressure reading that required correction (Van Rijn et al. 2000).
Both the OWHL and Sea-Bird SBE-26 deployed at Marguerite Reef provided raw time series of absolute pressure that were converted to sea surface elevation and statistical summaries using the same algorithm from the oceanwaves package. Using sea level air pressure data from KLGB, linearly interpolated from original 5 min intervals to 4 Hz, we subtracted off air pressure from the sensors' absolute pressure values to produce pressure estimates due only to the water column, which could then be processed into sea surface elevation estimates. Because the SBE-26 was restricted to short bursts of 4096 samples at 4 Hz (1024 s duration, equal to 17 min 4 s) every 4 h, we subset the continuous OWHL record to include time series that aligned in time with the SBE-26 data (Fig. 1). Estimates of significant wave height H m0 and peak period T p were calculated for each 17 min sampling period. Wave heights and periods derived from the two co-situated pressure sensors were highly correlated (Pearson's r > 0.99, p < 0.0001 in all cases, Table 1).
We compared the spectrally significant wave height H m0 and peak period T p estimates generated from OWHL data from Marguerite Reef to two nearby Datawell Waverider MkIII surface buoys maintained by the Scripps Institution of Oceanography Coastal Data Information Program (CDIP, https://cdip. ucsd.edu/). These buoys measure surface wave motion and swell direction using accelerometers, and are specified to measure wave heights for wave periods of 1.6-30 s with an accuracy of 3%. We retrieved data for buoys that were located offshore of Santa Monica (CDIP buoy 028) and San Pedro (CDIP buoy 092), which were 22.09 km NW and 17.6 km SE, respectively, of Marguerite Reef. The CDIP buoys sampled in bursts of 1600 s duration, and we used matching 1600 s window lengths for the OWHL data to calculate wave statistics used in the comparison with the CDIP buoys.  Comparisons of the bottom-mounted OWHL unit at Marguerite Reef against CDIP surface Waverider buoys showed generally strong correspondence depending on the distance between the sensors, and ocean swell conditions (Fig. 2). The nearest CDIP buoys were located many kilometers away from the OWHL deployment location and further offshore, and so significant wave heights reported by the two surface buoys were generally larger than the OWHL estimates (Fig. 2C). Similarly, there were intervals of time where the peak swell period switched between short-period wind waves and long-period ground swell at different times in the records of the OWHL and two surface buoys. This difference could be driven by differences in swell direction and local bathymetric features interacting with the swell, but could also be due in part to the different sensor types.
A second 21 d test deployment was run at Cabrillo Point (36.6263 , −121.9071 ) in Pacific Grove, CA from 11 February 2019 to 4 March 2019. At Cabrillo Point, the OWHL was attached to two sand anchors at a depth of 18 m, and was positioned 70 cm above the seafloor. This location was chosen so that the OWHL sat beneath a surface Waverider MkIII buoy (CDIP buoy 158), which allowed us to use the surface buoy as a direct reference for comparison of the wave data from the bottom-mounted OWHL pressure sensor. During postprocessing, sea level air pressure data from the Monterey airport (KMRY) were used for the initial sea level pressure correction and air pressure compensation throughout the deployment. The OWHL data were subset into 1600 s intervals aligned with the reported sample start times for the CDIP buoy.
At Cabrillo Point, where the surface buoy and OWHL were co-located in horizontal space, there was good correspondence between significant wave height and peak period for the two records, although the bottom-mounted OWHL tended to overestimate or underestimate significant wave height H m0 at some points in the record (Fig. 3C,D). The correlation between the Cabrillo Point OWHL and CDIP 158 for significant wave height was r = 0.985 (p < 0.001), and the correlation for peak wave period was r = 0.736 (p < 0.001).

Discussion
The Open Wave Height Logger provides researchers with a low-cost, long-duration, and extensible tool for recording wave heights in the nearshore environment. The combination of open-source hardware and software permits users to adapt and modify the basic design as needed. Field comparisons indicate that the OWHL is capable of recording pressure fluctuations with the same resolution as a more expensive commercial pressure data logger (Sea-Bird SBE-26), but continuously, for longer durations, and at a fraction of the cost. Because deviations between distant Waverider buoys and the OWHL at Marguerite Reef were duplicated in the record acquired with the commercial wave height recorder deployed alongside the OWHL, we argue that local wave conditions are better quantified using an instrument placed directly at the site of interest rather than relying on a distant buoy.
The primary barriers to the assembly and use of the OWHL are likely to be the need for the user to solder the circuit boards and construct the housings, although these steps should be possible using the resources of moderately equipped undergraduate electronics teaching laboratory and machine shop facilities. We provide detailed instructions, illustrations, and video resources to aid in the assembly of an OWHL (see Data S1 and online repository).
The field deployments of OWHLs illustrate the utility of having in situ wave sensors available rather than relying solely on offshore wave buoys or shore stations, but also show the limitation of using a bottom-mounted pressure transducer to estimate surface wave heights in some situations. The correspondence between the wave records derived from the co-located OWHL and CDIP surface buoy 158 at Cabrillo Point was generally good, but the deep mounting depth of the OWHL may have contributed to the observed discrepancies in estimated significant wave height at some time points during the deployment. Deeper deployments increase the degree of attenuation of the dynamic pressure signal created by waves passing overhead, particularly for short-period waves (Driver 1980). For deep deployments, such as the 18 m depth at our Cabrillo Point site, there is an increased reliance on pressure attenuation corrections that may not always successfully reconstruct the surface elevation fluctuations that can be directly measured with a surface buoy, particularly for high frequency waves. This limitation will then impact the derived estimates of significant wave height and period. The surface buoy's use of accelerometers (or real time kinetic GPS in newer models) to directly measure its own movement in response to surface waves should provide better resolution of wave conditions, particularly for high frequency waves. Despite the limitations of the bottom-mounted OWHL in deeper water, the record from the OWHL at Cabrillo Point managed to capture large and small surface waves that matched up well with the surface buoy record throughout much of the deployment.
In contrast, for the Marguerite Reef deployment, where the nearest surface buoy records were more than 15 km distant, the wave time series provided by the OWHL showed periods of good correspondence of estimated significant wave height and period with the distant buoys, interspersed with periods where the offshore surface buoys reported very different wave heights and peak wave periods. The ability to affordably collect these sorts of in situ data may be most valuable in topographically complex nearshore environments, particularly those with coastal features such as offshore islands, headlands, canyons, bays, and reefs that might reduce the wave energy impinging on a study site relative to what a distant offshore buoy might record. Regions with these complex features, like the San Pedro Channel where Marguerite Reef is located, tend to perform relatively poorly in numerical simulations used to create hindcasts of nearshore wave conditions (O'Reilly et al. 2016), and so direct measurements can provide a more accurate picture of the wave climate at a study site. Similarly, sites within or behind dense assemblages of aquatic vegetation such as mangroves, seagrass meadows, or kelp forests could have different wave conditions than what is recorded at offshore buoys, although we reiterate the limitation of using bottom-mounted pressure transducers to measure short-period waves, particularly periods less than 3 s, due to pressure attenuation effects with increasing depth that do not allow accurate reconstruction of short period surface wave profiles.
The OWHL's pressure resolution and ability to log data continuously for months could also make it useful for recording tide height fluctuations to enhance the accuracy of tide predictions in complex coastal zones that are poorly covered by existing tide monitoring stations. In freshwater systems, OWHL could monitor water depth changes in water bodies of any size, again duplicating the function of more expensive commercial water depth data loggers, with the caveat that the current post-processing routines provided in the oceanwaves and owhlR packages are best suited for typical ocean conditions, so they do not currently adjust for water density and do not provide appropriate pressure attenuation corrections for very short period waves (< 3 s). The open source design of the hardware and software of the OWHL provide an opportunity for researchers to customize and extend the capabilities of the basic design, which can ultimately improve our ability to observe and measure physical processes in complex aquatic environments.