Matlab processing scripts to analyse monitoring data from the Hurunui Hapua.
Hapua are non-estuarine river mouth lagoons which form at the mouths of steep gravel bed rivers on high wave energy micro-meso tidal coastlines. Hapua have elongated shore-parallel lagoons seperated from the sea by a mixed sand and gravel beach barrier. A highly dynamic outlet channel flows through the beach barrier to the sea. Their outlet channels change rapidly in response to river flows, waves and, to a lesser extent, tides. Outlet processes include migration along the barrier, changes in length and orientation, closure, and barrier breach to form a new oulet. As part of a project to better understand hapua responses to changing drivers (e.g. changed river flow regimes due to water extraction) intensive monitoring of the Hurunui Hapua is being conducted. Analysis of this data is required in order to understand the links between observed drivers and lagoon responses, and to generate a robust calibration/validation data set for planned modelling of hapua processes.
The Hurunui River drains a catchment of 2669 km2, from the main divide of the Southern Alps to the East Coast of the South Island, New Zealand. Where it emerges onto the coastline there is a 1.5 km long shore parallel lagoon (hapua).
Data used in this analysis of the Hurunui Hapua includes:
- Timelapse cameras: Two timelapse cameras are mounted on an 8 m utility pole in the centre of the lagoon backshore. One camera points towards the north-east end of the lagoon and one towards the south-west. The cameras record colour images every 15 minutes during daylight hours.
- Water level recorder: A telemetered lagoon water level recorder is sited in the center of the lagoon directly below the cameras. The QA'd water level data is stored in NIWA's Aquarius hydrometric database and can be accessed using web services.
- River flow gauge: Environment Canterbury maintain a flow recorder 20km upstream from the coast at the SH1 bridge over the the Hurunui River (Station 65101). The data is available for download at https://www.ecan.govt.nz/data/riverflow/sitedetails/65101.
- Wave buoy: A wave buoy 100 kms to the south of the hapua monitors the deep water wave climate. It is maintained by NIWA and partially funded by Environment Canterbury. Real time data is visible at https://www.ecan.govt.nz/data/current-wave-data/.
- Wave hindcast: Data from hindcast wave modelling carried out by Richard Gorman and described in Hicks et al. (2018) was used to provide wave data at the open coast outside the river mouth.
- Sea level: Sea level monitoring is conducted by NIWA at Sumner (Station 66699). Real time data is visible at https://www.niwa.co.nz/our-science/coasts/tools-and-resources/sea-levels/sumner-head.
The most important analysis scripts are:
Script | Purpose |
---|---|
OrganiseImages | For adding/organising photos into a logical sub-directory structure for storage/management. This script is run to process downloaded images after bringing them back to the office. |
ImageAnalysis | Main image processing workflow |
TimeseriesAnalysis | Main timeseries processing workflow |
MapOutletChannel | Semi-manual identification of outlet channel position |
OutputPlots | Production of results figures for publication etc. |
These scripts rely on functions and static data/inputs contained with the functions/ and inputs/ folders. The test_scripts/ folder contains scripts used to test/develop other functions.
HurunuiDataProcessing uses export_fig for exporting publication quality figures. Export_fig is included as a submodule in the HurunuiDataAnalysis respoitory (in functions/externals). To export PDF format figures export_fig requires Ghostscript be installed, a free download available from http://www.ghostscript.com/. To export EPS format figures export_fig requires pdftops.exe, part of the Xpdf tools available freely from http://www.xpdfreader.com.
To convert from conductivity to salinity HurunuiDataProcessing uses the Gibbs SeaWater (GSW) Oceanographic Toolbox of TEOS-10. The matlab toolbox of these functions, GSW-Matlab, is avalable on GitHub (https://github.com/TEOS-10/GSW-Matlab) and is included as a submodule in the HurunuiDataAnalysis respoitory (in functions/externals).
t-tide (Pawlowicz et al. 2002) is used for tidal analysis. This is a free set of tools available for download (https://www.eoas.ubc.ca/~rich/#T_Tide) and a copy is included in the HururnuiDataAnalysis repository (functions/t_tide_v1.3beta)
OpenEarthTools contains many useful matlab functions. More information about the OpenEarth initiative is available at https://publicwiki.deltares.nl/display/OET. Only a small sub-set of the many available matlab functions have been used in HurunuiDataAnalysis. These have been copied into the repository at functions/OpenEarthTools.
The ts_package functions for producing stacked timeseries plots are available on Matlab File Exchange: https://mathworks.com/matlabcentral/fileexchange/60990-stacked-time-series-plots. These functions have been copied into the HurunuiDataAnalaysis repository (functions/ts_package) and have been modified to allow customisation to plot formats.
The wind_rose function for producing wind rose plots is available on Matlab File Exchange: http://au.mathworks.com/matlabcentral/fileexchange/17748-wind-rose. The function has been copied into the HurunuiDataAnalysis repository (functions/wind_rose) and slightly modified.
NIWA has funded this research through the Sustainable water Allocation Programme.
This code has been developed as part of Richard Measures' part time PhD research in the Hydrological and Ecological Engineering research group at the University of Canterbury Department of Civil and Natural Resources Engineering. Richard's PhD supervisors are Tom Cochrane, Deirdre Hart and Murray Hicks.
Hicks, D.M., Gorman, R.M., Measures, R.J., Walsh, J.M., Bosserelle, C., 2018. Coastal sand budget for Southern Pegasus Bay: Stage A, NIWA Client Report 2018062CH for Christchurch City Council.
Pawlowicz, R., Beardsley, B., Lentz, S., 2002. Classical tidal harmonic analysis including error estimates in MATLAB using T_TIDE. Comput. Geosci. 28, 929–937. doi:10.1016/S0098-3004(02)00013-4. http://www.sciencedirect.com/science/article/pii/S0098300402000134