Commit eb348a3b authored by Pierre Cazenave's avatar Pierre Cazenave

Merge the changes from the dev branch for a new release.

parents 91c4dca9 776cc639
Pierre Cazenave <pica@pml.ac.uk> fvcom-toolbox ChangeLog
20151207
--------
Fairly significant change this time. Added new functions to work with the tidal
turbine parameterisation added to the UK FVCOM code by Rory O'Hara Murray
(Marine Scotland Science). Also added initial support for ECMWF ERA-20C forcing
data. Includes numerous bug fixes and miscellaneous code improvements
(standardising history variables in netCDFs generated with the toolbox, for
example).
README.md
* Update the list of releases of this toolbox.
doc:
Update all the documentation for this release.
examples:
example.m
* Move existing example scripts into the examples directory to clean up
the toolbox a bit.
example2.m
* Move existing example scripts into the examples directory to clean up
the toolbox a bit.
example_FVCOM_river.m
* Move existing example scripts into the examples directory to clean up
the toolbox a bit.
example_FVCOM_tsobc.m
* Move existing example scripts into the examples directory to clean up
the toolbox a bit.
example_FVCOM_wind_ts.m
* Move existing example scripts into the examples directory to clean up
the toolbox a bit.
example_FVCOM_wind_ts_speed.m
* Move existing example scripts into the examples directory to clean up
the toolbox a bit.
example_init_lag.m
* Move existing example scripts into the examples directory to clean up
the toolbox a bit.
example_my_project.m
* Move existing example scripts into the examples directory to clean up
the toolbox a bit.
tidal_turbine_example.m
* Example script showing how to use Rory O'Hara Murray's tidal turbine
parameterisation changes in the UK FVCOM code.
fvcom_prepro:
README.m
* Add the additional authors to the list of authors.
add_coriolis.m
* Fix bug in the variabel to check when setting the Coriolis. The code
now checks for spherical coordinates rather than checking whether the
Coriolis has been set. The broken behaviour was a bit recursive.
estimate_ts.m
* Set the initial values to infinite rather than ones to make the test
more robust.
fix_river_nodes.m
* New function to check the river nodes assigned to your model are
valid.
* Split rivers over multiple nodes if the discharge exceeds
a user-defined threshold value.
generate_mjd.m
* REMOVED (uses the old mexnc netCDF interface).
get_CFS_forcing.m
* Updated significantly to download and process the NCEP CFSv2
reanalysis data. Data are available for use from 1979-2009 (inclusive).
get_EA_river_climatology.m
* Add check for whether any rivers have actually been added to prevent
crashes.
get_EHYPE_rivers.m
* Add check for whether any rivers have actually been added to prevent
crashes.
* Fix handling of duplicate river nodes.
get_ERA_forcing.m
* New function to add and process ECMWF ERA-20C forcing data. Requires
netCDFs to have been previously downloaded.
get_HYCOM_forcing.m
* Add support for the Global Reanalysis data which extends coverage
back to 1992 (previously limited to 2008 with the Global Analysis
data). The Global Analysis data is used from 2008 onwards even though
the reanalysis exists up to 2012.
get_HYCOM_tsobc.m
* Remove the old parallel processing bits and replace with the modern
versions.
* Also add bounds checking for data downloaded using Python.
get_NCEP_forcing.m
* Add support for multi-year downloads.
* Fix some of the variables to download too.
init_lag.m
* Add consistent history variable to the generated netCDF.
read_sms_mesh.m
* Populate the alternative coordinate system with zeros rather
than repeating the values. Also add element centre coordinates for
cartesian coordinates. This is somewhat redundant given setup_metrics
does this anyway.
wrf2fvcom.m
* Function to convert WRF output to FVCOM formatted netCDFs. Thanks to
Dmitry Aleynik for his example script upon which this script is based.
write_FVCOM_TT.m
* New function to generate a netCDF file containing the tidal turbine
parameters for FVCOM.
write_FVCOM_elevtide.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_forcing.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_groundwater.m
* New function to generate a groundwater forcing file for FVCOM.
write_FVCOM_heating.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_meanflow.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_nested_forcing.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_obs_TS.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_river.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_river_ERSEM.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_spectide.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_tsobc.m
* Add consistent history variable to the generated netCDF.
* Tidy the help too.
write_FVCOM_tsobcERSEM.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_wind_ts_speed.m
* Add consistent history variable to the generated netCDF.
write_FVCOM_z0.m
* Add consistent history variable to the generated netCDF.
write_WRF_forcing.m
* Add consistent history variable to the generated netCDF.
utilities:
do_ph_change_plot.m
* Clear out old useless scripts.
do_ph_change_points_plot.m
* Clear out old useless scripts.
do_ph_max_change_plot.m
* Clear out old useless scripts.
do_volume.m
* Clear out old useless scripts.
do_volume_change.m
* Clear out old useless scripts.
do_volume_change2.m
* Clear out old useless scripts.
get_BADC_data.m
* Add optional arguments for username and password for the BADC
servers.
grid2fvcom.m
* Update the parallel processing commands.
* Add option to enable output on element centres to save memory. The
default has changed to only be on nodes now. Only u and v data need to
be output to element centres (e.g. wind, stress).
qair2rh.m
* Formatting changes mostly.
turbine_area_sigma.m
* Calculate the fraction of the tidal turbine rotor swept area
occupying each sigma layer.
20150319
--------
......
......@@ -12,23 +12,27 @@ Notes:
(0) Some third-party MATLAB toolboxes are required for some functions:
* The Tidal Model Driver available at http://polaris.esr.org/ptm_index.html.
* The Tidal Model Driver available at http://polaris.esr.org/ptm_index.html and https://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/TMD (with minor fixes).
* The air-sea toolbox available at http://woodshole.er.usgs.gov/operations/sea-mat/air_sea-html/index.html.
* The OPeNDAP toolbox (for versions of MATLAB older than 2011b) available at http://www.opendap.org/pub/contributed/source/ml-toolbox/.
(1) The html based documentation is generated using m2html and is available with the download (see doc/index.html)
(2) The code was originally maintained at a Google Code repository (http://code.google.com/p/fvcom-toolbox/). This repository was used between Sep, 2010 (initial commit) and July, 2013 when it was moved to github (https://github.com/GeoffCowles/fvcom-toolbox). Commit history was not maintained during the move as substantial revisions had been made to the code by Plymouth Marine Laboratory members outside of version control. The github trunk includes most of these changes noted in the file headers and noted in the file PML_ChangeLog.txt. Although the development from the version included in FVCOM (github.com/GeoffCowles/fvcom-toolbox) is discontinuous from the version worked on by PML (and NOC and others), a commit history is available at http://gitlab.ecosystem-modelling.pml.ac.uk/pica/fvcom-toolbox or https://github.com/pwcazenave/fvcom-toolbox.
(2) The code was originally maintained at a Google Code repository (http://code.google.com/p/fvcom-toolbox/). This repository was used between Sep, 2010 (initial commit) and July, 2013 when it was moved to github (https://github.com/GeoffCowles/fvcom-toolbox). Commit history was not maintained during the move as substantial revisions had been made to the code by Plymouth Marine Laboratory members outside of version control. The github trunk includes most of these changes noted in the file headers and noted in the file PML_ChangeLog.txt. Although the development from the version included in FVCOM (github.com/GeoffCowles/fvcom-toolbox) is discontinuous from the version worked on by PML (and NOC and others), a commit history is available at http://gitlab.ecosystem-modelling.pml.ac.uk/fvcom/fvcom-toolbox or https://github.com/pwcazenave/fvcom-toolbox.
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:
- v2014-04-23: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20140423
- v2014-01-31: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20140131
- v2013-09-17: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130917
- v2013-07-19: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130719
- v2013-05-21: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130521
- v2013-04-03: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130403
- v2013-02-04: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130204
- v20151207: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20151207
- v20150319: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20150319
- v20141017: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20141017
- v20140728: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20140728
- v20140423: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20140423
- v20140131: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20140131
- v20130917: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130917
- v20130719: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130719
- v20130521: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130521
- v20130403: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130403
- v20130204: https://github.com/pwcazenave/fvcom-toolbox/releases/tag/20130204
To download the version included in the FVCOM source code, go to https://github.com/GeoffCowles/fvcom-toolbox.
......@@ -44,7 +48,6 @@ If you are stuck for something to get started with on the toolbox, there are som
* example_FVCOM_wind_ts.m
* example_FVCOM_wind_ts_speed.m
* example_init_lag.m
* generate_mjd.m
* wrf2fvcom_U10V10.m
* write_FVCOM_bedflag.m
- swan_scripts:
......
......@@ -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 Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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=do_vector_plot(plotOPTS,FVCOM)</pre></div>
<hr><address>Generated on Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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,11 +19,11 @@
<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="133,29,130,22,121,15,107,10,89,7,69,5,50,7,32,10,17,15,8,22,5,29,8,37,17,43,32,49,50,52,69,53,89,52,107,49,121,43,130,37">
<area shape="poly" id="node1" href="README.html" title="README" alt="" coords="134,29,130,22,121,15,107,10,89,7,69,5,50,7,32,10,18,15,8,22,5,29,8,37,18,43,32,49,50,52,69,53,89,52,107,49,121,43,130,37">
<area shape="poly" id="node2" href="example_surface_plot.html" title="example_surface_plot" alt="" coords="395,29,389,22,372,15,346,10,313,7,276,5,239,7,206,10,180,15,163,22,157,29,163,37,180,43,206,49,239,52,276,53,313,52,346,49,372,43,389,37">
</map>
</center>
<hr><address>Generated on Tue 29-Jul-2014 15:11:01 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 Mon 07-Dec-2015 09:59:23 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="133,29,130,22,121,15,107,10,89,7,69,5,50,7,32,10,17,15,8,22,5,29,8,37,17,43,32,49,50,52,69,53,89,52,107,49,121,43,130,37">
<area shape="poly" id="node1" href="README.html" title="README" alt="" coords="134,29,130,22,121,15,107,10,89,7,69,5,50,7,32,10,18,15,8,22,5,29,8,37,18,43,32,49,50,52,69,53,89,52,107,49,121,43,130,37">
<area shape="poly" id="node2" href="example_surface_plot.html" title="example_surface_plot" alt="" coords="395,29,389,22,372,15,346,10,313,7,276,5,239,7,206,10,180,15,163,22,157,29,163,37,180,43,206,49,239,52,276,53,313,52,346,49,372,43,389,37">
doc/fvcom_postproc/graph.png

8.02 KB | W: | H:

doc/fvcom_postproc/graph.png

9.36 KB | W: | H:

doc/fvcom_postproc/graph.png
doc/fvcom_postproc/graph.png
doc/fvcom_postproc/graph.png
doc/fvcom_postproc/graph.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -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 Tue 29-Jul-2014 15:10: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 Mon 07-Dec-2015 09:59:22 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
......@@ -39,6 +39,11 @@
Geoff Cowles (University of Massachusetts Dartmouth)
Ricardo Torres (Plymouth Marine Laboratory)
Pierre Cazenave (Plymouth Marine Laboratory)
Karen Amoudry (National Oceanography Centre, Liverpool)
Rory O'Hara Murray (Marine Scotland Science)
Hakeem Johnson (CH2M-Hill)
Chang Liu (University of Massachusetts Dartmouth)
Jenny Brown (National Oceanography Centre, Liverpool)
Revision history
......@@ -69,10 +74,15 @@ This function is called by:
0010 <span class="comment">% Geoff Cowles (University of Massachusetts Dartmouth)</span>
0011 <span class="comment">% Ricardo Torres (Plymouth Marine Laboratory)</span>
0012 <span class="comment">% Pierre Cazenave (Plymouth Marine Laboratory)</span>
0013 <span class="comment">%</span>
0014 <span class="comment">% Revision history</span>
0015 <span class="comment">%</span>
0016 <span class="comment">%==============================================================================</span></pre></div>
<hr><address>Generated on Tue 29-Jul-2014 15:11:16 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
0013 <span class="comment">% Karen Amoudry (National Oceanography Centre, Liverpool)</span>
0014 <span class="comment">% Rory O'Hara Murray (Marine Scotland Science)</span>
0015 <span class="comment">% Hakeem Johnson (CH2M-Hill)</span>
0016 <span class="comment">% Chang Liu (University of Massachusetts Dartmouth)</span>
0017 <span class="comment">% Jenny Brown (National Oceanography Centre, Liverpool)</span>
0018 <span class="comment">%</span>
0019 <span class="comment">% Revision history</span>
0020 <span class="comment">%</span>
0021 <span class="comment">%==============================================================================</span></pre></div>
<hr><address>Generated on Mon 07-Dec-2015 09:59:26 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
......@@ -62,7 +62,7 @@ This function calls:
</ul>
This function is called by:
<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><li><a href="read_grid_mesh.html" class="code" title="function [Mobj] = read_grid_mesh(varargin)">read_grid_mesh</a> Read .grid mesh files into Matlab mesh object</li></ul>
<li><a href="read_grid_mesh.html" class="code" title="function [Mobj] = read_grid_mesh(varargin)">read_grid_mesh</a> Read .grid mesh files into Matlab mesh object</li><li><a href="read_sms_mesh.html" class="code" title="function [Mobj] = read_sms_mesh(varargin)">read_sms_mesh</a> Read sms mesh files into Matlab mesh object.</li></ul>
<!-- crossreference -->
......@@ -111,7 +111,7 @@ This function is called by:
0041 <span class="keyword">if</span>(exist(<span class="string">'cortype'</span>))
0042 <span class="keyword">if</span>(cortype(1:3)==<span class="string">'use'</span>)
0043 CorType = <span class="string">'uselatitude'</span>;
0044 <span class="keyword">if</span>(~Mobj.have_cor)
0044 <span class="keyword">if</span>(~Mobj.have_lonlat)
0045 error(<span class="string">'To set Coriolis with latitude, need (lon,lat) field in Mesh structure'</span>)
0046 <span class="keyword">end</span>;
0047 <span class="keyword">else</span>
......@@ -144,6 +144,6 @@ This function is called by:
0074
0075
0076</pre></div>
<hr><address>Generated on Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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 Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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
......@@ -58,6 +58,7 @@
2013-01-02 KJA bug fix: amended usage of 'unique' in line 53 to
prevent it from sorting the values it returns. Amended by Pierre to
support pre-2012 versions of MATLAB whilst giving the same result.
2015-02-23 Output number of nodes if the verbose flag is set.
==========================================================================</pre></div>
......@@ -68,13 +69,13 @@ This function calls:
</ul>
This function is called by:
<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>
</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 [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType,plotFig) </a>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType,plotFig)</a>
0002
0003 <span class="comment">% Add a set of obc nodes comprising a single obc boundary to Mesh structure</span>
0004 <span class="comment">% Using a list of nodes</span>
......@@ -107,68 +108,72 @@ This function is called by:
0031 <span class="comment">% 2013-01-02 KJA bug fix: amended usage of 'unique' in line 53 to</span>
0032 <span class="comment">% prevent it from sorting the values it returns. Amended by Pierre to</span>
0033 <span class="comment">% support pre-2012 versions of MATLAB whilst giving the same result.</span>
0034 <span class="comment">%</span>
0035 <span class="comment">%==========================================================================</span>
0036 subname = <span class="string">'add_obc_nodes'</span>;
0037 <span class="keyword">global</span> ftbverbose
0038 <span class="keyword">if</span>(ftbverbose)
0039 fprintf(<span class="string">'\n'</span>)
0040 fprintf([<span class="string">'begin : '</span> subname <span class="string">'\n'</span>])
0041 <span class="keyword">end</span>
0042
0043 <span class="comment">% Do we want a figure showing how we're getting along?</span>
0044 <span class="keyword">if</span> nargin == 4
0045 plotFig = 0;
0046 <span class="keyword">end</span>
0047
0048 <span class="comment">%--------------------------------------------------------------------------</span>
0049 <span class="comment">% Get a unique list and make sure they are in the range of node numbers</span>
0050 <span class="comment">%--------------------------------------------------------------------------</span>
0051 <span class="comment">% Make this works in versions of MATLAB older than 2012a (newer versions</span>
0052 <span class="comment">% can just use unique(A, 'stable'), but checking versions is a pain).</span>
0053 [~, Nidx] = unique(Nlist);
0054 Nlist = Nlist(sort(Nidx));
0055
0056 <span class="keyword">if</span> max(Nlist) &gt; Mobj.nVerts
0057 fprintf(<span class="string">'your open boundary node number exceed the total number of nodes in the domain\n'</span>);
0058 error(<span class="string">'stopping...'</span>)
0059 <span class="keyword">end</span>
0060
0061 <span class="comment">%--------------------------------------------------------------------------</span>
0062 <span class="comment">% Plot the mesh</span>
0063 <span class="comment">%--------------------------------------------------------------------------</span>
0064 <span class="keyword">if</span> plotFig == 1
0065 <span class="keyword">if</span> strcmpi(Mobj.nativeCoords(1:3), <span class="string">'car'</span>)
0066 x = Mobj.x;
0067 y = Mobj.y;
0068 <span class="keyword">else</span>
0069 x = Mobj.lon;
0070 y = Mobj.lat;
0071 <span class="keyword">end</span>
0072
0073 figure
0074 patch(<span class="string">'Vertices'</span>,[x,y],<span class="string">'Faces'</span>,Mobj.tri,<span class="keyword">...</span>
0075 <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>);
0076 hold on;
0077 whos Nlist
0078 plot(x(Nlist),y(Nlist),<span class="string">'ro'</span>);
0079 axis(<span class="string">'equal'</span>,<span class="string">'tight'</span>)
0080 title(<span class="string">'open boundary nodes'</span>);
0081 <span class="keyword">end</span>
0082
0083 <span class="comment">% add to mesh object</span>
0084 npts = numel(Nlist);
0085 Mobj.nObs = Mobj.nObs + 1;
0086 Mobj.nObcNodes(Mobj.nObs) = npts;
0087 Mobj.obc_nodes(Mobj.nObs,1:npts) = Nlist;
0088 Mobj.obc_name{Mobj.nObs} = ObcName;
0089 Mobj.obc_type(Mobj.nObs) = ObcType;
0090
0034 <span class="comment">% 2015-02-23 Output number of nodes if the verbose flag is set.</span>
0035 <span class="comment">%</span>
0036 <span class="comment">%==========================================================================</span>
0037 subname = <span class="string">'add_obc_nodes_list'</span>;
0038
0039 <span class="keyword">global</span> ftbverbose
0040 <span class="keyword">if</span> ftbverbose
0041 fprintf(<span class="string">'\nbegin : %s\n'</span>, subname)
0042 <span class="keyword">end</span>
0043
0044 <span class="comment">% Do we want a figure showing how we're getting along?</span>
0045 <span class="keyword">if</span> nargin == 4
0046 plotFig = 0;
0047 <span class="keyword">end</span>
0048
0049 <span class="comment">%--------------------------------------------------------------------------</span>
0050 <span class="comment">% Get a unique list and make sure they are in the range of node numbers</span>
0051 <span class="comment">%--------------------------------------------------------------------------</span>
0052 <span class="comment">% Make this works in versions of MATLAB older than 2012a (newer versions</span>
0053 <span class="comment">% can just use unique(A, 'stable'), but checking versions is a pain).</span>
0054 [~, Nidx] = unique(Nlist);
0055 Nlist = Nlist(sort(Nidx));
0056
0057 <span class="keyword">if</span> max(Nlist) &gt; Mobj.nVerts
0058 fprintf(<span class="string">'Your open boundary node number exceed the total number of nodes in the domain\n'</span>);
0059 error(<span class="string">'stopping...'</span>)
0060 <span class="keyword">end</span>
0061
0062 <span class="comment">%--------------------------------------------------------------------------</span>
0063 <span class="comment">% Plot the mesh</span>
0064 <span class="comment">%--------------------------------------------------------------------------</span>
0065 <span class="keyword">if</span> plotFig == 1
0066 <span class="keyword">if</span> strcmpi(Mobj.nativeCoords(1:3), <span class="string">'car'</span>)
0067 x = Mobj.x;
0068 y = Mobj.y;
0069 <span class="keyword">else</span>
0070 x = Mobj.lon;
0071 y = Mobj.lat;
0072 <span class="keyword">end</span>
0073
0074 figure
0075 patch(<span class="string">'Vertices'</span>, [x, y] , <span class="string">'Faces'</span>, Mobj.tri, <span class="keyword">...</span>
0076 <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>)
0077 hold on
0078 whos Nlist
0079 plot(x(Nlist), y(Nlist), <span class="string">'ro'</span>);
0080 axis(<span class="string">'equal'</span>, <span class="string">'tight'</span>)
0081 title(<span class="string">'open boundary nodes'</span>);
0082 <span class="keyword">end</span>
0083
0084 <span class="comment">% add to mesh object</span>
0085 npts = numel(Nlist);
0086 Mobj.nObs = Mobj.nObs + 1;
0087 Mobj.nObcNodes(Mobj.nObs) = npts;
0088 Mobj.obc_nodes(Mobj.nObs,1:npts) = Nlist;
0089 Mobj.obc_name{Mobj.nObs} = ObcName;
0090 Mobj.obc_type(Mobj.nObs) = ObcType;
0091
0092 <span class="keyword">if</span>(ftbverbose)
0093 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0092 <span class="keyword">if</span> ftbverbose
0093 fprintf(<span class="string">'found %d open boundary nodes'</span>, npts)
0094 <span class="keyword">end</span>
0095</pre></div>
<hr><address>Generated on Tue 29-Jul-2014 15:11:16 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
0095
0096 <span class="keyword">if</span> ftbverbose
0097 fprintf(<span class="string">'\nend : %s\n'</span>, subname)
0098 <span class="keyword">end</span>
0099</pre></div>
<hr><address>Generated on Mon 07-Dec-2015 09:59:26 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 Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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
......@@ -71,7 +71,7 @@ This function calls:
</ul>
This function is called by:
<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>
</ul>
<!-- crossreference -->
......@@ -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 Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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 Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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 Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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
......@@ -169,6 +169,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 Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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.
......@@ -66,7 +66,7 @@ This function calls:
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="example_FVCOM_river.html" class="code" title="function example_FVCOM_river()">example_FVCOM_river</a> example file for dumping an FVCOM river file and adding sediment concentration</li></ul>
</ul>
<!-- crossreference -->
......@@ -172,6 +172,6 @@ This function is called by:
0098 fprintf([<span class="string">'end : '</span> subname <span class="string">'\n'</span>])
0099 <span class="keyword">end</span>;
0100</pre></div>
<hr><address>Generated on Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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 Tue 29-Jul-2014 15:11:16 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 Mon 07-Dec-2015 09:59:26 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.
This diff is collapsed.
......@@ -58,7 +58,7 @@ This function calls:
</ul>
This function is called by: