function v=compute_ekman_surge_bet(vmax,rmax,r35,vt,phi,phi_in,w,a,n,lat)
% Computes ekman_surge_bet
% Script automatically generated by fit_ekman_surge_bet.m
% Inputs : 
% vmax           = Vmax (km/h)
% rmax           = Rmax (km)
% r35            = R35 (km)
% vt             = forward speed (km/h)
% phi            = track angle (deg)
% phi_in         = inflow angle (deg)
% w              = shelf width (km)
% a              = Dean slope a (-)
% n              = Mannings n
% lat            = latitude (deg)

% R2    = 0.69311
% RMSE  = 1.1677
% MEAN  = 0.90391
% RANGE = -4.1667 - 4.5366

beta( 1 )= -2.3388e+00 ;
beta( 2 )= 7.0231e+01 ;
beta( 3 )= 7.4294e-02 ;
beta( 4 )= -3.1772e-02 ;
beta( 5 )= 3.3726e+00 ;
beta( 6 )= 1.3925e+01 ;
beta( 7 )= 4.2230e+01 ;
beta( 8 )= 2.5259e+01 ;
beta( 9 )= 9.8139e+00 ;
beta( 10 )= 9.2277e+01 ;
beta( 11 )= -5.8695e+01 ;
beta( 12 )= -1.4023e-02 ;
beta( 13 )= 4.9579e-03 ;
beta( 14 )= 3.4837e-02 ;

v=beta(1) + beta(2)*a + beta(4)*lat + beta(5)*cos(phi*pi/180) + beta(3)*w.*sin((min(phi,beta(8))-beta(7))*pi/180).*exp(-vt.*cos((phi)*pi/180)/beta(6)) + beta(9)*(exp(-vmax/beta(10))) + beta(11)*n + beta(12)*rmax + beta(13)*r35 + beta(14).*phi_in;
