9.2 Appendix B: Quick Guides
EE: Register for an account
In your internet browser, navigate to https://earthexplorer.usgs.gov/.
Lick on Login in the top right corner. This will bring you to a new window where you can click on Create New Account which will open a form where you enter your information. After verifying your account by clicking on the appropriate link that you will be sent, you can download data from the Earth Explorer interface.
EE: Download SRTM data for a selected region
- Login to the Earth Explorer (Register if you haven’t done so before How to).
- Navigate to your are of interest in the map panel of the Earth Explorer interface.
- Draw a polygon around your area of interest by clicking on the map (9.3).
- In the Data Set tab, look for the SRTM 1 arc-second global DEM (9.4) and select it by ticking the box next to the product name in the list.
- Verify that the result layer(s) cover your area of interest by pressing the foot icon in the Results tab and download if you are satisfied (9.5).
Back to the Load DEM section.
QGIS installation guide
In your web browser go to https://qgis.org/en/site/forusers/download.html (Figure 9.6).Double-click on the downloaded file to start the installation. Typically, SAGA GIS and GRASS GIS are installed alongside QGIS.
The QGIS window - overview
The main parts of the QGIS window which are referenced in this tutorial, are highlighted in 9.8.
QGIS: Saving a new QGIS project
Open your QGIS and open a new QGIS project by moving your cursor on the white sheet symbol in the upper-left corner of your QGIS window (9.9).
Save the QGIS project by pressing on the floppy disk icon and selecting a location for the file on your computer and a name for the project. You can add freely available on-line maps as background.
Back to setting up of QGIS.
QGIS: Change the projection of the QGIS project
For this tutorial, the projection of the QGIS project should be in EPSG:32642. Change it by clicking on the projects projection in the lower right corner of the QGIS window (see Figure 9.8). In the coordinate reference system (CRS) tab of the Project Properties, select WGS84 / UTM zone 42N with ID EPSG:32642 and click OK.
For modeling your own sample catchment, a different UTM zone may be applicable. The map in the lower right corner of the Project Properties window shows the area for the projection in red and the area where your data is located in violet so you can visually verify that you choose an appropriate projection. Large parts of Kyrgyzstan are in the UTM zone 43N (EPSG:32643).
Back to the setting up of QGIS.
QGIS: Install and activate plugins in QGIS3
Navigate to Plugins in the header toolbar and go to Manage and Install Plugins …. Search for the plugin name and go to Install Plugin to install a plugin or tick the box to the left of the plugin name in the list of plugins to activate it (9.10).
Back to the setting up of QGIS.
GQIS: Managing panels visibility in QGIS
Should one of the panels described here not be visible in your QGIS window navigate to View in your header toolbar and move to Panels. The visible panels are marked with a tick. Click on a panel name in the list to activate or deactivate it.
Back to setting up of QGIS.
QGIS: Loading public background maps
You can add freely available on-line maps as backgrounds. Note that they will only be available as long as your computer is connected to the internet. In the Browser panel (What to do if you don’t see the Browser panel), move the cursor to XYZ Tiles, do a right-click and select New Connection. Enter a descriptive name for the map layer and one of the links below and click OK. The new map layer will appear under XYZ Tiles. By double-clicking on the layer you can add it to your Layers panel.
Back to setting up of QGIS.
QGIS: Zoom to layer
You can tell QGIS to zoom to the selected layer by selecting a layer in the Layers window and then on the white sheet and magnifying glass icon in the toolbar (9.11).
You can also perform a right-click on the layer name in the Layers panel and select Zoom to layer.
QGIS: Import SRTM layers using the SRTM plugin
Make sure the SRTM plugin is installed (How to). Navigate to Plugins in the header toolbar and there to SRTM Downloader. Select the SRTM Downloader. Set the boundaries of the SRTM tiles to download and press the Download button. Close the window when done. The SRTM tiles are loaded to the Layers pane.
Back to Load DEM in QGIS section
QGIS: Merge SRTM tiles to a single layer
Navigate to Raster in the header toolbar and then to Miscellaneous and Merge…. In the Merge window that opens, select the input layers by clicking on the … button. Tick the layers that need to be merged and press Run. When the algorithm is done, close the window. You can zoom to the extent of the new layer How to. You can change the color of the DEM file.
Back to Load DEM in QGIS section
QGIS: Add raster layer
In your QGIS window, navigate to Layer in your header toolbar, there to Add Layer and left-click on Add Raster Layer (see Figure 9.12). The Data Source Manager will open in a pop-up window (see Figure 9.13).In the example above, a DEM for the example of the Nauvalisoy river catchment is loaded. For loading the DEM of your sample catchments, browse for the DEM you downloaded from the learningFiles directory.
Press the Add button at the bottom right of the Data Source Manager window to load the raster layer to your QGIS project and close the window by pressing the Close button (to the left of the Add button).
Your QGIS project now shows a grey-scale version of the raster layer you loaded. If you are satisfied with the change, save your porject by pressing the floppy disk icon at the upper left corner of your QGIS window.
You can change the color of your raster file (how to). Here is a quick-guide of how to apply a topography-style color band to your DEM.
QGIS: Change color of raster layer
You can change the colors of your cut DEM by double-clicking on the layer name in the Layers window. Go to tab Symbology (with the paint and brush icon) and choose Render type Singleband-pseudocolor (Figure 9.14) and select a Color ramp.
QGIS comes with a large library of color ramps but you can also create your own. See below a description of how to get your DEM in a topography style color palette.
QGIS: Topography-style color palettes
For our DEM we choose an existing topography-style color ramp. Open the Layer Properties window with a double-click on the raster layer in the Layers pane of the QGIS window. In the Symbology tab click the triangle to the right of the color ramp and select Create New Color Ramp… (Figure 9.15).
In the drop down menu of the pop-up window choose Catalog: cpt-city and press OK (Figure 9.16).
A this will open another window containing the catalog of existing color ramps. Under Topography, we choose sd-a and press OK (Figure 9.17).
Go to tab Transparency, set Global Opacity to 30% and specify the No Data Value 0 (Figure 9.18).
Then go back to the Symbology tab. The minimum value of the color ramp should now not be 0 but 272. Adapt manually if need be. Then, press classify to get a discrete color ramp for your map and Apply to the map. If you are happy with the colors, quit by pressing OK (Figure 9.19).
The result will look like Figure 9.20.
You can add decorations (e.g. scale and north arrow) to your map (how to).
QGIS: Add map decorations
Navigate to View -> Decorations and choose among the decorations to add. Many options for configuring the decorations are available.
9.2.1 QGIS: Verify projection of layer and re-project layer
Open the Layer Properties window with a double-click on the layer in the Layers pane and navigate to the Information tab. Under CRS (coordinate reference system) you see the projection of the layer. For the Chirchiq river basin, the CRS should say “EPSG:32642 - WGS 84 / UTM zone 42N - Projected.” Other river catchments in Central Asia may require a different UTM zone.
A raster layer can be re-projected to a different CRS: Go to Raster in the header toolbar. From there move the cursor over Projections and click on Warp (Reproject)…. The Warp window will pop up. Select the raster layer you wish to re-project in the Input layer and select the Target CRS. If the target CRS you wish to re-project to is not available in the drop-down menue, you can browse for it by clicking on the globe icon to thr right of the Target CRS section. You may re-sample the raster to a coarser resolution by specifying the Output file resolution. You may also specify to save the re-projected raster layer: Scrol to the bottom of the Warp (Reproject) window where you see Reprojected and a white box where you can browser for a location to store the new layer to. If you do not specify a target location, only a temporary layer will be loaded to QGIS which will not be available anymore after you close the QGIS project (even if you save the project). You may decide to load the temporary file and save it later (how to). Click the Run button at the bottom right to start the re-projection algorithm and press Close when the process is done. The re-projected layer will be available in the Layers pane.
A vector layer can be re-projected by selecting Vector in the header toolbar, moving the cursor to Data Management Tools and clicking on Reproject Layer…. This opens the Reproject Layer window where you can specify a Target CRS and optionally a storage location. As for the re-projection of the raster layer, a temporary layer is loaded to your QGIS project if you do not specify a storage location. However, you can always store temporary layers later (how to).
Back to the load DEM section.
QGIS: Save a temporary layer
Right-click on a temporary layer in the Layers pane. Temporary layers are indicated by a box to the right of the layer name. From the menu that opens upon right-click, select Export and Save As… (for raster layers) or Save Feature As… (for vector layers). An explorer window will open where you can specify a file name and a location to store the file to.
QGIS: Add vector layer
Left-clicking on Layer, moving your cursor over Add Layer and left-clicking Add Vector Layer (Figure 9.21).
A window will pop up, asking you to specify the properties of the vector layer to add (9.22).
Press the box with the three dots on the right of the source field to specify the location of the shape file to be added to your project (9.23). Click Open and the window will close. The address of your shape files should now stand in the source field as in 9.22.
Note that you load the .shp file but that all the files in the list in 9.22 need to be present. In the Add Vector Layer window, click Add and then close the window. QGIS has attributed a random color to your shape file which can be changed manually How to.
QGIS: Change color of a vector layer
You can change the color of your layer by double-clicking on the layer name in the Layers Window to the left of the map. This will open the properties window. The third tab from the top shows paint and brush (9.24).
You can activate Simple fill by clicking on it and select No brush in the drop-down menu in order to only show the outline of your vector layer (9.25).
QGIS: Fill sinks
Browse for the Fill sinks algorithm in the Processing Toolbox panel (Figure 9.26). If the Processing Toolbox panel is not visible go to Processing in the header toolbar and click on Toolbox to activate it. Alternatively, here is how to manage the visibility of panels in QGIS.When the algorithm is done it will load the new layer into your QGIS project. Close the Fill sinks window and save your project.
Back to catchment delineation.
QGIS: Calculate the area upslope of a point
Search for the SAGA algorithm Upslope Area in the Processing Toolbox panel and open the function window with a double click on the name. Enter the Longitude of your discharge station for the Target X coordinate and the Latitude for the Target Y coordinate. For the Elevation select the sink-filled DEM (how to fill sinks in a DEM, why we need to fill in sinks). All GIS layers and the coordinates of the discharge gauge need to be in the same UTM projection. Choose a method in the drop-down menue in the Method section and optionally specify a location for the output file. For the example of the Nauvalisoy basin, the Upslope Area window filled in correctly is shown in Figure 9.28.Click Run and Close after the algorithm is done. A new raster file with the values 0 for outside the catchment area and 100 for inside the catchment area is now loaded into your QGIS project.
Back to catchment delineation.
QGIS:
Got to Raster in the header toolbar, move your cursor over Conversion and click on Polygonize (Raster to Vector)… (see Figure 9.29).Close the attribute table window and save the boundary of your watershed and your QGIS project.
Back to catchment delineation.
QGIS: Edit Junctions layer
Select the Junctions layer and toggle manual editing by clicking on the yellow pen (9.34).
When in editing mode, the yellow pen will appear in the Layers window next to the name of the layer being edited. The edit mode will also activate a button for adding points (i.e. junctions, we don’t need that now) and the vertex tool. Click on the vertex tool icon. It is active when a a boundary appears around the icon and the Vertex Editor windows opens (9.35).
Right-click on a junction point you would like to delete to activate it (9.36).
Select the activated point by drawing a rectangle over the point with your mouse. The point will appear blue (9.37).
Delete the point with the delete key on your keyboard. You can save your edits by pressing the blue-white Save Layer Edits button that is decorated with an orange pen (9.38). This saves your changes without exiting the edit mode.
If you have many points to remove, as in our case, it may be faster to identify the IDs of the features you want to keep, select these and delete all others. To start, you activate the Identify Features mode by clicking on the icon with the white i on the blue circle (9.39).
A black i will appear next to your cursor. You then click on the first of your nodes that you want to keep. This will highlight it in red and a list with information on the selected feature appears on the right in the Identify Results window. You will see the attribute NODE_ID with value 1 for the outflow node (9.40). Note down the ID of the feature.
You then press on the node at the confluence of the two tributaries in the center of the catchment. The Identify Results window shows 2 results, that means, that two junction nodes are close to each other (9.41).
Zoom in in your map window with your mouse to see the two nodes (9.42).
Select the node that should be kept and not the ID of the node (NODE_ID 11), (9.43).
Zoom back to the entire Junctions layer (see 9.11). and go to Select Features by Values… in the toolbar (9.44).
Add NODE_ID 1 to your selection as demonstrated in (9.45).
The outflow node with ID 1 will change color in your map (9.46).
Add node 11 to your selection in the same way and close the Select Node by Value window. Invert the feature selection as shown in (9.47).
All other nodes will now be yellow and the ones to keep will appear in the layer color (9.48).
Delete the features (nodes) by pressing the Delete Selected button in the edit features toolbar (9.49).
Save your edits (9.38). To verify that, indeed, all superfluous nodes are deleted from the Junctions file, open the Attribute table (9.50).
Only 2 features should be listed under each attribute. We will now edit the attribute table to prepare it for the RS Minerve model (see ??). RS Minerve needs an identifyer to differentiate between the junctions. We can use the attribute TYPE to uniquely identify the two junctions needed. RS Minerve further needs the ID of the downstream river. Add a collumn to the attribute table by pressing the Add Field button (9.51).
Define a name for the attribute, a type and admissible length of each entry in the Add Field window. In our case, we choose a string (a word) as ID and allow it to be 20 characters long (9.52).
Close the window by pressing OK. By clicking in the newly created NULL fields, you can now type names for the downstream rivers and save your edits by pressing the save edits icon (3rd from the left in the toolbar of the attribute table window). As the outlet of the catchment goes directly into Charvak reservoir, we can type Charvak as the downstream river ID. The river stretch between junction and outlet is called Pskem (9.53).
We are done editing the Junctions layer. Deactivate the edit mode by clickig on the yellow pen in the attribute table window (9.54) and close the window.
Now save the Junctions layer in an appropriate place on your drive and save your project.
In the same way you can also edit the river channels layer.
RSM: Create HBV model and edit parameters
Click on the HBV model icon in the model selection panel (Figure 9.55).Save your model by clicking the floppy disk icon in the toolbar.
You can also export parameters to a text file via the button Export P in the Model Properties toolbar, edit the text file and import the edited parameter file through Import P.
The area of the HBV model should be 99’000’000 m2.
Back to the Nauvalisoy model guide.
RSM: Add and link climate station
Move your cursor to the V-Station icon in the models panel (the first icon in Figure 9.55). Click on the icon to activate it and click next to the HBV model in your model pane to place the V-Station. With a double-click on the newly created V-Station, you can visualize the parameters of the virtual weather station.Connect the station to the HBV model by activating the Connections mode in the Editing tools toolbar (Figure 9.61).
Click Ok to accept the suggested data links and a blue arrow will appear between the weather station and the model. Click on the black arrow in the Editing tools toolbar to leave the Connections model.
Back to the Nauvalisoy model guide.
RSM: Import climate data
Go to the database tab and click on Open in the File database toolbar (Figure 9.63).Select the file./data/SyrDarya/Chirchiq/RSMinerve/ERA5_Nauvalisoy_1981_2013.csv. If you don’t see the file in your file browser, make sure the file ending .csv is selected in the file browser (Figure 9.64).
As our weather data is representative for the entire Nauvalisoy catchment, the station name in the data base needs to be consistent with the station name of the V-Station in the model pane. Change the name of the station in the model pane from V-Station to Nauvalisoy by clicking on the name.
Choose the nauvalisoy data set as source and adapt the simulation period as shown in Figure 9.68.Click on Validation to verify that the model has been set up correctly. Once you have adapted the model settings to calculate evaporation based on temperature (how to), no errors should be reported. You can now run the model. A warning tells you that the number of meteo stations is not sufficient. Ignore the warning for now.
RSM: Adapt model settings
Navigate to Edit in the Settings toolbar (Figure 9.69).Back to the model guide
RSM: Export simulation results to data base
Go to Export in the Database toolbar (Figure 9.71). Define a name for the simulation results and choose a data base group to save the data to. Create a new group if you haven’t already done so.
The data sets are now available in the data base tab and can be visualized in the Selection and plots tab.
Back to the model guide
RSM: Add comparator and load discharge measurements
The comparator object allows the user to compare a simulated variable to a reference. In our case, we want to compare the simulated discharge of the Nauvalisoy river to the measured one. The measured discharge can be imported to RS Minerve via the database tab.Move your cursor to the comparator icon (Figure 9.72) in the model components panel.
Activate it with a right-click and move your cursor next to the HBV model in the model pane. Place the comparator object with another click.
Add a source object to your model following the same procedure as for the comparator object. Figure 9.73 shows the icon of the source object.You can now optionally rename your model objects.
Connect the source and the HBV model to the comparator by activating the Connections mode in the Editing Tools toolbar. Right-click on the HBV model, hold the click and drag the cursor to the comparator object where you release the cursor. You will be asked in a pop-up window to specify the flow your wish to compare and if it is to be viewed as a simulation result or the reference. Connect the total discharge computed by the HBV model component as simulation result to the comparator (Figure 9.74) and close the pop-up window by pressing OK.Connect the source object to the comparator in the same way as the HBV object. The source will be connected as reference (Figure 9.75).
Open the tab with the Values. Here we need to import the discharge data. You can do that by opening the discharge data in a spreadsheet (e.g. Excel) and copy-pasting the dates and discharge values into the Values table in RS Minerve (Here is how to do this step-by-step.
Now we need to link the discharge data in the database to the source object in the model. Navigate to the model and
Validate the model to see if the model setup went correctly. Run the model if the validation did not throw an error.
Back to the practical model calibration and validation section
RSM: Copy-paste data to database
Open the file ./data/SyrDarya/Chirchiq/RSMinerve/synthetic_discharge_Nauvalisoy_river_for_calibration_exercise.csv in a spreadsheet software, e.g. Excel, Numbers, Google Sheets or OpenOffice Calc and select the rows containing dates and values (Figure 9.79). Press control C or perform a left-click and choose copy.
Then navigate to the discharge sensor on the database tab in RS Minerve where you want to add the data to. Click in the small square to the left of the first row in the Values tab and enter control P. Alternatively perform a right-click in the small square and select Paste. The dates and values from the excel sheet will now appear in the table (Figure 9.80). Save the database.
Back to the practical model calibration and validation section