Skip to content

.DRA

There are two types of drainage files: simple and extended. The templates can be found below.

Simple drainage

DRFIL_BASIC.template
**********************************************************************************
* Filename: swap.dra                  
* Contents: SWAP 4 - Input data for basic and extended drainage
**********************************************************************************
* Comment area:
* Testbank of SWAP: build with template of dra-file
*
**********************************************************************************

*** BASIC DRAINAGE SECTION ***

**********************************************************************************
* Part 0: General

* Switch, method of lateral drainage calculation:
  DRAMET = {{DRAMET}}        ! 1 = Use table of drainage flux - groundwater level relation
                             ! 2 = Use drainage formula of Hooghoudt or Ernst
                             ! 3 = Use drainage/infiltration resistance, multi-level if needed

  SWDIVD = {{SWDIVD}}        ! Calculate vertical distribution of drainage flux in groundwater [Y=1, N=0]

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1, specify anisotropy factor COFANI (horizontal/vertical saturated hydraulic
* conductivity) for each soil layer (maximum MAHO), [0.0001..1000 -, R]:
  COFANI = {{COFANI}}
{{/SWITCH_SWDIVD_OPTION_1}}

* Switch to adjust upper boundary of model discharge layer
  SWDISLAY = 0               ! switch to adjust discharge layer  [0,1,2, -, I]

**********************************************************************************


{{#SWITCH_DRAMET_OPTION_1}}
**********************************************************************************
* Part 1: Table of drainage flux - groundwater level relation (DRAMET = 1)

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1, specify the drain spacing:
  LM1 = {{LM1}}              ! Drain spacing, [1..1000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
* Specify drainage flux QDRAIN [-100..1000 cm/d, R] as function of groundwater level GWL [-1000.0..10.0 cm, R]
* negative GWL is below soil surface; start with highest groundwater level; maximum of 25 records:

{{#TABLE_QDRNTB}}
  {{QDRAIN}} {{GWL}}
{{/TABLE_QDRNTB}}
* End of table                                             
{{/SWITCH_DRAMET_OPTION_1}}
{{#SWITCH_DRAMET_OPTION_2}}
**********************************************************************************
* Part 2: Drainage formula of Hooghoudt or Ernst (DRAMET = 2)
*
* Drain characteristics:
  LM2    = {{LM2}}           ! Drain spacing, [1..1000 m, R]
  SHAPE  = {{SHAPE_DRA}}     ! Shape factor to account for actual location between drain and water divide [0.0..1.0 -, R]
  WETPER = {{WETPER}}        ! Wet perimeter of the drain, [0..1000 cm, R]
  ZBOTDR = {{ZBOTDR}}        ! Level of drain bottom, [-1000..0 cm, R, neg. below soil surface]
  ENTRES = {{ENTRES}}        ! Drain entry resistance, [0..1000 d, R]

* Soil profile characteristics:

* Position of drain:  
  IPOS   = {{IPOS}}          ! 1 = On top of an impervious layer in a homogeneous profile          
                             ! 2 = Above an impervious layer in a homogeneous profile              
                             ! 3 = At the interface of a fine upper and a coarse lower soil layer
                             ! 4 = In the lower, more coarse soil layer
                             ! 5 = In the upper, more fine soil layer                                             

* For all positions specify:
  BASEGW = {{BASEGW}}        ! Level of impervious layer, [-1d4..0 cm, R]
  KHTOP  = {{KHTOP}}         ! Horizontal hydraulic conductivity top layer, [0..1000 cm/d, R]

{{#SWITCH_IPOS_OPTION_3}}
* In addition, in case IPOS = 3
  KHBOT  = {{KHBOT}}         ! horizontal hydraulic conductivity bottom layer, [0..1000 cm/d, R]
  ZINTF  = {{ZINTF}}         ! Level of interface of fine and coarse soil layer, [-1d4..0 cm, R]
{{/SWITCH_IPOS_OPTION_3}}
{{#SWITCH_IPOS_OPTION_4}}
* In addition, in case IPOS = 4
  KHBOT  = {{KHBOT}}         ! horizontal hydraulic conductivity bottom layer, [0..1000 cm/d, R]
  ZINTF  = {{ZINTF}}         ! Level of interface of fine and coarse soil layer, [-1d4..0 cm, R]
  KVTOP  = {{KVTOP}}         ! Vertical hydraulic conductivity top layer, [0..1000 cm/d, R]
  KVBOT  = {{KVBOT}}         ! Vertical hydraulic conductivity bottom layer, [0..1000 cm/d, R]
{{/SWITCH_IPOS_OPTION_4}}
{{#SWITCH_IPOS_OPTION_5}}
* In addition, in case IPOS = 5
  KHBOT  = {{KHBOT}}         ! horizontal hydraulic conductivity bottom layer, [0..1000 cm/d, R]
  ZINTF  = {{ZINTF}}         ! Level of interface of fine and coarse soil layer, [-1d4..0 cm, R]
  KVTOP  = {{KVTOP}}         ! Vertical hydraulic conductivity top layer, [0..1000 cm/d, R]
  KVBOT  = {{KVBOT}}         ! Vertical hydraulic conductivity bottom layer, [0..1000 cm/d, R]
  GEOFAC = {{GEOFAC}}        ! Geometry factor of Ernst,  [0..100 -, R]
{{/SWITCH_IPOS_OPTION_5}}
{{/SWITCH_DRAMET_OPTION_2}}
{{#SWITCH_DRAMET_OPTION_3}}
**********************************************************************************
* METHOD 3 - Part 3: Drainage and infiltration resistance (DRAMET = 3)

  NRLEVS = {{NRLEVS}}        ! Number of drainage levels, [1..5, I]

* Option for interflow in highest drainage level (shallow system with short residence time)
  SWINTFL = {{SWINTFL}}      ! Switch for interflow [0,1, I]

{{#SWITCH_SWINTFL_OPTION_1}}
* If SWINTFL = 1, specify:
  COFINTFLB = {{COFINTFLB}}  ! Coefficient for interflow relation  [0.01..10.0 d, R]
  EXPINTFLB = {{EXPINTFLB}}  ! Exponent for interflow relation  [0.1..1.0 -, R]

{{#SWITCH_SWDIVD_OPTION_1}}
* Switch to adjust the bottom of the model discharge layer in case of lateral interflow (SWDIVD=1).
* In case of SWTOPNRSRF=1) then the bottom of the highest order drainage system (ZBORDR(NUMDRAIN)) represents the max depth of the interflow.  
 SWTOPNRSRF = {{SWTOPNRSRF}} ! Switch to enable adjustment of model discharge layer [0,1, I] 

{{/SWITCH_SWDIVD_OPTION_1}}
{{/SWITCH_SWINTFL_OPTION_1}}
**********************************************************************************

{{#SWITCH_NRLEVS_OPTION_1}}
**********************************************************************************
* Part 3a: Drainage to level 1

  DRARES1 = {{DRARES1}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES1 = {{INFRES1}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO1 = {{SWALLO1}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L1 = {{L1}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR1 = {{ZBOTDR1}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP1 = {{SWDTYP1}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL1 [date] and channel water level LEVEL1 [-10000..200, cm, R]
* LEVEL1 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB1}}
  {{DATOWL1}} {{LEVEL1}}
{{/TABLE_DATOWLTB1}}
* End of table
{{/SWITCH_NRLEVS_OPTION_1}}
{{#SWITCH_NRLEVS_OPTION_2}}
**********************************************************************************
* Part 3a: Drainage to level 1

  DRARES1 = {{DRARES1}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES1 = {{INFRES1}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO1 = {{SWALLO1}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L1 = {{L1}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR1 = {{ZBOTDR1}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP1 = {{SWDTYP1}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL1 [date] and channel water level LEVEL1 [-10000..200, cm, R]
* LEVEL1 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB1}}
  {{DATOWL1}} {{LEVEL1}}
{{/TABLE_DATOWLTB1}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3b: Drainage to level 2

  DRARES2 = {{DRARES2}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES2 = {{INFRES2}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO2 = {{SWALLO2}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L2 = {{L2}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR2 = {{ZBOTDR2}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP2 = {{SWDTYP2}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL2 [date] and channel water level LEVEL2 [-10000..200, cm, R]
* LEVEL2 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB2}}
  {{DATOWL2}} {{LEVEL2}}
{{/TABLE_DATOWLTB2}}
* End of table
{{/SWITCH_NRLEVS_OPTION_2}}
{{#SWITCH_NRLEVS_OPTION_3}}
**********************************************************************************
* Part 3a: Drainage to level 1

  DRARES1 = {{DRARES1}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES1 = {{INFRES1}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO1 = {{SWALLO1}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L1 = {{L1}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR1 = {{ZBOTDR1}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP1 = {{SWDTYP1}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL1 [date] and channel water level LEVEL1 [-10000..200, cm, R]
* LEVEL1 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB1}}
  {{DATOWL1}} {{LEVEL1}}
{{/TABLE_DATOWLTB1}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3b: Drainage to level 2

  DRARES2 = {{DRARES2}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES2 = {{INFRES2}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO2 = {{SWALLO2}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L2 = {{L2}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR2 = {{ZBOTDR2}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP2 = {{SWDTYP2}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL2 [date] and channel water level LEVEL2 [-10000..200, cm, R]
* LEVEL2 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB2}}
  {{DATOWL2}} {{LEVEL2}}
{{/TABLE_DATOWLTB2}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3c: Drainage to level 3

  DRARES3 = {{DRARES3}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES3 = {{INFRES3}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO3 = {{SWALLO3}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L3 = {{L3}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR3 = {{ZBOTDR3}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP3 = {{SWDTYP3}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL3 [date] and channel water level LEVEL3 [-10000..200, cm, R]
* LEVEL3 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB3}}
  {{DATOWL3}} {{LEVEL3}}
{{/TABLE_DATOWLTB3}}
* End of table
{{/SWITCH_NRLEVS_OPTION_3}}
{{#SWITCH_NRLEVS_OPTION_4}}
**********************************************************************************
* Part 3a: Drainage to level 1

  DRARES1 = {{DRARES1}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES1 = {{INFRES1}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO1 = {{SWALLO1}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L1 = {{L1}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR1 = {{ZBOTDR1}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP1 = {{SWDTYP1}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL1 [date] and channel water level LEVEL1 [-10000..200, cm, R]
* LEVEL1 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB1}}
  {{DATOWL1}} {{LEVEL1}}
{{/TABLE_DATOWLTB1}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3b: Drainage to level 2

  DRARES2 = {{DRARES2}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES2 = {{INFRES2}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO2 = {{SWALLO2}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L2 = {{L2}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR2 = {{ZBOTDR2}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP2 = {{SWDTYP2}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL2 [date] and channel water level LEVEL2 [-10000..200, cm, R]
* LEVEL2 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB2}}
  {{DATOWL2}} {{LEVEL2}}
{{/TABLE_DATOWLTB2}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3c: Drainage to level 3

  DRARES3 = {{DRARES3}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES3 = {{INFRES3}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO3 = {{SWALLO3}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L3 = {{L3}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR3 = {{ZBOTDR3}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP3 = {{SWDTYP3}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL3 [date] and channel water level LEVEL3 [-10000..200, cm, R]
* LEVEL3 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB3}}
  {{DATOWL3}} {{LEVEL3}}
{{/TABLE_DATOWLTB3}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3d: Drainage to level 4

  DRARES4 = {{DRARES4}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES4 = {{INFRES4}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO4 = {{SWALLO4}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L4 = {{L4}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR4 = {{ZBOTDR4}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP4 = {{SWDTYP4}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL4 [date] and channel water level LEVEL4 [-10000..200, cm, R]
* LEVEL4 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB4}}
  {{DATOWL4}} {{LEVEL4}}
{{/TABLE_DATOWLTB4}}
* End of table
{{/SWITCH_NRLEVS_OPTION_4}}
{{#SWITCH_NRLEVS_OPTION_5}}
**********************************************************************************
* Part 3a: Drainage to level 1

  DRARES1 = {{DRARES1}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES1 = {{INFRES1}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO1 = {{SWALLO1}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L1 = {{L1}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR1 = {{ZBOTDR1}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP1 = {{SWDTYP1}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL1 [date] and channel water level LEVEL1 [-10000..200, cm, R]
* LEVEL1 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB1}}
  {{DATOWL1}} {{LEVEL1}}
{{/TABLE_DATOWLTB1}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3b: Drainage to level 2

  DRARES2 = {{DRARES2}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES2 = {{INFRES2}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO2 = {{SWALLO2}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L2 = {{L2}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR2 = {{ZBOTDR2}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP2 = {{SWDTYP2}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL2 [date] and channel water level LEVEL2 [-10000..200, cm, R]
* LEVEL2 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB2}}
  {{DATOWL2}} {{LEVEL2}}
{{/TABLE_DATOWLTB2}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3c: Drainage to level 3

  DRARES3 = {{DRARES3}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES3 = {{INFRES3}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO3 = {{SWALLO3}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L3 = {{L3}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR3 = {{ZBOTDR3}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP3 = {{SWDTYP3}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL3 [date] and channel water level LEVEL3 [-10000..200, cm, R]
* LEVEL3 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB3}}
  {{DATOWL3}} {{LEVEL3}}
{{/TABLE_DATOWLTB3}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3d: Drainage to level 4

  DRARES4 = {{DRARES4}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES4 = {{INFRES4}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO4 = {{SWALLO4}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L4 = {{L4}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR4 = {{ZBOTDR4}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP4 = {{SWDTYP4}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL4 [date] and channel water level LEVEL4 [-10000..200, cm, R]
* LEVEL4 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB4}}
  {{DATOWL4}} {{LEVEL4}}
{{/TABLE_DATOWLTB4}}
* End of table

**********************************************************************************


**********************************************************************************
* Part 3e: Drainage to level 5

  DRARES5 = {{DRARES5}}      ! Drainage resistance, [10..1d5 d, R]
  INFRES5 = {{INFRES5}}      ! Infiltration resistance, [0..1d5 d, R]

* Switch, for allowance drainage/infiltration:
  SWALLO5 = {{SWALLO5}}      ! 1 = Drainage and infiltration are both allowed
                             ! 2 = Drainage is not allowed
                             ! 3 = Infiltration is not allowed                          

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1 (drainage flux vertically distributed), specify the drain spacing:
  L5 = {{L5}}                ! Drain spacing, [1..100000 m, R]

{{/SWITCH_SWDIVD_OPTION_1}}
  ZBOTDR5 = {{ZBOTDR5}}      ! Level of drainage medium bottom, [-10000..0 cm, R]
  SWDTYP5 = {{SWDTYP5}}      ! Type of drainage medium: 1 = drain tube, 2 = open channel

* Specify date DATOWL5 [date] and channel water level LEVEL5 [-10000..200, cm, R]
* LEVEL5 is negative if below soil surface; maximum MAOWL records:

{{#TABLE_DATOWLTB5}}
  {{DATOWL5}} {{LEVEL5}}
{{/TABLE_DATOWLTB5}}
* End of table
{{/SWITCH_NRLEVS_OPTION_5}}
{{/SWITCH_DRAMET_OPTION_3}}

**********************************************************************************

* End of .dra file!

Extended drainage

DRFIL_EXTENDED.template
**********************************************************************************
* Filename: swap.dra                  
* Contents: SWAP 4 - Input data for basic and extended drainage
**********************************************************************************
* Comment area:
* Testbank of SWAP: build with template of dra-file
*
**********************************************************************************

*** EXTENDED DRAINAGE SECTION ***

**********************************************************************************
* Part 0: General

  SWDIVD = {{SWDIVD}}        ! Calculate vertical distribution of drainage flux in groundwater [Y=1, N=0]

{{#SWITCH_SWDIVD_OPTION_1}}
* If SWDIVD = 1, specify anisotropy factor COFANI (horizontal/vertical saturated hydraulic
* conductivity) for each soil layer (maximum MAHO), [0.0001..1000 -, R]:
  COFANI = {{COFANI}}
{{/SWITCH_SWDIVD_OPTION_1}}

* Switch to adjust upper boundary of model discharge layer
  SWDISLAY = 0               ! switch to adjust discharge layer  [0,1,2, -, I]

**********************************************************************************


**********************************************************************************
* Part 0: Reference level

  ALTCU = 0.0                ! Altitude of the control unit relative to reference level [-300000..300000 cm, R]

**********************************************************************************
* Part 1: drainage characteristics 

  NRSRF  = {{NRSRF}}         ! number of subsurface drainage levels [1..5, I]

* Table with physical characteristics of each subsurface drainage level:
* Variables RENTRY, REXIT, WIDTHR and TALUDR must have realistic values when the type of drainage medium is open
* LEVEL   = Drainage level number [1..NRSRF, I]
* SWDTYP  = Type of drainage medium [open=0, closed=1] 
* L       = Spacing between channels/drains [1..100000 m, R]
* ZBOTDRE = Altitude of bottom of channel or drain [ALTCU-1000..ALTCU-0.01 cm,R]
* GWLINF  = Groundwater level for maximum infiltration [-1000..0 cm rel. to soil surf., R]
* RDRAIN  = Drainage resistance [1..100000 d, R]
* RINFI   = Infiltration resistance  [1..100000 d, R]
* RENTRY  = Entry resistance  [0..100 d, R]
* REXIT   = Exit resistance   [0..100 d, R]
* WIDTHR  = Bottom width of channel [0..10000 cm, R]
* TALUDR  = Side-slope (dh/dw) of channel [0.01..5, R]

{{#TABLE_DRNTB}}
  {{LEV}} {{SWDTYP}} {{L}} {{ZBOTDRE}} {{GWLINF}} {{RDRAIN}} {{RINFI}} {{RENTRY}} {{REXIT}} {{WIDTHR}} {{TALUDR}}
{{/TABLE_DRNTB}}
* End of table

* Switch to introduce rapid subsurface drainage [0..2, I]
  SWNRSRF = {{SWNRSRF}}      ! 0 = No rapid drainage
                             ! 1 = Rapid drainage in the highest drainage system (implies adjustment of RDRAIN of highest drainage system)
                             ! 2 = Rapid drainage as interflow according to a power relation (implies adjustment of RDRAIN of highest drainage system)

{{#SWITCH_SWNRSRF_OPTION_1}}
* In case of SWRNSRF=1, specify rapid drainage
  RSURFDEEP    = {{RSURFDEEP}} ! Maximum resistance of rapid subsurface drainage [0.001..1000.0 d, R]
  RSURFSHALLOW = {{RSURFSHALLOW}} ! Minimum resistance of rapid subsurface drainage [0.001..1000.0 d, R]
{{/SWITCH_SWNRSRF_OPTION_1}}
{{#SWITCH_SWNRSRF_OPTION_2}}
* In case of SWRNSRF=2, specify coefficients of power function
 COFINTFL = {{COFINTFL}}     ! Coefficient of interflow relation [0.01..10.0 d-1, R]
 EXPINTFL = {{EXPINTFL}}     ! Exponent of interflow relation [0.1...1.0 -, R]
{{/SWITCH_SWNRSRF_OPTION_2}}

* Switch to adjust the bottom of the model discharge layer in case of lateral (SWDIVD=1) interflow or rapid drainage (SWNRSRF=1 or SWNRSRF=2). 
* In case of SWTOPNRSRF=1) then the bottom of the highest order drainage system (ZBORDR(NUMDRAIN)) represents the max depth of the interflow.  
 SWTOPNRSRF = {{SWTOPNRSRF}} ! Switch to enable adjustment of model discharge layer [0,1, I] 

**********************************************************************************


**********************************************************************************
* Part 2: Specification and control of surface water system

* Switch for interaction with surface water system [1..3, I] 
  SWSRF = {{SWSRF}}          ! 1 = No interaction with surface water system
                             ! 2 = Surface water system is simulated with no separate primary system 
                             ! 3 = Surface water system is simulated with separate primary system

{{#SWITCH_SWSRF_OPTION_2}}
* If SWSRF=2, specify option for surface water level of secondary system [1..2, I]
  SWSEC = {{SWSEC}}          ! 1 = Surface water level is input
                             ! 2 = Surface water level is simulated


{{#SWITCH_SWSEC_OPTION_1}}
* Water level in secondary water course [ALTCU-1000..ALTCU-0.01 cm, R] as function of DATE2 [dd-mmm-yyyy] 
{{#TABLE_SECWATLVL}}
  {{DATE2}} {{WLS}}
{{/TABLE_SECWATLVL}}
* End of table
{{/SWITCH_SWSEC_OPTION_1}}
{{#SWITCH_SWSEC_OPTION_2}}
* Miscellaneous parameters
  WLACT  = {{WLACT}}         ! Initial surface water level [ALTCU-1000..ALTCU cm,R]
  OSSWLM = {{OSSWLM}}        ! Criterium for warning about oscillation [0..10 cm, R]

* Management of surface water levels
  NMPER  =  {{NMPER}}        ! Number of management periods [1..3660, I]

* For each management period specify:
* IMPER  = Index of management period [1..NMPER, I]
* IMPEND = Date that period ends [dd-mm-yyyy]
* SWMAN  = Type of water management 1 = fixed weir crest (see part 4c and 4d) 2 = automatic weir (see part 4e) [1..2, I]
* WSCAP  = Surface water supply capacity [0..100 cm/d, R]
* WLDIP  = Allowed dip of surface water level before starting supply [0..100 cm, R]
* INTWL  = Length of water-level adjustment period (SWMAN=2 only) [1..31 d, I]

{{#TABLE_MANSECWATLVL}}
  {{IMPER_4B}} {{IMPEND}} {{SWMAN}} {{WSCAP}} {{WLDIP}} {{INTWL}}
{{/TABLE_MANSECWATLVL}}
* End of table

* Switch for type of discharge relationship [1..2, I]
  SWQHR = {{SWQHR}}          ! 1 = Exponential relationship
                             ! 2 = Table

{{#SWITCH_SWQHR_OPTION_1}}
* If SWQHR=1, specify:
  SOFCU = {{SOFCU}}          ! Size of the control unit [0.1..100000.0 ha, R]

* If SWQHR=1, specify exponential discharge relation for all periods: 
* IMPER  = Index of management period [1..NMPER, I]
* HBWEIR = Weir crest; levels above soil surface are allowed, but simulated surface water levels should remain below 100 cm above soil surface; 
*          the crest must be higher than the deepest channel bottom of the secondary system (ZBOTDR(1 or 2), [ALTCU-ZBOTDR..ALTCU+100 cm,R].
*          If SWMAN=2, HBWEIR represents the lowest possible weir position.
* ALPHAW = Alpha-coefficient of discharge formula [0.1..50.0, R]
* BETAW  = Beta-coefficient of discharge formula [0.5..3.0, R]

{{#TABLE_QWEIR}}
  {{IMPER_4C}} {{HBWEIR}} {{ALPHAW}} {{BETAW}}
{{/TABLE_QWEIR}}
* End of table
{{/SWITCH_SWQHR_OPTION_1}}
{{#SWITCH_SWQHR_OPTION_2}}
* If SWQHR=2, specify table discharge relation:
* IMPER  = Index of management period [1..NMPER, I]
* IMPTAB = Index per management period [1..10, I]
* HTAB   = Surface water level [ALTCU-1000..ALTCU+100 cm, R] (first value for each period = ALTCU + 100 cm)
* QTAB   = Discharge [0..500 cm/d, R] (should go down to a value of zero at a level that is higher than the deepest channel bottom of secondary surface water system)

{{#TABLE_QWEIRTB}}
  {{IMPER_4D}} {{IMPTAB}} {{HTAB}} {{QTAB}}
{{/TABLE_QWEIRTB}}
* End of table
{{/SWITCH_SWQHR_OPTION_2}}
{{/SWITCH_SWSEC_OPTION_2}}
{{/SWITCH_SWSRF_OPTION_2}}
{{#SWITCH_SWSRF_OPTION_3}}
* If SWSRF=3, specify water levels in the primary system [max. = 52]
* No levels above soil surface for primary system      

* Water level in primary water course [ALTCU-1000..ALTCU-0.01 cm, R] as function of DATE1 [date]
{{#TABLE_PRIWATLVL}}
  {{DATE1}} {{WLP}}
{{/TABLE_PRIWATLVL}}
* End of table

* If SWSRF=3, specify option for surface water level of secondary system [1..2, I]
  SWSEC = {{SWSEC}}          ! 1 = Surface water level is input
                             ! 2 = Surface water level is simulated

{{#SWITCH_SWSEC_OPTION_1}}
* Water level in secondary water course [ALTCU-1000..ALTCU-0.01 cm, R] as function of DATE2 [dd-mmm-yyyy] 
{{#TABLE_SECWATLVL}}
  {{DATE2}} {{WLS}}
{{/TABLE_SECWATLVL}}
* End of table
{{/SWITCH_SWSEC_OPTION_1}}
{{#SWITCH_SWSEC_OPTION_2}}
* Miscellaneous parameters
  WLACT  = {{WLACT}}         ! Initial surface water level [ALTCU-1000..ALTCU cm,R]
  OSSWLM = {{OSSWLM}}        ! Criterium for warning about oscillation [0..10 cm, R]

* Management of surface water levels
  NMPER  =  {{NMPER}}        ! Number of management periods [1..3660, I]

* For each management period specify:
* IMPER  = Index of management period [1..NMPER, I]
* IMPEND = Date that period ends [dd-mm-yyyy]
* SWMAN  = Type of water management 1 = fixed weir crest (see part 4c and 4d) 2 = automatic weir (see part 4e) [1..2, I]
* WSCAP  = Surface water supply capacity [0..100 cm/d, R]
* WLDIP  = Allowed dip of surface water level before starting supply [0..100 cm, R]
* INTWL  = Length of water-level adjustment period (SWMAN=2 only) [1..31 d, I]

{{#TABLE_MANSECWATLVL}}
  {{IMPER_4B}} {{IMPEND}} {{SWMAN}} {{WSCAP}} {{WLDIP}} {{INTWL}}
{{/TABLE_MANSECWATLVL}}
* End of table

* Switch for type of discharge relationship [1..2, I]
  SWQHR = {{SWQHR}}          ! 1 = Exponential relationship
                             ! 2 = Table

{{#SWITCH_SWQHR_OPTION_1}}
* If SWQHR=1, specify:
  SOFCU = {{SOFCU}}          ! Size of the control unit [0.1..100000.0 ha, R]

* If SWQHR=1, specify exponential discharge relation for all periods: 
* IMPER  = Index of management period [1..NMPER, I]
* HBWEIR = Weir crest; levels above soil surface are allowed, but simulated surface water levels should remain below 100 cm above soil surface; 
*          the crest must be higher than the deepest channel bottom of the secondary system (ZBOTDR(1 or 2), [ALTCU-ZBOTDR..ALTCU+100 cm,R].
*          If SWMAN=2, HBWEIR represents the lowest possible weir position.
* ALPHAW = Alpha-coefficient of discharge formula [0.1..50.0, R]
* BETAW  = Beta-coefficient of discharge formula [0.5..3.0, R]

{{#TABLE_QWEIR}}
  {{IMPER_4C}} {{HBWEIR}} {{ALPHAW}} {{BETAW}}
{{/TABLE_QWEIR}}
* End of table
{{/SWITCH_SWQHR_OPTION_1}}
{{#SWITCH_SWQHR_OPTION_2}}
* If SWQHR=2, specify table discharge relation:
* IMPER  = Index of management period [1..NMPER, I]
* IMPTAB = Index per management period [1..10, I]
* HTAB   = Surface water level [ALTCU-1000..ALTCU+100 cm, R] (first value for each period = ALTCU + 100 cm)
* QTAB   = Discharge [0..500 cm/d, R] (should go down to a value of zero at a level that is higher than the deepest channel bottom of secondary surface water system)

{{#TABLE_QWEIRTB}}
  {{IMPER_4D}} {{IMPTAB}} {{HTAB}} {{QTAB}}
{{/TABLE_QWEIRTB}}
* End of table
{{/SWITCH_SWQHR_OPTION_2}}
{{/SWITCH_SWSEC_OPTION_2}}
{{/SWITCH_SWSRF_OPTION_3}}
{{/SWITCH_SWDRA_OPTION_2}}

**********************************************************************************

* End of .dra file!