Thursday, July 20, 2017

Using Multiple Operations Sets in HEC-ResSim

This post is a continuation of previous posts discussing the use of Multiple Watershed Configurations and Multiple Reservoir Networks.  These posts can be found in the locations given below:

Multiple Watershed Configurations:

Multiple Watershed Configurations Link

Multiple Reservoir Networks:

Multiple Reservoir Networks Link

Multiple operations sets can be used to test various operating criteria.  These operating criteria can include rules of operation and the definition of operating zones.

The watershed setup is shown below.

The first operations set is titled, "flow thru".  This operations set contains no rules of operation and the top of the conservation pool is set to 75 feet.  In this operations set, the following will occur:

  • Inflow will be held if the pool is below the top of conservation until the pool reaches the top of conservation
  • Top of conservation will be held by passing inflow assuming that inflow does not exceed the physical release capacity
  • If the pool is above top of conservation, the inflow plus storage above the top of conservation will be released until the pool is at top of conservation.  The limiting factor on reaching top of conservation is the release capacity.

The next operations set is titled, "max based on downstream conditions".  In this operations set, a rule has been added to limit the maximum release based on the conditions at the downstream junction, titled, "downstream control".  The operations when below the top of conservation are the same as those for the "flow thru" operations set.  When holding the top of conservation or releasing inflow and stored water to get back down to the top of conservation, the releases will be limited such that the flow at "downstream control" will not exceed 500 cfs.

The next operations set is titled, "max at dam and downstream".  This includes the same rule in the operations set shown above along with an additional rule that limits the release from the dam to 350 cfs.  Since there are two maximum release rules, HEC-ResSim will use the lower of the two maximums.  This maximum is applied when holding the top of conservation or when releasing to bring the pool down to the top of conservation.  

The final operations set is titled, "cons zone change".  In this operations set, the same rules developed in the operations set shown above apply.  However, the top of the conservation pool has been decreased from 75 feet to 73 feet.

In a future post, the development of multiple alternatives will be shown.  Developing multiple alternatives from these various operations sets allows the user to study the impacts of alternative operational scenarios.  

Wednesday, July 19, 2017

Using KML files for Placemarks in Google Earth

I recently developed a map in Google Earth to show the location of Clearwater Lake on the Black River in Missouri along with the locations of downstream gages.

To place a single Placemark for Clearwater Lake, the coding is as follows:

I placed this code in a text file and then selected "Import KML File" to bring this location into Google Earth.  The result is shown below.

To put multiple Placemarks into Google Earth, I used the coding shown below.  The additional locations are Poplar Bluff, Black Rock, and Newport.

The results of importing this into Google Earth are shown below.

Saturday, July 8, 2017

Python Advanced #15 - Developing a dictionary from values in external text file

This post demonstrates how to develop a dictionary from values in an external text file.  For this example, the values are set to the flag of "true" or "false".  It may be desirable to store these values in an external text file to instruct the program whether to perform a computation or not without having users altering these flags within the code.

The external text file is named, "dicts from text.txt".  The contents of this text file are shown below.

The following is performed in the code shown below:

  • Each line is read and stored in a temporary list.
  • The values are split based on the colon between them.
  • Any extra spaces are stripped and the values are added in key:value pairs in the dictionary named "flag_dict".
  • The temporary list is cleared after each line is read into the dictionary.
  • For this example, I used print statements based on the values; however, computations could be performed based on the values.

The output from this program is shown below.