RHESSysWorkflows  1.33
Classes | Functions
rhessysworkflows.rhessys Namespace Reference

Functions related to RHESSys models. More...

Classes

class  RHESSysOutput
 
class  RHESSysPaths
 

Functions

def generateCommandString (binPath, outputPrefix, startDate, endDate, tecPath, worldPath, subsurfaceFlowPath=None, surfaceFlowPath=None, flags="", kwargs)
 Return a string representing a properly formatted RHESSys command with the executable and all command line options and arguments specified. More...
 
def datetimeToString (dt)
 Return string representing the year, month, day, and hour of a datetime object. More...
 
def readParameterFile (paramFilepath)
 Read a RHESSys parameter file into a dictionary with parameters as keys and parameter values as values. More...
 

Detailed Description

Functions related to RHESSys models.

This software is provided free of charge under the New BSD License. Please see the following license information:

Copyright (c) 2013, University of North Carolina at Chapel Hill All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author
Brian Miles brian.nosp@m._mil.nosp@m.es@un.nosp@m.c.ed.nosp@m.u
Todo:
Add unit tests

This software is provided free of charge under the New BSD License. Please see the following license information:

Copyright (c) 2013, University of North Carolina at Chapel Hill All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author
Brian Miles brian.nosp@m._mil.nosp@m.es@un.nosp@m.c.ed.nosp@m.u
Todo:
Add unit tests

Function Documentation

def rhessysworkflows.rhessys.datetimeToString (   dt)

Return string representing the year, month, day, and hour of a datetime object.

Parameters
dtPython datetime object
Returns
String of the form 'YYYY MM DD HH'
def rhessysworkflows.rhessys.generateCommandString (   binPath,
  outputPrefix,
  startDate,
  endDate,
  tecPath,
  worldPath,
  subsurfaceFlowPath = None,
  surfaceFlowPath = None,
  flags = "",
  kwargs 
)

Return a string representing a properly formatted RHESSys command with the executable and all command line options and arguments specified.

Parameters
binPathString representing path to RHESSys binary
startDatedatetime
endDatedatetime
tecPathString representing tec file to be used
worldPathString representing world file to be used
subsurfaceFlowPathString representing subsurface flowtable to be used
surfaceFlowPathString representing surface flowtable to be used flags String representing flags to include (e.g. b for -b or basin output) **kwargs Mapping type describing calibration options, with key representing the parameter name and value a tuple of arguments to pass to the calibration option
Returns
String representing the RHESSys command line
def rhessysworkflows.rhessys.readParameterFile (   paramFilepath)

Read a RHESSys parameter file into a dictionary with parameters as keys and parameter values as values.

Parameters
paramFilepathString representing path of parameter file to read
Returns
Dict with keys representing parameters and their values IOError if file cannot be read