Examples of Use TSTool Documentation
<br />• Time series 2 (TS2) has a shorter period of gage d data with 1920 to 1950 being unregulated and
<br />1950 to 2000 being regulated (e.g., due to the construction of a reservoir)
<br />• The goal is to produce an estimate of unregulated flow for TS2 for the full period 1900 to 2000.
<br />
<br />This can be accomplished using the following commands:
<br />
<br />#
<br /># Data filling example - assume daily DateValue time series as input
<br />#
<br />#
<br /># Generate some sample data for the example described above:
<br /># ts1 has observed values from 1900-2000
<br /># ts2 has observed values from 1920 to 1950 and regulated thereafter
<br />#
<br /># Although data are generated below, they could be read from files or a
<br /># database. In this case, the SetOutputPeriod() command might need to be used
<br /># to ensure that the final result is for a required period.
<br />#
<br />NewPatternTimeSeries(Alias="ts1",NewTSID="ts1..Streamflow.Day",
<br /> Description="Time series 1, all unregulated",SetStart="1900-01-01",
<br /> SetEnd="2000-12-31",Units="CFS",PatternValues="1,2,4,7,12,6,2,1.5")
<br />NewPatternTimeSeries(Alias="ts2",NewTSID="ts2..Streamflow.Day",
<br /> Description="Time series 1, unregulated from 1920 to 1950, regulated after",
<br /> SetStart="1900-01-01",SetEnd="2000-12-31",Units="CFS",PatternValues="2,3,6,10,15,3,2.5,2")
<br />#
<br /># Clear out the period 1919- in ts2 because it was not recorded in our example.
<br />SetConstant(TSList=AllMatchingTSID,TSID="ts2",ConstantValue=-999,SetEnd="1919-12-31")
<br /># Clear out the period 1951+ in ts2 because it is regulated and needs to
<br /># be filled with the result of unregulated MOVE2 analysis.
<br />SetConstant(TSList=AllMatchingTSID,TSID="ts2",ConstantValue=-999,SetStart="1951-01-01")
<br /># Analyze and fill the second time series. Transform the data to log10 and
<br /># use monthly equations…
<br />FillMOVE2(TSID="ts2",IndependentTSID="ts1",NumberOfEquations=MonthlyEquations,
<br /> DependentAnalysisStart="1920-01-01",DependentAnalysisEnd="1950-12-31",
<br /> IndependentAnalysisStart="1900-01-01",IndependentAnalysisEnd="2000-12-31",FillFlag="M")
<br />ExamplesOfUse/Filling/Example_Filling.TSTool
<br />
<br />The above example illustrates a somewhat complicated situation where data filling is facilitated by the
<br />features of the FillMOVE2() command. If the FillMOVE2() command is not appropriate, then the
<br />FillRegression() or other commands can be applied. In some cases, it may be appropriate to fill
<br />different parts of the period using different indepe ndent time series. A simpler approach may involve
<br />only a single filling step (e.g., fill the entire period using a single FillRegression() command).
<br />
<br />Examples - 8 88
|