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 3ac27449 authored by Pierre Cazenave's avatar Pierre Cazenave

Prepare for a new release.

parent d6a0c75b
Pierre Cazenave <pica@pml.ac.uk> fvcom-toolbox ChangeLog
20190220
--------
Minor update.
Thanks to Ricardo Torres and Simon Waldman for their contributions.
README.md
Updated with the current release details.
doc:
Updated for the latest release.
fvcom_postproc:
do_surface_plotMatlabMap
* Cosmetic changes to the plot.
show_max_CFL
* New function to compute the CFL number for a given grid.
fvcom_prepro:
add_obc_node_list
* Fix checks for invalid open boundaries.
add_sponge_nodes_list
* Code cleanup.
add_weights_FVCOM_nested_forcing
* Fix shape of the weights for the nodes.
change_shallow_bathy
* New function to adjust bathymetry in the grid.
find_nesting_region
* Code cleanup.
hybrid_coordinate
* Fix output format for the sigma file.
interp_POLCOMS2FVCOM
* Merge the v1 version of this and remove the duplicate.
make_default_nml
* Tweak the default number format for bed roughness.
read_fabm_variables
* Code cleanup.
read_sigma
* Add complete support for generalised and hyperbolic tangent sigma distributions.
read_sms_mesh
* Allow a given depth file to override values in the .2dm.
set_elevtide_tmd
* Add argument for the location of the TMD data.
write_FVCOM_river_nml
* Add argument to supply a vertical distribution as fractional depths (0-1).
write_FVCOM_tsobcERSEM
* Code cleanup.
utilities:
ComputeMatricRx1_nodes
* New function to calculate the hydrostatic consistency condition.
Times2Datetime
* New function to convert FVCOM 'Times' to MATLAB datetime objects.
concat_by_struct
* New function to concatenate data contained within a structure.
mjul2str
* Make the input always be a double.
plot_fvcom_field
* Add quiver plotting option.
read_FVCOM_river_file
* New function to read in FVCOM river files.
read_netCDF_FVCOM
* Fix loading data with only a single time stamp.
restrict_spatial_indices
* New function to eliminate nodes and elements for some given mask.
sigma_gen
* Add comment about potential bug (not yet fully investigated).
sigma_tanh
* Add option to return the sigma data into the supplied mesh object.
tubine_area_sigma
* Add option to plot into subplots.
20180201
--------
......
......@@ -22,6 +22,7 @@ Notes:
The PML version of the toolbox includes tagged releases, which can be downloaded as standalone (and thus relatively stable) versions. See the PML_ChangeLog.txt for details. Links to the direct downloads are:
- v20190220: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20190120
- v20180201: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20180201
- v20160811: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20160811
- v20160218: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20160218
......
......@@ -59,6 +59,6 @@ This function is called by:
0007 <span class="comment">% Revision history</span>
0008 <span class="comment">%</span>
0009 <span class="comment">%==============================================================================</span></pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -114,6 +114,6 @@ This function is called by:
0061 <span class="comment">% Calculate direction and magnitude.</span>
0062 rDir=atan2(uDiff,vDiff)*(180/pi); <span class="comment">% in degrees.</span>
0063 rMag=sqrt(uDiff.^2+vDiff.^2)/tideDuration; <span class="comment">% in units/s.</span></pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -121,6 +121,6 @@ This function is called by:
0076 <span class="keyword">end</span>
0077 <span class="keyword">end</span>
0078</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -168,6 +168,6 @@ This function is called by:
0094
0095 <span class="keyword">return</span>
0096</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -110,6 +110,6 @@ This function is called by:
0066
0067 <span class="keyword">return</span>
0068</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -118,6 +118,6 @@ This function is called by:
0074
0075 <span class="keyword">return</span>
0076</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -186,6 +186,6 @@ This function is called by:
0111 plot(X,Y,<span class="string">'r'</span>,<span class="string">'LineWidth'</span>,2.5)
0112 <span class="keyword">end</span>
0113</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -194,6 +194,6 @@ This function is called by:
0120 delete(Plots(plotOPTS.figure).handles(:))
0121 <span class="keyword">end</span>
0122 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -238,6 +238,6 @@ This function is called by:
0164 <span class="comment">% delete(Plots(plotOPTS.figure).handles(:))</span>
0165 <span class="comment">% end</span>
0166 <span class="comment">% end</span></pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -224,6 +224,6 @@ This function is called by:
0150 <span class="comment">% delete(Plots(plotOPTS.figure).handles(:))</span>
0151 <span class="comment">% end</span>
0152 <span class="comment">% end</span></pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -184,6 +184,6 @@ This function is called by:
0120 <span class="comment">% vector plots requires correct lat and lon for u and v positions: FVCOM.xc</span>
0121 <span class="comment">% and FVCOM.yc. Remember to extract them</span>
0122 PLotoutV=<a href="do_vector_plot.html" class="code" title="function [Plots]=do_vector_plot(plotOPTS,FVCOM)">do_vector_plot</a>(plotOPTS,FVCOM)</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -16,4 +16,5 @@ digraph m2html {
do_vector_plot_MatlabMap [URL="do_vector_plot_MatlabMap.html"];
do_vector_plot_MatlabMapC [URL="do_vector_plot_MatlabMapC.html"];
example_surface_plot [URL="example_surface_plot.html"];
show_max_CFL [URL="show_max_CFL.html"];
}
\ No newline at end of file
......@@ -34,6 +34,6 @@
</map>
</center>
<hr><address>Generated on Thu 01-Feb-2018 09:48:59 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 Wed 20-Feb-2019 16:06:00 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
......@@ -19,7 +19,7 @@
<h2>Matlab files in this directory:</h2>
<table>
<tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="README.html">README</a></td><td>README for FVCOM_postproc </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_residual.html">do_residual</a></td><td>DO_RESIDUAL Takes the u and v vectors of a model output and calculates </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_residual_plot.html">do_residual_plot</a></td><td>Take the output of do_residual and plot as a vector figure. Summarises a </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_surface_plot.html">do_surface_plot</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_surface_plotMatlabMap.html">do_surface_plotMatlabMap</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_surface_plotVel.html">do_surface_plotVel</a></td><td>reads image and plots tracks or stations </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_surface_plotVelMatlabMap.html">do_surface_plotVelMatlabMap</a></td><td>reads image and plots tracks or stations </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_transect_plot.html">do_transect_plot</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_vector_plot.html">do_vector_plot</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_vector_plot_MatlabMap.html">do_vector_plot_MatlabMap</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_vector_plot_MatlabMapC.html">do_vector_plot_MatlabMapC</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="example_surface_plot.html">example_surface_plot</a></td><td>Sample script to extract and generate m_map contours of tracer variables </td></tr></table>
<tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="README.html">README</a></td><td>README for FVCOM_postproc </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_residual.html">do_residual</a></td><td>DO_RESIDUAL Takes the u and v vectors of a model output and calculates </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_residual_plot.html">do_residual_plot</a></td><td>Take the output of do_residual and plot as a vector figure. Summarises a </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_surface_plot.html">do_surface_plot</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_surface_plotMatlabMap.html">do_surface_plotMatlabMap</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_surface_plotVel.html">do_surface_plotVel</a></td><td>reads image and plots tracks or stations </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_surface_plotVelMatlabMap.html">do_surface_plotVelMatlabMap</a></td><td>reads image and plots tracks or stations </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_transect_plot.html">do_transect_plot</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_vector_plot.html">do_vector_plot</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_vector_plot_MatlabMap.html">do_vector_plot_MatlabMap</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="do_vector_plot_MatlabMapC.html">do_vector_plot_MatlabMapC</a></td><td> </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="example_surface_plot.html">example_surface_plot</a></td><td>Sample script to extract and generate m_map contours of tracer variables </td></tr><tr><td><img src="../matlabicon.gif" alt="" border="">&nbsp;<a href="show_max_CFL.html">show_max_CFL</a></td><td>SHOW_MAX-CFL Function to find the max CFL encountered in each mesh element during an FVCOM model </td></tr></table>
<h2>Subsequent directories:</h2>
......@@ -29,6 +29,6 @@
<ul style="list-style-image:url(../simulinkicon.gif)">
<li>View the <a href="graph.html">Graph</a>.</li>
</ul>
<hr><address>Generated on Thu 01-Feb-2018 09:48:59 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 Wed 20-Feb-2019 16:06:00 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
This diff is collapsed.
......@@ -83,6 +83,6 @@ This function is called by:
0019 <span class="comment">% Revision history</span>
0020 <span class="comment">%</span>
0021 <span class="comment">%==============================================================================</span></pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -144,6 +144,6 @@ This function is called by:
0074
0075
0076</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -160,6 +160,6 @@ This function is called by:
0088 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0089 <span class="keyword">end</span>;
0090</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -149,7 +149,7 @@ This function is called by:
0062 [~, Nidx] = unique(Nodelist);
0063 Nodelist = Nodelist(sort(Nidx));
0064
0065 assert(max(Nodelist) &lt; Mobj.nVerts, <span class="string">'Your open boundary node number exceed the total number of nodes in the domain\n'</span>)
0065 assert(max(Nodelist) &lt;= Mobj.nVerts, <span class="string">'Your open boundary node number (%d) exceeds the total number of nodes in the domain (%d)'</span>, max(Nodelist), Mobj.nVerts)
0066
0067 <span class="comment">%--------------------------------------------------------------------------</span>
0068 <span class="comment">% Plot the mesh</span>
......@@ -189,6 +189,6 @@ This function is called by:
0102 fprintf(<span class="string">'\nend : %s\n'</span>, subname)
0103 <span class="keyword">end</span>
0104</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -166,6 +166,6 @@ This function is called by:
0094 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0095 <span class="keyword">end</span>;
0096</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -175,6 +175,6 @@ This function is called by:
0096 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0097 <span class="keyword">end</span>
0098</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -91,6 +91,6 @@ This function is called by:
0045 nc = close(nc);
0046
0047</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -157,6 +157,6 @@ This function is called by:
0085
0086 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0087</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -111,7 +111,7 @@ This function is called by:
0036
0037 <span class="keyword">global</span> ftbverbose
0038 <span class="keyword">if</span> ftbverbose
0039 fprintf(<span class="string">'\nbegin : %s\m'</span>, subname)
0039 fprintf(<span class="string">'\nbegin : %s\n'</span>, subname)
0040 <span class="keyword">end</span>
0041
0042 <span class="comment">% Do we want a figure showing how we're getting along?</span>
......@@ -133,11 +133,11 @@ This function is called by:
0058 <span class="keyword">end</span>
0059
0060 figure
0061 patch(<span class="string">'Vertices'</span>,[x,y],<span class="string">'Faces'</span>,Mobj.tri,<span class="keyword">...</span>
0062 <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 hold on;
0064 plot(x(SpongeList),y(SpongeList),<span class="string">'wx'</span>)
0065 axis(<span class="string">'equal'</span>,<span class="string">'tight'</span>)
0061 patch(<span class="string">'Vertices'</span>, [x, y], <span class="string">'Faces'</span>, Mobj.tri, <span class="keyword">...</span>
0062 <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 hold on
0064 plot(x(SpongeList), y(SpongeList), <span class="string">'wx'</span>)
0065 axis(<span class="string">'equal'</span>, <span class="string">'tight'</span>)
0066 <span class="keyword">end</span>
0067
0068 npts = length(SpongeList);
......@@ -162,13 +162,13 @@ This function is called by:
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;
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;
0091 <span class="keyword">end</span>
0092
0093 <span class="keyword">if</span> ftbverbose
0094 fprintf(<span class="string">'end : %s\n'</span>, subname)
0095 <span class="keyword">end</span>
0096</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -206,6 +206,6 @@ This function is called by:
0114 <span class="keyword">if</span> ftbverbose
0115 fprintf(<span class="string">'end : %s\n'</span>, subname)
0116 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -182,6 +182,6 @@ This function is called by:
0106 fprintf(<span class="string">'end : %s\n'</span>, subname)
0107 <span class="keyword">end</span>
0108</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -222,7 +222,7 @@ This function is called by:
0141
0142
0143 netcdf.putVar(nc2read, cweights_varid, nest.weight_cell);
0144 netcdf.putVar(nc2read, nweights_varid, nest.weight_node');
0144 netcdf.putVar(nc2read, nweights_varid, nest.weight_node);
0145 <span class="keyword">catch</span> e
0146 fprintf(e.message)
0147 error(<span class="string">'Adding variable %s failed - does the variable already exist?'</span>, <span class="string">'weight_cell'</span>)
......@@ -235,6 +235,6 @@ This function is called by:
0154 <span class="keyword">if</span> ftbverbose
0155 fprintf(<span class="string">'end : %s\n'</span>, subname)
0156 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -170,6 +170,6 @@ This function is called by:
0094 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0095 <span class="keyword">end</span>
0096</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Description of change_shallow_bathy</title>
<meta name="keywords" content="change_shallow_bathy">
<meta name="description" content="Deepens shallow nodes by setting a minimum depth and making nodes that">
<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; change_shallow_bathy.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>change_shallow_bathy
</h1>
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Deepens shallow nodes by setting a minimum depth and making nodes that</strong></div>
<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function M = change_shallow_bathy(M, min_depth) </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"> Deepens shallow nodes by setting a minimum depth and making nodes that
are too shallow the mean of the surrouding deep nodes. Loop until all
nodes are deeper than the minuimum depth required.
function [M]=change_shallow_bathy(M, min_depth)
DESCRIPTION:
INPUT:
M = Mesh object
min_depth = the minimum depth of nodes
OUTPUT:
Nested Mesh object with altered bathymetry.
EXAMPLE USAGE:
Author(s):
Rory O'Hara Murray (Marine Scotland Science)
Revision history:
2014 sometime - first version
==========================================================================</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)">
</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 <a name="_sub0" href="#_subfunctions" class="code">function M = change_shallow_bathy(M, min_depth)</a>
0002 <span class="comment">% Deepens shallow nodes by setting a minimum depth and making nodes that</span>
0003 <span class="comment">% are too shallow the mean of the surrouding deep nodes. Loop until all</span>
0004 <span class="comment">% nodes are deeper than the minuimum depth required.</span>
0005 <span class="comment">%</span>
0006 <span class="comment">% function [M]=change_shallow_bathy(M, min_depth)</span>
0007 <span class="comment">%</span>
0008 <span class="comment">% DESCRIPTION:</span>
0009 <span class="comment">%</span>
0010 <span class="comment">% INPUT:</span>
0011 <span class="comment">% M = Mesh object</span>
0012 <span class="comment">% min_depth = the minimum depth of nodes</span>
0013 <span class="comment">%</span>
0014 <span class="comment">% OUTPUT:</span>
0015 <span class="comment">% Nested Mesh object with altered bathymetry.</span>
0016 <span class="comment">%</span>
0017 <span class="comment">% EXAMPLE USAGE:</span>
0018 <span class="comment">%</span>
0019 <span class="comment">%</span>
0020 <span class="comment">% Author(s):</span>
0021 <span class="comment">% Rory O'Hara Murray (Marine Scotland Science)</span>
0022 <span class="comment">%</span>
0023 <span class="comment">% Revision history:</span>
0024 <span class="comment">% 2014 sometime - first version</span>
0025 <span class="comment">%</span>
0026 <span class="comment">%==========================================================================</span>
0027
0028 count = 0;
0029 h=-99; <span class="comment">% just to start</span>
0030
0031 <span class="keyword">while</span> sum(h==-99)&gt;0
0032 count=count+1;
0033 disp([<span class="string">'iteration # '</span> num2str(count)])
0034 I = M.h&lt;=min_depth; <span class="comment">% find shallow nodes as depth is +ve down.</span>
0035 If = find(I);
0036 h = [];
0037
0038 <span class="comment">% loop through all shallow nodes with depth&lt;=min_depth</span>
0039 <span class="keyword">for</span> ii=1:length(If)
0040
0041 <span class="comment">% find elements surrounding the shallow node</span>
0042 test = [];
0043 <span class="keyword">for</span> jj=1:3
0044 test = [test; find(M.tri(:,jj)==If(ii))];
0045 <span class="keyword">end</span>
0046 <span class="comment">% find nodes for all these elements surrounding the shallow node</span>
0047 <span class="comment">% (the surrounding nodes)</span>
0048 nodes = unique(M.tri(test,:));
0049
0050 htmp = M.h(nodes);
0051 bla = htmp&gt;min_depth; <span class="comment">% find the nodes that are deeper than min_depth</span>
0052 <span class="keyword">if</span> sum(bla)&gt;0
0053 h(ii) = mean(htmp(bla));<span class="comment">% make the shallow node the mean of the surrounding nodes deeper than min_depth</span>
0054 <span class="keyword">else</span>
0055 h(ii) = -99; <span class="comment">% id no deep surroundign nodes then make it -99 and try again.</span>
0056 <span class="keyword">end</span>
0057 <span class="keyword">end</span>
0058 M.h(I) = h; <span class="comment">% save changes to the Mobj array.</span>
0059 <span class="keyword">end</span>
0060
0061 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Wed 20-Feb-2019 16:06:01 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
......@@ -202,6 +202,6 @@ This function is called by:
0131 fclose(fid);
0132
0133 disp(<span class="string">'finished creating nesting file'</span>);</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -123,6 +123,6 @@ This function is called by:
0057
0058 <span class="comment">%fprintf(['end : ' subname '\n'])</span>
0059</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -180,6 +180,6 @@ This function is called by:
0105 c = 2 * atan2(sqrt(a), sqrt(1-a));
0106 km = R * c; <span class="comment">% distance in metres</span>
0107</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 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 Wed 20-Feb-2019 16:06:01 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
......@@ -138,6 +138,6 @@ This function is called by:
0069 <span class="comment">% end</span>
0070
0071</pre></div>
<hr><address>Generated on Thu 01-Feb-2018 09:49:00 by <strong>