function [params_run]=CreateParam(i,crsection,ngridp,boundaryConditions,surgeConditions,paramdir_var,ngd,nd,dzg,sedcal1,sedcal2)%% make new XB input
%create a new params.txt with a new depfile
params_run=['params_run_',num2str((i),'%02i'),'.txt'];    
jonswap=['jsp_run_',num2str(i,'%02i'),'.txt'];
XB = CreateEmptyXBeachVar(...
'nx',ngridp-1,...
'ny',2,...
'vardx',1,...
'depfile', [crsection],...
'xfile','x.grd',...
'yfile','y.grd',...
'xori',0,...
'yori',0,...
'alfa',0,...
'posdwn',-1,...
'scheme',2,...
'struct',0,...
'break',3,...
'dir0',270,...
'gamma',0.55,...
'alpha',1,...
'delta',0,...
'n',10,...
'rho',1025,...
'g',9.81,...
'thetamin',-180,...
'thetamax',180,...
'dtheta',360,...
'wci', 0,...
'instat',4,...
'bcfile',[boundaryConditions],...
'ARC',1,...
'rt', 2261,...
'dtbc',0.2,...
'nuh',0.15,...
'nuhfac',1,...
'roller',1,...
'beta',0.1,...
'random',1,...
'back',2,...
'gammax',5,...
'tideloc',2,...
'zs0file',[surgeConditions],...
'tidelen',96,...
'paulrevere',0,...
'tstart',0,...
'tstop',172800,...
'C', 55,...
'eps',0.01,...
'umin',0,...
'CFL', 0.7,...
'epsi',0.01,...
'A', 0.002,...
'dico', 1,...
'D501',0.0002,...
'D901',0.0003,...
'rhos',2650,...
'morfac',10,...
'morstart',5000,...
'por', 0.4,...
'dryslp',1,...
'wetslp',0.3,...
'hswitch',0.1,...
'tintp',100,...
'npoints',0,...
'punt',[],...%{'1 5 3  zs#zb#H#' '3950 5 2 zs#zb#' '4000 5 2 zs#zb#' '5826 5 2 zs#zb#'},...
'tintg',2000,...
'left',1,...
'right',1,...
'D502', 0.0002,...
'D902', 0.0003,...
'ngd',[ngd],...
'nd',[nd],...
'dzg',[dzg],...
'sedcal1',[sedcal1],...
'sedcal2',[sedcal2]);%jonswap ook laten genereren?;



XBeach_Write_Inp(paramdir_var, XB, 'paramsfile', params_run);
  