Technical Support for Environmental Data Collection Software
Email This Article
Your Name: *  
Your Email: *
Friend's Email: *
  *Required Field
Verification Code: *

Unit Conversion Issues in Computations

  • Author: Michael Maloney
  • Create Time: 12/16/2014 11:05:25
  • Last Update Time: 12/16/2014 11:11:37
The CCP allows you to specify the Engineering Units for both input and output parameters to a computation. But what does this really mean?

When you specify the units for an input, you are telling the CCP framework the units that your algorithm requires. These may be different from the database storage units. The framework will retrieve the data, and if necessary, will convert the data to the units you specify. This will happen automatically before your computation is run.

When you specify the units for an output, you are telling the CCP framework the units that your algorithm is producing. Then, after running your computation, the framework will do any conversions necessary before saving the data to the database. (The framework already knows the units required by the database for each parameter type.)

Example: A Stage to Flow rating using an external USGS RDB file that relates stage in ft to flow in cfs:

1. For your "indep" (independent, or input) parameter, specify units "ft". The framework will retrieve stage data and convert to feet.
2. The algorithm needs feet so it can find the appropriate row in the table.
3. For your "dep" (dependent, or output) parameter, specify units "cfs".
4. The framework knows how to convert cfs to cms, required by CWMS for storage.

This processing happens for every computation that is run. You can chain computations together that use different units with no problem as long as you specify the input/output units for each correctly.

Another example: Computation "StageToElev" adds a gage-zero value in meters to a stage value to produce an elevation. Then computation "ElevToStorage" wants the elevation in "ft" and produces "acre-ft".

1. For StageToElev, specify units "m" for both the input and output. This ensures consistency because you are adding the gage-zero in meters.
2. For ElevToStorage, specify input units "ft" and output units "acre-ft".