﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="1.0.8348.30405"?>
<worksheet xmlns="http://smath.info/schemas/worksheet/1.0">
  <settings ppi="144">
    <identity>
      <id>d44d2e67-406f-4630-b64f-00bdbbbee76e</id>
      <revision>63</revision>
    </identity>
    <metadata lang="eng">
      <author>NDTM Amarasekera</author>
    </metadata>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <trailingZeros>false</trailingZeros>
      <significantDigitsMode>false</significantDigitsMode>
      <roundingMode>0</roundingMode>
      <approximateEqualAccuracy>0</approximateEqualAccuracy>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="true" viewMode="0" printGrid="false" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="9" orientation="Portrait" width="827" height="1169" />
      <margins left="59" right="30" top="39" bottom="47" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9"> &amp;[FILENAME] - &amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependencies>
      <assembly name="SMath Studio Desktop" version="1.0.8348.30405" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="MathRegion" version="1.11.8348.30405" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="SpecialFunctions" version="1.12.8348.30405" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="TextRegion" version="1.11.8348.30405" guid="485d28c5-349a-48b6-93be-12a35a1c1e39" />
      <assembly name="Writer Region" version="0.23.8034.36139" guid="5922d677-323f-4327-8c68-be902d8339ad" />
      <assembly name="XlsxImportExport" version="1.3.7845.24796" guid="621b8a62-bd79-47fc-948b-d4c4ab3b8588" />
      <assembly name="Mathcad Toolbox" version="0.4.8207.33692" guid="ddc09821-49f1-4c21-a829-6499de0a8f06" />
    </dependencies>
  </settings>
  <regions type="content">
    <region left="27" top="27" width="278" height="26" color="#000000" fontSize="10">
      <math evaluate="false">
        <input>
          <e type="operand">4</e>
          <e type="operator" args="1">-</e>
          <e type="function" args="1">appVersion</e>
        </input>
        <result action="numeric">
          <e type="operand" style="string">0.98.6128.10018</e>
        </result>
      </math>
    </region>
    <region left="333" top="27" width="278" height="26" color="#000000" fontSize="10">
      <math>
        <input>
          <e type="operand">4</e>
          <e type="operator" args="1">-</e>
          <e type="function" args="1">appVersion</e>
          <e type="operand" style="string">0.98.6128.10018</e>
          <e type="operator" args="2">≡</e>
        </input>
      </math>
    </region>
    <region left="333" top="63" width="257" height="26" color="#000000" fontSize="10">
      <math>
        <input>
          <e type="operand">4</e>
          <e type="function" args="1">appVersion</e>
        </input>
        <result action="numeric">
          <e type="operand" style="string">1.0.8348.30405</e>
        </result>
      </math>
    </region>
    <region left="27" top="81" width="290" height="26" color="#000000" isBreakable="false">
      <writer lang="eng"><![CDATA[<span style="font-family: 'Tw Cen MT Condensed Extra Bold'; font-size: 10pt; font-weight: normal; font-style: normal; color: windowtext; background-color: Yellow; vertical-align: baseline; text-align: left; margin-left: 0pt; text-indent: 0pt; line-height: 115%">
<div><span style="font-family: 'Microsoft Sans Serif'"><strong><span style="background-color: #CCFFFF">1. Import Water Level Data (from EXCEL file)</span></strong></span></div></span>]]></writer>
    </region>
    <region left="531" top="99" width="101" height="26" color="#000000" bgColor="#ffe8d0" fontSize="10">
      <math>
        <input>
          <e type="operand">t0</e>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="18" top="135" width="438" height="26" color="#000000" fontSize="10">
      <math exponentialThreshold="8">
        <description active="true" position="Top" lang="eng">
          <content>
            <p>Directory of  Excel file to import</p>
          </content>
        </description>
        <input>
          <e type="operand">MyDirectory</e>
          <e type="operand" style="string"></e>
          <e type="function" args="1">DocumentDirectory</e>
          <e type="operator" args="2">:</e>
        </input>
        <result action="numeric">
          <e type="operand" style="string">D:\Water Level\</e>
        </result>
      </math>
    </region>
    <region left="18" top="198" width="395" height="26" color="#000000" fontSize="10">
      <math exponentialThreshold="8">
        <description active="true" position="Top" lang="eng">
          <content>
            <p>Name of Excel File</p>
          </content>
        </description>
        <input>
          <e type="operand">MyFile</e>
          <e type="operand">MyDirectory</e>
          <e type="operand" style="string">1.July WL&amp;RT.xlsx</e>
          <e type="function" args="2">concat</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="18" top="261" width="365" height="30" color="#000000" fontSize="10">
      <math decimalPlaces="6" exponentialThreshold="8">
        <description active="true" position="Top" lang="eng">
          <content>
            <p>To import: Sheet Name, Start cell and End cell</p>
          </content>
        </description>
        <input>
          <e type="operand">WL</e>
          <e type="operand">MyFile</e>
          <e type="operand" style="string">WL</e>
          <e type="operand" style="string">C5</e>
          <e type="operand" style="string">AX35</e>
          <e type="function" args="4">importData.XLSX</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="18" top="324" width="710" height="68" color="#000000" fontSize="10">
      <text lang="eng" width="704" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p style="font-size: 10px; font-weight: bold;">Note: <span style="color: #ff0000;">WL</span> is a digital signal received at control center. The numerical values of WL have <span style="color: #ff0000;">more than 6 decimals,</span> whereas the <span style="color: #ff0000;">Rating Table (RT)</span> is calibrated only to <span style="color: #ff0000;">2 decimals. </span><span style="color: #400040;">Hence, first WL values have to be refined to 2 decimals for use with RT values. Otherwise, "findrows()" function will return zero values. <br /></span>Pl see <span style="color: #ff0000;">Program 1</span></p>
        </content>
      </text>
    </region>
    <region left="18" top="414" width="668" height="168" color="#000000" fontSize="10">
      <math decimalPlaces="8" exponentialThreshold="8" matrixOptions="0,0,7,8">
        <description active="true" position="Top" lang="eng">
          <content>
            <p>WL imported Water :eve;s (Only part shown)</p>
          </content>
        </description>
        <input>
          <e type="operand">WL</e>
        </input>
        <result action="numeric">
          <e type="operand">0.85000002</e>
          <e type="operand">0.74000001</e>
          <e type="operand">0.74000001</e>
          <e type="operand">0.75</e>
          <e type="operand">0.73000002</e>
          <e type="operand">0.72000003</e>
          <e type="operand">0.72000003</e>
          <e type="operand">0.72000003</e>
          <e type="operand">0.70999998</e>
          <e type="operand">0.69</e>
          <e type="operand">0.69999999</e>
          <e type="operand">0.70999998</e>
          <e type="operand">0.72000003</e>
          <e type="operand">0.69999999</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.70999998</e>
          <e type="operand">0.69999999</e>
          <e type="operand">0.69999999</e>
          <e type="operand">0.68000001</e>
          <e type="operand">0.68000001</e>
          <e type="operand">0.69</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.68000001</e>
          <e type="operand">0.69999999</e>
          <e type="operand">0.68000001</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.66000003</e>
          <e type="operand">0.68000001</e>
          <e type="operand">0.68000001</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.67000002</e>
          <e type="operand">0.86000001</e>
          <e type="operand">0.89999998</e>
          <e type="operand">0.89999998</e>
          <e type="operand">0.88999999</e>
          <e type="operand">0.93000001</e>
          <e type="operand">0.89999998</e>
          <e type="operand">0.89999998</e>
          <e type="operand">0.88999999</e>
          <e type="operand">0.89999998</e>
          <e type="operand">0.94999999</e>
          <e type="operand">0.98000002</e>
          <e type="operand">0.89999998</e>
          <e type="operand">0.89999998</e>
          <e type="operand">0.87</e>
          <e type="operand">0.63999999</e>
          <e type="operand">0.63</e>
          <e type="operand">0.63</e>
          <e type="operand">0.64999998</e>
          <e type="operand">0.63999999</e>
          <e type="operand">0.63</e>
          <e type="operand">0.62</e>
          <e type="operand">8</e>
          <e type="operand">7</e>
          <e type="function" args="58">mat</e>
        </result>
      </math>
    </region>
    <region left="18" top="630" width="139" height="26" color="#000000" fontSize="10">
      <math exponentialThreshold="8">
        <input>
          <e type="operand">WL</e>
          <e type="function" args="1">length</e>
        </input>
        <result action="numeric">
          <e type="operand">1488</e>
        </result>
      </math>
    </region>
    <region left="189" top="630" width="107" height="26" color="#000000" fontSize="10">
      <math exponentialThreshold="8">
        <input>
          <e type="operand">WL</e>
          <e type="function" args="1">rows</e>
        </input>
        <result action="numeric">
          <e type="operand">31</e>
        </result>
      </math>
    </region>
    <region left="333" top="630" width="107" height="26" color="#000000" fontSize="10">
      <math exponentialThreshold="8">
        <input>
          <e type="operand">WL</e>
          <e type="function" args="1">cols</e>
        </input>
        <result action="numeric">
          <e type="operand">48</e>
        </result>
      </math>
    </region>
    <region left="18" top="693" width="466" height="168" color="#000000" fontSize="10">
      <math decimalPlaces="6" exponentialThreshold="8" matrixOptions="0,0,2,8">
        <description active="true" position="Top" lang="eng">
          <content>
            <p>Similarly, Import Rating Table to Smath</p>
          </content>
        </description>
        <input>
          <e type="operand">RT</e>
          <e type="operand">MyFile</e>
          <e type="operand" style="string">RT</e>
          <e type="operand" style="string">B4</e>
          <e type="operand" style="string">C404</e>
          <e type="function" args="4">importData.XLSX</e>
          <e type="operator" args="2">:</e>
        </input>
        <result action="numeric">
          <e type="operand">0.5</e>
          <e type="operand">4.3</e>
          <e type="operand">0.51</e>
          <e type="operand">4.57</e>
          <e type="operand">0.52</e>
          <e type="operand">4.84</e>
          <e type="operand">0.53</e>
          <e type="operand">5.11</e>
          <e type="operand">0.54</e>
          <e type="operand">5.38</e>
          <e type="operand">0.55</e>
          <e type="operand">5.65</e>
          <e type="operand">0.56</e>
          <e type="operand">5.92</e>
          <e type="operand">0.57</e>
          <e type="operand">6.19</e>
          <e type="operand">8</e>
          <e type="operand">2</e>
          <e type="function" args="18">mat</e>
        </result>
      </math>
    </region>
    <region left="513" top="747" width="106" height="24" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">RT</e>
          <e type="function" args="1">rows</e>
        </input>
        <result action="numeric">
          <e type="operand">401</e>
        </result>
      </math>
    </region>
    <region left="513" top="783" width="92" height="24" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">RT</e>
          <e type="function" args="1">cols</e>
        </input>
        <result action="numeric">
          <e type="operand">2</e>
        </result>
      </math>
    </region>
    <region left="18" top="936" width="65" height="22" color="#000000" fontSize="9">
      <text lang="eng" fontFamily="Trebuchet MS" fontSize="9">
        <content>
          <p style="font-weight: bold; text-decoration: underline;">Example </p>
        </content>
      </text>
    </region>
    <region left="126" top="936" width="230" height="35" color="#000000" fontSize="10">
      <math>
        <input>
          <e type="operand">RT</e>
          <e type="operand">0.52</e>
          <e type="operand">1</e>
          <e type="function" args="3">findrows</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
        </input>
        <result action="numeric">
          <e type="operand">4.84</e>
        </result>
      </math>
    </region>
    <region left="18" top="1089" width="434" height="141" border="true" color="#000000" bgColor="#e1ffe1" fontSize="10">
      <math exponentialThreshold="8">
        <description active="true" position="Top" lang="eng">
          <content>
            <p>Program 1 : Convert Water levels to equivalent flows</p>
          </content>
        </description>
        <input>
          <e type="operand">wl</e>
          <e type="operand">rt</e>
          <e type="function" args="2">Find_Q</e>
          <e type="operand">j</e>
          <e type="operand">1</e>
          <e type="operand">wl</e>
          <e type="function" args="1">rows</e>
          <e type="function" args="2">range</e>
          <e type="operand">k</e>
          <e type="operand">1</e>
          <e type="operand">wl</e>
          <e type="function" args="1">cols</e>
          <e type="function" args="2">range</e>
          <e type="operand">wll</e>
          <e type="operand">j</e>
          <e type="operand">k</e>
          <e type="function" args="3">el</e>
          <e type="operand">wl</e>
          <e type="operand">j</e>
          <e type="operand">k</e>
          <e type="function" args="3">el</e>
          <e type="operand">2</e>
          <e type="function" args="2">round</e>
          <e type="operator" args="2">:</e>
          <e type="operand">q</e>
          <e type="operand">j</e>
          <e type="operand">k</e>
          <e type="function" args="3">el</e>
          <e type="operand">rt</e>
          <e type="operand">wll</e>
          <e type="operand">j</e>
          <e type="operand">k</e>
          <e type="function" args="3">el</e>
          <e type="operand">1</e>
          <e type="function" args="3">findrows</e>
          <e type="operand">2</e>
          <e type="function" args="2">el</e>
          <e type="operator" args="2">:</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="function" args="3">for</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="function" args="3">for</e>
          <e type="operand">q</e>
          <e type="operand">2</e>
          <e type="operand">1</e>
          <e type="function" args="4">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="18" top="1278" width="151" height="26" color="#000000" fontSize="10">
      <math>
        <input>
          <e type="operand">Q</e>
          <e type="operand">WL</e>
          <e type="operand">RT</e>
          <e type="function" args="2">Find_Q</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region left="18" top="1323" width="472" height="440" color="#000000" fontSize="10">
      <math>
        <input>
          <e type="operand">Q</e>
        </input>
        <result action="numeric">
          <e type="operand">16.75</e>
          <e type="operand">11</e>
          <e type="operand">11</e>
          <e type="operand">11.5</e>
          <e type="operand">10.5</e>
          <e type="operand">10</e>
          <e type="operand">10</e>
          <e type="operand">10</e>
          <e type="operand">10.5</e>
          <e type="operand">10</e>
          <e type="operand">9.5</e>
          <e type="operand">8.8</e>
          <e type="operand">9</e>
          <e type="operand">9.5</e>
          <e type="operand">10</e>
          <e type="operand">9</e>
          <e type="operand">9</e>
          <e type="operand">9</e>
          <e type="operand">8.4</e>
          <e type="operand">9.5</e>
          <e type="operand">9</e>
          <e type="operand">9</e>
          <e type="operand">8.6</e>
          <e type="operand">8.6</e>
          <e type="operand">8.8</e>
          <e type="operand">8.8</e>
          <e type="operand">8.8</e>
          <e type="operand">8.4</e>
          <e type="operand">8.4</e>
          <e type="operand">8.4</e>
          <e type="operand">8.6</e>
          <e type="operand">9</e>
          <e type="operand">8.6</e>
          <e type="operand">8.4</e>
          <e type="operand">8.6</e>
          <e type="operand">8.4</e>
          <e type="operand">8.4</e>
          <e type="operand">8.4</e>
          <e type="operand">8.2</e>
          <e type="operand">8.6</e>
          <e type="operand">8.6</e>
          <e type="operand">8.4</e>
          <e type="operand">8.4</e>
          <e type="operand">8.2</e>
          <e type="operand">8</e>
          <e type="operand">17.3</e>
          <e type="operand">19.5</e>
          <e type="operand">19.5</e>
          <e type="operand">18.95</e>
          <e type="operand">21.15</e>
          <e type="operand">19.5</e>
          <e type="operand">19.5</e>
          <e type="operand">31.6</e>
          <e type="operand">32.8</e>
          <e type="operand">18.95</e>
          <e type="operand">19.5</e>
          <e type="operand">22.25</e>
          <e type="operand">23.9</e>
          <e type="operand">19.5</e>
          <e type="operand">19.5</e>
          <e type="operand">17.85</e>
          <e type="operand">17.85</e>
          <e type="operand">18.95</e>
          <e type="operand">7.8</e>
          <e type="operand">7.6</e>
          <e type="operand">7.6</e>
          <e type="operand">8</e>
          <e type="operand">7.8</e>
          <e type="operand">7.6</e>
          <e type="operand">7.4</e>
          <e type="operand">7.6</e>
          <e type="operand">7.4</e>
          <e type="operand">16.75</e>
          <e type="operand">20.6</e>
          <e type="operand">19.5</e>
          <e type="operand">19.5</e>
          <e type="operand">20.05</e>
          <e type="operand">20.05</e>
          <e type="operand">19.5</e>
          <e type="operand">21.15</e>
          <e type="operand">21.7</e>
          <e type="operand">13</e>
          <e type="operand">13.5</e>
          <e type="operand">14.55</e>
          <e type="operand">15.65</e>
          <e type="operand">16.75</e>
          <e type="operand">18.95</e>
          <e type="operand">20.05</e>
          <e type="operand">21.15</e>
          <e type="operand">20.6</e>
          <e type="operand">25.6</e>
          <e type="operand">23.35</e>
          <e type="operand">22.8</e>
          <e type="operand">21.7</e>
          <e type="operand">21.7</e>
          <e type="operand">20.6</e>
          <e type="operand">19.5</e>
          <e type="operand">18.4</e>
          <e type="operand">18.95</e>
          <e type="operand">25</e>
          <e type="operand">23.35</e>
          <e type="operand">23.9</e>
          <e type="operand">26.2</e>
          <e type="operand">27.4</e>
          <e type="operand">27.4</e>
          <e type="operand">27.4</e>
          <e type="operand">25</e>
          <e type="operand">26.8</e>
          <e type="operand">27.4</e>
          <e type="operand">25.6</e>
          <e type="operand">25</e>
          <e type="operand">25.6</e>
          <e type="operand">24.45</e>
          <e type="operand">26.2</e>
          <e type="operand">26.8</e>
          <e type="operand">31</e>
          <e type="operand">28.6</e>
          <e type="operand">10.5</e>
          <e type="operand">10.5</e>
          <e type="operand">10</e>
          <e type="operand">11</e>
          <e type="operand">11.5</e>
          <e type="operand">12.5</e>
          <e type="operand">12.5</e>
          <e type="operand">11.5</e>
          <e type="operand">11.5</e>
          <e type="operand">21.15</e>
          <e type="operand">20.6</e>
          <e type="operand">19.5</e>
          <e type="operand">20.05</e>
          <e type="operand">22.25</e>
          <e type="operand">20.05</e>
          <e type="operand">25</e>
          <e type="operand">26.2</e>
          <e type="operand">25</e>
          <e type="operand">22.8</e>
          <e type="operand">21.15</e>
          <e type="operand">21.15</e>
          <e type="operand">18.95</e>
          <e type="operand">21.7</e>
          <e type="operand">23.9</e>
          <e type="operand">25.6</e>
          <e type="operand">22.25</e>
          <e type="operand">22.8</e>
          <e type="operand">22.8</e>
          <e type="operand">20.6</e>
          <e type="operand">25.6</e>
          <e type="operand">25.6</e>
          <e type="operand">25.6</e>
          <e type="operand">24.45</e>
          <e type="operand">23.9</e>
          <e type="operand">23.9</e>
          <e type="operand">22.8</e>
          <e type="operand">21.7</e>
          <e type="operand">22.25</e>
          <e type="operand">25</e>
          <e type="operand">23.9</e>
          <e type="operand">22.8</e>
          <e type="operand">23.35</e>
          <e type="operand">23.35</e>
          <e type="operand">24.45</e>
          <e type="operand">25.6</e>
          <e type="operand">37.69</e>
          <e type="operand">39.76</e>
          <e type="operand">39.07</e>
          <e type="operand">23.9</e>
          <e type="operand">22.25</e>
          <e type="operand">22.25</e>
          <e type="operand">23.9</e>
          <e type="operand">21.7</e>
          <e type="operand">19.5</e>
          <e type="operand">17.85</e>
          <e type="operand">21.15</e>
          <e type="operand">22.25</e>
          <e type="operand">20.05</e>
          <e type="operand">22.25</e>
          <e type="operand">22.8</e>
          <e type="operand">22.25</e>
          <e type="operand">18.95</e>
          <e type="operand">21.7</e>
          <e type="operand">18.4</e>
          <e type="operand">19.5</e>
          <e type="operand">22.25</e>
          <e type="operand">20.05</e>
          <e type="operand">20.6</e>
          <e type="operand">19.5</e>
          <e type="operand">18.4</e>
          <e type="operand">20.6</e>
          <e type="operand">22.25</e>
          <e type="operand">20.6</e>
          <e type="operand">18.95</e>
          <e type="operand">18.95</e>
          <e type="operand">20.6</e>
          <e type="operand">19.5</e>
          <e type="operand">18.4</e>
          <e type="operand">18.4</e>
          <e type="operand">19.5</e>
          <e type="operand">20.6</e>
          <e type="operand">18.4</e>
          <e type="operand">19.5</e>
          <e type="operand">21.7</e>
          <e type="operand">21.15</e>
          <e type="operand">17.85</e>
          <e type="operand">18.4</e>
          <e type="operand">18.95</e>
          <e type="operand">17.85</e>
          <e type="operand">18.4</e>
          <e type="operand">23</e>
          <e type="operand">9</e>
          <e type="function" args="209">mat</e>
        </result>
      </math>
    </region>
    <region left="540" top="1422" width="128" height="24" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">WL</e>
          <e type="function" args="1">length</e>
        </input>
        <result action="numeric">
          <e type="operand">1488</e>
        </result>
      </math>
    </region>
    <region left="540" top="1458" width="120" height="24" color="#000000" fontSize="9">
      <math>
        <input>
          <e type="operand">Q</e>
          <e type="function" args="1">length</e>
        </input>
        <result action="numeric">
          <e type="operand">1488</e>
        </result>
      </math>
    </region>
    <region left="522" top="1728" width="159" height="26" color="#000000" bgColor="#ffe8d0" fontSize="10">
      <math decimalPlaces="2">
        <input>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operand">t0</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">1.18</e>
          <e type="operand" style="unit">s</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
  </regions>
</worksheet>