%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% AeoLiS model configuration                                       %%
%% Date: 2020-04-22 12:26:11                                        %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% -------------------- [Timing] ----------------------------- %%
dt 						= 3600.000								% [s] Timeinterval between timesteps
tstart 					= 0										% [s] Starting time of the simulation
tstop 					= 757195200.0							% [s] End time of the simulation
restart                 = None               					% [s] Interval for which to write restart files
refdate               	= 2020-01-01 00:00 						% [-] Reference datetime in netCDF output

%% -------------------- [Grid files *.grd] ------------------- %%
xgrid_file 				= x.grd									% Filename of ASCII file with x-coordinates of grid cells
ygrid_file 				= y.grd									% Filename of ASCII file with y-coordinates of grid cells
bed_file 				= z_m5.grd								% Filename of ASCII file with bed level heights of grid cells
ne_file 				= ne.grd								% Filename of ASCII file with non-erodible layer
veg_file 				= None									% Filename of ASCII file with initial vegetation density

%% -------------------- [Time series *.txt] ------------------ %%
tide_file 				= tide.txt								% Filename of ASCII file with time series of water levels
wave_file 				= wave.txt								% Filename of ASCII file with time series of wave heights (and periods)
wind_file 				= wind_morocco.txt						% Filename of ASCII file with time series of wind velocity and direction

%% -------------------- [Output] ----------------------------- %%	
output_times 			= 3024000.000								% [s] Timeinterval [s] between *.nc output file
output_vars 			= zb ustar_avg ustarn_avg ustars_avg uth Cu Ct % [-] List of output variables for in *.nc output file
visualization 			= T

%% -------------------- [Flags Processes] -------------------- %%
process_wind           	= T               						% [T/F] Enable the process of wind 
process_shear        	= T               						% [T/F] Enable the process of wind shear
process_tide            = F               						% [T/F] Enable the process of tides
process_wave            = F               						% [T/F] Enable the process of waves
process_runup           = F               						% [T/F] Enable the process of wave runup
process_moist           = F               						% [T/F] Enable the process of moist
process_threshold       = T               						% [T/F] Enable the process of threshold
process_transport       = T               						% [T/F] Enable the process of transport
process_bedupdate       = T            							% [T/F] Enable the process of bed updating
process_avalanche       = T               						% [T/F] Enable the process of avalanching
process_separation      = T               						% [T/F] Enable the including of separation bubble
process_vegetation      = F              						% [T/F] Enable the process of vegetation

%% -------------------- [Flags Threshold] -------------------- %%
th_grainsize            = T               						% [T/F] Enable wind velocity threshold based on grainsize
th_bedslope             = F              						% [T/F] Enable wind velocity threshold based on bedslope
th_moisture             = F               						% [T/F] Enable wind velocity threshold based on moisture
th_roughness            = F               						% [T/F] Enable wind velocity threshold based on roughness
th_nelayer              = T              						% [T/F] Enable wind velocity threshold based on a non-erodible layer

%% -------------------- [General physics] -------------------- %%
g                       = 9.81               					% [m/s^2] Gravitational constant
v                       = 0.000015           					% [m^2/s] Air viscosity  
rhoa                    = 1.225              					% [kg/m^3] Air density
rhog                    = 2650.0              					% [kg/m^3] Grain density
rhow                    = 1025.0              					% [kg/m^3] Water density
porosity                = 0.4                 					% [-] Sediment porosity
cpair                  	= 0.0010035          					% [MJ/kg/oC] Specific heat capacity air

%% -------------------- [Sediment] --------------------------- %%
nlayers 				= 1										% [-] Number of bed layers
layer_thickness 		= 0.05000								% [m] Thickness of bed layers
nfractions 				= 1										% [-] Number of sediment fractions
grain_dist 				= 1.0									% [-] Initial distribution of sediment fractions
grain_size 				= 0.00025 								% [m] Average grain size of each sediment fraction

%% -------------------- [Wind and shear] --------------------- %%
wind_convention         = nautical         						% [-] Convention used for the wind direction in the input files (cartesian or nautical)
alfa                    = 0                  					% [deg] Real-world grid cell orientation wrt the North (clockwise)
k 						= 0.001									% [m] Bed roughness
z                       = 10.                					% [m] Measurement height of wind velocity
kappa                   = 0.41               					% [-] Von Kármán constant
h                       = None               					% [m] Representative height of saltation layer
L                       = 20.               					% [m] Typical length scale of dune feature (perturbation)
l                       = 1.                					% [m] Inner layer height (perturbation)
m                       = 1.                					% [-] Factor to account for difference between average and maximum shear stress
	
%% -------------------- [Transport] -------------------------- %%
bi 						= 0.50000								% [-] Bed interaction factor
method_transport 		= bagnold								% [-] Name of method to compute equilibrium sediment transport rate
method_grainspeed       = duran_full                            % [-] Name of method to assume/compute grainspeed
Aa                      = 0.085               					% [-] Constant in formulation for wind velocity threshold based on grain size
Cb                     	= 1.5                					% [-] Constant in bagnold formulation for equilibrium sediment concentration
Ck                      = 2.78              					% [-] Constant in kawamura formulation for equilibrium sediment concentration
Cl                     	= 6.7               					% [-] Constant in lettau formulation for equilibrium sediment concentration
Cdk                     = 5.                 					% [-] Constant in DK formulation for equilibrium sediment concentration

%% -------------------- [Solver] ----------------------------- %%
T 						= 1.									% [s] Adaptation time scale in advection equation
solver 					= steadystate							% [-] Numerical solver of advection scheme
max_bedlevel_change 	= 0.02									% [m] Maximum bedlevel change after one timestep. Next timestep dt will be modified (use 999. if not used)

%% -------------------- [Boundary conditions] ---------------- %%
boundary_onshore 		= circular								% [-] Name of onshore boundary conditions (flux, constant, uniform, gradient)
boundary_lateral 		= circular	   							% [-] Name of lateral boundary conditions (circular, constant ==noflux)
boundary_offshore 		= circular								% [-] Name of offshore boundary conditions (flux, constant, uniform, gradient)
offshore_flux           = 0.                 					% [-] Factor to determine offshore boundary flux as a function of Q0 (= 1 for saturated flux , = 0 for noflux)
constant_offshore_flux  = 0.                 					% [kg/m/s] Constant input flux at offshore boundary
onshore_flux            = 0.                 					% [-] Factor to determine onshore boundary flux as a function of Q0 (= 1 for saturated flux , = 0 for noflux)
constant_onshore_flux   = 0.                 					% [kg/m/s] Constant input flux at offshore boundary
lateral_flux            = 0.                 					% [-] Factor to determine lateral boundary flux as a function of Q0 (= 1 for saturated flux , = 0 for noflux)
sedimentinput           = 0.                 					% [-] Constant boundary sediment influx (only used in solve_pieter)

%% -------------------- [Rotating shear-grid] ---------------- %%
dx 						= 1.0									% [m] Size of dimension of the computational grid that is generated for a rotating shear computation in x-direction
dy 						= 1.0       							% [m] Size of dimension of the computational grid that is generated for a rotating shear computation in x-direction
buffer_width			= 0.0									% [m] Width of the bufferzone around the rotational grid for wind perturbation	

%% -------------------- [Vegetation] ------------------------- %%	
sigma                   = 4.2                					% [-] Ratio between basal area and frontal area of roughness elements
beta 					= 130.000000							% [-] Ratio between drag coefficient of roughness elements and bare surface
gamma_vegshear          = 16.                					% [-] Roughness factor for the shear stress reduction by vegetation
avg_time              	= 86400.             					% [s] Indication of the time period over which the bed level change is averaged for vegetation growth
dzb_interval            = 86400.              					% [s] Interval used for calcuation of vegetation growth
hveg_max                = 1.                 					% [m] Max height of vegetation
V_ver                   = 0.                 					% [m/year] Vertical growth
V_lat                   = 0.                 					% [m/year] Lateral growth
germinate               = 0.                 					% [1/year] Possibility of germination per year
lateral                 = 0.                 					% [1/year] Posibility of lateral expension per year
veg_gamma               = 1.                					% [-] Constant on influence of sediment burial
veg_sigma               = 0.8                					% [-] Sigma in gaussian distrubtion of vegetation cover filter
vegshear_type           = raupach          						% [-] Choose the Raupach grid based solver (1D or 2D) or the Okin approach (1D only)
	
%% -------------------- [Seperation] ------------------------- %%	
c_b 					= 0.2									% [-] Slope at the leeside of the separation bubble # c = 0.2 according to Durán 2010 (Sauermann 2001: c = 0.25 for 14 degrees)
mu_b 					= 20.									% [deg] Minimum required slope for the start of flow separation
sep_filter_iterations 	= 0										% [-] Number of filter iterations on the separation bubble (0 = no filtering)
zsep_y_filter			= F										% [T/F] Boolean for turning on/off the filtering of the separation bubble height in y-direction

%% -------------------- [Soil moisture] ---------------------- %%		   
Tdry 					= 7200.000								% [s] Adaptation time scale for soil drying
eps                     = 0.001               					% [m] Minimum water depth to consider a cell "flooded"
method_moist            = belly_johnson    						% [-] Name of method to compute wind velocity threshold based on soil moisture content

%% -------------------- [Waves] ------------------------------ %%
Tbedreset               = 86400.                				% [s] Adaptation time for resetting morphology in the Swash-zone
xi                      = .3                 					% [-] Surf similarity parameter
facDOD                  = .1                 					% [-] Ratio between depth of disturbance and local wave height    

%% -------------------- [Avalanching] ------------------------ %%
theta_dyn               = 33.                					% [degrees] Initial Dynamic angle of repose, critical dynamic slope for avalanching
theta_stat              = 34.                					% [degrees] Initial Static angle of repose, critical static slope for avalanching
max_iter_ava            = 10               						% [-] Maximum number of iterations at which to quit iterative solution in avalanching calculation