-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgsw_f.m
59 lines (53 loc) · 1.92 KB
/
gsw_f.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
function f = gsw_f(lat)
% gsw_f Coriolis parameter (f)
%==========================================================================
%
% USAGE:
% f = gsw_f(lat)
%
% DESCRIPTION:
% Calculates the Coriolis parameter (f) defined by:
% f = 2*omega*sin(lat)
% where,
% omega = 7.292115e-5 (Groten, 2004) [ radians/s ]
%
% INPUT:
% lat = latitude in decimal degrees North [ -90 ... +90 ]
%
% OUTPUT:
% f = Coriolis parameter [ radians/s ]
%
% AUTHOR:
% 20th April 1993. Phil Morgan [ help@teos-10.org ]
%
% MODIFIED:
% 28th July, 2010 by Paul Barker
%
% VERSION NUMBER: 3.05 (27th January 2015)
%
% REFERENCE:
% Groten, E., 2004: Fundamental Parameters and Current (2004) Best
% Estimates of the Parameters of Common Relevance to Astronomy, Geodesy,
% and Geodynamics. Journal of Geodesy, 77, pp. 724-797.
%
% IOC, SCOR and IAPSO, 2010: The international thermodynamic equation of
% seawater - 2010: Calculation and use of thermodynamic properties.
% Intergovernmental Oceanographic Commission, Manuals and Guides No. 56,
% UNESCO (English), 196 pp. Available from http://www.TEOS-10.org
%
% The software is available from http://www.TEOS-10.org
%
%==========================================================================
%--------------------------------------------------------------------------
% Check variables
%--------------------------------------------------------------------------
if ~(nargin == 1)
error('gsw_f: Requires only one input argument, lat')
end
%--------------------------------------------------------------------------
% Start of the calculation
%--------------------------------------------------------------------------
deg2rad = pi/180;
omega = 7.292115e-5; %(1/s) (Groten, 2004)
f = 2*omega*sin(lat*deg2rad);
end