Due to a shift in policy, from 0900 GMT on Wednesday 14th July 2021, we will be disabling ssh access to the server for external users. External users who wish to continue to access code repositories on the server will need to switch to using https. This can be accomplished in the following way: 1) On the repo on gitlab, use the clone dialogue and select ‘Clone with HTTPS’ to get the address of the repo; 2) From within the checkout of your repo run: $ git remote set-url origin HTTPS_ADDRESS. Here, replace HTTPS_ADDRESS with the address you have just copied from GitLab. Pulls and pushes will now require you to enter a username and password rather than using a ssh key. If you would prefer not to enter a password each time, you might consider caching your login credentials.

Commit e8d720fd authored by Pierre Cazenave's avatar Pierre Cazenave

Update the documentation to reflect new functions. Also add a dependency graph...

Update the documentation to reflect new functions. Also add a dependency graph for the functions in the toolbox
parent 4032b7ca
/* Created by mdot for Matlab */
digraph m2html {
README [URL="README.html"];
example_surface_plot [URL="example_surface_plot.html"];
}
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Dependency Graph for fvcom_postproc</title>
<meta name="keywords" content="dependency, graph, dependence, fvcom_postproc">
<meta name="description" content="Dependency graph for fvcom_postproc">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
<meta name="robots" content="index, follow">
<link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for fvcom_postproc&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>
<h1>Dependency Graph for fvcom_postproc</h1>
<center>
<img src="graph.png" usemap="#mainmap" alt="Dependency Graph for fvcom_postproc" border="2" style="color:#000;">
<map name="mainmap">
<area shape="poly" id="node1" href="README.html" title="README" alt="" coords="144,31 141,23 131,16 116,10 96,6 75,5 53,6 34,10 18,16 8,23 5,31 8,39 18,46 34,51 53,55 75,56 96,55 116,51 131,46 141,39">
<area shape="poly" id="node2" href="example_surface_plot.html" title="example_surface_plot" alt="" coords="426,31 420,23 402,16 373,10 337,6 297,5 257,6 221,10 193,16 174,23 168,31 174,39 193,46 221,51 257,55 297,56 337,55 373,51 402,46 420,39">
</map>
</center>
<hr><address>Generated on Tue 04-Jun-2013 12:12:56 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>
\ No newline at end of file
<area shape="poly" id="node1" href="README.html" title="README" alt="" coords="144,31 141,23 131,16 116,10 96,6 75,5 53,6 34,10 18,16 8,23 5,31 8,39 18,46 34,51 53,55 75,56 96,55 116,51 131,46 141,39">
<area shape="poly" id="node2" href="example_surface_plot.html" title="example_surface_plot" alt="" coords="426,31 420,23 402,16 373,10 337,6 297,5 257,6 221,10 193,16 174,23 168,31 174,39 193,46 221,51 257,55 297,56 337,55 373,51 402,46 420,39">
...@@ -25,7 +25,10 @@ ...@@ -25,7 +25,10 @@
<h2>Subsequent directories:</h2> <h2>Subsequent directories:</h2>
<ul style="list-style-image:url(../matlabicon.gif)"> <ul style="list-style-image:url(../matlabicon.gif)">
<li>plots</li><li>surface_plots</li><li>transect_plots</li></ul> <li>plots</li><li>surface_plots</li><li>transect_plots</li></ul>
<h2>Dependency Graph</h2>
<hr><address>Generated on Mon 04-Feb-2013 14:22:26 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> <ul style="list-style-image:url(../simulinkicon.gif)">
<li>View the <a href="graph.html">Graph</a>.</li>
</ul>
<hr><address>Generated on Tue 04-Jun-2013 12:12:54 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -24,13 +24,13 @@ ...@@ -24,13 +24,13 @@
<div class="box"><strong>Add a set of river nodes comprising a single river to Mesh structure</strong></div> <div class="box"><strong>Add a set of river nodes comprising a single river to Mesh structure</strong></div>
<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [Mobj] = add_river_nodes(Mobj,Nlist,RiverName) </strong></div> <div class="box"><strong>function [Mobj] = add_river_nodes_list(Mobj,Nlist,RiverName) </strong></div>
<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Add a set of river nodes comprising a single river to Mesh structure <div class="fragment"><pre class="comment"> Add a set of river nodes comprising a single river to Mesh structure
Using a set of user-defined nodes Using a set of user-defined nodes
[Mobj] = add_river_nodes(Mobj) [Mobj] = add_river_nodes(Mobj,Nlist,RiverName)
DESCRIPTION: DESCRIPTION:
Select using ginput the set of nodes comprising a river Select using ginput the set of nodes comprising a river
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
Mobj = Matlab mesh object with an additional river nodelist Mobj = Matlab mesh object with an additional river nodelist
EXAMPLE USAGE EXAMPLE USAGE
Mobj = add_river_nodes(Mobj,'Potomac') Mobj = add_river_nodes(Mobj, [146, 3004], 'Potomac')
Author(s): Author(s):
Geoff Cowles (University of Massachusetts Dartmouth) Geoff Cowles (University of Massachusetts Dartmouth)
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
Revision history Revision history
==============================================================================</pre></div> ==========================================================================</pre></div>
<!-- crossreference --> <!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
...@@ -69,12 +69,12 @@ This function is called by: ...@@ -69,12 +69,12 @@ This function is called by:
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [Mobj] = add_river_nodes(Mobj,Nlist,RiverName)</a> <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [Mobj] = add_river_nodes_list(Mobj,Nlist,RiverName)</a>
0002 0002
0003 <span class="comment">% Add a set of river nodes comprising a single river to Mesh structure</span> 0003 <span class="comment">% Add a set of river nodes comprising a single river to Mesh structure</span>
0004 <span class="comment">% Using a set of user-defined nodes</span> 0004 <span class="comment">% Using a set of user-defined nodes</span>
0005 <span class="comment">%</span> 0005 <span class="comment">%</span>
0006 <span class="comment">% [Mobj] = add_river_nodes(Mobj)</span> 0006 <span class="comment">% [Mobj] = add_river_nodes(Mobj,Nlist,RiverName)</span>
0007 <span class="comment">%</span> 0007 <span class="comment">%</span>
0008 <span class="comment">% DESCRIPTION:</span> 0008 <span class="comment">% DESCRIPTION:</span>
0009 <span class="comment">% Select using ginput the set of nodes comprising a river</span> 0009 <span class="comment">% Select using ginput the set of nodes comprising a river</span>
...@@ -87,7 +87,7 @@ This function is called by: ...@@ -87,7 +87,7 @@ This function is called by:
0016 <span class="comment">% Mobj = Matlab mesh object with an additional river nodelist</span> 0016 <span class="comment">% Mobj = Matlab mesh object with an additional river nodelist</span>
0017 <span class="comment">%</span> 0017 <span class="comment">%</span>
0018 <span class="comment">% EXAMPLE USAGE</span> 0018 <span class="comment">% EXAMPLE USAGE</span>
0019 <span class="comment">% Mobj = add_river_nodes(Mobj,'Potomac')</span> 0019 <span class="comment">% Mobj = add_river_nodes(Mobj, [146, 3004], 'Potomac')</span>
0020 <span class="comment">%</span> 0020 <span class="comment">%</span>
0021 <span class="comment">% Author(s):</span> 0021 <span class="comment">% Author(s):</span>
0022 <span class="comment">% Geoff Cowles (University of Massachusetts Dartmouth)</span> 0022 <span class="comment">% Geoff Cowles (University of Massachusetts Dartmouth)</span>
...@@ -98,57 +98,57 @@ This function is called by: ...@@ -98,57 +98,57 @@ This function is called by:
0027 <span class="comment">%</span> 0027 <span class="comment">%</span>
0028 <span class="comment">% Revision history</span> 0028 <span class="comment">% Revision history</span>
0029 <span class="comment">%</span> 0029 <span class="comment">%</span>
0030 <span class="comment">%==============================================================================</span> 0030 <span class="comment">%==========================================================================</span>
0031 subname = <span class="string">'add_river_nodes'</span>; 0031 subname = <span class="string">'add_river_nodes_list'</span>;
0032 <span class="keyword">global</span> ftbverbose 0032 <span class="keyword">global</span> ftbverbose
0033 <span class="keyword">if</span>(ftbverbose) 0033 <span class="keyword">if</span> ftbverbose
0034 fprintf(<span class="string">'\n'</span>) 0034 fprintf(<span class="string">'\n'</span>)
0035 fprintf([<span class="string">'begin : '</span> subname <span class="string">'\n'</span>]) 0035 fprintf([<span class="string">'begin : '</span> subname <span class="string">'\n'</span>])
0036 <span class="keyword">end</span>; 0036 <span class="keyword">end</span>
0037 0037
0038 <span class="comment">%------------------------------------------------------------------------------</span> 0038 <span class="comment">%--------------------------------------------------------------------------</span>
0039 <span class="comment">% Get a unique list and make sure they are in the range of node numbers</span> 0039 <span class="comment">% Get a unique list and make sure they are in the range of node numbers</span>
0040 <span class="comment">%------------------------------------------------------------------------------</span> 0040 <span class="comment">%--------------------------------------------------------------------------</span>
0041 Nlist = unique(Nlist); 0041 Nlist = unique(Nlist);
0042 0042
0043 <span class="keyword">if</span>(max(Nlist) &gt; Mobj.nVerts); 0043 <span class="keyword">if</span> max(Nlist) &gt; Mobj.nVerts
0044 fprintf(<span class="string">'your river node number(s) exceed the total number of nodes in the domain\n'</span>); 0044 fprintf(<span class="string">'your river node number(s) exceed the total number of nodes in the domain\n'</span>);
0045 fprintf(<span class="string">'stop screwing around\n'</span>); 0045 fprintf(<span class="string">'stop screwing around\n'</span>);
0046 error(<span class="string">'stopping...\n'</span>) 0046 error(<span class="string">'stopping...\n'</span>)
0047 <span class="keyword">end</span>; 0047 <span class="keyword">end</span>
0048 0048
0049 <span class="comment">%------------------------------------------------------------------------------</span> 0049 <span class="comment">%--------------------------------------------------------------------------</span>
0050 <span class="comment">% Plot the mesh</span> 0050 <span class="comment">% Plot the mesh</span>
0051 <span class="comment">%------------------------------------------------------------------------------</span> 0051 <span class="comment">%--------------------------------------------------------------------------</span>
0052 0052
0053 <span class="keyword">if</span>(lower(Mobj.nativeCoords(1:3)) == <span class="string">'car'</span>) 0053 <span class="keyword">if</span> strcmpi(Mobj.nativeCoords(1:3), <span class="string">'car'</span>)
0054 x = Mobj.x; 0054 x = Mobj.x;
0055 y = Mobj.y; 0055 y = Mobj.y;
0056 <span class="keyword">else</span> 0056 <span class="keyword">else</span>
0057 x = Mobj.lon; 0057 x = Mobj.lon;
0058 y = Mobj.lat; 0058 y = Mobj.lat;
0059 <span class="keyword">end</span>; 0059 <span class="keyword">end</span>
0060 0060
0061 figure 0061 figure
0062 patch(<span class="string">'Vertices'</span>,[x,y],<span class="string">'Faces'</span>,Mobj.tri,<span class="keyword">...</span> 0062 patch(<span class="string">'Vertices'</span>, [x,y], <span class="string">'Faces'</span>, Mobj.tri,<span class="keyword">...</span>
0063 <span class="string">'Cdata'</span>,Mobj.h,<span class="string">'edgecolor'</span>,<span class="string">'k'</span>,<span class="string">'facecolor'</span>,<span class="string">'interp'</span>); 0063 <span class="string">'Cdata'</span>, Mobj.h, <span class="string">'edgecolor'</span>, <span class="string">'k'</span>, <span class="string">'facecolor'</span>, <span class="string">'interp'</span>);
0064 hold on; 0064 hold on
0065 0065
0066 plot(x(Nlist),y(Nlist),<span class="string">'ro'</span>); 0066 plot(x(Nlist), y(Nlist), <span class="string">'ro'</span>)
0067 title(<span class="string">'river nodes'</span>); 0067 title(<span class="string">'river nodes'</span>)
0068 0068
0069 <span class="comment">% add to mesh object</span> 0069 <span class="comment">% add to mesh object</span>
0070 npts = numel(Nlist); 0070 npts = numel(Nlist);
0071 Mobj.nRivers = Mobj.nRivers + 1; 0071 Mobj.nRivers = Mobj.nRivers + 1;
0072 Mobj.nRivNodes(Mobj.nRivers) = npts; 0072 Mobj.nRivNodes(Mobj.nRivers) = npts;
0073 Mobj.riv_nodes(Mobj.nRivers,1:npts) = Nlist; 0073 Mobj.riv_nodes(Mobj.nRivers, 1:npts) = Nlist;
0074 Mobj.riv_name{Mobj.nRivers} = RiverName; 0074 Mobj.riv_name{Mobj.nRivers} = RiverName;
0075 0075
0076 0076
0077 <span class="keyword">if</span>(ftbverbose) 0077 <span class="keyword">if</span> ftbverbose
0078 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>]) 0078 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0079 <span class="keyword">end</span>; 0079 <span class="keyword">end</span>
0080</pre></div> 0080</pre></div>
<hr><address>Generated on Tue 18-Dec-2012 12:37:31 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> <hr><address>Generated on Tue 04-Jun-2013 12:12:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -159,7 +159,7 @@ This function is called by: ...@@ -159,7 +159,7 @@ This function is called by:
0084 Mobj.sponge_name{Mobj.nSponge} = SpongeName; 0084 Mobj.sponge_name{Mobj.nSponge} = SpongeName;
0085 Mobj.sponge_fac(Mobj.nSponge) = SpongeCoeff; 0085 Mobj.sponge_fac(Mobj.nSponge) = SpongeCoeff;
0086 0086
0087 <span class="keyword">if</span> max(size(SpongeRadius))==1 <span class="comment">% if you have a constant sponge radius</span> 0087 <span class="keyword">if</span> numel(unique(SpongeRadius)) == 1 <span class="comment">% if you have a constant sponge radius</span>
0088 Mobj.sponge_rad(Mobj.nSponge) = SpongeRadius; 0088 Mobj.sponge_rad(Mobj.nSponge) = SpongeRadius;
0089 <span class="keyword">else</span> <span class="comment">% if you have a variable sponge radius</span> 0089 <span class="keyword">else</span> <span class="comment">% if you have a variable sponge radius</span>
0090 Mobj.sponge_rad(Mobj.nSponge,1:npts) = SpongeRadius; 0090 Mobj.sponge_rad(Mobj.nSponge,1:npts) = SpongeRadius;
...@@ -169,6 +169,6 @@ This function is called by: ...@@ -169,6 +169,6 @@ This function is called by:
0094 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>]) 0094 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0095 <span class="keyword">end</span> 0095 <span class="keyword">end</span>
0096</pre></div> 0096</pre></div>
<hr><address>Generated on Mon 04-Feb-2013 14:22:28 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> <hr><address>Generated on Tue 04-Jun-2013 12:12:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -169,7 +169,14 @@ This function is called by: ...@@ -169,7 +169,14 @@ This function is called by:
0090 inc = inc + 1; 0090 inc = inc + 1;
0091 <span class="keyword">end</span> 0091 <span class="keyword">end</span>
0092 0092
0093 Mobj.stations = out;</pre></div> 0093 <span class="keyword">if</span> ~isempty(out)
<hr><address>Generated on Tue 18-Dec-2012 12:37:31 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> 0094 Mobj.stations = out;
0095 <span class="keyword">else</span>
0096 Mobj.stations = [];
0097 <span class="keyword">if</span> ftbverbose
0098 fprintf(<span class="string">'No stations found within the model domain.\n'</span>)
0099 <span class="keyword">end</span>
0100 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Tue 04-Jun-2013 12:12:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -105,7 +105,7 @@ This function is called by: ...@@ -105,7 +105,7 @@ This function is called by:
0031 <span class="comment">%</span> 0031 <span class="comment">%</span>
0032 <span class="comment">%==============================================================================</span> 0032 <span class="comment">%==============================================================================</span>
0033 0033
0034 warning off 0034 <span class="comment">%warning off</span>
0035 0035
0036 subname = <span class="string">'add_var_FVCOM_river'</span>; 0036 subname = <span class="string">'add_var_FVCOM_river'</span>;
0037 <span class="keyword">global</span> ftbverbose; 0037 <span class="keyword">global</span> ftbverbose;
...@@ -172,6 +172,6 @@ This function is called by: ...@@ -172,6 +172,6 @@ This function is called by:
0098 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>]) 0098 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0099 <span class="keyword">end</span>; 0099 <span class="keyword">end</span>;
0100</pre></div> 0100</pre></div>
<hr><address>Generated on Tue 18-Dec-2012 12:37:31 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> <hr><address>Generated on Tue 04-Jun-2013 12:12:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
This diff is collapsed.
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls: This function calls:
<ul style="list-style-image:url(../matlabicon.gif)"> <ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="add_var_FVCOM_river.html" class="code" title="function add_var_FVCOM_river(RiverFile,VarName,VarLongName,VarUnits,VarData)">add_var_FVCOM_river</a> add time dependent scalar variable to a Riverfile</li><li><a href="write_FVCOM_river.html" class="code" title="function write_FVCOM_river(RiverFile,RiverName,nRivnodes,time,flux,temp,salt,RiverInfo1,RiverInfo2)">write_FVCOM_river</a> write FVCOM 3.x NetCDF river file</li></ul> <li><a href="add_var_FVCOM_river.html" class="code" title="function add_var_FVCOM_river(RiverFile,VarName,VarLongName,VarUnits,VarData)">add_var_FVCOM_river</a> add time dependent scalar variable to a Riverfile</li><li><a href="write_FVCOM_river.html" class="code" title="function write_FVCOM_river(RiverFile,RiverName,time,flux,temp,salt,RiverInfo1,RiverInfo2)">write_FVCOM_river</a> Write FVCOM 3.x NetCDF river file</li></ul>
This function is called by: This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)"> <ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="example.html" class="code" title="">example</a> example demonstrating reading in a 2DM file and constructing a model</li></ul> <li><a href="example.html" class="code" title="">example</a> example demonstrating reading in a 2DM file and constructing a model</li></ul>
...@@ -103,7 +103,7 @@ This function is called by: ...@@ -103,7 +103,7 @@ This function is called by:
0042 RiverName = <span class="string">'tstRiver'</span>; 0042 RiverName = <span class="string">'tstRiver'</span>;
0043 0043
0044 0044
0045 <a href="write_FVCOM_river.html" class="code" title="function write_FVCOM_river(RiverFile,RiverName,nRivnodes,time,flux,temp,salt,RiverInfo1,RiverInfo2)">write_FVCOM_river</a>(RiverFile,RiverName,nRivnodes,time,flux,temp,salt,RiverInfo1,RiverInfo2) 0045 <a href="write_FVCOM_river.html" class="code" title="function write_FVCOM_river(RiverFile,RiverName,time,flux,temp,salt,RiverInfo1,RiverInfo2)">write_FVCOM_river</a>(RiverFile,RiverName,nRivnodes,time,flux,temp,salt,RiverInfo1,RiverInfo2)
0046 0046
0047 <span class="comment">% add sediment to the file</span> 0047 <span class="comment">% add sediment to the file</span>
0048 VarName = <span class="string">'fine_sand'</span>; 0048 VarName = <span class="string">'fine_sand'</span>;
...@@ -123,6 +123,6 @@ This function is called by: ...@@ -123,6 +123,6 @@ This function is called by:
0062 VarUnits = <span class="string">'kgm^-3'</span>; 0062 VarUnits = <span class="string">'kgm^-3'</span>;
0063 VarData = .333*sedload; 0063 VarData = .333*sedload;
0064 <a href="add_var_FVCOM_river.html" class="code" title="function add_var_FVCOM_river(RiverFile,VarName,VarLongName,VarUnits,VarData)">add_var_FVCOM_river</a>(RiverFile,VarName,VarLongName,VarUnits,VarData)</pre></div> 0064 <a href="add_var_FVCOM_river.html" class="code" title="function add_var_FVCOM_river(RiverFile,VarName,VarLongName,VarUnits,VarData)">add_var_FVCOM_river</a>(RiverFile,VarName,VarLongName,VarUnits,VarData)</pre></div>
<hr><address>Generated on Tue 18-Dec-2012 12:37:31 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> <hr><address>Generated on Tue 04-Jun-2013 12:12:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -97,7 +97,7 @@ This function is called by: ...@@ -97,7 +97,7 @@ This function is called by:
0027 <span class="comment">%</span> 0027 <span class="comment">%</span>
0028 <span class="comment">%==============================================================================</span> 0028 <span class="comment">%==============================================================================</span>
0029 0029
0030 warning off; 0030 <span class="comment">%warning off;</span>
0031 0031
0032 0032
0033 subname = <span class="string">'example_FVCOM_tsobc'</span>; 0033 subname = <span class="string">'example_FVCOM_tsobc'</span>;
...@@ -197,7 +197,7 @@ This function is called by: ...@@ -197,7 +197,7 @@ This function is called by:
0127 netcdf.putAtt(nc,netcdf.getConstant(<span class="string">'NC_GLOBAL'</span>),<span class="string">'type'</span>,<span class="string">'FVCOM RIVER FORCING FILE'</span>) 0127 netcdf.putAtt(nc,netcdf.getConstant(<span class="string">'NC_GLOBAL'</span>),<span class="string">'type'</span>,<span class="string">'FVCOM RIVER FORCING FILE'</span>)
0128 netcdf.putAtt(nc,netcdf.getConstant(<span class="string">'NC_GLOBAL'</span>),<span class="string">'title'</span>,<span class="string">'simple open boundary hydrography test'</span>) 0128 netcdf.putAtt(nc,netcdf.getConstant(<span class="string">'NC_GLOBAL'</span>),<span class="string">'title'</span>,<span class="string">'simple open boundary hydrography test'</span>)
0129 netcdf.putAtt(nc,netcdf.getConstant(<span class="string">'NC_GLOBAL'</span>),<span class="string">'type'</span>,<span class="string">'FVCOM TIME SERIES OBC TS FILE'</span>) 0129 netcdf.putAtt(nc,netcdf.getConstant(<span class="string">'NC_GLOBAL'</span>),<span class="string">'type'</span>,<span class="string">'FVCOM TIME SERIES OBC TS FILE'</span>)
0130 netcdf.putAtt(nc,netcdf.getConstant(<span class="string">'NC_GLOBAL'</span>),<span class="string">'history'</span>,<span class="string">'generated using the fvcom-toolbox'</span>) 0130 netcdf.putAtt(nc,netcdf.getConstant(<span class="string">'NC_GLOBAL'</span>),<span class="string">'history'</span>,<span class="string">'File generated using example_FVCOM_tsobc.m from the MATLAB fvcom-toolbox'</span>)
0131 0131
0132 0132
0133 <span class="comment">% define dimensions</span> 0133 <span class="comment">% define dimensions</span>
...@@ -276,6 +276,6 @@ This function is called by: ...@@ -276,6 +276,6 @@ This function is called by:
0206 netcdf.close(nc); 0206 netcdf.close(nc);
0207 0207
0208 <span class="keyword">if</span>(ftbverbose); fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>]);<span class="keyword">end</span>;</pre></div> 0208 <span class="keyword">if</span>(ftbverbose); fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>]);<span class="keyword">end</span>;</pre></div>
<hr><address>Generated on Tue 18-Dec-2012 12:37:31 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> <hr><address>Generated on Tue 04-Jun-2013 12:12:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
Revision history Revision history
==============================================================================</pre></div> ==============================================================================
warning off</pre></div>
<!-- crossreference --> <!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
...@@ -91,7 +92,7 @@ This function is called by: ...@@ -91,7 +92,7 @@ This function is called by:
0024 <span class="comment">% Revision history</span> 0024 <span class="comment">% Revision history</span>
0025 <span class="comment">%</span> 0025 <span class="comment">%</span>
0026 <span class="comment">%==============================================================================</span> 0026 <span class="comment">%==============================================================================</span>
0027 warning off 0027 <span class="comment">%warning off</span>
0028 subname = <span class="string">'example_FVCOM_wind_ts'</span>; 0028 subname = <span class="string">'example_FVCOM_wind_ts'</span>;
0029 <span class="keyword">global</span> ftbverbose; 0029 <span class="keyword">global</span> ftbverbose;
0030 <span class="keyword">if</span>(ftbverbose); 0030 <span class="keyword">if</span>(ftbverbose);
...@@ -181,6 +182,6 @@ This function is called by: ...@@ -181,6 +182,6 @@ This function is called by:
0114 0114
0115 0115
0116</pre></div> 0116</pre></div>
<hr><address>Generated on Tue 18-Dec-2012 12:37:31 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> <hr><address>Generated on Tue 04-Jun-2013 12:12:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
Revision history Revision history
==============================================================================</pre></div> ==============================================================================
warning off</pre></div>
<!-- crossreference --> <!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
...@@ -91,7 +92,7 @@ This function is called by: ...@@ -91,7 +92,7 @@ This function is called by:
0024 <span class="comment">% Revision history</span> 0024 <span class="comment">% Revision history</span>
0025 <span class="comment">%</span> 0025 <span class="comment">%</span>
0026 <span class="comment">%==============================================================================</span> 0026 <span class="comment">%==============================================================================</span>
0027 warning off 0027 <span class="comment">%warning off</span>
0028 subname = <span class="string">'example_FVCOM_wind_ts'</span>; 0028 subname = <span class="string">'example_FVCOM_wind_ts'</span>;
0029 fprintf(<span class="string">'\n'</span>) 0029 fprintf(<span class="string">'\n'</span>)
0030 fprintf([<span class="string">'begin : '</span> subname <span class="string">'\n'</span>]) 0030 fprintf([<span class="string">'begin : '</span> subname <span class="string">'\n'</span>])
...@@ -170,6 +171,6 @@ This function is called by: ...@@ -170,6 +171,6 @@ This function is called by:
0103 0103
0104 0104
0105</pre></div> 0105</pre></div>
<hr><address>Generated on Tue 18-Dec-2012 12:37:31 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> <hr><address>Generated on Tue 04-Jun-2013 12:12:57 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body> </body>
</html> </html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Description of example_init_lag</title>
<meta name="keywords" content="example_init_lag">
<meta name="description" content="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
<meta name="robots" content="index, follow">
<link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt; <a href="index.html">fvcom_prepro</a> &gt; example_init_lag.m</div>
<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for fvcom_prepro&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->
<h1>example_init_lag
</h1>
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong></strong></div>
<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>This is a script file. </strong></div>
<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"></pre></div>
<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="plot_field.html" class="code" title="function plot_field(Mobj,PlotField,varargin)">plot_field</a> Plot the mesh, user defined field, open boundary nodes, and river points</li><li><a href="read_fvcom_bath.html" class="code" title="function [h] = read_fvcom_bath(bathfile)">read_fvcom_bath</a> Read fvcom bathymetry file</li><li><a href="read_fvcom_mesh.html" class="code" title="function [Mobj] = read_fvcom_mesh(gridfile)">read_fvcom_mesh</a> Read fvcom mesh file into Matlab mesh object</li><li><a href="setup_metrics.html" class="code" title="function [Mobj] = setup_metrics(Mobj)">setup_metrics</a> Setup metrics for mesh object Mesh</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
<!-- crossreference -->
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 clear all; close all;
0002
0003 <span class="comment">% example script:</span>
0004 <span class="comment">% initialize the online Lagrangian tracking for Julian day (realtime) forcing</span>
0005 <span class="comment">%</span>
0006 <span class="comment">% Author(s):</span>
0007 <span class="comment">% Geoff Cowles (University of Massachusetts Dartmouth)</span>
0008 <span class="comment">%</span>
0009 <span class="comment">% Revision history</span>
0010 <span class="comment">%</span>
0011 <span class="comment">%==============================================================================</span>
0012 <span class="comment">%warning off</span>
0013 type = 2;
0014
0015 <span class="comment">% set mesh/bathymetry files</span>
0016 meshfile = <span class="string">'../Model_Maker/coos01_grd.dat'</span>;
0017 bathfile = <span class="string">'../Model_Maker/coos01_dep.dat'</span>;
0018 lagfile = <span class="string">'test_lag.nc'</span>;
0019
0020 <span class="comment">% start/end time for particles</span>
0021 tbeg = greg2mjulian(2008,01,01,0,0,0);
0022 tend = greg2mjulian(2008,02,01,0,0,0);
0023
0024 <span class="comment">% read in mesh and bathymetry</span>
0025 Mobj = <a href="read_fvcom_mesh.html" class="code" title="function [Mobj] = read_fvcom_mesh(gridfile)">read_fvcom_mesh</a>(meshfile);
0026 Mobj.h = <a href="read_fvcom_bath.html" class="code" title="function [h] = read_fvcom_bath(bathfile)">read_fvcom_bath</a>(bathfile); Mobj.have_bath = true;
0027 Mobj = <a href="setup_metrics.html" class="code" title="function [Mobj] = setup_metrics(Mobj)">setup_metrics</a>(Mobj);
0028
0029
0030 <span class="keyword">if</span>(type==1) <span class="comment">%initialize at all elements</span>
0031
0032 xc = Mobj.xc;
0033 yc = Mobj.yc;
0034 nLag = Mobj.nElems;
0035
0036 <span class="keyword">elseif</span>(type==2) <span class="comment">%initialize along a line of interest</span>
0037 nLag = 10;
0038 p1 = [1.188363e6,194497];
0039 p2 = [1.188548e6,194996];
0040 xp = p1(1):(p2(1)-p1(1))/(nLag-1):p2(1);
0041 yp = p1(2):(p2(2)-p1(2))/(nLag-1):p2(2);
0042
0043 <span class="keyword">end</span>;
0044
0045
0046 <span class="comment">% plot to check</span>
0047 <a href="plot_field.html" class="code" title="function plot_field(Mobj,PlotField,varargin)">plot_field</a>(Mobj,Mobj.h,<span class="string">'title'</span>,<span class="string">'domain'</span>,<span class="string">'withextra'</span>,false,<span class="string">'showgrid'</span>,false); hold on;
0048 plot(xp,yp,<span class="string">'ro'</span>);
0049
0050
0051 <span class="comment">% dump the initial particle position file</span>
0052 nc = netcdf(lagfile,<span class="string">'clobber'</span>);
0053 nc.references = <span class="string">'http://fvcom.smast.umassd.edu'</span>;
0054 nc.source = <span class="string">'lag_init.m'</span>;
0055 nc.info = <span class="string">'debugging '</span>;
0056
0057
0058
0059
0060
0061
0062 <span class="comment">% dimensions</span>
0063 nc(<span class="string">'nparticles'</span>) = nLag;
0064
0065 <span class="comment">% particle vars</span>
0066 nc{<span class="string">'x'</span>} = ncfloat(<span class="string">'nparticles'</span>);
0067 nc{<span class="string">'x'</span>}.long_name = <span class="string">'particle x position'</span>;
0068 nc{<span class="string">'x'</span>}.units = <span class="string">'m'</span>;
0069
0070 nc{<span class="string">'y'</span>} = ncfloat(<span class="string">'nparticles'</span>);
0071 nc{<span class="string">'y'</span>}.long_name = <span class="string">'particle y position'</span>;
0072 nc{<span class="string">'y'</span>}.units = <span class="string">'m'</span>;
0073
0074 nc{<span class="string">'z'</span>} = ncfloat(<span class="string">'nparticles'</span>);
0075 nc{<span class="string">'z'</span>}.long_name = <span class="string">'particle z position'</span>;
0076 nc{<span class="string">'z'</span>}.units = <span class="string">'m'</span>;
0077
0078 nc{<span class="string">'pathlength'</span>} = ncfloat(<span class="string">'nparticles'</span>);
0079 nc{<span class="string">'pathlength'</span>}.long_name = <span class="string">'particle integrated path length'</span>;
0080 nc{<span class="string">'pathlength'</span>}.units = <span class="string">'m'</span>;
0081
0082 nc{<span class="string">'tbeg'</span>} = ncfloat(<span class="string">'nparticles'</span>);
0083 nc{<span class="string">'tbeg'</span>}.long_name = <span class="string">'particle release time'</span>;
0084 nc{<span class="string">'tbeg'</span>}.units = <span class="string">'days since 1858-11-17 00:00:00'</span>;
0085 nc{<span class="string">'tbeg'</span>}.format = <span class="string">'modified julian day (MJD)'</span>;
0086 nc{<span class="string">'tbeg'</span>}.time_zone = <span class="string">'UTC'</span>;
0087
0088 nc{<span class="string">'tend'</span>} = ncfloat(<span class="string">'nparticles'</span>);
0089 nc{<span class="string">'tend'</span>}.long_name = <span class="string">'particle freeze time'</span>;
0090 nc{<span class="string">'tend'</span>}.units = <span class="string">'days since 1858-11-17 00:00:00'</span>;
0091 nc{<span class="string">'tend'</span>}.format = <span class="string">'modified julian day (MJD)'</span>;
0092 nc{<span class="string">'tend'</span>}.time_zone = <span class="string">'UTC'</span>;
0093
0094
0095 nc{<span class="string">'group'</span>} = ncint(<span class="string">'nparticles'</span>);