function v=compute_ekman_surge_cpx(a,vmax,shelf_width,foreward_speed,phi,r35,manning,latitude)
% Computes ekman_surge_cpx
% Script automatically generated by fit_ekman_surge_cpx.m
% Inputs : 
% a              = a (-)
% vmax           = Vmax (km/h)
% shelf_width    = width (km)
% foreward_speed = foreward speed (km/h)
% phi            = track angle (deg)

% R2    = 0.63282
% RMSE  = 31.7437
% MEAN  = 122.3675
% RANGE = 32.4278 - 247.5889

beta( 1 )= -3.1526e+01 ;
beta( 2 )= 2.4499e+01 ;
beta( 3 )= 3.1859e-01 ;
beta( 4 )= 9.8584e-03 ;
beta( 5 )= 3.9346e+00 ;
beta( 6 )= 6.2119e+01 ;
beta( 7 )= 4.0454e+00 ;
beta( 8 )= 5.0000e-01 ;
beta( 9 )= 7.9126e-03 ;
beta( 10 )= 2.3605e-01 ;
beta( 11 )= 2.8332e+01 ;
beta( 12 )= 1.1719e-03 ;
beta( 13 )= -1.8369e+01 ;

v=beta(1) + beta(2)*shelf_width.^beta(3) .* (1+beta(10)*sin((phi-beta(11))*pi/180)) .* (beta(5)*exp(-vmax/beta(6)) + beta(7)*a.^beta(8) + beta(9)*latitude + beta(4)*foreward_speed + beta(12)*r35 + beta(13)*manning);
