After running a SEIMS-based watershed model, the postprocessing tool may be used for the calculation of model performance statistics such as Nash-Sutcliffe Efficiency (NSE), and the plotting of hydrographs of time-series data at the reach outlet such as streamflow and sediment.
For simple usage, open a CMD window, enter the following commands to execute the postprocessing of the Youwuzhen watershed model.
The runtime logs of postprocessing showed input paths and output model performance statistics (Figure 2:5 1).
By default, the hydrographs of streamflow (e.g., Q.txt
) and sediment (e.g., SED.txt
) at the watershed outlet were plotted and saved as figure files with the formats of PNG and PDF, e.g., SEIMS\data\youwuzhen\demo_youwuzhen30m_longterm_model\OUTPUT0\png\Q-2013-01-01-2015-12-31.png
(Figure 2:5 2).
Same to the data preprocessing, the simple usage of postprocessing also includes generating the configuration INI
file according to the local paths of SEIMS such as Figure 2:5 3, and executing postprocessing by the advanced usage (See Section 2:5.3).
The configuration file of postprocessing, such as that of the Youwuzhen watershed model shown in Figure 2:5 3, includes four sections, i.e., SEIMS_Model
, PARAMETERS
, OPTIONAL_PARAMETERS
, and OPTIONAL_MATPLOT_SETTING
. Among them, OPTIONAL_PARAMETERS
and OPTIONAL_MATPLOT_SETTING
are optional. The names of sections and options should not be changed.
SEIMS_Model
: Basic settings of the SEIMS-based watershed model, including HOSTNAME
, PORT
, MODEL_DIR
, BIN_DIR
, scenarioID
, and calibrationID
, etc. The meanings of these options have been introduced in Section 2:4.3.2.PARAMETERS
PLOT_SUBBASINID
: The subbasin ID to be plotted.PLOT_VARIABLES
: The variables to be plotted, such as Q
, SED
, and CH_TN
. Multiple variables can be separated by comma. Note that, the specified subbasin ID and the corresponding variables MUST be set as time-series output data in file.out (Section 2:4.2.2) and/or FILE_OUT
collection of the main MongoDB database. If there is no matched observed data for the specified variable, the model performance statistics will not able to be calculated.OPTIONAL_PARAMETERS
: (Optional) Time period of model calibration and validation. The starting and ending date times of either calibration or validation MUST be presented or omitted simultaneously.Cali_Time_start
: Starting date time of model calibration with the format of YYYY-MM-DD HH:MM:SS
.Cali_Time_end
: Ending date time of model calibration.Vali_Time_start
: Starting date time of model validation.Vali_Time_end
: Ending date time of model validation.OPTIONAL_MATPLOT_SETTINGS
: (Optional) Plot settings for matplotlib.FIGURE_FORMATS
: The format(s) of output figure(s) which can be one or multiple of PNG, JPG, TIF, PDF, EPS, SVG, and PS. Multiple formats are separated by comma, e.g., PNG,JPG,EPS.LANG_CN
: Whether Chinese are included (True) or not (False) in labels and legend texts, etc.FONT_TITLE
: Font title (font name) for the output figures. Below are tips to check the available fonts or use new ones..ttf
format such as YaHei Mono which supports a hybrid of Chinese and English. If you have only .ttc formatted font file, you may want to convert it to .ttf file using transfonter.D:\demo\python27\Lib\site-packages\matplotlib\mpl-data\fonts\ttf
C:\Users\ZhuLJ\.matplotlib
. The cache files may be fontList.cache and fontList.json
for Python 2, and fontList.py3k.cache
and fontList-v300.json
for Python 3.TITLE_FONTSIZE
), legend (LEGEND_FONTSIZE
), axis-tick label (TICKLABEL_FONTSIZE
), axis label (AXISLABEL_FONTSIZE
), and universal label (LABEL_FONTSIZE
) in points.DPI
: The resolution in dots (Integer) per inch, which is applied to non-vector formats.The Python scripts of postprocessing are in SEIMS/seims/postprocess
. The main.py
is the entrance of postprocessing which can be executed though the unified format of running SEIMS Python scripts, e.g.,
To illustrate the functionality of postprocessing, Figure 4 showed the calibration and validation of the simulated streamflow (Q, m3/s) at the watershed outlet derived from the demo Youwuzhen watershed model with default model parameters with Chinese labels and legend texts based on YaHei Mono font
(see below for changes of the configuration).
Also see introduction of the Python package seims.postprocess package