RdfAnnualizer Plugin Help Information
Table of Contents
Overview
The
RdfAnnualizer plugin will use a RiverWare Data Format (RDF) file with a
timestep of less than a year and will aggregate its data to generate an
RDF file with an annual timestep. Methods for aggregating data for the
slots in the RDF file are specified via a method control file. The user also
specifies the end month for the aggregated year, so calendar years or
water years can be generated, for example.
Source RDF File
RDF files are generated from
RiverWare and contain data for slots specified by the user. Non-series
slots can be written to RDF files, but only data for series slots will
be processed by the RdfAnnualizer tool. The exact format of an RDF file
is described in the Output and Plotting section of RiverWare Online
Help. An RDF file for results from a single run in RiverWare can be
created from the Output Manager via a RiverWare Data File device. Slot
data for a multiple run in RiverWare can be output to an RDF file by
configurations in the Output tab of the MRM Configuration dialog.
The source RDF file should contain series data with a timestep of less than
a year.Currently in RiverWare this would include timesteps of 1
hour, 6 hour, 12 hour, daily, weekly, and monthly. If a yearly timestep
file is specified as input to the RdfAnnualizer, an error message will
be returned that the run is already in an annual timestep.
Method Control File
The
method control file specifies the slots to be processed and the
annualization method associated with the slots. The file is a text file
and the syntax is for each line to contain an entry of the form:
Object.Slot: Method
where Object can be:
- A specific object name from RiverWare
- a "*" symbol as a wildcard to match any object name
- An object type from RiverWare to match all objects of this type, such as "LevelPowerReservoir"
where Slot can be:
- A specific slot name from RiverWare
- a "*" symbol as a wildcard to match any slot name
and where Method can be any of the following:
- Sum (adds all of the values for the year)
- Average (average of all the values for the year)
- Max (maximum of all the values for the year)
- Min (minimum of all the values for the year)
- End (last value in the year)
- Begin (first value in the year)
- SumNan
- AverageNan
- MaxNan
- MinNan
- EndNan
- BeginNan
The
behavior of the non-Nan methods is to report NaN for the summary value
if any of the input values for the year are NaN. The Nan suffix on a
method means that NaN input values are ignored in calculating the
summary value.
If the same slot is identified more than once in
the method control file through specific declarations or wildcards, the
method is set at the first identification and not changed thereafter.
Example Method Control File
An example method control file might contain the following entries:
*.Outflow: Average
*.Pool Elevation: End
Big Reservoir.Evaporation: SumNan
DataObj.*: EndNan
Outflow
for all objects in the file will be averaged over the year and if any
outflows are NaN, the result for the year will be NaN. Pool
Elevation for all abjects in the file will be the last value for the
year and if any values over the year are NaN, the result will be NaN.
For the object named Big Reservoir, its evaporation slot will be summed
over the year, and if any values are NaN, they will be skipped and the
remaining values will be used in the sum. For all objects in the file
that are data objects, all of their slots will be assigned the last
value of the year whether there are any NaNs or not in the data
over the year.
End Year Month
The
RdfAnnualizer plugin will take a month specification that becomes the end of
year for the annualization calculations that generate the result RDF
file. The default is December for annualizing to calendar years, but
any month can be specified, such as September for water years. Another
example would be if you want an RDF file with storage for reservoirs at
the end of March, you could annualize with March as the end month and
use the End method to get the last value for the year.
Note
that if the timesteps in the source RDF file generate partial years at
the beginning or end of the time range when annualized into the defined
year, the partial years are dropped when the result RDF file is
written. The result annual RDF file only contains data for full
annualized years.
Result Annual RDF File
The result RDF
file contains all of the same descriptive fields as the original source
RDF file, such as name, owner, description, etc., and will contain the
same number of runs. Note that only slots from the original file that
have a method defined in the method control file will be annualized, so
the output RDF file could have fewer slots than the input file
(also any non-series slots in the source RDF file will not be
annualized). The time_step_unit field is written as year, and the end
times for the specific annualized years are listed as the new timesteps
for the file.
The same slot header information is listed in
the result file for annualized slots, except a method field is
added to show the specific method for how that slot's data was
annualized. Also, if the method was Sum or SumNan, the units field for
the slot has the phrase "summed over the year" added to it (such as
"acre-ft/month summed over the year"). Otherwise, the result annual RDF
file looks exactly like an RDF file that was output from a RiverWare
model with a yearly timestep.
User Interface
When
the RdfAnnualizer plugin is activated, the following user interface is
presented (note that the source RDF file and the output annual RDF file
are configured in the program calling the plugin, so are not part of
this interface):

The Method
Control File can be indicated by either
using the associated "Select..." button to open a file chooser dialog,
or by typing in the path and file name into the file's text
field. An
environment variable of the form $NAME, for example, can be typed in
and the NAME environment variable defined on the system would then be
substituted into the Method Control File path when the program is run.
The End of Year Month
is a combo box where the month defining the end of the annualized year can
be selected by the user.