' '---------------------------- '--- Creation information --- '---------------------------- ' 'Name: balconu.ave 'Version: 1.1 'Date: 02/11/97 'Author: Ferdi Hellweger ' Center for Research in Water Resources ' The University of Texas at Austin ' ferdi@crwr.utexas.edu ' '--------------------------- '--- Purpose/Description --- '--------------------------- ' 'This is for configuring units. ' '------------------- '--- Set default --- '------------------- ' if (not _configu) then _units = 1 end ' '---------------------------------- '--- Get units system from user --- '---------------------------------- ' choices = list.make choices = choices.add("SI") choices = choices.add("English") choices = choices.add("Generic") ' mychoice = msgbox.listasstring(choices, "Units system", "BALANCE") if (mychoice = nil) then exit end ' if (mychoice = "Generic") then _units = 0 end if (mychoice = "SI") then _units = 1 end if (mychoice = "English") then _units = 2 end ' '-------------------------------- '--- Units Conversion Factors --- '-------------------------------- ' if (_units = 0) then _win = 1 _wout = 1 _wlab = "[M/T]" _sin = 1 _sout = 1 _slab = "[M/V]" _kin = 1 _kout = 1 _klab = "[1/T]" _tin = 1 _tout = 1 _tlab = "[T]" _qlab = "[V/T]" _eplab = "[V/T]" _vlab = "[V]" end if (_units = 1) then _win = 1000 / 86400 _wout = 86400 / 1000 _wlab = "[kg/day]" _sin = 1 _sout = 1 _slab = "[mg/L]" _kin = 1 / 86400 _kout = 86400 _klab = "[1/day]" _tin = 3600 _tout = 1 / 3600 _tlab = "[hr]" _qlab = "[m^3/s]" _eplab = "[m^3/s]" _vlab = "[m^3]" end if (_units = 2) then _win = 453.6 / 86400 _wout = 86400 / 453.6 _wlab = "[lb/day]" _sin = 1 / 35.3147 _sout = 35.3147 _slab = "[mg/L]" _kin = 1 / 86400 _kout = 86400 _klab = "[1/day]" _tin = 3600 _tout = 1 / 3600 _tlab = "[hr]" _qlab = "[cfs]" _eplab = "[cfs]" _vlab = "[ft^3]" end ' '--------------------------- '--- Set config variable --- '--------------------------- ' _configu = true ' '----------- '--- End --- '----------- '