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.91908
% RMSE  = 0.15389
% MEAN  = 0.8811
% RANGE = 0.14653 - 2.2717

beta( 1 )= 1.6498e-05 ;
beta( 2 )= 6.4658e-02 ;
beta( 3 )= 8.0651e+01 ;
beta( 4 )= 3.3615e-01 ;
beta( 5 )= 5.9589e-01 ;
beta( 6 )= 6.5747e-01 ;
beta( 7 )= 7.5964e-01 ;
beta( 8 )= -5.5414e-01 ;
beta( 9 )= -1.4865e-01 ;
beta( 10 )= 1.6425e-01 ;

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);
