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

Add revision history to the estimated time step code

parent c4494c92
...@@ -20,6 +20,9 @@ function [Mobj] = estimate_ts(Mobj,u,zeta) ...@@ -20,6 +20,9 @@ function [Mobj] = estimate_ts(Mobj,u,zeta)
% Geoff Cowles (University of Massachusetts Dartmouth) % Geoff Cowles (University of Massachusetts Dartmouth)
% %
% Revision history % Revision history
% 2012-07-14 Add great circle approximation if only provided with
% latitude and longitudes. Also add arguments to the function to define
% current velocity and tidal amplitudes.
% %
%============================================================================== %==============================================================================
...@@ -45,9 +48,9 @@ end; ...@@ -45,9 +48,9 @@ end;
%------------------------------------------------------------------------------ %------------------------------------------------------------------------------
% Compute the time step estimate % Compute the time step estimate
%------------------------------------------------------------------------------ %------------------------------------------------------------------------------
if Mobj.have_xy if Mobj.have_xy
x = Mobj.x; x = Mobj.x;
y = Mobj.y; y = Mobj.y;
else else
% Will convert to metres when calculating element edge length % Will convert to metres when calculating element edge length
x = Mobj.lon; x = Mobj.lon;
...@@ -87,9 +90,9 @@ end ...@@ -87,9 +90,9 @@ end
function [km]=haversine(lat1,lon1,lat2,lon2) function [km]=haversine(lat1,lon1,lat2,lon2)
% Haversine function to calculate first order distance measurement. Assumes % Haversine function to calculate first order distance measurement. Assumes
% spherical Earth surface. Lifted from: % spherical Earth surface. Lifted from:
% %
% http://www.mathworks.com/matlabcentral/fileexchange/27785 % http://www.mathworks.com/matlabcentral/fileexchange/27785
% %
R = 6371000; % Earth's mean radius in metres R = 6371000; % Earth's mean radius in metres
delta_lat = lat2 - lat1; % difference in latitude delta_lat = lat2 - lat1; % difference in latitude
delta_lon = lon2 - lon1; % difference in longitude delta_lon = lon2 - lon1; % difference in longitude
......
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