!--------------------------------------------------------------------
! Sed2d input parameters
!--------------------------------------------------------------------
! Format rules :
! - Lines beginning with "!" are comments; 
! - blank lines are ignored;
! - one line for each parameter in the format: keywords= value;
! - keywords are case sensitive; 
! - spaces allowed between keywords and "=" and value;
! - comments starting with "!"  allowed after value;
! - value is an integer, double, or 2-char string (no quote needed); 
! - for double, any of the format is acceptable: 40 40. 4.e1;
! - use of decimal point in integers is OK but discouraged.
!--------------------------------------------------------------------

!--------------------------------------------------------------------
!-                      Pre-processing                              -
!--------------------------------------------------------------------

!- Pre-processing flag: 0)No 1)Yes (need to use 1CPU if yes) 
!- If IPRE_FLAG=1, the filtered depth is output in hgrid_<IPRE_FLAG>.gr3
 IPRE_FLAG = 0

!- Filter flag (not used if IPRE_FLAG = 0) --------------------------
!- 1) NL extrema filter
!- 2) Slope filter
!- 3) Diffusive filter 
! For '2', the critical slopes are read in from slope_cr.gr3. If the
! latter is not present, default values (for dry and wet) specified in
! routine sed2d_filter_slope() (see sed2d_filter.F90) are used
!--------------------------------------------------------------------  
 IPRE_FILT = 1

!--------------------------------------------------------------------
!-               Water and sand  properties                         -
!--------------------------------------------------------------------

!- Water kinematic viscosity (m2.s-1) -------------------------------
 WVISCO = 1.36e-6 ! kinematic viscosity 

!- Number of sediment classes (max value is 99) ---------------------
  NBCLASS = 5

!- Number of sediment layers ----------------------------------------
! If NBCLASS = 1, put NBLAYER = 1
! If NBCLASS > 1, NBLAYER should be >= 3 (suggested value is 10)
!--------------------------------------------------------------------
  NBLAYER = 10

!- Sediment top layer thickness (m) ---------------------------------
! Needed if NBLAYER > 1 (suggested value is 0.1)
!--------------------------------------------------------------------
  H_TOP = 0.1

!- Thickness of layer #2 (below top) (m) -----------------------------------
! Needed if NBLAYER > 1 (suggested value is 0.1, or use a large value for robustness)
! NB: Only the layer #2 (sub-surface layer) will have a time-variable
! thickness.
!--------------------------------------------------------------------
  H_INF = 10.

!- Minimum and maximum thickness for layer #2 (m) -------------------
! Needed if NBLAYER > 1: When the layer #2 thickness becomes lower
! than H_LIM_MIN, it is merged with the layer below.
! Respectively, when it becomes higher than H_LIM_MAX, it is split
! into two layers.
!
! NB: H_LIM_MIN < H_INF (suggested value is 0.5*H_INF)
!     H_LIM_MAX > H_INF (suggested value is 2*H_INF)
!     H_LIM_MAX-H_LIM_MIN > H_INF
!--------------------------------------------------------------------
  H_LIM_MIN = 5.
  H_LIM_MAX = 20.

!- Grain size (m) ----------------------------------------------------------
! - If NBCLASS = 1, only D50_1 is needed
! If D50_1 < 0, values are read in d50.gr3 and the value below is not used after that
! NB: This value should be set to d35 if ITRANS = 2
!
! - If NBCLASS = 3, D50_1 to D50_3 are needed (D50_1 must >0). These are D50 for each class (uniform for all layers)
! - If NBCLASS = 5, D50_1 to D50_5 are needed (D50_1 must >0)
! - If NBCLASS = 10, D50_1 to D50_10 are needed (D50_1 must >0)
! SED2D restricts 5.e-5<=D50<=2.e-3 m
!--------------------------------------------------------------------
 D_1   = 0.0001
 D_2   = 0.0002
 D_3   = 0.0003
 D_4   = 0.0004
 D_5   = 0.0006
 D_6   = 0.0008
 D_7   = 0.0010
 D_8   = 0.0020
 D_9   = 0.0030
 D_10  = 0.0040

!- d90 (m) ----------------------------------------------------------
! If D90 = 0 or D50 < 0, the approximation d90 = 2.5 * d50 is used
!
! NB: put D90 = 0 for NBCLASS > 1
!--------------------------------------------------------------------
 D90  = 0.

!- Initial sediment classes fraction --------------------------------
! - If NBCLASS = 1, not needed
! - If NBCLASS = 3, F_1 to F_3 are needed
! - If NBCLASS = 5, F_1 to F_5 are needed
! - If NBCLASS = 10, F_1 to F_10 are needed
! NB: sum of fractions must equal to 1
!--------------------------------------------------------------------
 F_1 = 0.2
 F_2 = 0.2
 F_3 = 0.2
 F_4 = 0.2
 F_5 = 0.2
 F_6 = 0.1
 F_7 = 0.1
 F_8 = 0.1
 F_9 = 0.1
 F_10 = 0.1

!- Porosity ---------------------------------------------------------
 PORO = 0.4

!--------------------------------------------------------------------
!-             Sediment transport parameters                        -
!--------------------------------------------------------------------

!- Threshold depth (m) ----------------------------------------------
! Sediment transpot rate is set to 0 if depth < H0_SED
!--------------------------------------------------------------------
 H0_SED = 0.05 

!- Transport formula flag -------------------------------------------
! 1)Engelund-Hansen (1967)               - EH67
! 2)Ackers and White (1973)              - AW73
! 3)Soulsby - Van Rijn (Soulsby, 1997)   - SVR97
! 4)Van Rijn (2007)                      - VR07
! 5)Camenen and Larson (2011)            - CL11 
! 6)Wu and Lin (2014)                    - WL14 (developed for multi-sized sediment)
! 7)TRANSPOR2004 (van Rijn et al., 2004) - TR04 (developed for multi-sized sediment)
!--------------------------------------------------------------------
 ITRANS = 4 

!- Wave asymmetry treatment (used only with Camenen and Larson (2011)
!- formula) ---------------------------------------------------------
! 0)No wave asymmetry (Airy waves)
! 1)Wave asymmetry treatment based on Elfrink (2006)
!--------------------------------------------------------------------
 IASYM = 0

!- Slope effect flag ------------------------------------------------
! 0)No slope effect
! 1)Slope effect on total transport (Soulsby-Van Rijn, Soulsby 1997)
! 2)Slope effect on bedload transport as in (Lesser et al, 2004)
!--------------------------------------------------------------------
 ISLOPE = 1 

!- Roughness length formula -----------------------------------------
! 1)Skin component only (z0 = d50/12) (recommended for NB_CLASS>1)
! 2)Bedform associated roughness (Soulsby, 1997)
! 3)Bedform associated roughness (Van-Rijn, 2007)
!--------------------------------------------------------------------
 IROUGH = 1

!- Drag coefficient in transport formula ----------------------------
! 1)Cdp from SCHISM is used (Manning law)
! -2 or 2)Cd is computed based on log-law formula
! -3 or 3)Cd is computed based on alluvial friction method (Engelund, 1966)
!
! NB) - This flag has no impact for ITRANS = 3 (Van-Rijn, 2007)
!     - If a negative value is set, the drag coefficient computed by
!       sed2d is returned to selfe for friction computation.
!     - -2 is recommended for NB_CLASS>1
!-------------------------------------------------------------------- 
 IDRAG = 2

!- Diffusion factor (no diffusion if DIFFAC = 0) applied to the transport rate
!- based on local slope (as in bedload transport)
 DIFFAC = 0

!- Transport rate correction factor (original rate if TRANSFAC = 1) - 
 TRANSFAC = 1

!- Diffusive filter on total transport 0)No 1)Yes -------------------
!- Only required if velocity field is strongly divergent
!  NB: Only for NB_CLASS=1
!--------------------------------------------------------------------
 QFILTER = 0

!- Shapiro filter on velocities 0)No 1)Yes ------------------------
!- If ufilter /= 0, a shapiro filter is applied on the velocity 
!- field. ufilter is also the number of iterations of the filter. 
!- Recommended if spurious velocities occur at coastline (with WWM)
!--------------------------------------------------------------------
 UFILTER = 0

!- Ramp period (sec) applied on total transport after ISKIP (see below) iterations 
!- Use '0' for no ramp
 QRAMP = 0

!--------------------------------------------------------------------
!-             Bottom evolution parameters                          -
!--------------------------------------------------------------------

!- Dredging/dumping option
!- If =1, needs sed_dump.in (see a sample in Sediment)
 ISED_DUMP = 0

!- Bottom evolution flag 0)No 1)Yes ---------------------------------
!  If =1, a morphological ramp can be used through imorphogrid.gr3
!  file which contains values between 0 (i.e. no bottom evolution)
!  and 1 (i.e. "full" bottom evolution)
 IMORPHO = 1

!- Morphological acceleration factor (>0). Use '1' for no acceleration.
 MORFAC = 1

!- Skip first ISKIP steps before computing bottom change ------------
 ISKIP = 100 

!- Bathymetry filter flag -------------------------------------------
! 0)No filter (recommended for NB_CLASS>1)
! 1)Local extrema filter  
! 2)Slope filter (avalanching)
! 3)Local extrema and slope filters
! For '2' and '3', the critical slopes are read in from slope_cr.gr3. If the 
! latter is not present, default values (for dry and wet) specified in
! routine sed2d_filter_slope() (see sed2d_filter.F90) are used 
!--------------------------------------------------------------------
 IFILT = 0

!- Dry and wet maximum slope (active if IFILT=2 or 3) ---------------
 DRYSLOPE = 0.1
 WETSLOPE = 0.05

!- Skip NSKIP*DTSED2D time steps between application of the filter --
 NSKIP = 1

!--------------------------------------------------------------------
!-                 Numerical parameters                             -
!--------------------------------------------------------------------

!- Morphological time step ------------------------------------------
!- Bathymetry is updated every DTSED2D hydrodynamic time step
! Only works with 1 at the moment
!--------------------------------------------------------------------
 DTSED2D = 1

!- Numerical method -------------------------------------------------
! 1) Node-centered scheme where sediment flux is considered constant
!    inside each element (probably need DIFFAC>0 and IFILT=3 to avoid
!    numerical oscillations)
! 2) WENO scheme (try first with DIFFAC=0 and IFILT=0 or IFILT=2)
!--------------------------------------------------------------------
 IMETH = 1