USGS - science for a changing world

USGS Coastal and Marine Geology Program

South Carolina Coastal Erosion Study, Data Report for Observations, October 2003 - April 2004


Matlab M-Files

Skip navigational side bar

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 7.1.0 SP3 with NetCDF installed. 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 ABS data processing (see Data Processing page)

abs metaexample: An example ASCII ABS metadata file used to process ABS data.

aqa2cdf: A function to convert Aquascat ABS raw binary data files to burst and statistic NetCDF files.

matpctile: Calculates p-th percentile values for ABS statistics (called by aqa2cdf.m).

readaqa_oleg: Reads Aquatec ABS data files with extensions .aqa and (or) .aqf (called by aqa2cdf.m).

read_aquatec_v4: Reads Aquatec ABS data files from the Aquatec New Version (v3) system (called by aqa2cdf.m).

maskAqaCdf: A function to mask bad data in Aquascat ABS burst and statistic NetCDF files.

plot_ABS_stats: A function to plot data in the Aquascat ABS statistic NetCDF file (called by maskAqa2cdf.m).

maskAqaCdf2nc: A function to write Aquascat ABS data to Best Basic Version burst and statistic NetCDF files.

M-files for Aquadopp AP data processing (see Data Processing page)

aqdpCurr2cdf: A function to write Aquadopp water flow data to a NetCDF file.

get_meta_nortek: A function load metadata for the Aquadopp (called by aqdpCurr2cdf.m).

READ_aquapro_beam: A function to load Aquadopp data output by the AquaPro software (called by aqdpCurr2cdf.m).

beam2enu: A function to convert water flow collected in beam coordinates to geographical (east, north, up) coordinates (called by READ_aquapro_beam.m).

mask_aqdpCurr_cdf: A function to flag (mask) bad Aquadopp water flow data in a NetCDF file.

aqdpCurrMaskCdf2nc: A function to write Aquadopp water flow data to a Best Basic Version NetCDF file.

M-files for Argonaut ADP data processing (see Data Processing page)



argnCurr2cdf: A function to write Argonaut water flow data to a NetCDF file.

get_meta_sontek: A function load metadata for the Argonaut (called by argnCurr2cdf.m).

READ_viewarg_beam: A function to load Argonaut data output by the ViewArgonaut software (called by argnCurr2cdf.m).

beam2enu: A function to convert water flow collected in beam coordinates to geographical (east, north, up) coordinates (called by READ_viewarg_beam.m).

mask_argnCurr_cdf: A function to flag (mask) bad Argonaut water flow data in a NetCDF file.

argnCurrMaskCdf2nc: A function to write Argonaut water flow data to a Best Basic Version NetCDF file.

M-files for Imagenex Rotating Sonar data processing (see Data Processing page)

animatesonar2nc: A function to write Imagenex sonar data to NetCDF and to create a series of images which can be used to animate the data.

showfan: A function to plot Imagenex rotating sonar data (called by animatesonar2nc.m.

showpencil: A function to plot Imagenex pencil beam sonar data (called by animatesonar2nc.m).

uv2polar: A function to calculate speed and direction from east and north components of water flow (called by showfan.m and showpencil.m).

xycoord: A function to convert polar to rectangular coordinates in the geographic convention (called by showfan.m and showpencil.m).

ubqf: A function to calculate the quick approximation of near-bottom orbital velocity from Dean and Dalrymple (1991) (called by showfan.m and showpencil.m).

M-files for SEACAT and MicroCAT data processing (see Data Processing page)

asc2epic: Imports ASCII data to EPIC NetCDF.

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

abs_ts: Creates single site plots of the timeseries of ABS statistics.

adcp_curr_ts: Creates single site plots of the timeseries of ADCPTM water flow data.

adcp_wvs_ts: Creates single site plots of the timeseries of ADCPTM wave measurement data.

adv_ts: Creates single site plots of the timeseries of ADV water flow data.

all_adv_ts: Creates multi-site plots of the timeseries of ADV water flow data.

all_curr_ts.m: Creates multi-site plots of the timeseries of water flow data.

all_obs_ts.m: Creates multi-site plots of the timeseries of OBS statistics.

all_wvs_ts.m: Creates multi-site plots of the timeseries of wave measurement data.

aqdp_curr_ts: Creates single site plots of the timeseries of AquadoppTM water flow data.

aqdp_wvs_ts: Creates single site plots of the timeseries of AquadoppTM wave measurement data.

argn_curr_ts: Creates single site plots of the timeseries of Argonaut water flow data.

argn_wvs_ts: Creates single site plots of the timeseries of Argonaut wave measurement data.

ct_ts: Creates single site and multi-site plots the timeseries of seawater properties from CT data.

data available: Creates a plot of data availability of at all sites.

met_ts: Creates plots of the timeseries of meteorological data from NDBC moored buoys, NOS water level stations, and the COAMPS wind model.

obs_ts: Creates single site plots of the timeseries of OBS statistics.

pcadp_ts: Creates single site plots of the timeseries of PCADP water flow data.

pressure_ts: Creates single site and multi-site plots of the timeseries of pressure measurements.

river_ts: Creates plots of the timeseries of river discharge data from USGS gauging stations along the Cape Fear and Pee Dee rivers.

wind_ts: Creates plots of the timeseries of wind data from NOAA buoy stations, NOS water level stations, and the COAMPS wind model (Hodur, 1997).

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

ttide_adcp_indiv: Performs tidal analysis on individual records of ADCPTM data.

ttide_adcp_comb: Performs tidal analysis on combined records of ADCPTM data.

ttide_aqdp_indiv: Performs tidal analysis on individual records of Nortek AquadoppTM data.

ttide_aqdp_comb: Performs tidal analysis on combined records of Nortek AquadoppTM data.

ttide_argn_indiv: Performs tidal analysis on individual records of SonTek Argonaut data.

ttide_argn_comb: Performs tidal analysis on combined records of Sontek Argonaut 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

coamps_wind: A function to load wind data from the COAMPS model.

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.

stacklbl - A function to add y-axis labels and titles to a stack plot.

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

timeplt: A function to generate time series stack plots with Gregorian time labels on the x-axis.

timeplt_draw - A function to create the time series plots.

timeplt_figure - A function to create a time_plot figure.

timeplt_obj_index - A function to determine cell index of current timeplt object.

value2Index: A function to find the indices of a value in a list closest to a particular hit value, and return the distance from the hit value to the closest value.


Jump to top of page
Return to references cited. Go on to metadata.



adobe reader To view files in PDF format, download free copy of Adobe Reader.


Skip Navigation

Accessibility FOIA Privacy Policies and Notices

U.S. Department of the Interior | U.S. Geological Survey | Coastal and Marine Geology

URL: cmgds.marine.usgs.gov/publications/of2005-1429/WEBPAGES/m_files.html
Page Contact Information: CMGDS Team
Page Last Modified: Wednesday, 06-Dec-2017 12:52:08 EST