Preparing stations map and sub-basins map

To prepare a stations map it is easiest to use a vector file with the point locations (for example a shapefile), to a PCRaster grid (.map file). You can create a new shapefile with points in QGIS under Layer New New Shapefile layer:

Figure 32: Create new shapefile layer

Make sure that you select “Point” and that the CRS corresponds (see Figure 31) with the EPSG that you have defined in Section 5.1. Finally click OK to create the New Shapefile Layer and save it under a useful name, for example locations.shp.

Figure 33: Setting the properties of the New Shapefile Layer.

The next step involves adding points to the Shapefile where you want the SPHY model to report time-series. Often these points correspond with the locations of discharge measurement stations. If you have an existing Shapefile of discharge measurement stations in your basin, then you can easily drag this file into QGIS to identify these locations. Now you can start adding points to the newly created Shapefile by following these steps:

  1. Make sure the “locations” layer is selected. Then click “Toggle Editing” to change the layer to editing mode (see Figure 32).

Figure 34: Toggle Editing for Shapefiles.

  1. Then click the “Add Feature” option (see Figure 33). Now you can start adding points to the map where you want the SPHY model to create time-series output. The accuflux.map can help you determining if you are adding a point to the river network. Add as many as points as you like. For each point you need to provide an ID number. Start with ID 1, then ID 2, etc. In the example of Figure 34 we added 3 points to the “locations” layer.

Figure 35: Add Feature for Shapefiles.

Figure 36: Adding points to the locations Shapefile layer using the accuflux.map.

  1. If you are finished with adding the points, then you again can click the “Toggle Editing” button and Save your edits.

  2. The next step involves converting the “locations” Shapefile layer to a raster layer. This can be done using the “v.to.rast.attribute” tool in QGIS under Processing Toolbox (see Figure 35).

  3. Within this toolbox (Figure 36) set the “locations” layer as “Input vector layer”, make sure that the “id” column is selected, set the “GRASS region extent” by specifying the clone.map layer, and set the “GRASS region cellsize” as determined before. Finally, choose a “Rasterized” layer name (e.g. “locations.tif”) and click Run.

  4. The final step again involves converting the resulting GeoTiff raster from step 5) to a PCRaster *.map format. This can be done using the Raster Conversion Translate tool (see Figure 27 and Figure 28). The only additional step required here is to click the “Edit” button (see Figure 37) and add the following syntax: -ot Float32 (see Figure 38).

  5. Finally click OK, and again OK, and again OK, and Close to finish the conversion.

Figure 37: Selecting the v.to.rast.attribute tool from the Processing Toolbox.

Figure 38: Setting the options in the v.to.rast.attribute tool.

Figure 39: Editing the command for Translation.

Figure 40: Adding the “-ot Float32” syntax to the command for Translation.

The resulting “locations.map” is of the Float32 data format (scalar). As can be seen Table 5 from it is required to have a nominal format for station files. This can be achieved by typing the following command in the Windows Command line:

pcrcalc locs.map = nominal(locations.map)

You can use locs.map and ldd.map to delineate the catchments of the points in locs.map. Use the subcatchment command for that:

pcrcalc catchment.map = subcatchment(ldd.map, locs.map)

Last updated