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

Require a depth value when writing to SMS format.

parent fad83e23
function write_SMS_2dm(file, tri, x, y, bnd)
function write_SMS_2dm(file, tri, x, y, z, bnd)
% Output an SMS 2dm ASCII file from the triangulation given by tri, x and
% y.
......@@ -12,6 +12,7 @@ function write_SMS_2dm(file, tri, x, y, bnd)
% file - file name to save to.
% tri - triangulation matrix of the nodes in x and y.
% x, y - coordinate pairs for the unstructured grid.
% z - array of matching length with x and y of depth values.
% bnd - [optional] cell array of open boundary node ids to create node
% strings in SMS.
......@@ -26,6 +27,7 @@ function write_SMS_2dm(file, tri, x, y, bnd)
% Revision history:
% 2013-03-11 First version.
% 2017-01-27 Change the arguments to use a z value too.
......@@ -59,12 +61,12 @@ end
% Add the list of nodes
for n = 1:nn
fprintf(f, 'ND %i %.8e %.8e %.8e\n', n, x(n), y(n), 0);
fprintf(f, 'ND %i %.8e %.8e %.8e\n', n, x(n), y(n), z(n));
% Check we've got some open boundaries and create the relevant node string
% output.
if nargin == 5
if nargin == 6
for b = 1:length(bnd)
c = 0; % counter for the weird nodestring format.
......@@ -85,7 +87,7 @@ if nargin == 5
fprintf(f, 'NS %i ', node_id);
elseif c > 0 && c < 10
fprintf(f, '%i ', node_id);
elseif c >= 10 || ns == length(nodestring);
elseif c >= 10 || ns == length(nodestring)
fprintf(f, '%i\n', node_id);
c = 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment