/[MITgcm]/MITgcm_contrib/timour_matlab/mscripts/frmax.m
ViewVC logotype

Annotation of /MITgcm_contrib/timour_matlab/mscripts/frmax.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Sep 3 21:22:22 2003 UTC (21 years, 10 months ago) by edhill
Branch: MAIN
CVS Tags: HEAD
initial checkin of Timour's MatLAB scripts

1 edhill 1.1 function frm=frmax(p,le,r)
2     if (p~=1.)
3     a=p-1.;
4     b=(p+1.-2.*p.*le).*r./le;
5     c=(p.*le+1.-2.*p).*r./le;
6     d=(p.*le-1.).*r.*r./le./le;
7     h=(3.*a.*c-b.*b)./(9.*a.*a);
8     k=(2.*b.*b.*b-9.*a.*b.*c+27.*a.*a.*d)./(27.*a.*a.*a);
9     th=(acos(-k./(2.*(-h).^1.5)))./3.;
10     end %if
11    
12     if (p>1)
13     frm=2.*sqrt(-h).*cos(th+4*pi/3)-b./(3.*a);
14     elseif (p<1)
15     frm=2.*sqrt(-h).*cos(th)-b./(3.*a);
16     elseif (p==1)
17     frm=0.5.*sqrt(0.25+2.*r./le)+0.25;
18     elseif (p==0)
19     frm=sqrt(r./le)
20     end
21     return

  ViewVC Help
Powered by ViewVC 1.1.22