# Reporting

SPHY includes a large number of processes from which output can be generated through maps and timeseries. In a separate csv-file, the user can decide how map output should be generated for 50+ model variables. The csv-file has 6 columns: name, map, avg, timeseries, filename and comment. By default the csv-file is named reporting.csv and is located in the SPHY directory. To output variables other than the defaults, users must place the 'reporting.csv' file in the input directory, where SPHY map inputs are located.

The first column refers to the variable name in the model, which should not be changed.

In the second column the user can decide with which frequency the map (sum) output should be generated. This is usually used for water balance fluxes, such as precipitation, evapotranspiration and runoff and for sediment transport output:

**Table 21: Variables from which the sum should be reported**

<table><thead><tr><th width="94">Code</th><th width="177">Meaning</th><th>Number of maps generated</th><th>Common application</th></tr></thead><tbody><tr><td><strong>Y</strong></td><td>Yearly sum</td><td>Number of years in simulation</td><td>Water balance fluxes, e.g. precipitation, evapotranspiration, runoff</td></tr><tr><td><strong>M</strong></td><td>Monthly sum</td><td>Number of months in simulation (12* number of years)</td><td>Water balance fluxes, e.g. precipitation, evapotranspiration, runoff</td></tr><tr><td><strong>D</strong></td><td>Daily output</td><td>Each time step</td><td>Not commonly used</td></tr><tr><td><strong>MS</strong></td><td>Long-term average monthly sum</td><td>12 maps</td><td>Water balance fluxes, e.g. precipitation, evapotranspiration, runoff  </td></tr></tbody></table>

The third column is used to indicate the output variables that should be generated as an average. This is most commonly used for water balance storage components, such as canopy, snow, rootzone and groundwater storage, but also for plant water stress.

**Table 22: Variables from which the average should be reported**

<table><thead><tr><th width="99">Code</th><th width="157">Meaning</th><th width="252">Number of generated maps</th><th>Common applications</th></tr></thead><tbody><tr><td><strong>Y</strong></td><td>Yearly average</td><td>Number of years in simulation</td><td>Water balance storage components, e.g. snow, rootzone and groundwater storage</td></tr><tr><td><strong>M</strong></td><td>Monthly average</td><td>Number of months in simulation ( 12* number of years)</td><td>Water balance storage components, e.g. snow, rootzone and groundwater storage</td></tr><tr><td><strong>MA</strong></td><td>Long-term monthly average</td><td>12 maps</td><td>Water balance storage components, e.g. snow, rootzone and groundwater storage</td></tr></tbody></table>

In the second and third column more than one output frequency can be selected, separated with a “+” symbol. For example, when the user wants to get yearly and long-term average monthly output, the following combination should be provided: “Y+MA”.

The fourth column is used to indicate which variables should generate timeseries. In this case only one frequency can be used, which is daily. The time series will be generated at the stations, hence, the output file will contain 1 column with the time steps of the simulation, which is followed by one column per station. Time series output is generally used for routed runoff and sediment flux:

**Table 23: Variable from which a time series should be reported**

<table><thead><tr><th width="102">Code</th><th width="153">Meaning</th><th width="195">Number of time steps</th><th>Common application</th></tr></thead><tbody><tr><td><strong>D</strong></td><td>Daily time series</td><td>All time steps</td><td>Routed runoff and sediment flux</td></tr></tbody></table>

In the fifth column the user can define the filename (prefix). The maximum number of characters used here depends on the number of simulated time steps. The file names of map output (sum or average maps) is constructed as follows, in case of daily (D) output: SedFlxD0.001, SedFlxD0.002, SedFlxD0.003, etc. In this case, a prefix of 6 characters is used (i.e. SedFlx). The model will crash in case the simulation has more than 9999 time steps. In case of more than 9999 time steps, a prefix of maximum 5 characters should be used (e.g. SedFlx): SdFlxD10.000, SdFlxD10.001, SdFlxD10.002, etc.

The sixth column provides comments for each of the model variables, such as the full name and the unit.

In column 2-4, NONE indicates that no output will be generated. Only model output will be generated for model variables that are considered during the simulation. So, if the reporting csv-table indicates that sediment flux should be reported, but the sediment transport module is not used (i.e. SedTransFLAG = 0 in the config file), then no sediment flux will be generated. For further details regarding the output files readers are referred to in Appendix 2: Input and Output description.

**Table 24: Example of the reporting file**

<table><thead><tr><th width="141">Model name</th><th width="81">Map</th><th width="93">Avg</th><th width="115">Timeseries</th><th width="96">Filename</th><th>Comment</th></tr></thead><tbody><tr><td><strong>TotPrec</strong></td><td>Y</td><td>NONE</td><td>NONE</td><td>Prec</td><td>PRECIPITATION in mm</td></tr><tr><td><strong>PlantStress</strong></td><td>NONE</td><td>MA</td><td>NONE</td><td>Pws</td><td>PLANT WATER STRESS dimensionless</td></tr><tr><td><strong>StorRootW</strong></td><td>NONE</td><td>Y</td><td>NONE</td><td>Rootw</td><td>ROOTZONE STORAGE in mm</td></tr><tr><td><strong>QallRAtot</strong></td><td>NONE</td><td>NONE</td><td>D</td><td>QAll</td><td>ROUTED TOTAL RUNOFF in m3/s</td></tr><tr><td><strong>...</strong></td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td></tr></tbody></table>

Users can also add new variables to the reporting file. This can be done by adding a new line to the reporting file with a reference to the variable name in question. Keep in mind to use a filename that has less than 5 characters (column 5). In addition, the following code should be added to the SPHY model code below where the variable is defined:

*self.reporting.reporting(self, pcr, 'VariableNameReporting', VariableNameModel)*

The VariableNameReporting should coincide with the variable name of the first column of the reporting file. The VariableNameModel should coincide with the variable name in the model code. These two variable names could be identical, but this is up to the user.
