source: documentation/requirements/plotting_module_requirements.txt @ 2692

Last change on this file since 2692 was 2692, checked in by sexton, 18 years ago

updating requirements for plotting module

File size: 2.4 KB
Line 
1Requirements for module to plot time series data after simulation run.
2
331 March 2006
4
5
6
71.      The module shall read a SWW file and plot the time series for the prescribed quantities at defined gauge locations.
8
91.1     The prescribed quantities must be a name of an existing quantity or an expression involving existing quantities.
101.1.1   The default quantity will be 'depth'.
111.1.2   The user can define a list of quantities. The possibilities are the conserved quantitues of the shallow water wave equation and other quantities which can be derived from those, i.e.['depth', 'xmomentum', 'ymomentum', 'momentum', 'velocity', 'bearing'].
121.1.3   Velocity should be calculated as absolute momentum divided by depth.
131.1.4   Absolute momentum should be calculated as sqrt(xmomentum^2 + ymomentum^2).
141.1.5   Bearing should return the angle of the velocity vector from North.
15
161.2     The gauge locations should be defined in a separate file.
171.2.1   The gauges file should contain the gauge name and location defined in eastings and northings.
181.2.2   The gauge file should be a comma separated file.
19
201.3     The module should be contained in data_manager.py
211.3.1   The output should be available as data and graphics.
221.3.2   The default output shall be graphics.
231.3.3   The output should be available for a prescribed time range.
241.3.4   The default time range is the complete time series.
251.3.5   The output should be stored in the same directory as the SWW file.
26   
271.4     A latex document should be automatically generated which contains the output graphics.
281.4.1   The caption of the output graphics should contain the gauge name and other simulation parameters.
29
30The outline of the module is as follows:
31
32def sww2timeseries(swwfile,
33                   gauge_filename,
34                   gauge_data_outname,
35                   quantity = None,
36                   time_min = None,
37                   time_max = None,
38                   verbose = False):
39
40    # extract gauge locations from gauge file
41   
42    # extract all quantities from sww file
43   
44    # loop through appropriate range of time
45   
46    # plot prescribed quantities and export data if requested
47   
48
49    return
50
51
52where
53
54swwfile defines the input sww file
55gauge_filename defines the gauge (name, easting, northing)
56gauge_data_outname defined the name of the output data file (if required)
57time_min defines the beginning of the time range
58time_max defines the end of the time range
Note: See TracBrowser for help on using the repository browser.