%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Arctic XBeach parameter settings input file                              %%%
%%%                                                                          %%%
%%% date:     01-Jan-2020 12:00:00 AM                                        %%%
%%% Coastal Erosion Model at Foggy Island Bay, AK                            %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%% Flow boundary condition parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

front = nonh_1d                   
back  = abs_1d
epsi  = -1

%%% Bed Composition parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

D50 = 0.0002
D90 = 0.0003

%%% Grid parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

depfile   = bed.dep
posdwn    = -1
nx        = 3798
ny        = 0
alfa      = 270                       
vardx     = 1
xfile     = x.grd
yfile     = y.grd
xori      = 0
yori      = 0
thetamin  = -90
thetamax  = 90
dtheta    = 10
taper     = 100
tidetype  = velocity
start_node  = 17
end node    = 3799
sed_removal = 0.0

%%% Sediment Transport Options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

form        = soulsby_vanrijn          
bdslpeffmag = soulsby_bed              
bdslpeffini = bed                       
facsl       = 1.6
Ub_limit    = 2.0D+00                    
Erosion_Factor_High  = 1.00D+00        
Erosion_Factor_Low   = 1.00D+00         
Sedimentation_Factor_High = 1.00D+00   
Sedimentation_Factor_Low  = 1.00D+00
sediment_removal = 1
bedfriccoef      = 80   

%%% Model time %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
tstop         = 129600                  
CFL           = 0.9
solver        = 2
nmax          = 0.8

%%% Thermal Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

thermalperiod                = 1800.0D+00                 
water_temperature            = 4.274D+00                  
surface_temperature          = 3.377D+00                  
melt_temperature             = 0.0D+00                   
ice_ratio                    = 0.60D+00                   
ice_density                  = 920.0D+00                  
latent_heat                  = 334000000.0D+00            
heat_capacity                = 4200000.0D+00              
c_frozen_soil                = 1200000.0D+00              
c_unfrozen_soil              = 2000000.0D+00             
ht_kf                        = 0.45D+00                   
ht_ku                        = 0.85D+00                   
kinematic_viscosity          = 0.0000018D+00 
heat_conductivity            = 0.56D+00                                     
sea_water_density            = 1027.0D+00
roughness_height             = 0.01D+00
ht_max_depth                 = 4.0D+00                    
ht_number_of_nodes           = 2001.0D+00                
time_for_ht_routine          = 1800.0D+00                 
ht_time_nodes                = 3601.0D+00                 
ht_bed_updating              = 1                          
calm_condition               = 0                          
ht_calibration               = 0                          
net_heat_coeff               = 3000                        
temp_node                    = 400                       
thermal_factor               = 1.0D+00                                      
slope_threshold              = 25                         
first_run_flag               = 1
bed_adjustment		     = 0
bottom_temp                  = -5.50D+00                          

%%% Calibration Xbeach Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%gammax = 2.364
%beta   = 0.138
%alpha  = 1.262
%facSk  = 0.375
%facAs  = 0.123
%gamma  = 0.541

%%% Groundwater Processes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%gwflow = 1          
%gwnonh = 1
%kx     = 0.003 
%ky     = 0.003
%kz     = 0.003

%%% Physical Processes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

swave      = 0                  
swrunup    = 0                 
nonh       = 1                 
secorder   = 1
sedtrans   = 1
struct     = 0

%%% Morphology Processes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

morphology    = 1
morfacopt     = 1
morfac        = 1               
avalanching   = 1               
wetslp        = 0.15
dryslp        = 1.0           
dzmax         = 0.05
ne_layer      = permadepth.dep
smag          = 1
ALimit        = 0.0

%%% Water Elevation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

zs0file    = wlev.txt              
tideloc    = 2
paulrevere = 0

%%% Wave-Current Interaction %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%cats    = 4.0
%hwxi    = 0.1
%wci     = 1

%%% Roller Parameter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%roller = 1
%rfb    = 0

%%% Wave Breaking Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%break = roelvink2

%%% Wave boundary condition parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

wavemodel = nonh
%wbcfile = jons_table%
instat = jons_table

%%% Wave-spectrum boundary condition parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

bcfile = jonswap.txt             
windfile = wind_072016.txt
Cd          = 0.006

%%% Output variables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

tstart       = 0
tintg        = 1800
outputformat = netcdf
nglobalvar   = 2
zb
zs