function p=periods(iorder) %PERIODS tidal periods, names, speeds, etc. % PERIODS returns a structure of tidal periods, names, speeds, % strength ratios, and descriptions. The order of the constituents % can be returned based on descending relative strengths, increasing % period, or grouped by species type (diurnal, semi-diurnal,...). % The user can append additional constituents to the structure. For % example, to add M4 to the bottom of the structure: % p(20).name={'M4'}; % p(20).hours=12.42/2; % p(20).ratio=[]; % p(20).speed=[]; % p(20).desc={'First M2 Harmonic'}; % % Call as: p=periods(iorder); % % The structure looks like: % p = % % 1x19 struct array with fields: % name % hours % ratio % speed % desc % % To extract just the hours, for example to send to the % harmonic analysis routine HARMONIC, use % per=[p.hours]; % % Input: iorder - return order indicator (optional) % 0 = grouped by species type (default) % 1 = descending relative strengths % 2 = increasing period (decreasing speed) % % The following constituents are included. % % Period in Standard Relative Speed in Description % solar hours Name Strength Deg/Sol hr % --------------------------------------------------------------------- % Semidiurnal % 12.42 M2 1.00 28.98410 Principal Lunar % 12.00 S2 .466 30.00000 Principal Solar % 12.66 N2 .192 28.43973 Larger Lunar Elliptic % 11.97 K2 .127 30.08214 Lunisolar Semidiurnal % 12.01 T2 .027 29.95893 Larger Solar Elliptic % 12.19 L2 .028 29.52848 Smaller Lunar Elliptic % 12.91 2N2 .025 27.89535 Lunar Elliptic Second Order % 12.63 NU2 .036 28.51258 Larger Lunar Evectional % 12.22 Lambda3 .007 29.45563 Smaller Lunar Evectional % 12.87 MU2 .031 27.96821 Variational % Diurnal % 23.93 K1 .584 15.04107 Lunisolar Diurnal % 25.82 O1 .415 13.94304 Principal Lunar Diurnal % 24.07 P1 .194 14.95893 Principal Solar Diurnal % 26.87 Q1 .079 13.39866 Larger Lunar Elliptic % 24.84 M1 .033 14.49205 Smaller Lunar Elliptic % 23.10 J1 .033 15.58544 Small Lunar Elliptic % Long-period % 327.67 Mf .172 1.09803 Lunar Fortnightly % 661.30 Mm .091 0.54437 Lunar Monthly % 4383.00 Ssa .080 0.08214 Solar Semiannual % if nargin==0 iorder=0; else if iorder<0 | iorder>3 error('iorder to PERIODS out of range') end end p(1).name={'M2'}; p(1).hours=12.42; p(1).ratio=1.000; p(1).speed =28.98410; p(1).desc ={'Principal Lunar'}; p(2).name={'S2'}; p(2).hours=12.00; p(2).ratio=.466; p(2).speed =30.00000; p(2).desc ={'Principal Solar'}; p(3).name={'N2'}; p(3).hours=12.66; p(3).ratio=.192; p(3).speed =28.43973; p(3).desc ={'Larger Lunar Elliptic'}; p(4).name={'K2'}; p(4).hours=11.97; p(4).ratio=.127; p(4).speed =30.08214; p(4).desc ={'Lunisolar Semidiurnal'}; p(5).name={'T2'}; p(5).hours=12.01; p(5).ratio=.027; p(5).speed =29.95893; p(5).desc ={'Larger Solar Elliptic'}; p(6).name={'L2'}; p(6).hours=12.19; p(6).ratio=.028; p(6).speed =29.52848; p(6).desc ={'Smaller Lunar Elliptic'}; p(7).name={'2N2'}; p(7).hours=12.91; p(7).ratio=.025; p(7).speed =27.89535; p(7).desc ={'Lunar Elliptic Second Order'}; p(8).name={'NU2'}; p(8).hours=12.63; p(8).ratio=.036; p(8).speed =28.51258; p(8).desc ={'Larger Lunar Evectional'}; p(9).name={'Lambda3'}; p(9).hours=12.22; p(9).ratio=.007; p(9).speed =29.45563; p(9).desc ={'Smaller Lunar Evectional'}; p(10).name={'MU2'}; p(10).hours=12.87; p(10).ratio=.031; p(10).speed=27.96821; p(10).desc={'Variational'}; p(11).name={'K1'}; p(11).hours=23.93; p(11).ratio=.584; p(11).speed=15.04107; p(11).desc={'Lunisolar Diurnal'}; p(12).name={'O1'}; p(12).hours=25.82; p(12).ratio=.415; p(12).speed=13.94304; p(12).desc={'Principal Lunar Diurnal'}; p(13).name={'P1'}; p(13).hours=24.07; p(13).ratio=.194; p(13).speed=14.95893; p(13).desc={'Principal Solar Diurnal'}; p(14).name={'Q1'}; p(14).hours=26.87; p(14).ratio=.079; p(14).speed=13.39866; p(14).desc={'Larger Lunar Elliptic'}; p(15).name={'M1'}; p(15).hours=24.84; p(15).ratio=.033; p(15).speed=14.49205; p(15).desc={'Smaller Lunar Elliptic'}; p(16).name={'J1'}; p(16).hours=23.10; p(16).ratio=.033; p(16).speed=15.58544; p(16).desc={'Small Lunar Elliptic'}; p(17).name={'Mf'}; p(17).hours=327.67; p(17).ratio=.172; p(17).speed= 1.09803; p(17).desc={'Lunar Fortnightly'}; p(18).name={'Mm'}; p(18).hours=661.30; p(18).ratio=.091; p(18).speed= 0.54437; p(18).desc={'Lunar Monthly'}; p(19).name={'Ssa'}; p(19).hours=4383.00; p(19).ratio=.080; p(19).speed= 0.08214; p(19).desc={'Solar Semiannual'}; if iorder==0 iperm=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]; elseif iorder==1 % ordering for decreasing ratio iperm=[1 11 2 12 13 3 17 4 18 19 14 8 15 16 10 6 5 7 9]; elseif iorder==2 % ordering for increasing period iperm=[4 2 5 6 9 1 8 3 10 7 16 11 13 15 12 14 17 18 19]; end p=p(iperm); % % Brian O. Blanton % Spring 1999 %