function v=compute_ekman_surge_aep(vmax,rmax,r35,vt,phi,phi_in,w,a,n,lat)
% Computes ekman_surge_semax
% Script automatically generated by fit_ekman_surge_semax.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.29101
% RMSE  = 0.004899
% MEAN  = 0.003161
% RANGE = 2.2479e-14 - 0.023667

beta( 1 )= 0.0000e+00 ;
beta( 2 )= 1.8741e-03 ;
beta( 3 )= 1.6732e+02 ;
beta( 4 )= 0.0000e+00 ;
beta( 5 )= 2.0000e-01 ;
beta( 6 )= -1.6467e+00 ;
beta( 7 )= 6.0719e-01 ;
beta( 8 )= -5.0000e-01 ;
beta( 9 )= 0.0000e+00 ;
beta( 10 )= 0.0000e+00 ;

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