Package hec.model

Interface TSRecord

All Known Subinterfaces:
LocalTSRecord
All Known Implementing Classes:
AbstractTSRecord

public interface TSRecord
Maps a time series location to a DSS record.
  • Field Details

  • Method Details

    • setIndex

      void setIndex(int idx)
    • getIndex

      int getIndex()
    • getName

      String getName()
    • setName

      void setName(String name)
    • getParamName

      String getParamName()
    • setParamName

      void setParamName(String name)
    • getDSSFilename

      String getDSSFilename()
    • setDSSFilename

      void setDSSFilename(String fileName)
    • getDSSPathname

      String getDSSPathname()
    • setDSSPathname

      void setDSSPathname(String pathname)
    • setDSSPathname

      void setDSSPathname(String[] parts)
    • getUnits

      String getUnits()
    • getUnitsType

      String getUnitsType()
    • setUnits

      void setUnits(String units)
    • setUnitsType

      void setUnitsType(String units)
    • getInterpUnitsType

      String getInterpUnitsType()
    • setInterpUnitsType

      void setInterpUnitsType(String type)
    • getBeginDate

      int getBeginDate()
    • getBeginTime

      int getBeginTime()
    • getTimeStepMinutes

      int getTimeStepMinutes()
    • getTimeWindowString

      String getTimeWindowString()
    • getNumSteps

      int getNumSteps()
    • isDefaultData

      boolean isDefaultData()
    • isObservedData

      boolean isObservedData()
    • getInputDataPos

      int getInputDataPos()
    • setInputDataPos

      void setInputDataPos(int inputPos)
    • getPeriodAverage

      double getPeriodAverage(RunTimeStep rts, int period)
      get the Period Average starting at RunTimeStep and going back period steps
      Parameters:
      rts - the RunTimeStep
      period - the period to go back
      Returns:
      the period average of rts.step - period
    • getPeriodAverage

      double getPeriodAverage(int step, int period)
      get the Period Average starting at RunTimeStep and going back period steps
      Parameters:
      step - the starting step
      period - the number of steps to go back.
      Returns:
      the period average of step - period
    • getPreviousValue

      double getPreviousValue(RunTimeStep rts)
      get the value previous to the current runtime step
      Parameters:
      rts - the RunTimeStep
      Returns:
      the value one step back (rts.step-1)
    • setCurrentValue

      void setCurrentValue(RunTimeStep rts, double value)
      set the value at the current run time step
      Parameters:
      rts - the RunTimeStep
      value - the value to set
    • setCurrentValue

      void setCurrentValue(int step, double value)
      set the value at the current run time step
      Parameters:
      step - the index into the data array
      value - the value to set
    • getCurrentValue

      double getCurrentValue(RunTimeStep rts)
      return the value for the current runtime step
      Parameters:
      rts - the RunTimeStep
      Returns:
      the value at RunTimeStep.step
    • getValue

      double getValue(int step)
      get the value at step
      Parameters:
      step - the index into the data array
      Returns:
      the value at step
    • getLaggedValue

      double getLaggedValue(RunTimeStep rts, int lagAmount)
      get the value at current runtime step minus the lag amount
      Parameters:
      rts - the RunTimeWindow
      lagAmount - the lag amount
      Returns:
      the value at rts.step-lagAmount
    • getValue

      double getValue(HecTime time)
      get the value at the given HecTime
      Parameters:
      time - the HecTime for which data will be retrieved
      Returns:
      the value at step
    • getTSValueAt

      double getTSValueAt(HecTime time)
    • getCumulativeTotal

      double getCumulativeTotal(RunTimeStep rts, int period)
      get the cumulative total starting at rts and going back period steps.
      Parameters:
      rts - the RunTimeStep
      period - the number of steps to go back
      Returns:
      the cumulative total of rts.step - period
    • getCumulativeTotal

      double getCumulativeTotal(int step, int period)
      get the cumulative total starting at step and going back period steps.
      Parameters:
      step - the starting step
      period - the number of steps to go back
      Returns:
      the cumulative total of step - period
    • getTimeArray

      int[] getTimeArray()
    • getTSArray

      double[] getTSArray()
      Get the data array for the time series record.
      Returns:
      double array containing all data values for record
    • getTSContainer

      doubleArrayContainer getTSContainer()
    • getTimeSeriesContainer

      TimeSeriesContainer getTimeSeriesContainer()
      get the TimeSeriesContainer for the TSRecord. The TimeSeriesContainer and the TSRecord share the same underlying data model so changes in the data or times in one are reflected in the other. the TimeSeriesContainer will have no quality.
      Returns:
      the TimeSeriesContainer
    • getSummaryArray

      double[] getSummaryArray()
    • writeTSData

      boolean writeTSData()
    • writeTSDataAs

      boolean writeTSDataAs(String pathname, String interpUnitType)
    • loadTSData

      boolean loadTSData()
    • loadTSData

      boolean loadTSData(HecTime startTime, HecTime endTime)
    • loadRawTSData

      boolean loadRawTSData()
    • checkTSData

      boolean checkTSData()
    • isValidValue

      boolean isValidValue()
    • shiftLeft

      void shiftLeft(RunTimeWindow rtw)
    • shiftLeft

      void shiftLeft(HecTime startTime)
    • setVariableId

      void setVariableId(int varid)
    • getVariableId

      int getVariableId()
    • setTimeWindow

      void setTimeWindow(HecTime start, HecTime end)
    • setTimeWindowString

      void setTimeWindowString(String timestr)
    • setCompressData

      void setCompressData(boolean compress)
    • getInterpolatedTSArray

      double[] getInterpolatedTSArray(HecTime startTime, HecTime endTime, int intervalTime)
      Interpolate time series data for a regular size time interval "intervalTime" in minutes
    • reset

      void reset()
    • initialize

      boolean initialize(RunTimeWindow rtw)
    • initialize

      boolean initialize(int beginDate, int beginTime, int timeStepMin, int numSteps, String timeWindow)
    • reinitialize

      boolean reinitialize(RunTimeWindow rtw)
    • readData

      boolean readData(BufferedReader input)
      Read write methods for storing TSRecords to an ASCII file
    • writeData

      boolean writeData(BufferedWriter out)
    • writeDataToRas

      boolean writeDataToRas(BufferedWriter out)
    • readDataFromRas

      boolean readDataFromRas(BufferedReader input)
    • getDataArrayFor

      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.
      Parameters:
      step - the starting step
      period - the number of steps to go back if a negative number or forward is a positive number
      Returns:
      double[] of the values for the given time span
    • max

      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.
      Parameters:
      step - , the starting step
      period - , the number of steps to go back if a negative number or forward is a positive number
      Returns:
      the maximum value in the given time range
    • min

      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.
      Parameters:
      step - , the starting step
      period - , the number of steps to go back if a negative number or forward is a positive number
      Returns:
      the minimum value in the given time range
    • average

      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. Does not include undefined or missing values.
      Parameters:
      step - , the starting step
      period - , the number of steps to go back if a negative number or forward is a positive number
      Returns:
      double the period average for the values in the given time range
    • sum

      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. Does not include undefined or missing values.
      Parameters:
      step - , the starting step
      period - , the number of steps to go back if a negative number or forward is a positive number
      Returns:
      double the total sum for the values in the given time range
    • standardDeviation

      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.
      Parameters:
      step - , the starting step
      period - , the number of steps to go back if a negative number or forward is a positive number
      Returns:
      double the sample standard deviation
    • getTimeSeriesContainerFor

      TimeSeriesContainer getTimeSeriesContainerFor(int step, int period)
      Creates a TimeSeriesContainer filled with data from the TSRecord starting at step and going forward, if period is positive, or backwards, if period is negative.
      Parameters:
      step - , the starting step
      period - , the number of steps to go back when a negative number or forward if a positive number
    • isInput

      default boolean isInput()
    • getFactor

      default double getFactor()
    • setInput

      default void setInput(boolean isinput)