Package hec.hecmath

Class DurationPeriod

java.lang.Object
hec.hecmath.DurationPeriod

public class DurationPeriod extends Object
Class holds data for time series cyclic analysis statistic computed by HecMath.cyclicAnalysis
  • Field Details

    • UNDEFINED

      public static final int UNDEFINED
      See Also:
    • ANNUAL

      public static final int ANNUAL
      See Also:
    • QUARTERLY

      public static final int QUARTERLY
      See Also:
    • MONTHLY

      public static final int MONTHLY
      See Also:
    • OTHER

      public static final int OTHER
      See Also:
    • DURATION_PERIOD_STRINGS

      public static final String[] DURATION_PERIOD_STRINGS
    • _periodName

      protected String _periodName
    • _periodInterval

      protected String _periodInterval
    • _startOfPeriod

      protected HecTime _startOfPeriod
    • _endOfPeriod

      protected HecTime _endOfPeriod
    • _startDateBeforeEndDate

      protected boolean _startDateBeforeEndDate
    • _durationPeriodType

      protected int _durationPeriodType
    • _numberValues

      protected int _numberValues
    • _values

      public double[] _values
    • _durationPercent

      public double[] _durationPercent
    • _xunits

      protected String _xunits
    • _yunits

      protected String _yunits
    • _xtype

      protected String _xtype
    • _ytype

      protected String _ytype
    • _xparameterString

      protected String _xparameterString
    • _yparameterString

      protected String _yparameterString
    • _durationComputed

      protected boolean _durationComputed
    • _timeValid

      protected boolean _timeValid
  • Constructor Details

    • DurationPeriod

      public DurationPeriod(int type, String startOfPeriod, String endOfPeriod)
      type - type of period (ANNUAL, QUARTERLY, MONTHLY, OTHER ) startOfPeriod - date string of type "01JAN" (no year) defining beginning of period endOfPeriod - date string of type "31MAR" (no year) defining end of period
    • DurationPeriod

      public DurationPeriod(String name, String startOfPeriod, String endOfPeriod)
      Contructor for user defined period types name - name for user defined duration period startOfPeriod - date string of type "01JAN" (no year) defining beginning of period endOfPeriod - date string of type "31MAR" (no year) defining end of period
  • Method Details

    • filterTimeSeries

      public boolean filterTimeSeries(TimeSeriesContainer tsc)
      Filter the time series for the times in the duration period
      Parameters:
      tsc -
      Returns:
      boolean
    • sortDescending

      public void sortDescending()
    • computeDuration

      public boolean computeDuration()
      Compute flow/stage duration array P = 100 * [ M / (n + 1) ] P = the probability that a given flow will be equaled or exceeded (% of time) M = the ranked position on the listing (dimensionless) n = the number of events for period of record (dimensionless)
      Returns:
    • computeBinLimits

      public static double[] computeBinLimits(double[] values, int numberBins, boolean useLog)
    • computeBins

      public PairedDataContainer computeBins(double[] maxBinValue, double[] plottingPoints, int horizontalAxis)
    • computeAll

      public PairedDataContainer computeAll()
    • compute

      public PairedDataContainer compute(double[] xintervals, int horizontalAxis)
      Interpolate flow/stage duration result at probability intervalues
      Returns:
      PairedDataContainer object
    • interpolate

      protected static double[] interpolate(double[] xValues, double[] yValues, double[] newXValues, int horizontalAxis)
    • setName

      public void setName(String name)
    • getName

      public String getName()
    • setInterval

      public void setInterval(String interval)
    • getInterval

      public String getInterval()
    • clearArrays

      public void clearArrays()
      release memory