Quick links to often-used pages:
Quick links to often-used pages:
This tutorial provides introductory guidelines for creating a new HYPE model set-up in a new model domain. These guidelines cover the creation and formatting of mandatory and optional input files for a basic HYPE rainfall-runoff and nutrient turnover model. HYPE requires all input data as a set of formatted text files (e.g. model domain information, observation data, or calibration parameters). All input files mentioned in this tutorial are documented in detail in the file reference section of the HYPE documentation pages.
HYPE domains are spatially divided into sub-basins for which hydrological response units (HRUs) are derived. In order to create a HYPE model set-up, modellers will have to create a suitable sub-basin delineation based on a topographical database. SMHI provides the freeware GIS tool WHIST (World Hydrological Input Setup Tool) which is especially suited for setting up large HYPE domains using the USGS's HYDROSheds Hydrologically conditioned elevation product, but users can choose any GIS software suitable to derive sub-basins and flow routing connections and build their HYPE set-up workflow around them. WHIST provides additional functionality, e.g. to calculate HRU fractions for each sub-basin, and a convenient file export in HYPE-conform formatting. Many example figures in the tutorial text below show WHIST screenshots.
The following links list further in-depth reading, complementary to this tutorial:
HYPE software is available from the following sites:
If sub-basins do not exist for the targeted model domain, or if the routing is not defined between them, this information has to be created for a HYPE model set-up.
SMHI has developed a software for this purpose called WHIST, see links above. The manual “Procedure for using WHIST” describes step by step how to create hydrologically connected subbasins and how to extract information needed as input for the HYPE model. The software can also import already delineated subbasins from a shapefile with or without routing information.
The following sections outline the main steps which need to be taken to create a HYPE set-up in a new model domain.
HYPE model domains are divided into spatially delineated sub-basins. A hydrologically corrected gridded topographic database is used to derive the model domain (i.e. all sub-basin areas). The procedure is controlled by the geographic location of gauging stations and their documented catchment area which should have been quality checked before the delineation of the subbasins since the outlet of the developed subbasins should be drawn to fit the position of the gauging stations to get the best simulation conditions and optimize the possibilities to calibrate the model, see Fig. 1 to Fig. 3. How big these adjustments are is dependent on the resolution of the elevation data.
|Figure 1: Adjustment of gauging stations according to published drainage area. The flow accumulation data from Hydrosheds shows here the river network.|
Each subbasin must receive a unique subbasin ID (SUBID) and the SUBID of the subbasin next downstream to explain the routing, see figure 4. This is mandatory for the model and described in GeoData.txt (more info here).
|Figure 4: Routing between sub-basins. SUBID 103 is next downstream to SUBID 102. SUBID 102 is next downstream to SUBID 101 and 104.|
To describe the landuse and soil properties for each subbasin in the model, these are combined into so called SLC (Soil and Landuse Classes) classes (for example forest + medium soils, open land + fine soils etc), see figure 5. The distribution of SLC classes for each subbasin is described in geodata.txt and the SLC classes are defined in GeoClass.txt (more info here).
Keep landuse and soil classes essential and typical for the model domain but merge classes into a number you will manage to calibrate.
|Figure 5: Soil and landuse information is combined into SLC classes. Each subbasin is described with the proportion of the different classes in GeoData.txt.|
Lakes can be included to the model in two ways: as local lakes (ilakes) or as outlet lakes (olakes), see figure 6. The outlet lakes can be provided with rating curves and/or regulation schemes in LakeData.txt (more info here). The outlet lakes could be inserted as subbasins with their outlets corresponding to the subbasin outlet, see figure 7.
The model is forced by temperature (Tobs.txt) and precipitation (Pobs.txt) time series (mandatory) as a minimum. Temperature and precipitation can be corrected by elevation. The mean elevation of each sub-basin is included to the GeoData.txt file.
The separation of precipitation into rainfall and snow is usually done using air temperature threshold parameters, see Processes above ground in model description. However, it is also possible to force the model with a prescribed time series of snowfall fractions fraction in precipitation using the input-file SFobs.txt.
The default snowmelt model uses only air temperature as input. As an alternative, a snowmelt model based on temperature and radiationcan be used. In that case, shortwave radiation is either read from an input file SWobs.txt or estimated.
Read more about these processes in the model description.
The model could use different types of PET (potential evaporation) models (Alternative potential evaporation models). The different options for calculation of potential evapotranspiration requires additional forcing data, e.g. potential evaporation, extra-terrestrial radiation, daily min and max air temperatures, shortwave radiation, relative humidity, wind speed.
The HYPE code is continuously under development and new opportunities to force the model may be developed in the future. See http://hype.sourceforge.net/ for news.
There is an option to run water quality with HYPE. For modelling water quality, i.e. nitrogen and phosphorus leaching and transport, an additional file CropData.txt is required. CropData.txt consists of information on vegetation properties, e.g. average nutrient uptake, and crop management properties (e.g. fertilization amounts, sowing and harvesting days). Each line in CropData.txt holds information on a specific crop (or other vegetation) in a specific region (defined for each SUBID in GeoData.txt). Links between SLC and crops (main and secondary) are made in GeoClass.txt.
In addition, a few extra columns may be required in GeoData.txt. These include:
PointSourceData.txt holds information on point sources of nitrogen and phosphorus and in which SUBID they are discharged. Abstractions, e.g for municipality water supply, may also be handled in PointSourceData.txt.
These files are only necessary if nutrients are to be modelled.
All input files to HYPE are listed and described in detail in the HYPE file reference section of the online documentation.
Some of the setup and input data files described in this section of the tutorial are mandatory for every HYPE model setup: GeoClass.txt, GeoData.txt, Tobs.txt, Pobs.txt, info.txt, par.txt.
Error checking is very limited, so be careful to follow the described file formats.
GeoClass.txt is a file that defines the properties of the Soil and Landuse Classes (SLC) in geodata. It also describes special classes (lakes and glaciers), the number and depths of the soil layers.
Figure 8 shows a typical GeoClass.txt file. The first three rows contain comments, here some class ID references for different columns. These rows are denoted with an exclamation mark “!”. The column heads on row 4 are also just comments and not necessary for HYPE since the order of columns is predefined. The first column describes the SLC id. This id links geoclass to the SLC information in GeoData.txt. The second and third column describes the combination of landuse and soil in the SLC. Lakes (here: SLC 1 and 2) have 2 rows here. One for the special class 1 (outlet lake) and one for the special class 2 (internal lake). Glaciers also have a figure (3) in the special class column. All classes have got a figure for the vegetation type. This is only used for the NP simulations though. Crops have got a tile-depth in this example. It describe the distance from soil surface to the tile drainage system. Drain depth is the distance from soil surface to local stream depth. The last 4 columns describe the number of soil layers and the depth of these layers from soil surface to bottom of each soil layer.
Geodata.txt holds information about the subbasins, i.e. routing, area, mean elevation, fraction of SLCs, parameter regions, general lake depths etc. See GeoData.txt for a comprehensive reference on GeoData.txt columns.
The structure of a GeoData.txt files is shown in Fig. 9. The first column holds the ROWNR to keep the order of the rows since the subbasins have to be ordered in a downstream sequence starting at headwaters and ending at outlet basins. The columns SUBID and MAINDOWN (0=outlet to the sea) hold the routing information (see green cells). The columns may be in any order. The mandatory columns for simulating water are: SUBID, MAINDOWN, AREA, ICATCH, RIVLEN and SLC_nn, but it is also recommended to use LAKE_DEPTH and ELEV_MEAN. If you use a LakeData.txt file for tailored data on lake properties, you need to link to this file in the column named LAKEDATAID (see blue cell). The parameter regions (which can be used in par.txt to correct some parameters according to regions) are described in PARREG column. The sum of the SLCs should always be =1. See the GeoData.txt for more information about the geodata columns.
It is necessary that the subbasins are ordered in a downstream sequence. HYPEtools includes a function SortGeoData() for this purpose.
When GeoData.txt has been constructed it is always a good idea to check the tailoring of the data. Join the geodata.txt to the subbasin shapefile and produce some maps for spatial check, i.e. ELEV_MEAN, summerized LandUse and Soilclasses. A function GroupSLCClasses() from HYPEtools can be helpful. To check the routing you can map each sub-basin's catchment area (from WHIST: AREA+UPAREA, from HYPEtools: SumUpstreamArea()) and get a view of the network.
Precipitation (mm/time step) and temperature time series (°C/time step) are needed to force the model. Pobs.txt and Tobs.txt files are therefore mandatory. If you use complementary data needed for other PET/snowfall/snowmelt models other than standard, these options can be chosen in info.txt, see model options.
Choose source database. Take into account accuracy, resolution, and also final use of model, i.e. operational forecasting, climate modelling, local studies, etc. These all should affect the choice.
Create links from SUBID in HYPE to grid square in input data set using WHIST or another GIS software or method. Depending on grid and sub-basin sizes, area-weighted averaging of gridded forcing data might be prudent.
Create Pobs.txt and Tobs.txt files. The forcing data can either have each SUBID as column header or an independent PobsID/TobsID, e.g. the original forcing data ID. If PobsID and TobsID are used, the link between these and the SUBIDs is described in ForcKey.txt.
The structure of forcing data files is illustrated in Fig. 10 and Fig. 11.
|Figure 10: Part of Pobs.txt. First column is used for dates, following columns for observed data. Column headers are either SUBID (if you have a unique observation for each SUBID) or POBSID (if you use ForcKey.txt and several SUBIDs use the same time series).|
|Figure 11: Part of Tobs.txt. First column is used for dates, following columns for observed data. Column headers are either SUBID (if you have a unique observation for each SUBID) or TOBSID (if you use ForcKey.txt and several SUBIDs use the same time series).|
Make sure there is an elevation correction in par.txt for temperature and precipitation if necessary (will depend on your input data sets, resolution, geography etc).
Suggestions for quality assurance of forcing data:
ForcKey.txt is a key file for linking forcing data ID to SUBID. This file is not necessary if SUBIDs are used in Pobs.txt and Tobs.txt. If ForcKey.txt is used, this has to be stated in the info.txt with readobsid = y.
The structure of a typical ForcKey.txt file can be seen in Fig. 12.
This file contains all model settings for a model run and this provides the main user interface. Here, the modeller can define e.g. simulation start and end dates along with spin-up periods, which output files to print and which performance statistics to calculate. Users can also choose different options for model components, e.g. for evaporation and snowmelt modules. All settings are entered as code-value pairs in info.txt.
There are many options, the HYPE file reference entry for info.txt provides a comprehensve description of options and syntax. In figure 13 you can find a basic example of an info.txt file. The rows can be in any order and comment rows can be added using a double exclamation mark identifier '!!'.
The parameter file, par.txt, hold model parameters some of which can be calibrated. Some parameters are general, some landuse dependent, some soil dependent. There are also some parameters that can be tailored to certain given regions. See further information in the file reference entry for par.txt. There are also some suggestions on start values in the Quick Guide tutorial.
A simple example of the structure of the par.txt is described in Fig. 14. Parameters are soil-, landuse- or region-dependent. There are also general parameters used for the total model domain. Parameters dependent on soil and landuse classes have to be ordered in the same way as in the GeoClass.txt file. Region-dependent parameters are parameters which collectively alter groups of parameters and allow for regional tuning (super-parameters). Parameter regions for these have to be defined in GeoData.txt in a column named PARREG.
There are many optional components in HYPE. Below we describe some of the most commonly used optional model components, lakes and reservoirs and bifurcations, which often have large impact on the hydrology in large-scale river basins. Others can be found among the tutorials (e.g. floodplains).
LakeData.txt is used to tailor rating curves and/or general regulation routines to the olakes. For use of LakeData.txt you need more specific information about lake depths, regulation volumes etc. For larger lakes and reservoirs around the world these can for example be found in the GLWD (Global Lake and Wetland Database) and GranD (Global Reservoir and Dam database) databases.
lakadataidis used in both GeoData.txt and LakeData.txt for this purpose.
|Figure 15 (click to enlarge): Example of LakeData.txt. The LakeDataID is the link between GeoData.txt and LakeData.txt files. If a SUBID has a LakeDataID in GeoData.txt, the olake in this SUBID will be calculated according to the information in LakeData.txt. Black rows show some typical lakes, blue rows shows an example how to set up a multi-basin lake. The first blue row (bold) summerizes all basins. The red rows show some typical reservoirs. See more information about this file in LakeData.txt.|
With this file it is possible to describe bifurcations and other water diversions in downstream direction. Read more about this file at BranchData.txt. Fig. 16 provides an example of a BranchData.txt file.
|Figure 16: BranchData.txt example. Sourceid is the SUBID with the bifurcation. Branchid is the SUBID of the receiving flow and this must be located in a row below the subbasin with bifurcation in GeoData.txt. Mainpart is the fraction of flow which flows in the main branch (not to branchid). Maxqmain/Minqmain is maximum/minimum flow in the main path and Maxqbranch is the maximum flow in the branch|
For calibration and validation of the model, observed time series of discharge data are compiled in a file Qobs.txt. Other types of observations, e.g. nutrient concentrations or lake water levels are compiled in a file Xobs.txt.
Qobs.txt contains observations of discharge in m3/s for each time step. An example of Qobs.txt is given in Fig. 17.
|Figure 17: Example of Qobs.txt . First column is used for the date of observation. Then each column have the SUBID the data is given for as header. Missing values should be given as -9999.|
Suggestions for quality assurance in discharge observations:
The Xobs.txt file can contain observations of several selected variables, see more information in the file reference entry for Xobs.txt. An example of an Xobs.txt file is shown in Fig. 18.
A HYPE model run is started by placing the HYPE executable file in the model folder and run it. Please read the information in the Quick Guide for details.
HYPE returns with a Code 84 message after a successful run. In Fig. 19 you can see an example of a HYPE model set up.
It is possible to save model states for model initialisation, e.g. to save computation time on spin-up periods or to provide comparable starting states in scenario analyses. Read more about this in the file reference entry for State_Save files.
HYPE provides three standard output file types for simulated data, one centered around single sub-basins, and two more centered around single output variables. There are further output files for water balances and model evaluation results. These are documented in detail in the Output Files section of the HYPE file reference.
Read more about the calibration options in the HYPE file reference section for calibration files.