function v=compute_inflow_surge_cx(vmax,rmax,r35,vt,phi,phi_in,w,a,n,lat)
% Computes inflow surge cx shift
% Script automatically generated by fit_inflow_surge_cx.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.84691
% RMSE  = 14.0683
% MEAN  = 108.9265
% RANGE = 31.1172 - 179.2732

beta( 1 )= 6.3153e-01 ;
beta( 2 )= 5.9864e-01 ;
beta( 3 )= 5.6972e-01 ;
beta( 4 )= -1.0568e+00 ;
beta( 5 )= -9.9611e+00 ;
beta( 6 )= -3.3596e-01 ;

v=beta(1).*w.^beta(2).*r35.^beta(3).*(1-beta(4).*cos((phi-beta(5))*pi/180)).*vmax.^beta(6);
