Skip past header information
USGS - science for a changing world

U.S. Geological Survey Open-File Report 2012-1219

Carolinas Coastal Change Processes Project data report for nearshore observations at Cape Hatteras, North Carolina, February 2010


Matlab® m-files

Skip past contents information

Most of the data processing (see Data Processing page), tidal analysis (see Tidal Analysis page), and plots (see Time-Series Plots page) completed for this report were created using Matlab® software, created by Mathworks (www.mathworks.com). Plots were converted to tagged PDF format using Adobe (www.adobe.com) Acrobat.

DISCLAIMER: The Matlab® m-files provide partial documentation of the techniques used to create the plots in this report. The m-files are not turn-key programs and are not supported by their creator or by USGS.

This code was designed to run on Matlab® 2012b v8.0.0. Users are encouraged to look at http://woodshole.er.usgs.gov/staffpages/cdenham/public_html/
for more information about the NetCDF format.

M-files for time series plots (see Time-Series Plots page)

adcp_curr_ts: Creates plots of the timeseries of vectorized water flow data.

adcp_magdir_ts: Creates plots of the timeseries of water flow data magnitude and direction.

waves_ts: Creates plots of the timeseries of wave measurement data.

wind_ts: Creates plots of the timeseries of wind data from NDBC moored buoys and FRF.

ndbc_tpw_ts: Creates plots of the timeseries of temperature, pressure and wave height from NDBC moored buoys.

pressure_ts: Creates multi-site plots of pressure measurements.

temp_ts: Creates multi-site plots of temperature measurements.

river_ts: Creates plots of the timeseries of river discharge data from USGS gauging stations.

M-files for tidal analysis (see Tidal Analysis page)

ttide_adcp_indiv and ttide_adcp_merge : Perform tidal analysis on individual records of ADCP and Aquadopp data.

t_tide: Performs harmonic analysis of a time series (called by ttide_adcp_indiv.m, ttide_adcp_comb.m, ttide_aqdp_indiv.m, ttide_aqdp_comb.m, ttide_argn_indiv.m, and ttide_argn_comb.m; Pawlowicz and others, 2002).

Additional M-files

datenum2julian - A function to convert Julian Day to Matlab® datenum

dolandscape: An m-file to configure a figure's properties for landscape printing.

fixpaper: An m-file to configure a figure's properties such that the printed output looks like the on-screen display.

gmax: A function to calculate the maximum value in an array, ignoring NaN values.

gmean: A function to calculate the mean value in an array, ignoring NaN values.

gmin: A function to calculate the minimum value in an array, ignoring NaN values.

gregorian: A function to convert Julian days to Gregorian calendar dates.

gstd: A function to calculate the standard deviation of an array, ignoring NaN values.

hms2h: A function to convert hours, minutes, and seconds to hours.

julian: A function to convert Gregorian calendar dates to digital Julian days where the Julian day start and end at midnight.

julian2datenum: A function to convert Julian days to Matlab® datenum values.

pl66tn: A function to compute the low-passed time series from a time series of oceanographic data values using the PL64 filter described in Beardsley and others (1985).

replace_fill_nan: A function to replace netCDF fill values in an array with Not-a-Number (NaN).

s2hms - A function to convert seconds to integer hour,minute,seconds.

smart_interp: A function to interpolate an original time series data set onto a new time base.

suptitle: A function to place a title above all subplots.

tight_subplot: A function to create subplots with less space between plots.



Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://pubsdata.usgs.gov/pubs/of/2012/1219/mfiles.html
Page Contact Information: GS Pubs Web Contact
Page Last Modified: Monday, 26-Aug-2013 12:20:49 EDT