function v=compute_ekman_surge_cetp(vmax,rmax,r35,vt,phi,phi_in,w,a,n,lat)
% Computes ekman_surge_cetp
% Script automatically generated by fit_ekman_surge_cetp.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.75358
% RMSE  = 1.9352
% MEAN  = 8.5372
% RANGE = 3.1337 - 18.2755

beta( 1 )= 5.1680e+00 ;
beta( 2 )= 1.5946e-01 ;
beta( 3 )= -8.5122e-01 ;
beta( 4 )= 1.0254e+00 ;
beta( 5 )= 5.3733e+01 ;
beta( 6 )= 1.4778e-01 ;
beta( 7 )= 5.6864e-01 ;
beta( 8 )= 4.8992e-02 ;
beta( 9 )= -2.9783e-01 ;

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