hydroScalingAPI.modules.rainfallRunoffModel.objects
Class StormManager

java.lang.Object
  extended by hydroScalingAPI.modules.rainfallRunoffModel.objects.StormManager

public class StormManager
extends java.lang.Object

This class handles the precipitation over a basin. It takes in a group of raster files that represent snapshots of the rainfall fields and projects those fields over the hillslope map to obtain hillslope-based rainfall time series.

Author:
Ricardo Mantilla

Constructor Summary
StormManager(java.io.File locFile, Basin myCuenca, LinksAnalysis linksStructure, MetaRaster metaDatos, byte[][] matDir, int[][] magnitudes)
          Creates a new instance of StormManager (with spatially and temporally variable rainfall rates over the basin) based in a set of raster maps of rainfall intensities
StormManager(LinksAnalysis linksStructure, float rainIntensity, float rainDuration)
          Creates a new instance of StormManager (with constant rainfall rate over the basin during a given period of time)
 
Method Summary
 java.util.Date[] getFilesDates()
          Returns a group of Date indicating the date associated to the files
 float getMaxPrecOnHillslope(int HillNumber)
          Returns the maximum value of precipitation recorded for a given hillslope
 float getMeanPrecOnHillslope(int HillNumber)
          Returns the maximum value of precipitation recorded for a given hillslope
 int getNumberOfFilesRead()
          Returns the number of files that were read
 float getPrecOnHillslope(int HillNumber, java.util.Calendar dateRequested)
          Returns the value of rainfall rate in mm/h for a given moment of time
 float getTotalHillSlopeBasedPrec(int HillNumber)
          The total rainfall over a given hillslope
 float getTotalPixelBasedPrec(int i, int j)
          The total rainfall over a given pixel of the original raster fields
 boolean isCompleted()
          A boolean flag indicating if the precipitation files were fully read
static void main(java.lang.String[] args)
           
 double stormFinalTimeInMinutes()
          The final storm time as a double in milliseconds obtained from the method getTimeInMillis() of the Calendar object
 java.util.Calendar stormInitialTime()
          The initial storm time as a Calendar object
 double stormInitialTimeInMinutes()
          The initial storm time as a double in milliseconds obtained from the method getTimeInMillis() of the Calendar object
 java.lang.String stormName()
          Returns the name of this storm event
 float stormRecordResolution()
          The storm temporal resolution in milliseconds
 double stormRecordResolutionInMinutes()
          The storm record time resolution in minutes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StormManager

public StormManager(LinksAnalysis linksStructure,
                    float rainIntensity,
                    float rainDuration)
Creates a new instance of StormManager (with constant rainfall rate over the basin during a given period of time)

Parameters:
linksStructure - The topologic structure of the river network
rainIntensity - The uniform intensity to be applied over the basinb
rainDuration - The duration of the event with the given intensity

StormManager

public StormManager(java.io.File locFile,
                    Basin myCuenca,
                    LinksAnalysis linksStructure,
                    MetaRaster metaDatos,
                    byte[][] matDir,
                    int[][] magnitudes)
Creates a new instance of StormManager (with spatially and temporally variable rainfall rates over the basin) based in a set of raster maps of rainfall intensities

Parameters:
locFile - The path to the raster files
myCuenca - The Basin object describing the basin under consideration
linksStructure - The topologic structure of the river network
metaDatos - A MetaRaster describing the rainfall intensity maps
matDir - The directions matrix of the DEM that contains the basin
magnitudes - The magnitudes matrix of the DEM that contains the basin
Method Detail

getPrecOnHillslope

public float getPrecOnHillslope(int HillNumber,
                                java.util.Calendar dateRequested)
Returns the value of rainfall rate in mm/h for a given moment of time

Parameters:
HillNumber - The index of the desired hillslope
dateRequested - The time for which the rain is desired
Returns:
Returns the rainfall rate in mm/h

getMaxPrecOnHillslope

public float getMaxPrecOnHillslope(int HillNumber)
Returns the maximum value of precipitation recorded for a given hillslope

Parameters:
HillNumber - The index of the desired hillslope
Returns:
The maximum rainfall rate in mm/h

getMeanPrecOnHillslope

public float getMeanPrecOnHillslope(int HillNumber)
Returns the maximum value of precipitation recorded for a given hillslope

Parameters:
HillNumber - The index of the desired hillslope
Returns:
The average rainfall rate in mm/h

isCompleted

public boolean isCompleted()
A boolean flag indicating if the precipitation files were fully read

Returns:
A flag for the constructor success

stormName

public java.lang.String stormName()
Returns the name of this storm event

Returns:
A String that describes this storm

stormRecordResolution

public float stormRecordResolution()
The storm temporal resolution in milliseconds

Returns:
A float with the temporal resolution

stormInitialTime

public java.util.Calendar stormInitialTime()
The initial storm time as a Calendar object

Returns:
A Calendar object indicating when the first drop of water fell on the basin

stormInitialTimeInMinutes

public double stormInitialTimeInMinutes()
The initial storm time as a double in milliseconds obtained from the method getTimeInMillis() of the Calendar object

Returns:
A double indicating when the first drop of water fell over the basin on the basin

stormFinalTimeInMinutes

public double stormFinalTimeInMinutes()
The final storm time as a double in milliseconds obtained from the method getTimeInMillis() of the Calendar object

Returns:
A double indicating when the last drop of water fell over the basin on the basin

stormRecordResolutionInMinutes

public double stormRecordResolutionInMinutes()
The storm record time resolution in minutes

Returns:
A double indicating the time series time step

getTotalPixelBasedPrec

public float getTotalPixelBasedPrec(int i,
                                    int j)
The total rainfall over a given pixel of the original raster fields

Parameters:
i - The row number of the desired location
j - The column number of the desired location
Returns:
The accumulated rain over the entire storm period

getTotalHillSlopeBasedPrec

public float getTotalHillSlopeBasedPrec(int HillNumber)
The total rainfall over a given hillslope

Parameters:
HillNumber - The index of the desired hillslope
Returns:
The value of rainfall intensity

getNumberOfFilesRead

public int getNumberOfFilesRead()
Returns the number of files that were read

Returns:
An integer

getFilesDates

public java.util.Date[] getFilesDates()
Returns a group of Date indicating the date associated to the files

Returns:
An array of Dates

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments


CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.