MATLAB functions to contour, plot, etc triangular finite element model output (ADCIRC).
11 Nov 2022
Dependencies: None, but nctoolbox (https://github.com/nctoolbox/nctoolbox) will make life much easier. Nctoolbox greatly simplifies handling ADCIRC netCDF files.
Clone repo and then add <PATH_TO_adcirc_util>/adcirc_util to the MATLAB function path, then execute
AddAdcircPaths(/adcirc_util)
To add ADCIRC paths to the MATLAB MATLABPATH variable in the user's matlab/startup.m file, add:
global ADCIRC ADCIRC='/adcirc_util'; AddAdcircPaths(ADCIRC)
g=loadgrid('gridname');
or, using nctoolbox and a url to a ADCIRC netCDF "global" file:
% locally available maxele file url='maxele.63.nc'; % or: % maxele file on a TDS url='http://tds.renci.org/thredds/dodsC/NCFS_CURRENT_SYNOPTIC/maxele.63.nc'; nc=ncgeodataset(url); g=ExtractGrid(nc);
helems=drawelems(g); hcont=lcontour(g,'z',0,'LineWidth',1,'color','r'); axis('equal')