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.35106
% RMSE  = 25.075
% MEAN  = 116.2899
% RANGE = 64.5467 - 188.4026

beta( 1 )= 8.3906e+01 ;
beta( 2 )= 8.2403e-03 ;
beta( 3 )= 1.0297e+00 ;
beta( 4 )= 1.8092e-01 ;
beta( 5 )= 7.1903e-01 ;
beta( 6 )= 2.2716e+02 ;
beta( 7 )= -1.1886e-01 ;
beta( 8 )= -3.9068e-01 ;
beta( 9 )= 5.6576e-01 ;
beta( 10 )= -1.4985e+00 ;
beta( 11 )= 1.6057e+02 ;
beta( 12 )= -6.9612e-01 ;
beta( 13 )= -3.3440e-01 ;

v=beta(1) + beta(2)*w.^beta(3) .* a.^beta(4) .* r35.^beta(5) .* rmax.^beta(13) .* (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);
