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

Handle missing element-based fields better (still not sure I've got them all).

parent 99c81cbf
......@@ -105,7 +105,11 @@ end
% for each node/element.
obc_hycom_idx = [];
oElems = [Mobj.read_obc_elems{:}];
if isfield(Mobj, 'read_obc_elems')
oElems = [Mobj.read_obc_elems{:}];
else
oElems = [];
end
oNodes = [Mobj.read_obc_nodes{:}];
for obc_i = 1:length(oNodes)
[~, h_idx] = sort(sqrt((lon(:) - Mobj.lon(obc_i)).^2 + ...
......@@ -141,6 +145,9 @@ mask = hycom.(fields{ff}).data(:, :, :, 1) > 1.26e29;
% Ignore depth layers in the HYCOM data which are below the maximum depth
% of the open boundary nodes so we don't waste time trying to interpolate
% those data. Add a buffer of one layer in case I'm an idiot.
if ~isfield(Mobj, 'hc')
Mobj.hc = nodes2elems(Mobj.h, Mobj);
end
max_obc_depth = max([max(Mobj.h([Mobj.read_obc_nodes{:}])), max(Mobj.hc([Mobj.read_obc_elems{:}]))]);
[~, zidx] = min(abs(hycom.Depth.data - max_obc_depth));
zidx = zidx + 1;
......
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