public interface TSRecord
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_INPUT |
static int |
OBS_INPUT |
static int |
SUMMARY_AVG |
static int |
SUMMARY_CNT |
static int |
SUMMARY_MAX |
static int |
SUMMARY_MIN |
static int |
SUMMARY_NUMID |
| Modifier and Type | Method and Description |
|---|---|
double |
average(int step,
int period)
Calculates the period average for the values in the data starting at
step and
going back period, if the value is negative or
forward period, if the value is positive. |
boolean |
checkTSData() |
int |
getBeginDate() |
int |
getBeginTime() |
double |
getCumulativeTotal(int step,
int period)
get the cumulative total starting at
step and going back period steps. |
double |
getCumulativeTotal(RunTimeStep rts,
int period)
get the cumulative total starting at
rts and going back period steps. |
double |
getCurrentValue(RunTimeStep rts)
return the value for the current runtime step
|
double[] |
getDataArrayFor(int step,
int period)
Returns the values for the data starting at
step and
either going back period steps if the value is negative or
forward if the value is positive. |
java.lang.String |
getDSSFilename() |
java.lang.String |
getDSSPathname() |
int |
getIndex() |
int |
getInputDataPos() |
double[] |
getInterpolatedTSArray(HecTime startTime,
HecTime endTime,
int intervalTime)
Interpolate time series data for a regular size time interval "intervalTime" in minutes
|
java.lang.String |
getInterpUnitsType() |
double |
getLaggedValue(RunTimeStep rts,
int lagAmount)
get the value at current runtime step minus the lag amount
|
java.lang.String |
getName() |
int |
getNumSteps() |
java.lang.String |
getParamName() |
double |
getPeriodAverage(int step,
int period)
get the Period Average starting at
RunTimeStep and going back period steps |
double |
getPeriodAverage(RunTimeStep rts,
int period)
get the Period Average starting at
RunTimeStep and going back period steps |
double |
getPreviousValue(RunTimeStep rts)
get the value previous to the current runtime step
|
double[] |
getSummaryArray() |
int[] |
getTimeArray() |
TimeSeriesContainer |
getTimeSeriesContainer()
get the TimeSeriesContainer for the TSRecord.
|
TimeSeriesContainer |
getTimeSeriesContainerFor(int step,
int period)
Creates a TimeSeriesContainer filled with data from the TSRecord starting
at
step |
int |
getTimeStepMinutes() |
java.lang.String |
getTimeWindowString() |
double[] |
getTSArray()
Get the data array for the time series record.
|
doubleArrayContainer |
getTSContainer() |
double |
getTSValueAt(HecTime time) |
java.lang.String |
getUnits() |
java.lang.String |
getUnitsType() |
double |
getValue(HecTime time)
get the value at the given HecTime
|
double |
getValue(int step)
get the value at step
|
int |
getVariableId() |
boolean |
initialize(int beginDate,
int beginTime,
int timeStepMin,
int numSteps,
java.lang.String timeWindow) |
boolean |
initialize(RunTimeWindow rtw) |
boolean |
isDefaultData() |
boolean |
isObservedData() |
boolean |
isValidValue() |
boolean |
loadRawTSData() |
boolean |
loadTSData() |
boolean |
loadTSData(HecTime startTime,
HecTime endTime) |
double |
max(int step,
int period)
Finds the maximum value in the data starting at
step and
going back period, if the value is negative or
forward period, if the value is positive. |
double |
min(int step,
int period)
Finds the minimum value in the data set starting at
step and
going back period, if the value is negative or
forward period, if the value is positive. |
boolean |
readData(java.io.BufferedReader input)
Read write methods for storing TSRecords to an ASCII file
|
boolean |
readDataFromRas(java.io.BufferedReader input) |
boolean |
reinitialize(RunTimeWindow rtw) |
void |
setCompressData(boolean compress) |
void |
setCurrentValue(int step,
double value)
set the value at the current run time step
|
void |
setCurrentValue(RunTimeStep rts,
double value)
set the value at the current run time step
|
void |
setDSSFilename(java.lang.String fileName) |
void |
setDSSPathname(java.lang.String pathname) |
void |
setDSSPathname(java.lang.String[] parts) |
void |
setIndex(int idx) |
void |
setInputDataPos(int inputPos) |
void |
setInterpUnitsType(java.lang.String type) |
void |
setName(java.lang.String name) |
void |
setParamName(java.lang.String name) |
void |
setTimeWindow(HecTime start,
HecTime end) |
void |
setTimeWindowString(java.lang.String timestr) |
void |
setUnits(java.lang.String units) |
void |
setUnitsType(java.lang.String units) |
void |
setVariableId(int varid) |
void |
shiftLeft(HecTime startTime) |
void |
shiftLeft(RunTimeWindow rtw) |
double |
standardDeviation(int step,
int period)
Calculate the standard deviation of the time series values starting at
step and
either going back period steps if the value is negative or
forward if the value is positive. |
double |
sum(int step,
int period)
Calculates the sum for the values in the data starting at
step and
going back period, if the value is negative or
forward period, if the value is positive. |
boolean |
writeData(java.io.BufferedWriter out) |
boolean |
writeDataToRas(java.io.BufferedWriter out) |
boolean |
writeTSData() |
boolean |
writeTSDataAs(java.lang.String pathname,
java.lang.String interpUnitType) |
static final int OBS_INPUT
static final int DEFAULT_INPUT
static final int SUMMARY_AVG
static final int SUMMARY_MIN
static final int SUMMARY_MAX
static final int SUMMARY_CNT
static final int SUMMARY_NUMID
void setIndex(int idx)
int getIndex()
java.lang.String getName()
void setName(java.lang.String name)
java.lang.String getParamName()
void setParamName(java.lang.String name)
java.lang.String getDSSFilename()
void setDSSFilename(java.lang.String fileName)
java.lang.String getDSSPathname()
void setDSSPathname(java.lang.String pathname)
void setDSSPathname(java.lang.String[] parts)
java.lang.String getUnits()
java.lang.String getUnitsType()
void setUnits(java.lang.String units)
void setUnitsType(java.lang.String units)
java.lang.String getInterpUnitsType()
void setInterpUnitsType(java.lang.String type)
int getBeginDate()
int getBeginTime()
int getTimeStepMinutes()
java.lang.String getTimeWindowString()
int getNumSteps()
boolean isDefaultData()
boolean isObservedData()
int getInputDataPos()
void setInputDataPos(int inputPos)
double getPeriodAverage(RunTimeStep rts, int period)
RunTimeStep and going back period stepsrts - the RunTimeStepperiod - the period to go backdouble getPeriodAverage(int step,
int period)
RunTimeStep and going back period stepsstep - the starting stepperiod - the number of steps to go back.double getPreviousValue(RunTimeStep rts)
rts - the RunTimeStepvoid setCurrentValue(RunTimeStep rts, double value)
rts - the RunTimeStepvalue - the value to setvoid setCurrentValue(int step,
double value)
step - the index into the data arrayvalue - the value to setdouble getCurrentValue(RunTimeStep rts)
rts - the RunTimeStepdouble getValue(int step)
step - the index into the data arraydouble getLaggedValue(RunTimeStep rts, int lagAmount)
rts - the RunTimeWindowlagAmount - the lag amountdouble getValue(HecTime time)
time - the HecTime for which data will be retrieveddouble getTSValueAt(HecTime time)
double getCumulativeTotal(RunTimeStep rts, int period)
rts and going back period steps.rts - the RunTimeStepperiod - the number of steps to go backdouble getCumulativeTotal(int step,
int period)
step and going back period steps.step - the starting stepperiod - the number of steps to go backint[] getTimeArray()
double[] getTSArray()
doubleArrayContainer getTSContainer()
TimeSeriesContainer getTimeSeriesContainer()
double[] getSummaryArray()
boolean writeTSData()
boolean writeTSDataAs(java.lang.String pathname,
java.lang.String interpUnitType)
boolean loadTSData()
boolean loadRawTSData()
boolean checkTSData()
boolean isValidValue()
void shiftLeft(RunTimeWindow rtw)
void shiftLeft(HecTime startTime)
void setVariableId(int varid)
int getVariableId()
void setTimeWindowString(java.lang.String timestr)
void setCompressData(boolean compress)
double[] getInterpolatedTSArray(HecTime startTime, HecTime endTime, int intervalTime)
boolean initialize(RunTimeWindow rtw)
boolean initialize(int beginDate,
int beginTime,
int timeStepMin,
int numSteps,
java.lang.String timeWindow)
boolean reinitialize(RunTimeWindow rtw)
boolean readData(java.io.BufferedReader input)
boolean writeData(java.io.BufferedWriter out)
boolean writeDataToRas(java.io.BufferedWriter out)
boolean readDataFromRas(java.io.BufferedReader input)
double[] getDataArrayFor(int step,
int period)
step and
either going back period steps if the value is negative or
forward if the value is positive.step - the starting stepperiod - the number of steps to go back if a negative number
or forward is a positive numberdouble max(int step,
int period)
step and
going back period, if the value is negative or
forward period, if the value is positive.int - step, the starting stepint - period, the number of steps to go back if a negative number
or forward is a positive numberdouble min(int step,
int period)
step and
going back period, if the value is negative or
forward period, if the value is positive.int - step, the starting stepint - period, the number of steps to go back if a negative number
or forward is a positive numberdouble average(int step,
int period)
step and
going back period, if the value is negative or
forward period, if the value is positive. Does not include undefined or missing values.int - step, the starting stepint - period, the number of steps to go back if a negative number
or forward is a positive numberdouble sum(int step,
int period)
step and
going back period, if the value is negative or
forward period, if the value is positive. Does not include undefined or missing values.int - step, the starting stepint - period, the number of steps to go back if a negative number
or forward is a positive numberdouble standardDeviation(int step,
int period)
step and
either going back period steps if the value is negative or
forward if the value is positive.int - step, the starting stepint - period, the number of steps to go back if a negative number
or forward is a positive numberTimeSeriesContainer getTimeSeriesContainerFor(int step, int period)
step and going forward, if period is positive,
or backwards, if period is negative.int - step, the starting stepint - period, the number of steps to go back when a negative number
or forward if a positive number