function v=compute_tangential_surge_c2(vmax,rmax,r35,vt,phi,phi_in,w,a,n,lat)
% Computes tangential_surge_c2
% Script automatically generated by fit_tangential_surge_c2.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.94709
% RMSE  = 4.2485
% MEAN  = 74.036
% RANGE = 37.0802 - 112.9081

beta( 1 )= 2.4995e-01 ;
beta( 2 )= 1.1263e-01 ;
beta( 3 )= 4.0613e+01 ;
beta( 4 )= 5.5287e-01 ;
beta( 5 )= 3.1973e-01 ;
beta( 6 )= -1.1762e-01 ;
beta( 7 )= -2.7455e-01 ;
beta( 8 )= 6.8878e+01 ;
beta( 9 )= -6.6671e-02 ;
beta( 10 )= 4.6360e-01 ;

v=beta(1) * a.^beta(2) .* max(w,beta(3)).^beta(4) .* rmax.^beta(5) .* vmax.^beta(6) .* (1 + beta(7)*sin((phi-beta(8))*pi/180)) .* vt.^beta(9) .* r35.^beta(10);
