NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/seawater/sw_f.m

Revision 495 (checked in by cbc, 11 years ago)

Initial import of Stark code.

Line 
1
2 function f = sw_f(lat)
3
4 % SW_F       Coriolis factor "f"
5 %===========================================================================
6 % SW_F   $Id: sw_f.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
7 %        Copyright (C) CSIRO, Phil Morgan 1993.
8 %
9 % USAGE:  f = sw_f(lat)
10 %
11 % DESCRIPTION:
12 %    Calculates the Coriolis factor "f" defined by
13 %       f = 2*Omega*Sin(lat)  where Omega = 7.292e-5 radians/sec
14 %
15 % INPUT:
16 %   lat = Latitude in decimal degress north [-90..+90]
17 %
18 % OUTPUT:
19 %  f    = Coriolis Factor "f" [s-1]
20 %
21 % AUTHOR:  Phil Morgan 93-04-20  (morgan@ml.csiro.au)
22 %
23 % DISCLAIMER:
24 %   This software is provided "as is" without warranty of any kind.
25 %   See the file sw_copy.m for conditions of use and licence.
26 %
27 % REFERENCE:
28 %   S. Pond & G.Pickard  2nd Edition 1986
29 %   Introductory Dynamical Oceanogrpahy
30 %   Pergamon Press Sydney.  ISBN 0-08-028728-X
31 %
32 %   A.E. Gill 1982. p.597
33 %   "Atmosphere-Ocean Dynamics"
34 %   Academic Press: New York.  ISBN: 0-12-283522-0
35 %=========================================================================
36
37 % CALLER:  general purpose
38 % CALLEE:  none
39
40 %-------------
41 % CHECK INPUTS
42 %-------------
43 if nargin ~= 1
44    error('sw_f.m:  Requires one input argument')
45 end %if
46
47 %-------------
48 % BEGIN
49 %-------------
50 % Eqn p27.  Unesco 1983.
51 DEG2RAD = pi/180;
52 OMEGA   = 7.292e-5;     %s-1   A.E.Gill p.597
53 f       = 2*OMEGA*sin(lat*DEG2RAD);
54
55 return
56 %===========================================================================
57
58
Note: See TracBrowser for help on using the browser.