SPHY Manual - All versions
  • 📚Readme
  • manual
    • SPHY manual 3.1
      • Introduction
      • Theory
        • Background
        • Modules
        • Reference and potential evaporation
        • Dynamic vegetation processes
        • Snow processes
        • Glacier processes
        • Soil water processes
        • Soil erosion processes
        • Routing
      • Applications
        • Irrigation management in lowland areas
        • Snow- and glacier-fed river basins
        • Flow forecasting
        • Soil erosion and sediment transport
      • Installation of SPHY
        • Installing SPHY as a stand-alone application
          • Miniconda
          • SPHY v3.1 source code
      • Build your own SPHY-model
        • Select projection extent and resolution
        • Clone map
        • DEM and Slope
        • Delineate catchment and create local drain direction map
        • Preparing stations map and sub-basin.map
        • Glacier table
        • Soil hydraulic properties
        • Other static input maps
        • Meteorological forcing map series
        • Open water evaporation
        • Dynamic vegetation module
        • Soil erosion model input
          • MMF
          • Soil erosion model calibration
          • Soil erosion model output
        • Sediment transport
      • Reporting and other utilities
        • Reporting
        • NetCDF
      • References
      • Copyright
      • Appendix 1: Input and Output
      • Appendix 2: Input and Output description
      • Appendix 3: Soil erosion model input
        • MUSLE
        • INCA
        • SHETRAN
        • DHVSM
        • HSFP
    • SPHY manual 3.0
      • Introduction
      • Theory
        • Background
        • Modules
        • Reference and potential evaporation
        • Dynamic vegetation processes
        • Snow processes
        • Glacier processes
        • Soil water processes
        • Soil erosion processes
        • Routing
      • Applications
        • Irrigation management in lowland areas
        • Snow- and glacier-fed river basins
        • Flow forecasting
      • Installation of SPHY
        • General
        • Installing SPHY as a stand-alone application
          • Miniconda
          • SPHY v3.1 source code
      • Build your own SPHY-model
        • Select projection extent and resolution
        • Clone map
        • DEM and Slope
        • Delineate catchment and create local drain direction map
        • Preparing stations map and sub-basin.map
        • Glacier fraction map
        • Soil hydraulic properties
        • Other static input maps
        • Meteorological forcing map series
        • Open water evaporation
        • Dynamic vegetation module
        • Soil erosion model input
          • MUSLE
          • MMF
          • INCA
          • SHETRAN
          • DHVSM
          • HSFP
          • Soil erosion model calibration
          • Soil erosion model output
        • Sediment transport
        • Applications
        • Reporting
        • NetCDF
      • References
      • Copyright
      • Appendix 1: Input and Output
Powered by GitBook
On this page
  1. manual
  2. SPHY manual 3.1
  3. Build your own SPHY-model

Preparing stations map and sub-basin.map

PreviousDelineate catchment and create local drain direction mapNextGlacier table

Last updated 1 year ago

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:

Make sure that you select “Point” and that the CRS corresponds (see Figure 34) 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.

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 35).

  1. Then click the “Add Feature” option (see Figure 36). 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 37 we added 3 points to the “locations” layer.

  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 38).

  3. Within this toolbox (Figure 39) 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 30 and Figure 31). The only additional step required here is to click the “Edit” button (see Figure 40) and add the following syntax: -ot Float32 (see Figure 41).

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

The resulting “locations.map” is of the Float32 data format (scalar). As can be seen Table 12 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)

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

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

subcatchment
Figure 33: Create new shapefile layer
Figure 34: Setting the properties of the New Shapefile Layer.
Figure 35: Toggle Editing for Shapefiles.
Figure 36: Add Feature for Shapefiles.
Figure 37: Adding points to the locations Shapefile layer using the accuflux.map.
Figure 38: Selecting the v.to.rast.attribute tool from the Processing Toolbox.
Figure 39: Setting the options in the v.to.rast.attribute tool.
Figure 40: Editing the command for Translation.
Figure 41: Adding the “-ot Float32” syntax to the command for Translation.