# Generated on ....
# Deltares, D-Flow FM Version ....

[General]
Program                           = D-Flow FM
Version                           =
fileType                          = modelDef
fileVersion                       = 1.09                # File format version (do not edit this)
AutoStart                         = 0                   # Autostart simulation after loading MDU (0: no, 1: autostart, 2: autostartstop)
PathsRelativeToParent             = 0                   # Whether or not (1/0) to resolve file names (e.g. inside the *.ext file) relative to their direct parent, instead of to the toplevel MDU working dir. Autostart simulation after loading MDU (0: no, 1: autostart, 2: autostartstop)

[geometry]
NetFile                           =                     # Unstructured grid file *_net.nc
BathymetryFile                    =                      
OneDNetworkFile                   =                     # 1d networkfile
BedlevelFile                      =                     # street_level.xyz , Bedlevels points file e.g. *.xyz, only needed for bedlevtype not equal 3
DryPointsFile                     =                     # Dry points file *.xyz (third column dummy z values), or dry areas polygon file *.pol (third column 1/-1: inside/outside)
WaterLevIniFile                   =                     # Initial water levels sample file *.xyz
LandBoundaryFile                  =                     #  Land boundaries file *.ldb, used for visualization
ThinDamFile                       =                     # Polyline file *_thd.pli, containing thin dams
FixedWeirFile                     =                     # Polyline file *_fxw.pliz, containing fixed weirs with rows x, y, crest level, left ground level, right ground level
UseCaching                        = 0                   # Use caching for geometrical/network-related items (0:no, 1: yes)
Gulliesfile                       =                     # Polyline file *_gul.pliz, containing lowest bed level along talweg x, y, z level
VertplizFile                      =                     # Vertical layering file *_vlay.pliz with rows x, y, Z, first Z, nr of layers, second Z, layer type
ProflocFile                       =                     # Channel profile location file *_proflocation.xyz with rows x, y, z, profile number ref
ProfdefFile                       =                     # Channel profile definition file *_profdefinition.def with definition for all profile numbers
ProfdefxyzFile                    =                     # Channel profile definition file _profdefinition.def with definition for all profile numbers
IniFieldFile                      = initialconditions/initialFields.ini# Initial data
Uniformwidth1D                    = 1.                  # Uniform width for channel profiles not specified by profloc
Uniformheight1D                   = 1.                  # Uniform height for channel profiles not specified by profloc
ManholeFile                       =                     # File *.ini containing manholes
PipeFile                          =                     # File *.pliz containing pipe-based 'culverts'
ShipdefFile                       =                     # File *.shd containing ship definitions
StructureFile                     = structure.ini       # File *.ini containing structures
CrossLocFile                      = cross_section_locations.ini      # Name and location of the file containing the locations of the cross sections
CrossDefFile                      = cross_section_definitions.ini    # Name and location of the file containing the definitions of the cross sections
FrictFile                         =                     # Name and location of the file containing the roughness data
StorageNodeFile                   =                     # File containing the specification of storage nodes and/or manholes to add extra storage to 1D models.
WaterLevIni                       = -10.                # Initial water level at missing s0 values
BedlevUni                         = 7.                  # Uniform bed level used at missing z values if BedlevType > 2
BedlevType                        = 1                   # Bathymetry specification
                                                        # 1: at cell centers
                                                        # 2: at faces
                                                        # 3: at nodes, face levels mean of node values
                                                        # 4: at nodes, face levels min. of node values
                                                        # 5: at nodes, face levels max. of node values
                                                        # 6: at nodes, face levels max. of cell-center values
Bedslope                          = 0.                  # bedslopeinclination, sets zk = bedlevuni + x*bedslope ans sets zbndz = xbndz*bedslope
PartitionFile                     =                     # Domain partition polygon file *_part.pol for parallel run
AngLat                            = 0.                  # Angle of latitude S-N (deg), 0: no Coriolis
AngLon                            = 0.                  # Angle of longitude E-W (deg), 0: Greenwich, used in solar heat flux computation.
Conveyance2D                      = -1                  # -1: R=HU,0: R=H, 1: R=A/P, 2: K=analytic-1D conv, 3: K=analytic-2D conv
Slotw2D                           = 0.                  # -
NonLin1D                          = 0
1D2DLinkFile                      = # File containing the custom parameterization of 1D-2D links. 
PartitionFile                     = # *_part.pol, polyline(s) x,y
Blmeanbelow                       = -999.               # if not -999d0, below this level the cell centre bedlevel is the mean of surrouding netnodes
Blminabove                        = -999.               # if not -999d0, above this level the cell centre bedlevel is the min of surrouding netnodes
Nonlin2D                          = 0                   # Non-linear 2D volumes, only i.c.m. ibedlevtype = 3 and Conveyance2D>=1
Sillheightmin                     = 0.0                 # Weir treatment only if both sills larger than this value (m)
Makeorthocenters                  = 0                   # 1=yes, 0=no switch from circumcentres to orthocentres in geominit
Dcenterinside                     = 1.                  # limit cell center; 1.0:in cell <-> 0.0:on c/g 
Bamin                             = 1.d-6               # Minimum gridcell area, i.c.m. cutcells
OpenBoundaryTolerance             = 3.                  # Search tolerance factor between boundary polyline and grid cells. Unit: in cell size units (i.e., not metres).
RenumberFlowNodes                 = 1                   # Renumber the flow nodes (1: yes, 0: no)
Kmx                               = 0                   # Max nr of vertical layers
Layertype                         = 1                   # 1= all sigma, 2 = all z, 3 = use VertplizFile
Numtopsig                         = 0                   # Nr of sigmalayers in top of Zlayer model
SigmaGrowthFactor                 = 1.                  # layer thickness growth factor from bed up
dxDoubleAt1DEndNodes              = true                # Extend endnodes with half ∆x.
AllowBndAtBifurcation             = 1                   # Allow boundary nodes to be placed at connection of 2 channels (1 to allow boundaries, 0 to ignore boundary at bifurcation. 

[numerics]
CFLMax                            = 0.7                 # Maximum Courant number
AdvecType                         = 33                  # Advection type (0: none, 1: Wenneker, 2: Wenneker q(uio-u), 3: Perot q(uio-u), 4: Perot q(ui-u), 5: Perot q(ui-u) without itself)
TimeStepType                      = 2                   # Time step handling (0: only transport, 1: transport + velocity update, 2: full implicit step-reduce, 3: step-Jacobi, 4: explicit)
Limtypmom                         = 4                   # Limiter type for cell center advection velocity (0: none, 1: minmod, 2: van Leer, 3: Kooren, 4: monotone central)
Limtypsa                          = 4                   # Limiter type for salinity transport (0: none, 1: minmod, 2: van Leer, 3: Kooren, 4: monotone central)
Limtyphu                          = 0                   # Limiter type for waterdepth in continuity eq., 0=no,1=minmod,2=vanLeer,3=Koren,4=Monotone Central
Icgsolver                         = 4                   # Solver type (1: sobekGS_OMP, 2: sobekGS_OMPthreadsafe, 3: sobekGS, 4: sobekGS + Saadilud, 5: parallel/global Saad, 6: parallel/Petsc, 7: parallel/GS)
Maxdegree                         = 6                   # Maximum degree in Gauss elimination
FixedWeirScheme                   = 9                   # 6 = semi-subgrid scheme, 8 = Tabellenboek, 9 = Villemonte
FixedWeirContraction              = 1.                  # flow width = flow width*FixedWeirContraction
Izbndpos                          = 0                   # Position of z boundary, 0=D3Dflow, 1=on net boundary,2 = on specifiend polyline
Tlfsmo                            = 0.                  # Fourier smoothing time (s) on water level boundaries
Slopedrop2D                       = 0.                  # Apply drop losses only if local bed slope > Slopedrop2D, (<=0: no drop losses)cstbnd                            = 0                   # Delft-3D type velocity treatment near boundaries for small coastal models (1: yes, 0: no)
Drop1D                            = 0                   # Limit the down stream water level in the momentum equation to the downstream invert level,
Chkadvd                           = 0.1                 # Check advection terms if depth < chkadvdp, => less setbacks
Teta0                             = 0.55                # Theta of time integration, 0.5 < Theta < 1d0
Qhrelax                           = 0.01                # Relaxation qhbnd ( )
cstbnd                            = 0                   # Delft-3D type velocity treatment near boundaries for small coastal models (1) or not (0)
Maxitverticalforestersal          = 0                   # 0 : no vertical filter, > 0 = Max nr of iterations
Maxitverticalforestertem          = 0                   # 0 : no vertical filter for temp, > 0 = Max nr of iterations
Turbulencemodel                   = 3                   # 0=no, 1 = constant, 2 = algebraic, 3 = k-eps, 4 = k-tau
Turbulenceadvection               = 3                   # 0=no, 3 = hor. expl., vert. impl.
AntiCreep                         = 0                   # Flag for AntiCreep option (0=off, 1=on)
Maxwaterleveldiff                 = 0.                  # upper bound (in m) on water level changes, <= 0: no bounds
Maxvelocitydiff                   = 0.                  # upper bound (in m/s) on velocity changes, <= 0: no bounds
Epshu                             = 1.d-4               # Threshold water depth for wet and dry cells

[physics]
UnifFrictCoef                     = 0.03                  # Uniform friction coefficient (0: no friction)
UnifFrictType                     = 1                   # Uniform friction type (0: Chezy, 1: Manning, 2: White-Colebrook, 3: idem, WAQUA style)
UnifFrictCoef1D                   = 0.03                  # Uniform friction coefficient in 1D links (0: no friction)
UnifFrictCoef1D2D                 = 0.03                  # Uniform friction coefficient in 1D links (0: no friction)
UnifFrictCoefLin                  = 0.                  # Uniform linear friction coefficient for ocean models (m/s) (0: no friction)
Vicouv                            = 1.                  # Uniform horizontal eddy viscosity (m2/s)
Dicouv                            = 1.                  # Uniform horizontal eddy diffusivity (m2/s)
Smagorinsky                       = 0.                  # Smagorinsky factor in horizontal turbulence, e.g. 0.15
Elder                             = 0.                  # Elder factor in horizontal turbulence
irov                              = 0                   # 0=free slip, 1 = partial slip using wall_ks
wall_ks                           = 0.                  # Wall roughness type (0: free slip, 1: partial slip using wall_ks)
Rhomean                           = 1000.               # Average water density (kg/m3)
Ag                                = 9.81                # Gravitational acceleration
TidalForcing                      = 1                   # Tidal forcing, if jsferic=1 (0: no, 1: yes)
SelfAttractionLoading             = 0                   # Self attraction and loading (0=no, 1=yes, 2=only self attraction)
VillemonteCD1                     = 1.                  # Calibration coefficient for Villemonte. Default = 1.0.  NB. For Bloemberg data set 0.8 is recommended.
VillemonteCD2                     = 10.                 # Calibration coefficient for Villemonte. Default = 10.0. NB. For Bloemberg data set 0.8 is recommended.
Salinity                          = 0                   # Include salinity, (0=no, 1=yes)
Temperature                       = 0                   # Include temperature (0: no, 1: only transport, 3: excess model of D3D, 5: composite (ocean) model)
SecondaryFlow                     = 0                   # Secondary flow (0: no, 1: yes)

[wind]
ICdtyp                            =                     # Wind drag coefficient type (1=Const; 2=Smith&Banke (2 pts); 3=S&B (3 pts); 4=Charnock 1955, 5=Whang 2005, 6=Wuest 2005, 7=Hersbach 2010 (2 pts)
Cdbreakpoints                     =                     # Wind drag coefficient break points
Windspeedbreakpoints              =                     # Wind speed break points (m/s)
Relativewind                      =                     # Wind speed relative to top-layer water speed, 1=yes, 0 = no)
Rhoair                            =                     # Air density (kg/m3)
PavBnd                            =                     # Average air pressure on open boundaries (N/m2) (only applied if > 0)
Pavini                            =                     # Average air pressure for initial water level correction (N/m2) (only applied if > 0)

[time]
RefDate                           = 20000101            # Reference date (yyyymmdd)
Tzone                             = 0.                  # Time zone assigned to input time series
DtUser                            = 60.                 # Time interval (s) for external forcing update
DtNodal                           = 60.                 # Time interval (s) for updating nodal factors in astronomical boundary conditions
DtMax                             = 30.               # Maximal computation timestep (s)
DtInit                            = 60.                 # Initial computation timestep (s)
Tunit                             = S                   # Time unit for start/stop times (D, H, M or S)
TStart                            = 0.0                 # Start time w.r.t. RefDate (in TUnit)
TStop                             = 1728000.0           # Stop  time w.r.t. RefDate (in TUnit)

[restart]
RestartFile                       =                     # Restart netcdf-file, either *_rst.nc or *_map.nc
RestartDateTime                   =                     # Restart date and time (YYYYMMDDHHMMSS) when restarting from *_map.nc

[external forcing]
ExtForceFile                      = # Old format for external forcings file *.ext, link with tim/cmp-format boundary conditions specification
ExtForceFileNew                   = # New format for external forcings file *.ext, link with bc-format boundary conditions specification

[output]
OutputDir                         =                     # Output directory of map-, his-, rst-, dat- and timings-files, default: DFM_OUTPUT_<modelname>. Set to . for current dir.
FlowGeomFile                      =                     # Flow geometry NetCDF *_flowgeom.nc
ObsFile                           =       # Points file *.xyn with observation stations with rows x, y, station name
CrsFile                           =                     # Polyline file *_crs.pli defining observation cross sections
FouFile                           =                     # Fourier analysis input file *.fou
HisFile                           =                     # HisFile name *_his.nc
MapFile                           =                     # MapFile name *_map.nc
HisInterval                       = 120. 0. 0.          # History output times, given as "interval" "start period" "end period" (s)
XLSInterval                       = 0.                  # Interval (s) between XLS history
MapInterval                       = 3600. 0. 0.         # Map file output, given as "interval" "start period" "end period" (s)
RstInterval                       = 86400. 0. 0.        # Restart file output times, given as "interval" "start period" "end period" (s)
WaqInterval                       = 0. 0. 0.            # DELWAQ output times, given as "interval" "start period" "end period" (s)
StatsInterval                     = -60.                # Screen step output interval in seconds simulation time, if negative in seconds wall clock time
TimingsInterval                   = 0.                  # Timings statistics output interval
TimeSplitInterval                 = 0X                  # Time splitting interval, after which a new output file is started. value+unit, e.g. '1 M', valid units: Y,M,D,h,m,s.
MapFormat                         = 4                   # Map file format, 1: netCDF, 2: Tecplot, 3: netCFD and Tecplot, 4: NetCDF-UGRID
Wrihis_balance                    = 1                   # Write mass balance totals to his file (1: yes, 0: no)
Wrihis_sourcesink                 = 1                   # Write sources-sinks statistics to his file (1=yes, 0=no)
Wrihis_structure_gen              = 1                   # Write general structure parameters to his file (1: yes, 0: no)
Wrihis_structure_dam              = 1                   # Write dam parameters to his file (1: yes, 0: no)
Wrihis_structure_pump             = 1                   # Write pump parameters to his file (1: yes, 0: no)
Wrihis_structure_gate             = 1                   # Write gate parameters to his file (1: yes, 0: no)
Wrihis_structure_weir             = 1                   # Write weir parameters to his file (1: yes, 0: no)
Wrihis_turbulence                 = 1                   # Write k, eps and vicww to his file (1: yes, 0: no)
Wrihis_wind                       = 1                   # Write wind velocities to his file (1: yes, 0: no)
Wrihis_rain                       = 1                   # Write precipitation to his file (1: yes, 0: no)
Wrihis_temperature                = 1                   # Write temperature to his file (1: yes, 0: no)
Wrihis_salinity                   = 1                   # Write salinity to his file (1: yes, 0: no)
Wrimap_waterlevel_s0              = 1                   # Write water levels for previous time step to map file (1: yes, 0: no)
Wrimap_waterlevel_s1              = 1                   # Write water levels to map file (1: yes, 0: no)
Wrimap_velocity_component_u0      = 1                   # Write velocity component for previous time step to map file (1: yes, 0: no)
Wrimap_velocity_component_u1      = 1                   # Write velocity component to map file (1: yes, 0: no)
Wrimap_velocity_vector            = 1                   # Write cell-center velocity vectors to map file (1: yes, 0: no)
Wrimap_upward_velocity_component  = 1                   # Write upward velocity component on cell interfaces (1: yes, 0: no)
Wrimap_density_rho                = 1                   # Write flow density to map file (1: yes, 0: no)
Wrimap_horizontal_viscosity_viu   = 1                   # Write horizontal viscosity to map file (1: yes, 0: no)
Wrimap_horizontal_diffusivity_diu = 1                   # Write horizontal diffusivity to map file (1: yes, 0: no)
Wrimap_flow_flux_q1               = 1                   # Write flow flux to map file (1: yes, 0: no)
Wrimap_spiral_flow                = 1                   # Write spiral flow to map file (1: yes, 0: no)
Wrimap_numlimdt                   = 1                   # Write the number times a cell was Courant limiting to map file (1: yes, 0: no)
Wrimap_taucurrent                 = 1                   # Write the shear stress to map file (1: yes, 0: no)
Wrimap_chezy                      = 1                   # Write the chezy roughness to map file (1: yes, 0: no)
Wrimap_turbulence                 = 1                   # Write vicww, k and eps to map file (1: yes, 0: no)
Wrimap_wind                       = 1                   # Write wind velocities to map file (1: yes, 0: no)
Wrimap_tidal_potential            = 1                   # Write tidal potential to map file (1: yes, 0: no)
Wrihis_structure_compound         = 1                   # Write output for compound structures
MapOutputTimeVector               =                     # File (*.mpt) containing fixed map output times (s) w.r.t. RefDate
FullGridOutput                    = 0                   # Full grid output mode (0: compact, 1: full time-varying grid data)
EulerVelocities                   = 0                   # Euler velocities output (0: GLM, 1: Euler velocities)
Wrirst_bnd                        = 1                   # Write waterlevel, bedlevel and coordinates of boundaries to restart files
Writepart_domain                  = 1                   # Write partition domain info. for postprocessing

