In Step 7 a ModuleConfigFile is produced which uses a PCRaster transformation. This PCRaster transformation is used for to calculate the lateral inflows. The lateral inflow at the river branches are shown in the accretion profiles. The accretion profile gives a clear overview of the different influences on the river discharge. Because Modflow only provides the surface water flow (QSTR_ACCU) of all streamcells, a PCraster transformation is necessary. When a tributary reaches the river branch, PCRaster sums the discharges of the upstream river cells. PCRaster executes the following 3 steps:
- PCRaster determines the discharge of the tributaries; the flow of the branch rivers is substracted from the total surface water flow.
only_Q_tributaries = Qflow * branches_grid; - Sums the discharges of all upstream river cells
sum_Q_tributaries = upstream(stream_directions, only_Q_tributaries); - Make the map with discharges of all upstream river cells at the crossing points of rivers.
Output = sum_Q_tributaries * cross_points;
This PCRaster tranformation needs input to be able to run and therefore the following xml files have to be created:
New xml files :
- Module configuration files :
- XXX^1^XXX 1_interpolate_grid_to_branch_grid
- XXX 1_PCR_generate_branch_file
- XXX 1_QTRIB_ref(Historic)
- workflow file :
- XXX 1_configuration_only
1 = model abbreviation
- XXX 1_configuration_only
Besides the xml files the following files in the Modules directory should be generated: •
- Fixed
...
...
- Ldd.map
...
- Strdir.map
...
- Scalar.map
...
- fromNGMS
...
...
- branch0000.000
...
- toNGMS
...
...
- branches_grid.map
...
- cross_points.map
...
- stream_directions.map
In order to create the above mentioned files it is necessary to follow the instructions below: 1.
- Import the branch locations into PCRaster. This is done with the PCRaster general adaptor export, which produces branch0000.000 file.
...
- Copy the X and Y locations from the Branches.xml and make an new irregular grid (XXX_branch_grid) in Grids.xml
...
- Make a new location ID for XXX_branch_grid.
...
- Make XXX_interpolate_grid_to_branch_grid file. This file converts the locationid from XXX_merged to the XXX_branch_grid. And back to the XXX_merged grid, making use of inverse distance interpolation technique. Adapt the search radius to grid size. (= smaller than half a grid cell)
...
- Make general adaptor run file: XXX_PCR_generate_branch_file. This file exports the branch0000.000 file.
...
- Make stream flow direction map.
...
- Export the stream flow direction map with the Modflow general adaptor
...
- by running the XXX_prepare.bat. The exported stream direction map file "XXX_Streamflow_Directions.asc" can be found in the "toNGMS" folder.
- Rename this stream flow direction asci file into "strdir.asc"
...
- Make initial scalar and ldd map
...
- use mapattr command to produce scalar.
...
- map -> mapattr scalar.map
number of columns =360
number of rows=240
data type = scalar
projection= y increases from bottom to top
x upperleft corner=400000
y upperleft corner=170000
celllength = 250
- map -> mapattr scalar.map
...
- use mapattr command to produce ldd.map
...
- -> mapattr ldd.map
number of colums =360
number of rows=240
data type = ldd
projection= y increases from bottom to top
x upperleft corner=400000
y upperleft corner=170000
celllength = 250
- -> mapattr ldd.map
...
- Make a new temporary workflow (e.g. XXX_configuration_only) and adapt the WorkflowDescriptorDescriptors and the ModuleinstanceDescriptors file
...
- Run workflow XXX_PCR_generate_branch_file. This run produces the following files:
...
- branches_grid.map, cross_points.map and stream_directions.map
...
- make XXX_QTRIB_ref(Historic) transformation file
...
- (as described in step 7 using the moduleinstance generation spreadsheet)
- adapt interpolation and compare files
...
- (as described in step 7 using the moduleinstance generation spreadsheet)
- adapt Moduledescriptor and ModuleinstanceDescriptors if still applicable
The instructions are also explained in the attached word document, which also includes some examples of resulting files. , ModuleinstanceDescriptors and the Parameter file