GCE Data Toolbox Functions

version 3.0, 17-Sep-2010

(c)2002-2010 Wade M. Sheldon and the Georgia Coastal Ecosystems LTER Project

Graphical User Interface Applications (GUI)
ui_aboutgce GCE Data Toolbox startup splash screen with links to the structure editor and documentation
(syntax: ui_aboutgce(op))
ui_aggrdatetime GCE Data Toolbox date/time aggregated statistics dialog
(syntax: ui_aggrdatetime(op,s))
ui_aggrmovingdate GCE Data Toolbox moving window date/time aggregated statistics dialog
(syntax: ui_aggrmovingdate(op,s))
ui_aggrstats GCE Data Toolbox aggregated statistics dialog
(syntax: ui_aggrstats(op,s))
ui_axislimits Axis limits dialog box for 2D and 3D plots
(syntax: ui_axislimits)
ui_bindata GCE Data Toolbox dialog for calculating statistics on aggregated data binned by values in a specified column.
(syntax: ui_bindata(op,s))
ui_calculator Dialog for adding calculated columns to a GCE Data Structure by evaluating a user-specified Matlab expression
(syntax: ui_calculator(op,s))
ui_clearflags GCE Data Toolbox dialog for selective deletion of QA/QC flags or flagged values
(syntax: ui_clearflags(op,s,mode,h_cb,cb))
ui_copyflags GCE Data Toolbox dialog for copying composite flags from one or more data columns
(syntax: ui_copyflags(op,s,h_cb,cb))
ui_dataflag Dialog for manually editing QA/QC flags for selected columns in a GCE Data Structure.
(syntax: ui_dataflag(op,s,col,h,cb))
ui_datagrid Opens a GCE Data Structure into a metadata-aware grid to allow data values to be viewed and edited
(syntax: ui_datagrid(op,s,h,cb,colwid,halign,cache))
ui_dateplots GUI dialog for generating multiple date plots at various intervals from a time-series plot
(syntax: ui_dateplots)
ui_dateplots_html GUI dialog for generating multiple date plots at various intervals from a time-series plot
(syntax: ui_dateplots_html)
ui_dateplots_template GUI dialog for generating multiple date plots at various intervals from a time-series plot
(syntax: ui_dateplots_template)
ui_editcodes GUI dialog for editing value codes for a specified column in a GCE Data Structure
(syntax: ui_editcodes(s,col,h_cb,cb))
ui_editmetadata Dialog for editing metadata stored in a GCE Data Structure (called by 'ui_editor')
(syntax: ui_editmetadata(op,s,h,callback))
ui_editor GCE Data Toolbox data structure editor for managing and analyzing data stored in GCE Data Structures
(syntax: ui_editor)
ui_expclimdb Dialog for exporting data in LTER ClimDB/HydroDB format
(syntax: msg = ui_expclimdb(op,data))
ui_exportasc GCE Data Toolbox data structure ASCII export dialog
(syntax: ui_exportasc(op,s,fn,pn))
ui_fetch_climdb GUI dialog for retrieving data from the LTER ClimDB/HydroDB web server
(syntax: ui_fetch_climdb)
ui_fetch_ncdc GUI dialog for retrieving data from the NOAA National Climatic Data Center WWW server
(syntax: ui_fetch_ncdc(op,h_cb,cb))
ui_fetch_usgs GUI dialog for retrieving data from the USGS WWW server
(syntax: ui_fetch_usgs(op,h_cb,cb))
ui_flagdefs QA/QC flag definition and data anomalies editor dialog called by 'ui_editor'.
(syntax: ui_flagdefs(op,meta,h_cb,cb))
ui_flagfunction GUI dialog called by 'ui_qccriteria' for adding custom function calls to a Q/C criteria string
(syntax: ui_flagfunction)
ui_gce_register GCE data download registration form dialog called by 'ui_search_data'
(syntax: ui_gce_register(op,cb))
ui_importfilter Filtered ASCII import dialog used by the GCE Data Toolbox.
(syntax: ui_importfilter(op,fn,pn,h_cb,cb))
ui_interp_missing GCE Data Toolbox dialog for filling in gaps in a data set using one-dimensional interpolation
(syntax: ui_interp_missing(op,s))
ui_joindata GUI dialog for joining columns in two GCE Data Structures together based on common values in one or more key columns
(syntax: ui_joindata(op,s0,s1,s1fname,h_fig,h_cb,cb,autodate))
ui_mapdata Data mapping dialog for the GCE Data Toolbox
(syntax: ui_mapdata(op,s))
ui_metastyle GUI dialog for editing metadata styles used by the GCE Data Toolbox
(syntax: ui_metastyle(op,data))
ui_multimerge Dialog for merging multiple GCE Data Structures into a single structure
(syntax: ui_multimerge(op,loadpath))
ui_normalizecols GUI dialog for normalizing a data set by merging multiple related columns
(syntax: ui_normalizecols(op,s))
ui_plotdata GCE Data Toolbox data structure plotting dialog
(syntax: ui_plotdata(op,s))
ui_plotgroups Dialog for creating a series of line/scatter plots from a single data set split by values in a grouping column
(syntax: ui_plotgroups(op,s))
ui_progressbar Creates a graphical progress bar to illustrate the status of long-running processes
(syntax: ui_proressbar(op,data,title))
ui_qccriteria QA/QC criteria editor dialog called by 'ui_editor'.
(syntax: ui_qccriteria(op,s,col,flagdefs,h_cb,cb))
ui_querybuilder GUI dialog for building row restriction queries to subselect data from a GCE Data Structure
(syntax: ui_querybuilder(op,val))
ui_search_data GCE Search Engine dialog for building and querying metadata search indices to identify and retrieve data sets
(syntax: ui_search_data(op,index))
ui_sortcolumns GUI dialog for sorting data columns in a GCE Data Structure
(syntax: ui_sortcolumns(op,s))
ui_splitseries GCE Data Toolbox dialog for splitting a compound data series based on values in a specified column
(syntax: ui_splitseries(op,s))
ui_statreport GCE Data Toolbox statistical report generator dialog
(syntax: ui_statreport(op,s,fn,pn))
ui_string_replace Dialog called by 'ui_editor' to update the title of a GCE Data Structure or editor window
(syntax: ui_string_replace(op,s,col,h_cb,cb))
ui_template GUI dialog for editing metadata templates used by the GCE Data Toolbox
(syntax: ui_template(op,s,template))
ui_text_prompt Opens a dialog box to prompt for a character array
(syntax: ui_text_prompt(op,h_cb,cb,str,prompt,title))
ui_title Dialog called by 'ui_editor' to update the title of a GCE Data Structure or editor window
(syntax: ui_title(op,s,h_cb,cb,caption,dlgtitle))
ui_topbottom GCE Data Toolbox dialog for extracting top and bottom data records from a vertical profile data set
(syntax: ui_topbottom(op,s))
ui_unitconv Unit conversion dialog called by 'ui_editor' (requires data file ui_editor.mat)
(syntax: ui_unitconv(op,s,col))
ui_viewdocs Displays documentation for the GCE Data Toolbox in a scrolling text box with selectable sections
(syntax: ui_viewdocs(op,fnc))
ui_viewmeta Displays various metadata components of a GCE Data Structure in a scrolling list box viewer
(syntax: ui_viewmetadata(s,style))
ui_viewtext Displays a string or cell array of strings in a scrolling list box viewer
(syntax: ui_viewtext(text,wrap,indent,titlestr,figsize,font))
ui_visualqc Dialog for assigning and clearing QC/QA flags visually by clicking on data points with the mouse.
(syntax: ui_visualqc(op,qc_data))
 
Data Import and Parsing Functions
fetch_climdb_data Fetches data for a specified site and station from the ClimDB/HydroDB web site (requires networking features in MATLAB 6.5/R13 or higher)
(syntax: [s,msg] = fetch_climdb_data(site,station,parms,username,userorg,userpurpose,
date_min,date_max,template,silent,savetemp,pn,base_url))
fetch_climdb_info Retrieves updated status information on sites, stations and variables from the LTER ClimDB/HyroDB web site
(syntax: [s_sites,s_stations,s_variables,msg] = fetch_climdb_info(contributors,baseurl))
fetch_ncdc Retrieves daily data for a NCDC climate station contained in 'fetch_ncdc.mat'
(syntax: [s,msg] = fetch_ncdc(email,station,template,date_start,date_end,max_time,max_attempts,
fn_temp,pn_temp,savetemp,silent,baseurl))
fetch_ncdc_climate_data Retrieves NCDC climate daily climate data using a URL retrieved by 'fetch_ncdc_climate_url'
(syntax: [s,msg,fn,pn] = fetch_ncdc_climate_data(url_ftp,template,max_time,fn,pn))
fetch_ncdc_climate_url Retrieves a data download URL from the NOAA NCDC database for a specified station and date range
(syntax: [url_ftp,msg] = fetch_ncdc_climate_url(coopid,email,date_start,date_end,baseurl))
fetch_nerr_data Retrieves NERR data arrays from the NOAA NWS NESDIS data server and returns a GCE data structure
(syntax: [s,msg] = fetch_nerr_data(nesdis,days,template,deletetemp,trim_partial,max_trim,pn_temp,fn_temp,baseurl))
fetch_usgs Fetches data from the USGS NWIS web site for the specified station and time period
(syntax: [s,msg] = fetch_usgs(stationid,datatype,days,template,pn,fn,
clear_provisional,deleteopt,baseurl,baseurl2))
fetch_usgs_dates Fetches data from the USGS NWIS web site for the specified station and time period
(syntax: [s,msg] = fetch_usgs_dates(stationid,datatype,begin_date,end_date,template,pn,fn,
clear_provisional,baseurl,baseurl2))
fetch_usgs_inventory Fetches a USGS monitoring site inventory report and generates a USGS stations dataset
(syntax: [s,msg,url] = fetch_usgs_inventory(state,datatypes,bbox,fn,url_base))
imp_aquatroll Imports data from a GCE Aqua TROLL 200 groundwater data logger
(syntax: [s,msg] = imp_aquatroll(fn,pn,template))
imp_ascii Reads a tab or space-delimitted text file to create a GCE Data Structure. Note that values of
(syntax: [data,msg] = imp_ascii(fn,pn,title,template,formatstr))
imp_ctdprofile Reads variables in a DiIorio CTD profile data file and concatentates them to form a GCE Data Structure
(syntax: [s,errmsg] = imp_ctdprofile(fn,pn,logfile,filetype))
imp_ctdprofile2 Reads variables in a DiIorio CTD profile data file (9/2004 and later) and concatentates them to form a GCE Data Structure
(syntax: [s,errmsg] = imp_ctdprofile(fn,pn,logfile,filetype))
imp_datastructRetrieves a GCE Data Structure from a MATLAB binary file. If no variable names 'data' is present,
(syntax: s = imp_datastruct(fn,pn))
imp_filter Imports data from a delimited ASCII file using a specified format string and list of
(syntax: [data,msg] = imp_filter(fn,pn,formatstr,colnames,headerlines,misschar,template,title))
imp_gcesonde Imports the data and header from a processed SBE 37-SM Microcat data file (.asc)
(syntax: [s,msg] = imp_gcesonde(fn,pn,calc_depth))
imp_hammock_tidbit Imports data from a Hobo Tidbit temperature logger deployed at a GCE Hammock sites
(syntax: [s,msg] = imp_hammock_tidbit(fn,pn,hammock))
imp_hobo_tidbit Imports data from a Hobo Tidbit temperature logger exported in ASCII boxcar format
(syntax: [s,msg] = imp_hobo_tidbit(fn,pn,template,site,location))
imp_hydrolab Import filter for GCE Hydrolab groundwater data logger files
(syntax: [s,msg] = imp_hydrolab(fn,pn,template))
imp_matlab Reads selected variables in a MATLAB binary file or the base worskspace to form a GCE Data Structure.
(syntax: [s,msg] = imp_matlab(source,path,varlist))
imp_minitroll Import filter for GCE In-Situ MiniTroll water level loggers
(syntax: [s,msg] = imp_minitroll(fn,pn,template))
imp_mlmet Imports real-time climate data from Marsh Landing CR10X data files processed using
(syntax: [s,msg] = imp_mlmet(fn,pn,period))
imp_ncdc_climate Imports climate data from a NCDC daily summary file to create a GCE Data Structure.
(syntax: [s,msg] = imp_ncdc_climate(fn,pn,template))
imp_nerr_cdmo Imports CSV files downloaded from the NERR CDMO web site
(syntax: [s,msg] = imp_nerr_cdmo(fn,pn,template,title))
imp_sabsoon Reads variables in a SABSOON data file and concatentates them to form a GCE Data Structure
(syntax: [s,errmsg] = imp_sabsoon(fn,pn))
imp_usgs_stations Imports a USGS NWIS station description file generated by 'fetch_usgs_inventory'
(syntax: [s,msg] = imp_usgs_stations(fn,pn,template,title))
imp_usgsdoctortown Imports tab-delimited data from the USGS gaging station at Doctortown, assigning
(syntax: [s,msg] = imp_usgsdoctortown(fn,pn))
imp_usgshudson Imports tab-delimited data from the USGS Hudson Creek Superstation, assigning
(syntax: [s,msg] = imp_usgshudson(fn,pn,datatype))
parse_37sm Parses a processed data file (.asc) from a Seabird Electronics 37-SM Microcat
(syntax: [data,colnames,site,bottomdep,hdr] = parse_37sm(fn,pn,calc_depth,lat,fn2,pn2))
parse_climdb_data Parses tab-delimited data retrieved from the LTER ClimDB/HydroDB web application to create a data structure
(syntax: [s,msg] = parse_climdb_data(fn,pn,template,savetemp))
parse_cruise_log Parses information for a specified cast in a GCE cruise log file to supplement information in a CTD data set
(syntax: [s2,msg] = parse_cruise_log(s,castcol,logfile,logfields,template,pos))
parse_gce_syntax Parses syntax and parameter information from GCE Data Toolbox function help text
(syntax: [syntax,fnc_desc,fnc_help,parms,modified] = parse_gce_syntax(fnc))
parse_gps Parses latitude and longitude from formatted GPS data strings
(syntax: [lat,lon] = parse_gps(gps,format))
parse_nerr_data Parses data arrays from a NOAA NESDIS file to generate a GCE Data Structure
(syntax: [s,msg] = parse_nerr_data(fn,pn,template,trim_partial,max_trim))
parse_nerr_lowerduplin Parses data retrieved from the NOAA HADS server for the SINERR Lower Duplin weather station
(syntax: [s,msg] = parse_nerr_lowerduplin(fn,pn))
parse_nerr_marshlanding Parses data retrieved from the NOAA HADS server for the SINERR Marsh Landing weather station
(syntax: [s,msg] = parse_nerr_marshlanding(fn,pn))
parse_seabird Parses data and header metadata from processed Sea-Bird CTD data files and returns a GCE data structure
(syntax: [s,msg] = parse_seabird(fn,pn,par_offset,cruise,logfile,template))
parse_usgs Parses tab-delimited real-time or daily data obtained from the USGS National Water Information System
(syntax: [data,msg] = parse_usgs(fn,pn,titlestr,template,timezone,flag_provisional,clear_provisional))
 
Data Export Functions
exp_ascii Exports the information in a GCE-LTER data or stat structure in the specified format
(syntax: msg = exp_ascii(s,format,fn,pn,rpttitle,hdropt,flagopt,metastyle,leader,rownumbers,missingchar,
delim,groupcol,appendopt))
exp_climdb Exports climate and/or hydrographic monitoring data in LTER ClimDB harvester format.
(syntax: [msg,status,s_mod] = exp_climdb(s,site,station,fn,pn,append,pct_missing))
exp_matlab Exports the contents of a GCE Data Structure as a standard MATLAB data file containing data and metadata as variables
(syntax: msg = exp_matlab(s,fn,pn,filetype,metastyle,flagopt,flagcols))
 
Quality Control Flag Functions
flag_ctd_soak_period Returns an index indicating records collected during the pre-deployment soaking period of a CTD cast
(syntax: Iflag = flag_ctd_soak_period(vals,windowsize))
flag_inlist Returns an index of string values that are present in a specified list array or file-based list
(syntax: Iflag = flag_inlist(vals,valuelist,caseopt))
flag_locationcoords Returns an index of location codes with coordinates that differ by more the specified tolerance from reference coordinates
(syntax: Iflag = flag_locationcoords(location,longitude,latitude,tolerance,caseoption,ref_file))
flag_locks Locks or unlocks Q/C flag criteria for specified columns in a GCE-LTER data structure
(syntax: [s2,msg] = flag_locks(s,lock_option,cols))
flag_notinlist Returns an index of string values that are not present in a specified list array or file-based list
(syntax: Iflag = flag_notinlist(vals,valuelist,caseopt))
flag_nsigma Returns an index of values above or below the mean of preceeding values by the specified number of standard deviations
(syntax: Iflag = flag_nsigma(vals,lowlimit,highlimit,framesize,iterations))
flag_o2saturation Returns an index of dissolved oxygen concentration values that are above or below specified saturation limits
(syntax: Iflag = flag_o2saturation(o2_conc,temp,sal,maxsat,minsat,units))
flag_percentchange Returns an index of values above or below the mean of preceeding values by the specified percentages
(syntax: Iflag = flag_percentchange(vals,lowlimit,highlimit,framesize,iterations))
flag_valuechange Returns an index of values above or below the mean of preceeding values by the specified limits
(syntax: Iflag = flag_valuechange(vals,lowlimit,highlimit,framesize,iterations))
 
Command-line Toolbox Functions and Miscellaneous Utilities
add_anomalies Summarizes flagged and missing values for specified parameters and stores the report in the Data/Anomalies
(syntax: [s2,msg] = add_anomalies(s,format,datesep,missing,cols,overwrite))
add_calcexpr Evaluates a text expression and adds the resultant values to a GCE Data Structure
(syntax: [s2,msg] = add_calcexpr(s,expr,colname,colunits,coldesc,pos,repscalar,colcrit))
add_datecol Generates a column of formatted date values from date component columns in a GCE Data Structure
(syntax: [s2,msg] = add_datecol(s,format,cols,pos))
add_datepartcols Adds numerical date part columns to a GCE Data Structure, based on a single serial date column
(syntax: [s2,msg] = add_datepartcols(s,datecol,timecol,dateparts,position))
add_gce_cruise Adds a GCE Cruise ID column to a data set, based on matching date information to a cruise lookup table
(syntax: [s2,msg] = add_gce_cruise(s,datecol,colname,colpos))
add_history Adds an entry to the data structure processing history
(syntax: [s2,msg] = add_history(s,str,fcn))
add_latloncoords Adds latitude and longitude coordinates (deg) to a GCE Data Structure containing geographic coordinates in UTM (m)
(syntax: [s2,msg] = add_latloncoords(s,easting_col,northing_col,zone_col,hem_col,position,datum))
add_locations Adds a column of location names to a dataset based on geographic lookups of reference station coordinates
(syntax: [s2,msg] = add_locations(s,tol,qc_tol,loctype,offsetcol,loncol,latcol,colname,reffile))
add_sitemetadata Adds or updates site metadata in a GCE Data Structure by matching values in
(syntax: [s2,msg] = add_sitemetadata(s,cols))
add_stationcoords Adds geographic coordinate columns to a data structure by matching station or location codes to entries
(syntax: [s2,msg] = add_stationcoords(s,coordtype,col))
add_studydates Adds study date metadata descriptors to a GCE Data Structure, based on the range of date values in
(syntax: [s2,msg] = add_studydates(s,datecol))
add_studysites Adds a column of GCE site codes to a data structure by matching values in geographic coordinate columns
(syntax: [s2,msg] = add_studysites(s,sitetypes,loncol,latcol))
add_transect_dist Adds trandsect and distance columns to a GCE Data Structure by matching GPS coordinates to transect coordinates
(syntax: [s2,msg] = add_transect_dist(s,loncol,latcol,transect,accuracy,disttol))
add_utmcoords Adds geographic coordinates in UTM units to a GCE Data Structure containing coordinates in lat/lon (decimal degrees)
(syntax: [s2,msg] = add_utmcoords(s,latcol,loncol,position,datum))
add_well_metadata Adds groundwater well location columns and metadata to GCE hammock well logger data sets
(syntax: [s2,msg] = add_hammock_meta(s,id,titlestr,fields))
add_yeardaycol Adds a numerical year day column to a GCE Data Structure, based on serial date or formatted date and time columns
(syntax: [s2,msg] = add_yeardaycol(s,roundopt,datecol,timecol,position))
addcol Adds a column array as a new calculated column to a GCE-LTER data structure
(syntax: [s2,msg] = addcol(s,newdata,name,units,description,datatype,vartype,numtype,precision,criteria,pos))
addflags Adds a character flag to specified records in one or more columns of a GCE Data Structure
(syntax: [s2,msg] = addflags(s,cols,rows,flag))
addmeta Appends or updates metadata fields in a GCE-LTER data structure or metadata array
(syntax: [s2,msg] = addmeta(s,newmeta,silent,application))
addnote Adds an annotation to a plot and assigns the 'ButtonDownFcn' to 'editnote' for text editing and repositioning
(syntax: addnote(pos,str))
aggr_bindata Bins data by values in the specified numerical column after aggregation by one or more grouping columns
(syntax: [s2,msg] = aggr_bindata(s,bincol,bins,emptybinopt,flagopt,agcols,datacols,qcrules))
aggr_datetime Performs statistical aggregation on selected data columns at the specified date/time interval
(syntax: [s2,msg] = aggr_datetime(s,interval,dtcols,aggrcols,statcols,statopt,flagopt,qcrules,missing_anom))
aggr_index Returns a sorted data structure and grouping index for use in aggregation operations
(syntax: [s2,I_breaks] = aggr_index(s,agcols))
aggr_movingdatewindow Generates a smoothed time series data set by statistically summarizing values along a sliding date window
(syntax: [s2,msg] = aggr_movingdatewindow(s,days,datecol,agcols,statcols,statopt,flapopt,qcrules))
aggr_stats Statistical aggregation function for summarizing or re-sampling GCE Data Structures
(syntax: [s2,msg] = aggr_stats(s,aggrcols,statcols,statopt,flagopt,qcrules))
aggr_sums Sorts and aggregates data in a GCE-LTER data structure by one or more columns,
(syntax: [s2,msg] = aggr_sums(s,aggrcols,statcols,statopt,flagopt))
aggr_topbottom Returns top and bottom values for data columns in a data structure based on values in a depth or pressure column,
(syntax: [s2,msg] = aggr_topbottom(s,depcol,agcols,datacols,compactrowsopt))
angleavg Calculates an average for angular data using a unit vector approach based on the formula:
(syntax: ad = angleavg(d,units,zerotol))
apply_template Applies a metadata template to a data structure, matching parameters by name
(syntax: [s2,msg] = apply_template(s,template,metaopt))
assign_numtype Automatically assigns numerical types and precisions to columns in a GCE Data Structure
(syntax: [s2,msg] = assign_numtype(s,exptol,cols))
batch_import Batch processes raw data files in a directory using the specified import filter
(syntax: [msg,filelist,badfiles] = batch_import(filtname,filemask,pn1,pn2,arg1,arg2,silent))
batch_import_ncdc Imports daily data from a list of NCDC climate stations contained in 'batch_import_ncdc.mat'
(syntax: msg = batch_import_ncdc(stations,date_start,date_end,pn,max_time,max_attempts,silent))
bbox2sites Returns a list of GCE study sites with bounding polygons intersecting a specified bounding box
(syntax: sites = bbox2sites(bbox,matchtype))
cell2commas Concatenates elements in a cell array of strings to form a single comma-separated character array.
(syntax: str = cell2commas(c,opt))
cell2pipes Concatenates elements in a cell array of strings to form a single character array separated with padding spaces
(syntax: str = cell2pipes(c,number,prefix,indent,compact))
centerstr Centers two character arrays with respect to eachother
(syntax: str3 = centerstr(str1,str2))
cleardupes Removes rows in a GCE Data Structure in which the contents of all specified columns are duplicated,
(syntax: [s2,msg,deletedrows] = cleardupes(s,cols,logopt))
clearflags Clears specified flags from a GCE Data Structure for display or export purposes
(syntax: [s2,msg] = clearflags(s,flagchars,cols,lockopt,metaopt))
clearreps Replaces repeated values in the selected columns of a GCE-LTER data structure
(syntax: s2 = clearreps(s,cols))
clipplottext Clips text on a 2D plot by toggling the visibility on or off based on axis position
(syntax: clipplottext)
close_gdt Closes all GCE Data Tools and optionally exits Matlab
(syntax: close_gdt(op))
coalesce_cols Coalesces values in two compatible data columns by filling in null/NaN records
(syntax: [s2,msg] = coalesce_cols(s,col1,col2,checkunits,flag,deletecol))
cols2flags Converts text columns to QA/QC flag values for specified data columns
(syntax: [s2,msg] = cols2flags(s,flagcols,datacols,overwrite))
cols2flags_mapped Converts data set columns to QA/QC flags after mapping multi-character flags to single character equivalents
(syntax: [s2,msg] = cols2flags_mapped(s,flagmap,flagcols,datacols,overwrite))
colstats Calculates basic descriptive statistics for columns in a standard GCE-LTER data structure
(syntax: [stats,msg] = colstats(data,flagopt,groupcol))
combine_ctdsurveys Combines consecutive CTD surveys within cruises to make multi-leg or multi-vessel surveys contiguous
(syntax: [s2,msg] = combine_ctdsurveys(s,maxdist,maxtimegap,col_cruise,col_survey,col_cast))
compactcols Deletes columns in a data structure in which all values are null/empty
(syntax: [s2,msg] = compactcols(s,cols))
compactrows Compacts a GCE Data Structure by eliminating rows in the structure in which all indicated data columns contain NaN or ''
(syntax: [s2,msg,deletedrows] = compactrows(s,datacols))
compress_str Removes all blanks from a character array or cell array of strings
(syntax: str2 = compress_str(str))
concat_cols Concatenates text columns in a GCE data structure to create a single text column
(syntax: [s2,msg] = concat_cols(s,cols,separator,deleteoption,colname,vartype,criteria))
concatcellcols Concatenates individual cells on each row in a cell array of strings to form a single column array
(syntax: ar2 = concatcellcols(ar,spacer))
conf_limits Calculates lower and upper confidence limits for an array of means and standard deviations
(syntax: [lcl,ucl] = conf_limits(mn,sd,n,pct))
confirmdlg Confirmation dialog that executes a 'callback' statement if the 'OK' button is pressed
(syntax: confirmdlg(op,querystr,callback))
contains Returns a logical index of strings in an array that contain the specified substring
(syntax: Imatch = contains(vals,pattern,caseopt))
convert_datatype Converts specified columns in a GCE Data Structure to a new data type, transforming values as necessary
(syntax: [s2,msg,badcols] = convert_datatype(s,cols,newdtype,integeropt))
convert_num2str Converts values in a numeric data column of a GCE Data Structure to string values using 'int2str'
(syntax: [s2,msg] = convert_int2str(s,col,vartype))
copycols Copies data from one or more columns in a GCE Data Structure to form a new data structure or array.
(syntax: [s2,msg] = copycols(s,cols,return_meta))
copyflags Copies composite flags from one or more columns and adds to or replaces the existing flag arrays
(syntax: [s2,msg] = copyflags(s,flagcols,datacols,opt))
copyrows Copies data from one or more rows in a GCE-LTER data structure to form a new data structure or array
(syntax: [s2,msg] = copyrows(s,rows,metadata))
correct_well_pressure Corrects groundwater well pressure for atmospheric pressure, optionally offset from pressure at time 0
(syntax: [s2,msg] = correct_well_pressure(s,col_pressure,col_atm,colname,pressure_t0))
csi2struct Parses data arrays in a comma-delimited output file from a Campbell Scientific Instruments datalogger,
(syntax: msg = csi2struct(fn,pn,template,pn2,missingval,year,gmtoffset))
ctd_bin_avg Generates a bin-averaged and interpolated data set from a CTD profile
(syntax: [s2,msg] = ctd_bin_avg(s,depcol,castcol,agcols,datacols,bin_top,bin_interval,emptybinopt,flagopt,qcrules,interp_method))
cullflags Deletes all records from a GCE Data Structure containing any values assigned specified flags
(syntax: [s2,msg] = cullflags(s,flags,cols,metaopt))
dataflag Evaluates Q/C criteria or assigns user-specified flags to generate or update Q/C flag arrays
(syntax: [s2,msg,flagerrors] = dataflag(s,cols,manual_flags))
dataflag2 Evaluates Q/C criteria in a GCE-LTER data structure to generate or update Q/C flag arrays
(syntax: [s2,msg] = dataflag2(s,cols))
datamerge Merges (concatenates) two GCE Data Structures to create a combined structure
(syntax: [s,msg] = datamerge(s1,s2,order,addcols,units,fixflags,calcflags))
date2monthyear Converts a MATLAB serial date to Month-Year format (e.g. January 2004)
(syntax: str = date2monthyear(d))
date2weekday Calculates numerical week day for any date, based on a specified first day of the week
(syntax: wd = date2weekday(dt))
date2weeknumber Calculates week numbers for an array of serial dates according to various calendar standards
(syntax: [week,year] = date2weeknumber(dt,standard))
date2yearday Calculates year day from a vector of MATLAB serial dates or cell array of valid date strings
(syntax: [yearday,year] = date2yearday(d,roundopt))
dateaxis Refreshes date ticks on the x-axis of the current plot
(syntax: dateaxis)
datecnv Converts numerical dates between various software conventions
(syntax: date_out = datecnv(dateval,opt))
datenum_iso Generates MATLAB serial dates from ISO date strings in the form 'yyyy-mm-dd HH:MM:SS' or 'yyyymmddTHHMMSS'
(syntax: [dt,msg] = datenum_iso(str,format))
dateplot2html Generates an HTML page and image files, with optional hyperlinked thumbnails, to represent
(syntax: msg = dateplot2html(cols,plotwidth,thumbnails,interval,fn_plots,fn_html,pn,
pagetitle,nav_html,h_fig,fmt))
dateplot2template Generates an HTML page and image files, with optional hyperlinked thumbnails, to represent
(syntax: msg = dateplot2template(fn_template,pn_template,cols,plotwidth,thumbnails,interval,
fn_plots,fn_html,pn,h_fig,pagetitle,nav,fmt))
dateplot2xml Generates an XML page and image files to represent time series data plots for a specified interval
(syntax: msg = dateplot2xml(cols,plotwidth,thumbnails,interval,fn_plots,fn_xml,
fn_index,pn,pagetitle,param,xsl,nav,fmt,h_fig))
dateplots Generates individual date plots at the specified interval from a standard date plot and saves
(syntax: [msg,filenames,dateranges,thumbs] = dateplots(interval,fn,pn,format,resolution,thumbnailss,h))
daterange2flags Assigns Q/C flags by date range and locks flags to prevent automatic recalculation
(syntax: [s2,msg] = dates2flags(s,datecol,dates,cols,flag))
daterange2str Generates textual descriptions of ranges of serial dates based on a selection index
(syntax: str = daterange2str(dt,I_dt,format,datesep))
ddeg2dms Converts geographic coordinates from decimal degrees format to degrees, minutes, seconds
(syntax: dms = ddeg2dms(ddeg))
dec_places Determines the maximum number of used decimal places in a floating-point array
(syntax: prec = dec_places(num,maxprec))
decodecols Converts coded columns in a GCE Data Structure to text columns based on code definitions in the metadata
(syntax: [s2,msg,badcols] = decodecols(s,cols,colnames))
deg2utm Converts geographic coordinates from lat/lon degrees to UTM using the specified ellipsoid datum
(syntax: [zone,utm_east,utm_north,hem,errormsg] = deg2utm(lon,lat,datum))
deg2utmzone Converts geographic coordinates from lat/lon degrees to UTM using the specified ellipsoid datum
(syntax: [zone,utm_east,utm_north,hem,errormsg] = deg2utmzone(lon,lat,datum,zone))
deletecols Deletes specified columns from a GCE Data Structure, ignoring any unmatched column names or indices
(syntax: [s2,msg] = deletecols(s,cols))
deleterows Deletes data from one or more rows in a GCE-LTER data structure to form a new data structure or array.
(syntax: [s2,msg] = deleterows(s,rows,logoption))
dupe_index Returns an index of records in a GCE Data Structure with duplicate values in all or specified columns
(syntax: [I_dupes,msg] = dupe_index(s,cols,nan_opt))
edit_importfilters Opens the list of GCE Data Toolbox import filter definitions stored in 'imp_filters.mat' into a grid for editing
(syntax: edit_importfilters(op,data))
edit_unitconv Dialog for editing unit conversion tables used by the GCE Data Toolbox.
(syntax: edit_unitconv(op,table))
editnote Dialog for adding or editing text annotations on figures. Can be called without arguments to
(syntax: editnote(op,h))
encodestrings Encodes text columns in a GCE data structure as series of unique integers
(syntax: [s2,msg] = encodestrings(s,reconcile))
exportfig Exports the current figure in the specified format with uicontrol printing suppressed, prompting for filename and path
(syntax: exportfig(option))
extract Extracts columns from a GCE-LTER data structure and returns standard numeric or cell arrays of strings
(syntax: [values,columns,msg] = extract(data,columns,maxrows))
file2listbox Loads an ASCII file and displays it in a uicontrol listbox
(syntax: file2listbox(h_listbox,fn,pn))
fill_date_gaps Fills in missing date/time records to complete a partial time-series data set
(syntax: [s2,msg] = fill_date_gaps(s,datecol,remove_dupes,repl_nondata))
fill_meta_tokens Replaces tokens in metadata templates with text from the corresponding metadata fields
(syntax: [s2,msg] = fill_meta_tokens(s,sections))
filter_by_daterange Filters a GCE data structure to include one or more specified date ranges
(syntax: [s2,msg] = filter_by_daterange(s,date_start,date_end,comparison))
filter_by_dates Filters a dataset to only include records for a specified set of dates
(syntax: [s2,msg] = filter_by_dates(s,dates,datecol,tolerance,matchtype,showmatch))
fix_ml_wind Back-corrects wind speed measurements in Marsh Landing weather station data sets due to incorrect calibration settings
(syntax: [s2,msg] = fix_ml_wind(s,windspeed,maxwindspeed,mult_old,offset_old,
mult_new,offset_new,date_start,date_end))
fix_ml_wind_auto Runs the 'fix_ml_wind' function to correct windspeed values with date-specific calibration factors
(syntax: [s2,msg] = fix_ml_wind_auto(s))
fixprec Sets numerical precision of specified columns in a GCE Data Structure
(syntax: [s2,msg] = fixprec(s,cols,opt))
flags2cols Converts Q/C flag information in a GCE Data Structure to coded string columns named based on the parent columns
(syntax: [s2,msg] = flags2cols(s,opt,clear,missing,pos,encode,firstflag))
gce_datatools Displays the list of functions comprising the GCE Data Toolbox for Matlab
(syntax: gce_datatools(gui))
gce_distribfiles Creates standard set of ASCII and MATLAB project-level distribution files for all data structures in the specified directory
(syntax: msg = gce_distribfiles(pn1,pn2,filespec,flagopt_ascii,flagopt_ml,flagcols_ml,silent))
gce_homepath Returns the base pathname of the current GCE Toolbox instance, optionally changing the working directory
(syntax: pn = gce_homepath(cd_option))
gce_sitemetadata Returns formatted site descriptor metadata for a list of GCE-LTER sampling sites
(syntax: [meta,msg] = gce_sitemetadata(sitecode))
gce_stationmeta Returns formatted site descriptor metadata for a list of GCE-LTER sampling locations
(syntax: [meta,msg] = gce_stationmeta(locations))
gce_valid Identifies and validates a GCE-LTER Data or Stat Structure by checking for required fields and verifying
(syntax: [val,stype,msg] = gce_valid(s,stype))
get_open_dataset Retrieves a data structure from an open editor window selected via listbox
(syntax: [s,msg] = get_open_dataset(listwidth))
get_studydates Retrieves serial dates for records in a GCE Data Structure based on analysis of datetime columns
(syntax: [dt,msg,s,datecol] = get_studydates(s,datecol))
get_type Returns the specified attribute descriptor for specified columns in a GCE Data Structure
(syntax: types = get_type(s,attribute,cols))
guihelp Opens MATLAB help text for a specified function in a scrollable GUI dialog
(syntax: guihelp(fcn))
help_flagfnc Opens a GUI dialog containing help text for all QA/QC flagging functions named 'flag_*'
(syntax: help_flagfnc)
iimp_struct Converts a MATLAB structure containing scalar values to a GCE Data Structure, using field names as column names
(syntax: [s2,msg,badfields] = imp_struct(s,template))
inlist Matches strings in an array to elements in a specified list and returns a logical index
(syntax: Imatch = inlist(vals,valuelist,caseopt))
insertrows Inserts rows of new data into specified columns of an existing GCE Data Structure,
(syntax: [s2,msg] = insertrows(s,values,cols,pos))
interp_missing Performs 1D interpolation to fill in missing values in a single data series using a specified method
(syntax: [s2,msg] = interp_missing(s,xcol,ycols,method,maxpts,logopt))
interp_missing2 Performs 1D interpolation to fill in missing values in a compound data series using a specified method
(syntax: [s2,msg] = interp_missing2(s,xcol,ycols,gpcols,method,maxpts,logopt))
interp_missing_stepwise Performs interpolation to fill in missing values, proceeding step-wise for each unique value in a stepping column,
(syntax: [s2,msg] = interp_missing(s,xcol,ycols,method,maxpts,logopt))
joindata Joins two data structures together by finding matching data rows in one or more common (key) columns,
(syntax: [s,msg] = joindata(s0,s1,key0,key1,jointype,cols0,cols1,prefix0,prefix1,s1fname,
cleardupes,matchunits,metamerge))
listbox2file Saves the string contents of a listbox uicontrol as an ASCII text file
(syntax: listbox2file(h_listbox,fn,pn))
listcols Lists names and units of all columns in a GCE-LTER data or stat structure
(syntax: [lst,msg] = listcols(data,format))
listdatacols Returns an index of data and/or calculation columns (dependent variables) in a GCE Data Structure
(syntax: Icols = listdatacols(s,option))
listdialog Customized variant of the MATLAB 'listdlg' function
(syntax: I_sel = listdialog(varargin))
listhist Lists the contents of the history field from a GCE-LTER Data Structure
(syntax: str = listhist(data,dateformat,wrap,indent))
listmeta Generates formatted metadata from values stored in a GCE Data or Stat structure
(syntax: meta = listmeta(s,style,fn,pn,opt,wrap))
lookup_coords Looks up geographic coordinates in a GCE Data structure and returns arrays on longitude and latitude in decimal degrees
(syntax: [lon,lat,loncol,latcol] = lookup_coords(s,loncol,latcol))
lookupmeta Looks up metadata in a GCE Data or Stat Structure by category and fieldname
(syntax: str = lookupmeta(s,catname,fieldname))
make_template Parses a tab-delimited text file with the following column headings to create a data descriptor metadata template structure:
(syntax: meta = make_template(name,spcsubst,fn,pn))
match_sites Matches the coordinates given by lon and lat to GCE site polygons from the GCE geographic database
(syntax: studysites = match_sites(lon,lat,sitetypes,opt))
maxrows Returns a maximum of 'maxrownum' rows from a GCE-LTER data structure 'data'
(syntax: data2 = maxrows(data,maxrownum))
merge_by_date Merges (i.e. concatenates) two GCE data structures to produce a single time series without duplicate date/time records.
(syntax: [s,msg] = merge_by_date(s1,s2,datecol1,datecol2,fixflags,calcflags,trim_opt))
merge_dateplots Generates an HTML table of date plot thumbnails based on multiple sets of existing plots in a specified directory
(syntax: msg = merge_dateplots(prefix_array,caption_array,fn_html,pn,
fn_template,pn_template,pagetitle,plot_ext))
merge_dateplots_xml Generates an HTML table of date plot thumbnails based on multiple sets of existing plots in a specified directory
(syntax: msg = merge_dateplots_xml(prefix_array,xml_array,caption_array,
nav_array,fn_xml,pn,pagetitle,xsl,nav,fmt))
mergemeta Merges metadata from two GCE Data structures following a data merge or join operation
(syntax: newmeta = mergemeta(s1,s2))
messagebox Generates a multi-line message box
(syntax: messagebox(op,message,callback,dialogtitle,bgcolor,showcancel))
meta2struct Converts an n x 3 cell array containing GCE-LTER metadata into a nested structure
(syntax: meta2 = meta2struct(meta))
meta_fields Returns an array of metadata categories and fields for a named metadata style
(syntax: meta = meta_fields(style))
meta_template Generates data descriptor metadata for a GCE Data Structure by matching supplied variable names
(syntax: [meta,msg] = meta_template(template,varnames))
mfilecatalog Generates a catalog of mfiles in the specified directory as an ASCII file.
(syntax: mfilecatalog(filespec,pn1,fn,pn2))
mlversion Returns the version of MATLAB running in numerical form ([majorversion].[minorversion])
(syntax: vnum = mlversion)
monthplots Generates monthly date plots for a multiple parameters in a GCE data structure,
(syntax: msg = monthplots(s,parms,nullflags,pn,colors,markers,linestyles,fillmarkers,markersize,yaxlims))
monthplotsfig Generates individual monthly date plots from a standard date plot and saves each plot as a .png file
(syntax: msg = monthplotsfig(fn,pn,h))
multi_templates Applies multiple, date-dependent metadata templates to a data set to accomodate parameter metadata changes
(syntax: [s2,msg] = multi_templates(s,templates,datecol))
multimerge Merges (concatenates) multiple GCE Data Structures specified by filename and structure name
(syntax: [s,msg] = multimerge(filelist,structnames,mergetype,fixflags,metamerge,addfilename,flagopt,flagchars))
name2col Returns an array of column index numbers matching the specified list of column names in a GCE-LTER data structure
(syntax: cols = name2col(s,colnames,caseopt,datatype,variabletype,unmatched))
negative2zero Converts negative values in the specified columns of a GCE Data Structure to zeros
(syntax: [s2,msg] = negative2zero(s,cols,metadata))
neststruct Nests a child structure in a specified field of a parent structure based on matching values in a shared key field
(syntax: s = neststruct(s_parent,s_child,keyfield,fieldname))
newstruct Creates an empty GCE data or stat structure, containing all default fields
(syntax: s = newstruct(type))
newtitle Updates the title of a GCE Data or Stat Structure with the specified string
(syntax: s2 = newtitle(s,titlestr,metaopt))
no_nan Returns a numeric array stripped of NaN elements and an index of corresponding positions
(syntax: [a2,I] = no_nan(a))
normalize_cols Normalizes a data set by merging multiple columns to form combined parameter name and parameter value columns
(syntax: [s2,msg] = normalize_cols(s,cols,repcols,cat_name,val_name))
nullflags Converts values in a GCE Data Structure assigned specified flags to NaN/empty
(syntax: [s2,msg] = nullflags(s,flags,cols,metaopt))
num_records Returns the number of records in a GCE Data Structure
(syntax: numrec = num_records(s))
o2_saturation Calculates dissolved oxygen saturation as a function of temperature and salinity at sea-level,
(syntax: [sat,o2_sat,msg] = o2_saturation(o2_conc,temp,sal,units))
openfigfile Opens a MATLAB .fig file, prompting for the filename if omitted
(syntax: openfilefile(fn,pn))
parent_figure Determines the parent figure for any uicontrol handle (returns empty matrix
(syntax: h_fig = parent_figure(h))
parseheader Parses delimited header information in an ASCII file
(syntax: [hdrs,hdrrows,msg] = parseheader(fn,pn,titlestr,metaonly))
plotbuttons Adds a custom toolbar to the bottom of the current plot, providing constrained zoom, pan and date axis
(syntax: adds axis manipulation buttons to a Matlab figure)
plotdata Generates 2D symbol/line plots of values in a GCE-LTER data structure
(syntax: [msg,h_fig] = plotdata(s,xcol,ycols,colors,markers,linestyles,fillmarkers,markersize,
scale,rotateaxis,sortx,dateaxis,flags,deblank,axlims))
plotgroups Creates multiple line/scatter plots for values in two columns of a GCE Data Structure,
(syntax: [msg,h_fig] = plotgroups(s,xcol,ycol,groupcols,maxgps,colors,markers,styles,fillmarkers,markersize,rotateaxis,scale,flags))
plothistogram Plots a frequency histogram for the indicated column in a GCE Data Structure
(syntax: plothist(s,columns,bins,flagopt))
plotlabels Adds the specified title and axis label strings to the current plot
(syntax: plotlabels(titlestr,xstr,ystr,zstr))
plotmenu Adds a menu item to a MATLAB figure containing commands for exporting figures in
(syntax: h_menu = plotmenu(label,h_fig))
plotresize Toggles plot select/move/resize for plot axes on a figure
(syntax: plotresize(h))
plotwidgets Creates or removes standard GCE plot menus and toolbars from a MATLAB figure
(syntax: plotwidgets(op,h_fig))
plotwind Generates a standard 2-axis wind plot from a GCE Data Structure, with wind speed
(syntax: [msg,h_fig] = plotwind(s,col_date,col_speed,col_dir,maxspeed,daterange,deblank,flags,
linespec_speed,linespec_dir,markersize_speed))
postproc_gcesonde Post-processing function that finalizes the QA/QC flagging manually applied to a
(syntax: [s2,msg] = postproc_gcesonde(s))
previewdata Displays a preview of formatted data in a scrolling text box control.
(syntax: previewdata(op,vals,fstr))
proc_ctdprofile Processes DiIorio CTD profile data files in the specified directory to create GCE Data Structures
(syntax: msg = proc_ctdprofile(pn,mmyy,transect,filetype))
proc_ctdprofile2 Generates summary data sets for processed DiIorio CTD profile "raw" data sets ('ctdprf*_raw.mat')
(syntax: msg = proc_ctdprofile2(pn))
proc_gcesonde Generates standard distribution files and daily summary statistics for GCE MicroCAT
(syntax: msg = proc_gcesonde(pn,filespec))
querydata Queries values in a GCE Data Structure and returns a new data structure containing only the rows
(syntax: [s2,rows,qry,msg,I_inc] = querydata(s,query))
querystats Calculates descriptive statistics for values in a GCE-LTER data structure
(syntax: [stats,msg] = querystats(data,query,flagopt,groupcol,cols))
readheader Reads a text file containing delimited header and metadata fields
(syntax: [s2,msg] = readheader(fn,pn,s))
readmeta Reads a text file containing delimited metadata fields ([category_field]:[value])
(syntax: [s2,msg] = readmeta(fn,pn,s))
recurse_files Recursively builds a list of all files in a directory and subdirectories matching a filename pattern
(syntax: filelist = recurse_files(pn,filemask,filemask_exclude))
rename_column Updates the name of a column in a GCE Data Structure, propagating the change
(syntax: [s2,msg] = rename_column(s,column,column_name,column_description,silent))
rename_struct_field Renames a structure field without re-ordering the existing fields
(syntax: s2 = rename_struct_field(s,fld_old,fld_new))
restart Opens the GCE Data Toolbox startup screen without modifying the MATLAB search path
(syntax: unspecified)
roundsig Rounds numbers to the indicated significant digits using the method specified
(syntax: x2 = roundsig(x,sigdig,method))
running_mean Calculates the running mean of a value array over the specified number of points
(syntax: mn = running_mean(vals,points))
search_data Identifies GCE Data Structures in one or more directories matching specified search criteria
(syntax: [paths,filenames,varnames,accessions,titles,daterange] = search_data(qry,index,pn))
search_data_r13 Identifies GCE Data Structures in one or more directories matching specified search criteria
(syntax: [paths,filenames,varnames,accessions,titles,daterange] = search_data(qry,index,pn))
search_index Generates a search index data structure for 'search_datasets' by inspecting all MATLAB files
(syntax: index = search_index(pn,index,option,subdir,fn_index))
search_index_r13 Generates a search index data structure for 'search_datasets' by inspecting all MATLAB files
(syntax: index = search_index_r13(pn,index,option,subdir,flagcols,fn_index))
set_type Sets attribute descriptor values for specified columns in a GCE Data Structure
(syntax: [s2,msg] = set_type(s,attribute,value,cols))
setpath Adds the current directory to the Matlab path
(syntax: setpath(pos))
sonde_batch Processes all uploaded SBE 37-SM sonde files (*.asc) in a directory to
(syntax: msg = sonde_batch(pn1,pn2,filespec,overwrite,distribfiles,calc_depth,silent))
sortdata Performs multi-column, bidirectional sorting on rows in a GCE Data Structure
(syntax: [sdata,msg] = sortdata(data,cols,dirs,caseopt))
split_csi Splits Campbell Scientific datalogger files into separate files for each
(syntax: numrows = split_csi(arrays,fn,pn))
split_dataseries Splits a compound data series based on values in a specified column and serially joins subsets to form a standard table
(syntax: [s2,msg] = split_dataseries(s,splitcol,joincols,valcols))
splitcodes Parses a delimited string containing code name, code value pairs and returns matching name and value arrays
(syntax: [codenames,codevalues] = splitcodes(str,delim))
splitstr Splits a character array into elements based on positions of a specified delimiter,
(syntax: ar = splitstr(str,delim,clearopt,trimopt))
splitstr_fast Speed-optimized version of the 'splitstr' function for deblanked, single-line character arrays
(syntax: ar = splitstr_fast(str,delim))
string_replace Performs string replacement on one or more text columns in a GCE Data Structure
(syntax: [s2,msg] = string_replace(s,cols,oldstring,newstring,matchtype,caseopt))
struct2xml Generates an xml fragment from a uni- or multi-dimensional structure
(syntax: xmlstr = struct2xml(s,outertag,emptyfields,wrapcolumn,indent,leftmargin))
syncpath Synchronizes path cache information between GCE Data Toolbox editor windows
(syntax: syncpath(pn,pathtype))
t_value_onetail Returns the area under the Student t distribution (single side) for a given alpha and degrees of freedom
(syntax: tval = t_value_onetail(alpha,df))
template_default Miscellaneous support file
(syntax: unspecified)
textedit Text editing dialog box, to be used as a callback function associated with text objects.
(syntax: textedit(op))
textfile2cell Reads the specified text file, and returns a Matlab cell array with lines optionally word-wrapped
(syntax: str = textfile2cell(fn,pn,emptylines,wrap,indent,trim))
tide_high_low Returns interpolated times and amplitudes of high and low tides based on a time-series of depth measurements
(syntax: [t_high,t_low,a_high,a_low] = tide_high_low(dt,depth,timestep,polyorder))
trimstr Trims leading and trailing blanks from a single string or cell array of strings
(syntax: str2 = trimstr(str))
unit_convert Performs unit conversions on a column in a GCE Data Structure using the specified multiplier or expression.
(syntax: [s2,msg] = unit_convert(s,col,newunits,expr,newcol))
update_data Updates values in a GCE Data Structure column, optionally logging all value changes
(syntax: [s2,msg] = update_data(s,col,newdata,logopt))
update_dataset Updates values in a dataset based on a second dataset and logs all changes in the metadata
(syntax: [s2,msg] = update_dataset(s,s_update,logopt,matchunits))
update_usgs_stations Updates the USGS station list by querying the NWIS site inventory
(syntax: [s,msg] = update_usgs_stations(datatypes))
utm2deg Converts geographic coordinates from UTM to decimal degrees (lon,lat)
(syntax: [lon,lat,errormsg] = utm2deg(zone,utm_east,utm_north,hem,datum))
viewhelp Displays help text for a specified function in a scrollable text viewer
(syntax: viewhelp(fcn))
viewstats Displays ungrouped column statistics for a GCE data structure in a scrollable text box
(syntax: msg = viewstats(s,flagopt))
viewtext displays the contents of a character array or cell array of strings in a GUI text viewer using 'ui_viewtext'
(syntax: viewtext(str,wrap,indent,titlestr))
wordwrap Wraps lines of text at word breaks with optional indentation
(syntax: str2 = wordwrap(str,col,indent,fmt))
xml2file Writes an xml file to disk using an xml string generated by 'struct2xml'
(syntax: msg = xml2file(xmlstr,rootelement,indent,fn,pn))
yearday2date Converts Julian Day/Year Day to a Matlab serial date
(syntax: d = yearday2date(yearday,year))
yearplotsfig Generates individual annual date plots from a standard date plot and saves each plot as a .png file
(syntax: msg = yearplotsfig(fn,pn,h))
 
Mapping Functions
addmap Adds a map to the current figure and generates a continuous line plot of the coordinates in 'map'.
(syntax: h_ax = addmap(map,bounds,mapedge,mapfill,background,title))
addnote Adds an annotation to a plot and assigns the 'ButtonDownFcn' to 'editnote' for text editing and repositioning
(syntax: addnote(pos,str))
addsites Adds site boundary polygon data to a map plot for use with 'poly_mgr'
(syntax: addsites(polydata,h))
axes2pixels Returns the positions of a figure and its current axis object in pixels and data units
(syntax: [fig_pixels,axes_pixels,fig_data,axes_data] = axes2pixels(h_fig))
center_fig Centers the specified figure on the computer screen
(syntax: center_fig(h,resize))
centerpoly Centers the polygon represented by handle 'h' over the coordinates
(syntax: centerpoly(h,x,y))
circle Generates coordinates for closed circular polygons at specified x/y coorindates and radius
(syntax: [x,y] = circle(x0,y0,r,pts))
compass_rose Adds a standard 8-point compass rose to a MATLAB figure
(syntax: [h_patch,h_text] = compass_rose(x,y,font,fontsize,width,height,h_fig))
concatcellcols Concatenates individual cells on each row in a cell array of strings to form a single column array
(syntax: ar2 = concatcellcols(ar,spacer))
confirmdlg Confirmation dialog that executes 'callback' statement if the 'OK' button is pressed
(syntax: confirmdlg(op,querystr,callback))
coordstr2ddeg Converts an array of geographic coordinate strings to decimal degrees, stripping any non-numeric characters
(syntax: coord = coordstr2ddeg(coordstr,hem))
copylines Copies Matlab line objects from the current axis of one figure to another
(syntax: copylines(h1,h2))
copypointlabels Copies point labels on a GCE map figure to another map figure
(syntax: copypointlabels(h_fig1,h_fig2,tag))
corner_coord Returns an array of SW and NE corner coordinates for a set of axis limits in degrees and utm
(syntax: coords = corner_coord(axlims))
ctd2dataset Generates a GCE Data Structure containing CTD station locations and labels for display or plotting
(syntax: [s,msg] = ctd2dataset(interval,rivers,transects))
ctd_stations Dialog for plotting nominal LMER and GCE-LTER ctd station labels on a map,
(syntax: ctd_stations)
ddeg2dms Converts geographic coordinates from decimal degrees format to degrees, minutes, seconds
(syntax: dms = ddeg2dms(ddeg))
deg2utm Converts geographic coordinates from lat/lon degrees to UTM using the specified ellipsoid datum
(syntax: [zone,utm_east,utm_north,hem,errormsg] = deg2utm(lon,lat,datum))
deg2utmzone Converts geographic coordinates from lat/lon degrees to UTM using the specified ellipsoid datum
(syntax: [zone,utm_east,utm_north,hem,errormsg] = deg2utmzone(lon,lat,datum,zone))
degmins DEGMINS Creates a degrees and minutes label for use in MAPAX routine.
(syntax: unspecified)
distbar Creates a checked distance bar with alternating checked ticks for a map plot.
(syntax: h_db = distbar(pos,distmajor,distminor,distheight,fontsize,fontweight,color,retain))
dms2ddeg Converts geographic coordinates from degrees, minutes, seconds to decimal degrees format
(syntax: ddeg = dms2ddeg(dms))
edit_polygon Interactive polygon editor application called by 'poly_mgr'
(syntax: edit_polygon(op,data,polylabel,polydate,h_map,style))
editnote Dialog for adding or editing text annotations on figures. Can be called without arguments to
(syntax: editnote(op,h))
errorbox Generates a simple message box to acknowledge error conditions. The
(syntax: errorbox(op,message))
exportfig Exports the current figure in the specified format with uicontrol printing suppressed, prompting for filename and path
(syntax: exportfig(option))
find_stations Generates arrays of locations and labels for a range of CTD stations in a reference transect
(syntax: [stat_coord,stat_labels] = find_stations(stat_ref,stat_begin,stat_end,stat_int,tol))
gen2mat Reads .GEN files created by Arcview's UNGENERATE command into a MATLAB array
(syntax: map = gen2mat(filename,pathname))
geo_simplify geo_simplify -- Simplify a (lon, lat) contour.
(syntax: unspecified)
geoarea_mouse Calculates geographic surface area of a rectangle selected with the mouse
(syntax: [geoarea,coords] = geoarea_mouse(units))
geocenter Returns the weighted geographic center of a polygon
(syntax: coords = geocenter(polygon,res))
get_bbox Returns a bounding box based on dragging a rectangle on a map figure, optionally plotting the result
(syntax: get_bbox(cb,plotopt,color))
gps2river Matches geographic coordinates to rivers based on bounding polygons in 'thalweg_bnd.mat'
(syntax: river = gps2river(lon,lat))
gps2riverdist Computes transect distances along Thalweg lines from geographic coordinates
(syntax: [distance,river] = gps2riverdist(lon,lat,river,accuracy,disttol))
gpsaxis Returns axis scaling array and aspect ratio to plot 'gps' on a map
(syntax: [axlims,aspect] = gpsaxis(gps,mode,boundary))
gpsdist Calculates great circle distance between geographic coordinates (longitude/latitude pairs)
(syntax: y = gpsdist(coords1,coords2,units))
gpsdistk Computes distance (in km) between GPS coordinates 'gps1' and 'gps2'
(syntax: d = gpsdistk(gps1,gps2))
ins_coord Inserts gps coordinates into a map longitude/latitude array to replace a specified segment
(syntax: mapdata2 = ins_coord(coords,mapdata,segnum,append,newseg))
insetmap Opens a map figure window that displays the specified boundaries or the boundaries
(syntax: insetmap(patchcolor,edgecolor,boxlimits))
labeledit Text editing dialog box, to be used as a callback function associated with text objects.
(syntax: labeledit(op,h))
lasso Builds an array of positions defining a closed polygon of specified shape
(syntax: [pos,h_line] = lasso(shape,colorval))
load_drg Loads a clipped USGS DRG map file in TIFF format, and uses the
(syntax: load_drg(fn,pn,mapinfo))
loadmap Loads a MATLAB map figure, centers it onscreen, and updates the title and axes labels
(syntax: h_fig = loadmap(fn,pn))
locations2dataset Generates a data set in GCE data structure format from a geographic location structure
(syntax: [s,msg] = locations2dataset(locations))
map_patch Plot data values on a map figure as colored patches
(syntax: map_patch(lon,lat,vals,patchsize,cbartitle,clims,colormap))
mapaxis Axis limits dialog box for map plots
(syntax: mapaxis)
mapbuttons Creates map toggle buttons to enable zoom, pan and probe functions via
(syntax: mapbuttons(op))
mapclick function called by 'mapbuttons.m' to handle mouse clicks on maps
(syntax: mapclick(mode,opt))
mapcolor Dialog called by 'mapmenu' for selecting map colors
(syntax: mapcolor(op))
mapimage plot a colormapped raster image on a map plot
(syntax: h_img = mapimage(img,cmap,wlon,elon,slat,nlat,h_fig,{titlestr}))
mapmenu Switchyard function to create custom map menu and handle callbacks
(syntax: mapmenu(op))
mapscale Map scale dialog box function
(syntax: mapscale(op,initvals))
mapticks Formats plot tickmarks in decimal degrees format with degree symbols or degrees and minutes format
(syntax: mapticks(op,style,rotate,h_ax))
merge_polygons Merges polygons stored in GCE Maptools .ply files to form a new compbined database
(syntax: [polydata,msg] = merge_polygons(opt,sortnames,fn1,pn1,fn2,pn2,fn_out,pn_out))
messagebox Generates a multiline message box.
(syntax: messagebox(op,message,callback,dialogtitle,bgcolor))
movepoly Moves a polygon (line object) to new center coordinates selected with the mouse.
(syntax: movepoly(h))
newpoly New polygon dialog called by 'surfintegrate'
(syntax: newpoly(op,callback,h_figure,h_report,initvals))
plot_locations Plots sampling locations on a map and generates a figure legend
(syntax: plot_locations(lon,lat,types,labels,h_map,symbols,colors))
plot_shapefile_polygons plots polygons in an ArcGIS shapefile on a MATLAB figure
(syntax: [h_poly,h_labels] = plot_shapefile_polygons(fn,pn,linewidth,color,label,h_fig))
plotlabels Adds the specified title and axis label strings to the current plot
(syntax: plotlabels(titlestr,xstr,ystr,zstr))
plotmap Creates a new figure window and generates a continuous line plot of the coordinates in 'map'
(syntax: h_fig = plotmap(map,bounds,mapedge,mapfill,background,figname))
plotrect Plots a rectangular bounding box around an array of coordinates
(syntax: plotrect(coords,lbl,clr))
plotseg Plot a specific segment of a coastline data file using the 'fillseg' function
(syntax: plotseg(mapdata,segnum,fillcolor,edgecolor))
plotstations Plots station labels on a map, centered over the locations given by lon, lat
(syntax: h = plotstations(lon,lat,labels,clr,fontsize,tag))
pointlabels Plots point labels for map coordinates (if 'str' is omitted,
(syntax: [h_line,h_text] = pointlabels(lon,lat,str,symbol,clr,offset,fontsize,tag))
poly_mgr Polygon management utility called by 'plotmap'
(syntax: poly_mgr)
poly_title Dialog called by 'poly_mgr' to update the title of a polygon
(syntax: poly_title(op,str,h_cb,cb,caption,dlgtitle))
polyvert Polygon numerical vertices dialog called by 'createpoly'
(syntax: polyvert(op,initvals,callback,h_figure,h_report))
r12_axistitles Updates axis titles in R11-saved figures to support zooming in R12
(syntax: r12_axistitles)
radcalc Returns the radius of the circle with origin x(1),y(1) and peripheral point x(2),y(2)
(syntax: rad = radcalc(xarray,yarray))
read_seg Reads the array of segments specified by 'segs' in 'mapdata'
(syntax: mapdata2 = read_seg(mapdata,segs))
rec2paral Shifts the top of a rectangle or parallelogram represented by the line handle 'h' by the amount 'topoffset'
(syntax: rec2paral(h,topoffset))
repl_seg Replaces the contents of segment 'segnum' in 'mapdata' with 'coords'
(syntax: mapdata2 = repl_seg(mapdata,segnum,coords))
rotateyticks Converts Y-axis tick labels to text strings rotated at a 90° angle
(syntax: rotateyticks(lbl))
roundsig Rounds numbers to the indicated significant digits using the method specified
(syntax: x2 = roundsig(x,sigdig,method))
shapefile2gcepoly Creates a GCE geographic coordinate structure for polygons stored in an ArcGIS shapefile
(syntax: [coords,shapes,attributes] = shapefile2gcepoly(fn,pn,id_field,utm_zone,utm_datum))
sitearea Calculates the surface area entrained by a site polygon in lat/lon degrees or utm.
(syntax: area = sitearea(coords,output,units))
split_seg Inserts NaN values to split a longitude/latitude array at specified positions
(syntax: mapdata2 = split_seg(mapdata,pos))
textedit Text editing dialog box, to be used as a callback function associated with text objects.
(syntax: textedit(op))
trandist Function for computing upriver distance of coordinates 'gps' relative to reference track 'ref'.
(syntax: dist = trandist(gps,ref,accuracy,disttol))
updateaxis Updates map plot axis limits to a geographically-correct aspect ratio
(syntax: updateaxis(op,gps,mode,bound))
upgrade_maps Upgrades maps figures to include the latest versions of the GCE polygon database, map menus and buttons
(syntax: upgrade_maps(pn))
utm2deg Converts geographic coordinates from UTM to decimal degrees (lon,lat)
(syntax: [lon,lat,errormsg] = utm2deg(zone,utm_east,utm_north,hem,datum))
writepoly Writes full geographic information about map polygons to disk in tab-delimited
(syntax: msg = writepoly(polydata,fn,pn))
writepoly2 Writes specific geographic information about map polygons to disk in tabular
(syntax: writepoly2(polydata,units,fn,pn))
 Applications Download
LTER
NSF

This material is based upon work supported by the National Science Foundation under grant numbers OCE-9982133 and OCE-0620959.  Any opinions, findings, conclusions, or recommendations expressed in the material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.