function v=compute_ekman_surge_cexp(vmax,rmax,r35,vt,phi,phi_in,w,a,n,lat)
% Computes ekman_surge_cexp
% Script automatically generated by fit_ekman_surge_cexp.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.71767
% RMSE  = 15.3897
% MEAN  = 111.9889
% RANGE = 68.0807 - 184.8726

beta( 1 )= 5.6611e+01 ;
beta( 2 )= 2.2675e-01 ;
beta( 3 )= 9.9481e-01 ;
beta( 4 )= 3.1610e-01 ;
beta( 5 )= 2.2765e-01 ;
beta( 6 )= 4.1503e+02 ;
beta( 7 )= -2.6441e-01 ;
beta( 8 )= -4.2609e-01 ;
beta( 9 )= 5.0811e-01 ;
beta( 10 )= -5.3645e-01 ;
beta( 11 )= 2.8587e+01 ;
beta( 12 )= -4.6053e-01 ;

v=beta(1) + beta(2)*w.^beta(3) .* a.^beta(4) .* r35.^beta(5) .* (1+beta(10)*cos((phi-beta(11))*pi/180)) .* exp(-vmax/beta(6)) .* max(phi_in,5).^beta(7) .* n.^beta(8) .* lat.^beta(9) .* vt.^beta(12);
