﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="0.99.6824.41156"?>
<regions xmlns="http://smath.info/schemas/worksheet/1.0">
  <settings dpi="96">
    <identity>
      <id>d44d2e67-406f-4630-b64f-00bdbbbee76e</id>
      <revision>236</revision>
    </identity>
    <calculation>
      <precision>3</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <trailingZeros>false</trailingZeros>
      <significantDigitsMode>false</significantDigitsMode>
      <roundingMode>0</roundingMode>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="true" viewMode="0" printGrid="False" printAreas="True" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="1" orientation="Portrait" width="850" height="1100" />
      <margins left="59" right="31" top="39" bottom="47" />
      <header alignment="Center" color="#a9a9a9" />
      <footer alignment="Center" color="#a9a9a9"> &amp;[FILENAME] - &amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependencies>
      <assembly name="SMath Studio Desktop" version="0.99.6824.41156" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Mathcad File Access Functions" version="1.0.6825.38653" guid="02a1c2c5-590e-46bb-bcf6-c87856a8b14b" />
      <assembly name="Math Region" version="0.99.6824.41156" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="Custom Functions" version="1.1.6824.29972" guid="18dadffd-79a3-4cf9-aee1-d66deb0ea720" />
      <assembly name="SpecialFunctions" version="1.12.6824.41156" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="Writer Region" version="0.12.6826.36893" guid="5922d677-323f-4327-8c68-be902d8339ad" />
      <assembly name="XLSX Import/Export" version="1.1.6824.33002" guid="621b8a62-bd79-47fc-948b-d4c4ab3b8588" />
      <assembly name="Statistical Tools" version="1.0.6824.32561" guid="76f6e9f5-ac86-4ffb-9e4d-284c8daecaf9" />
    </dependencies>
  </settings>
  <region id="0" left="27" top="18" width="229" height="26" border="true" color="#000000" bgColor="#ffff00" fontSize="10">
    <math decimalPlaces="15">
      <input>
        <e type="operand">1</e>
        <e type="function" args="1">time</e>
      </input>
      <contract>
        <e type="operand" style="unit">yr</e>
      </contract>
      <result action="numeric">
        <e type="operand">417.693951481753</e>
      </result>
    </math>
  </region>
  <region id="1" left="279" top="18" width="99" height="31" border="true" color="#000000" bgColor="#ffff00" fontSize="10">
    <math decimalPlaces="2">
      <input>
        <e type="operand">t.0</e>
        <e type="operand">1</e>
        <e type="function" args="1">time</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="2" left="27" top="54" width="297" height="28" color="#000000" bgColor="#ffffff">
    <writer lang="eng"><![CDATA[<span style="font-family: 'Tw Cen MT Condensed Extra Bold'; font-size: 10pt; font-weight: normal; font-style: normal; color: Black; background-color: Yellow; text-align: left; line-height: 115%">
<div><span style="font-family: 'Arial Unicode MS'"><strong><span style="background-color: #CCFFFF">1. Import Water Level Data (from EXCEL file)</span></strong></span></div></span>]]></writer>
  </region>
  <region id="3" left="36" top="90" width="78" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">mths</e>
        <e type="operand">24</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="4" left="180" top="90" width="54" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">d</e>
        <e type="operand">31</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="5" left="306" top="90" width="54" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">a</e>
        <e type="operand">35</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="6" left="36" top="126" width="202" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">n</e>
        <e type="operand">a</e>
        <e type="operand">mths</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="bracket">(</e>
        <e type="operand">d</e>
        <e type="operator" args="2">*</e>
        <e type="operator" args="2">+</e>
        <e type="operator" args="2">:</e>
      </input>
      <result action="numeric">
        <e type="operand">748</e>
      </result>
    </math>
  </region>
  <region id="7" left="306" top="126" width="318" height="28" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">nn</e>
        <e type="operand" style="string">AX</e>
        <e type="operand">n</e>
        <e type="function" args="1">num2str</e>
        <e type="function" args="2">concat</e>
        <e type="operator" args="2">:</e>
      </input>
      <result action="numeric">
        <e type="operand" style="string">AX748</e>
      </result>
    </math>
  </region>
  <region id="8" left="27" top="171" width="577" height="24" color="#000000" bgColor="#ffffff" fontSize="9">
    <math decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>Directory of  Excel file to import</p>
      </description>
      <input>
        <e type="operand">MyDirectory</e>
        <e type="operand" style="string" />
        <e type="function" args="1">DocumentDirectory</e>
        <e type="operator" args="2">:</e>
      </input>
      <result action="numeric">
        <e type="operand" style="string">F:\0001. Training ID\1. Vlookup Delay2\</e>
      </result>
    </math>
  </region>
  <region id="9" left="27" top="225" width="357" height="24" color="#000000" bgColor="#ffffff" fontSize="9">
    <math optimize="2" decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>Name of Excel File</p>
      </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 id="10" left="27" top="279" width="302" height="28" color="#000000" bgColor="#ffffff" fontSize="9">
    <math optimize="2" decimalPlaces="6" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>Import Water Levels</p>
      </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">nn</e>
        <e type="function" args="4">importData.XLSX</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="11" left="414" top="279" width="329" height="28" color="#000000" bgColor="#ffffff" fontSize="9">
    <math optimize="2" decimalPlaces="6" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>Similarly, Import Rating Table (RT)</p>
      </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>
    </math>
  </region>
  <region id="12" left="27" top="351" width="420" height="183" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8" matrixOptions="0,0,9,9">
      <description active="true" position="Top" lang="eng">
        <p>WL imported as a Matrix to SMath(Only part shown)</p>
      </description>
      <input>
        <e type="operand">WL</e>
      </input>
      <result action="numeric">
        <e type="operand">0.85</e>
        <e type="operand">0.74</e>
        <e type="operand">0.74</e>
        <e type="operand">0.75</e>
        <e type="operand">0.73</e>
        <e type="operand">0.72</e>
        <e type="operand">0.72</e>
        <e type="operand">0.72</e>
        <e type="operand">0.73</e>
        <e type="operand">0.72</e>
        <e type="operand">0.71</e>
        <e type="operand">0.69</e>
        <e type="operand">0.7</e>
        <e type="operand">0.71</e>
        <e type="operand">0.72</e>
        <e type="operand">0.7</e>
        <e type="operand">0.7</e>
        <e type="operand">0.7</e>
        <e type="operand">0.67</e>
        <e type="operand">0.71</e>
        <e type="operand">0.7</e>
        <e type="operand">0.7</e>
        <e type="operand">0.68</e>
        <e type="operand">0.68</e>
        <e type="operand">0.69</e>
        <e type="operand">0.69</e>
        <e type="operand">0.69</e>
        <e type="operand">0.67</e>
        <e type="operand">0.67</e>
        <e type="operand">0.67</e>
        <e type="operand">0.68</e>
        <e type="operand">0.7</e>
        <e type="operand">0.68</e>
        <e type="operand">0.67</e>
        <e type="operand">0.68</e>
        <e type="operand">0.67</e>
        <e type="operand">0.67</e>
        <e type="operand">0.67</e>
        <e type="operand">0.66</e>
        <e type="operand">0.68</e>
        <e type="operand">0.68</e>
        <e type="operand">0.67</e>
        <e type="operand">0.67</e>
        <e type="operand">0.66</e>
        <e type="operand">0.65</e>
        <e type="operand">0.86</e>
        <e type="operand">0.9</e>
        <e type="operand">0.9</e>
        <e type="operand">0.89</e>
        <e type="operand">0.93</e>
        <e type="operand">0.9</e>
        <e type="operand">0.9</e>
        <e type="operand">1.11</e>
        <e type="operand">1.13</e>
        <e type="operand">0.89</e>
        <e type="operand">0.9</e>
        <e type="operand">0.95</e>
        <e type="operand">0.98</e>
        <e type="operand">0.9</e>
        <e type="operand">0.9</e>
        <e type="operand">0.87</e>
        <e type="operand">0.87</e>
        <e type="operand">0.89</e>
        <e type="operand">0.64</e>
        <e type="operand">0.63</e>
        <e type="operand">0.63</e>
        <e type="operand">0.65</e>
        <e type="operand">0.64</e>
        <e type="operand">0.63</e>
        <e type="operand">0.62</e>
        <e type="operand">0.63</e>
        <e type="operand">0.62</e>
        <e type="operand">0.85</e>
        <e type="operand">0.92</e>
        <e type="operand">0.9</e>
        <e type="operand">0.9</e>
        <e type="operand">0.91</e>
        <e type="operand">0.91</e>
        <e type="operand">0.9</e>
        <e type="operand">0.93</e>
        <e type="operand">0.94</e>
        <e type="operand">9</e>
        <e type="operand">9</e>
        <e type="function" args="83">mat</e>
      </result>
    </math>
  </region>
  <region id="13" left="504" top="414" width="159" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">WL</e>
        <e type="function" args="1">length</e>
      </input>
      <result action="numeric">
        <e type="operand">35712</e>
      </result>
    </math>
  </region>
  <region id="14" left="504" top="441" width="119" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" 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 id="15" left="504" top="468" width="127" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">WL</e>
        <e type="function" args="1">rows</e>
      </input>
      <result action="numeric">
        <e type="operand">744</e>
      </result>
    </math>
  </region>
  <region id="16" left="36" top="585" width="336" height="63" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="8" exponentialThreshold="8">
      <input>
        <e type="operand">WL</e>
        <e type="operand">1</e>
        <e type="operand">3</e>
        <e type="function" args="2">range</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="2">range</e>
        <e type="function" args="3">el</e>
      </input>
      <result action="numeric">
        <e type="operand">0.85000002</e>
        <e type="operand">0.74000001</e>
        <e type="operand">0.72000003</e>
        <e type="operand">0.70999998</e>
        <e type="operand">0.67000002</e>
        <e type="operand">0.70999998</e>
        <e type="operand">3</e>
        <e type="operand">2</e>
        <e type="function" args="8">mat</e>
      </result>
    </math>
  </region>
  <region id="17" left="36" top="675" width="225" height="32" border="true" color="#000000" bgColor="#c9ff93" fontSize="10">
    <math optimize="2" decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">WL.col</e>
        <e type="operand">WL</e>
        <e type="function" args="1">mat2sys</e>
        <e type="function" args="1">sys2mat</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="18" left="315" top="675" width="162" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">WL.col</e>
        <e type="function" args="1">rows</e>
      </input>
      <result action="numeric">
        <e type="operand">35712</e>
      </result>
    </math>
  </region>
  <region id="19" left="522" top="675" width="130" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">WL.col</e>
        <e type="function" args="1">cols</e>
      </input>
      <result action="numeric">
        <e type="operand">1</e>
      </result>
    </math>
  </region>
  <region id="20" left="27" top="729" width="141" height="237" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8" matrixOptions="0,0,2,12">
      <description active="true" position="Top" lang="eng">
        <p>Rating Table</p>
      </description>
      <input>
        <e type="operand">RT</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">0.58</e>
        <e type="operand">6.46</e>
        <e type="operand">0.59</e>
        <e type="operand">6.73</e>
        <e type="operand">0.6</e>
        <e type="operand">7</e>
        <e type="operand">0.61</e>
        <e type="operand">7.2</e>
        <e type="operand">12</e>
        <e type="operand">2</e>
        <e type="function" args="26">mat</e>
      </result>
    </math>
  </region>
  <region id="21" left="405" top="729" width="122" height="237" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8" matrixOptions="0,0,1,12">
      <description active="true" position="Top" lang="eng">
        <p>Water level (vector)</p>
      </description>
      <input>
        <e type="operand">WL.col</e>
      </input>
      <result action="numeric">
        <e type="operand">0.85</e>
        <e type="operand">0.74</e>
        <e type="operand">0.74</e>
        <e type="operand">0.75</e>
        <e type="operand">0.73</e>
        <e type="operand">0.72</e>
        <e type="operand">0.72</e>
        <e type="operand">0.72</e>
        <e type="operand">0.73</e>
        <e type="operand">0.75</e>
        <e type="operand">0.73</e>
        <e type="operand">1.04</e>
        <e type="operand">12</e>
        <e type="operand">1</e>
        <e type="function" args="14">mat</e>
      </result>
    </math>
  </region>
  <region id="22" left="27" top="1017" width="292" height="27" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">RT</e>
        <e type="operand">0.85</e>
        <e type="operand">1</e>
        <e type="function" args="3">findrows</e>
      </input>
      <result action="numeric">
        <e type="operand">0.85</e>
        <e type="operand">16.75</e>
        <e type="operand">1</e>
        <e type="operand">2</e>
        <e type="function" args="4">mat</e>
      </result>
    </math>
  </region>
  <region id="23" left="18" top="1062" width="731" height="168" border="true" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="2" decimalPlaces="4" exponentialThreshold="8">
      <description active="false" position="Top" lang="eng">
        <p />
      </description>
      <input>
        <e type="operand">wl</e>
        <e type="operand">rt</e>
        <e type="function" args="2">Q</e>
        <e type="operand" style="string">Roundoff water level (wl) to 2 decimals, as Rating Table (rt) has 2 decimals</e>
        <e type="operand" style="string">Vectorize operator is much faster than element-wise operation in the loop</e>
        <e type="operand">wll</e>
        <e type="operand">wl</e>
        <e type="operand">2</e>
        <e type="function" args="2">round</e>
        <e type="function" args="1">vectorize</e>
        <e type="operator" args="2">:</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" style="string">'findrows()' suggested by Andey Ivashov to speed up execution</e>
        <e type="operand">q</e>
        <e type="operand">j</e>
        <e type="function" args="2">el</e>
        <e type="operand">rt</e>
        <e type="operand">wll</e>
        <e type="operand">j</e>
        <e type="function" args="2">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">q</e>
        <e type="operand">5</e>
        <e type="operand">1</e>
        <e type="function" args="7">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="24" left="36" top="1269" width="225" height="381" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8" matrixOptions="0,0,1,20">
      <input>
        <e type="operand">Q.hr</e>
        <e type="operand">WL.col</e>
        <e type="operand">RT</e>
        <e type="function" args="2">Q</e>
        <e type="operator" args="2">:</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">11.5</e>
        <e type="operand">10.5</e>
        <e type="operand">27.4</e>
        <e type="operand">41.83</e>
        <e type="operand">38.38</e>
        <e type="operand">33.4</e>
        <e type="operand">33.4</e>
        <e type="operand">34.6</e>
        <e type="operand">38.38</e>
        <e type="operand">36.4</e>
        <e type="operand">38.38</e>
        <e type="operand">20</e>
        <e type="operand">1</e>
        <e type="function" args="22">mat</e>
      </result>
    </math>
  </region>
  <region id="25" left="369" top="1458" width="131" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">Q.hr</e>
        <e type="function" args="1">max</e>
      </input>
      <result action="numeric">
        <e type="operand">74.1</e>
      </result>
    </math>
  </region>
  <region id="26" left="369" top="1494" width="147" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="2" exponentialThreshold="2">
      <input>
        <e type="operand">Q.hr</e>
        <e type="function" args="1">Mean</e>
      </input>
      <result action="numeric">
        <e type="operand">28.27</e>
      </result>
    </math>
  </region>
  <region id="27" left="369" top="1530" width="163" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">Q.hr</e>
        <e type="function" args="1">length</e>
      </input>
      <result action="numeric">
        <e type="operand">35712</e>
      </result>
    </math>
  </region>
  <region id="28" left="45" top="1701" width="219" height="31" border="true" color="#000000" bgColor="#ffff00" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">T1</e>
        <e type="operand">1</e>
        <e type="function" args="1">time</e>
        <e type="operand">t.0</e>
        <e type="operator" args="2">-</e>
        <e type="operator" args="2">:</e>
      </input>
      <result action="numeric">
        <e type="operand">19.774</e>
        <e type="operand" style="unit">s</e>
        <e type="operator" args="2">*</e>
      </result>
    </math>
  </region>
  <region id="29" left="45" top="1764" width="229" height="26" border="true" color="#000000" bgColor="#80ff00" fontSize="10">
    <math decimalPlaces="15">
      <input>
        <e type="operand">1</e>
        <e type="function" args="1">time</e>
      </input>
      <contract>
        <e type="operand" style="unit">yr</e>
      </contract>
      <result action="numeric">
        <e type="operand">417.693952108366</e>
      </result>
    </math>
  </region>
  <region id="30" left="315" top="1764" width="99" height="31" border="true" color="#000000" bgColor="#80ff00" fontSize="10">
    <math decimalPlaces="2">
      <input>
        <e type="operand">t.0</e>
        <e type="operand">1</e>
        <e type="function" args="1">time</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="31" left="45" top="1836" width="459" height="140" border="true" color="#000000" bgColor="#c8fa96" fontSize="10">
    <math optimize="2" decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>Program to find daily OR p_day avg flow. There are 48 readings for a day)</p>
      </description>
      <input>
        <e type="operand">A</e>
        <e type="operand">p</e>
        <e type="function" args="2">Find_Q</e>
        <e type="operand" style="string">Find daily avg. flow from 'Q.hr' vector</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">A</e>
        <e type="function" args="1">rows</e>
        <e type="operand">p</e>
        <e type="operator" args="2">/</e>
        <e type="function" args="1">trunc</e>
        <e type="function" args="2">range</e>
        <e type="operand" style="string">B = vector of 'p' elements</e>
        <e type="operand">B</e>
        <e type="operand">r</e>
        <e type="function" args="2">el</e>
        <e type="operand">A</e>
        <e type="operand">1</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="bracket">(</e>
        <e type="operand">p</e>
        <e type="operator" args="2">*</e>
        <e type="operator" args="2">+</e>
        <e type="bracket">(</e>
        <e type="operand">r</e>
        <e type="operand">p</e>
        <e type="operator" args="2">*</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">Mean</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">B</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="32" left="36" top="2043" width="354" height="28" color="#000000" bgColor="#ffffff">
    <writer lang="eng"><![CDATA[<span style="font-family: 'Tw Cen MT Condensed Extra Bold'; font-size: 10pt; font-weight: normal; font-style: normal; color: Black; background-color: Yellow; text-align: left; line-height: 115%">
<div><span style="font-family: 'Arial Unicode MS'"><strong><span style="background-color: Transparent">1. Find daily average flows from given half hourly data</span></strong></span></div></span>]]></writer>
  </region>
  <region id="33" left="423" top="2043" width="295" height="28" color="#000000" bgColor="#ffffff">
    <writer lang="eng"><![CDATA[<span style="font-family: 'Tw Cen MT Condensed Extra Bold'; font-size: 10pt; font-weight: normal; font-style: normal; color: Black; background-color: Yellow; text-align: left; line-height: 115%">
<div><span style="font-family: 'Arial Unicode MS'"><strong><span style="background-color: Transparent">2. Find &#39;p&#39; day average flows from daily flows</span></strong></span></div></span>]]></writer>
  </region>
  <region id="34" left="36" top="2079" width="187" height="26" border="true" color="#000000" bgColor="#ffff00" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>There are 48 readings for a day </p>
      </description>
      <input>
        <e type="operand">n_read</e>
        <e type="operand">WL</e>
        <e type="function" args="1">cols</e>
        <e type="operator" args="2">:</e>
      </input>
      <result action="numeric">
        <e type="operand">48</e>
      </result>
    </math>
  </region>
  <region id="35" left="423" top="2079" width="78" height="24" border="true" color="#000000" bgColor="#ffff00" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>Period for analysis </p>
      </description>
      <input>
        <e type="operand">p_day</e>
        <e type="operand">7</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="36" left="36" top="2160" width="219" height="32" border="true" color="#000000" bgColor="#e9e9e9" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>Daily avg. flow</p>
      </description>
      <input>
        <e type="operand">Q.daily</e>
        <e type="operand">Q.hr</e>
        <e type="operand">n_read</e>
        <e type="function" args="2">Find_Q</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="37" left="423" top="2169" width="231" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>p_day avg. flow</p>
      </description>
      <input>
        <e type="operand">Q.p_day</e>
        <e type="operand">Q.daily</e>
        <e type="operand">p_day</e>
        <e type="function" args="2">Find_Q</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="38" left="36" top="2250" width="151" height="435" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>Daily avg. flow.</p>
      </description>
      <input>
        <e type="operand">Q.daily</e>
      </input>
      <result action="numeric">
        <e type="operand">24.5638</e>
        <e type="operand">26.0917</e>
        <e type="operand">25.376</e>
        <e type="operand">27.5812</e>
        <e type="operand">23.939</e>
        <e type="operand">28.3288</e>
        <e type="operand">29.2402</e>
        <e type="operand">24.196</e>
        <e type="operand">20.7865</e>
        <e type="operand">31.5275</e>
        <e type="operand">25.7379</e>
        <e type="operand">32.0979</e>
        <e type="operand">32.2281</e>
        <e type="operand">27.1644</e>
        <e type="operand">23.3781</e>
        <e type="operand">31.8506</e>
        <e type="operand">26.3692</e>
        <e type="operand">34.4531</e>
        <e type="operand">32.4712</e>
        <e type="operand">33.5802</e>
        <e type="operand">26.806</e>
        <e type="operand">26.4973</e>
        <e type="operand">29.6108</e>
        <e type="operand">23</e>
        <e type="operand">1</e>
        <e type="function" args="25">mat</e>
      </result>
    </math>
  </region>
  <region id="39" left="423" top="2250" width="151" height="435" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <description active="true" position="Top" lang="eng">
        <p>p_day avg. flow</p>
      </description>
      <input>
        <e type="operand">Q.p_day</e>
      </input>
      <result action="numeric">
        <e type="operand">26.4458</e>
        <e type="operand">27.6769</e>
        <e type="operand">29.8441</e>
        <e type="operand">28.7244</e>
        <e type="operand">27.3252</e>
        <e type="operand">26.2508</e>
        <e type="operand">29.6488</e>
        <e type="operand">29.51</e>
        <e type="operand">28.5122</e>
        <e type="operand">26.3933</e>
        <e type="operand">27.5601</e>
        <e type="operand">30.2897</e>
        <e type="operand">29.446</e>
        <e type="operand">26.2381</e>
        <e type="operand">27.4164</e>
        <e type="operand">29.7021</e>
        <e type="operand">28.864</e>
        <e type="operand">28.2469</e>
        <e type="operand">25.6354</e>
        <e type="operand">29.1407</e>
        <e type="operand">29.9697</e>
        <e type="operand">29.7065</e>
        <e type="operand">25.7945</e>
        <e type="operand">23</e>
        <e type="operand">1</e>
        <e type="function" args="25">mat</e>
      </result>
    </math>
  </region>
  <region id="40" left="198" top="2466" width="151" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">Q.daily</e>
        <e type="function" args="1">rows</e>
      </input>
      <result action="numeric">
        <e type="operand">744</e>
      </result>
    </math>
  </region>
  <region id="41" left="585" top="2466" width="151" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">Q.p_day</e>
        <e type="function" args="1">rows</e>
      </input>
      <result action="numeric">
        <e type="operand">106</e>
      </result>
    </math>
  </region>
  <region id="42" left="27" top="2772" width="491" height="103" border="true" color="#000000" bgColor="#c8fa96" fontSize="10">
    <math optimize="2" decimalPlaces="4">
      <description active="true" position="Top" lang="eng">
        <p>Program to find p_day moving avg.</p>
      </description>
      <input>
        <e type="operand">A</e>
        <e type="operand">p</e>
        <e type="function" args="2">Find_Q_MA</e>
        <e type="operand" style="string">Find 'p_day' moving avg. from daily Q.hr</e>
        <e type="operand">r</e>
        <e type="operand">1</e>
        <e type="operand">A</e>
        <e type="function" args="1">rows</e>
        <e type="operand">p</e>
        <e type="operator" args="2">-</e>
        <e type="operand">1</e>
        <e type="operator" args="2">+</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="operand">B</e>
        <e type="operand">r</e>
        <e type="function" args="2">el</e>
        <e type="operand">A</e>
        <e type="operand">r</e>
        <e type="operand">r</e>
        <e type="operand">p</e>
        <e type="operator" args="2">+</e>
        <e type="operand">1</e>
        <e type="operator" args="2">-</e>
        <e type="bracket">(</e>
        <e type="function" args="2">range</e>
        <e type="function" args="2">el</e>
        <e type="function" args="1">Mean</e>
        <e type="operator" args="2">:</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">B</e>
        <e type="operand">3</e>
        <e type="operand">1</e>
        <e type="function" args="5">line</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="43" left="36" top="3060" width="373" height="435" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4" exponentialThreshold="8">
      <input>
        <e type="operand">Q.p_day_MA</e>
        <e type="operand">Q.daily</e>
        <e type="operand">p_day</e>
        <e type="function" args="2">Find_Q_MA</e>
        <e type="operator" args="2">:</e>
      </input>
      <result action="numeric">
        <e type="operand">26.4458</e>
        <e type="operand">26.3933</e>
        <e type="operand">25.6354</e>
        <e type="operand">26.5142</e>
        <e type="operand">26.2508</e>
        <e type="operand">27.4164</e>
        <e type="operand">27.9735</e>
        <e type="operand">27.6769</e>
        <e type="operand">27.5601</e>
        <e type="operand">29.1407</e>
        <e type="operand">28.4038</e>
        <e type="operand">29.6488</e>
        <e type="operand">29.7021</e>
        <e type="operand">29.8953</e>
        <e type="operand">29.8441</e>
        <e type="operand">30.2897</e>
        <e type="operand">29.9697</e>
        <e type="operand">30.7111</e>
        <e type="operand">29.51</e>
        <e type="operand">28.864</e>
        <e type="operand">28.409</e>
        <e type="operand">28.7244</e>
        <e type="operand">29.446</e>
        <e type="operand">23</e>
        <e type="operand">1</e>
        <e type="function" args="25">mat</e>
      </result>
    </math>
  </region>
  <region id="44" left="504" top="3159" width="88" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">p_day</e>
      </input>
      <result action="numeric">
        <e type="operand">7</e>
      </result>
    </math>
  </region>
  <region id="45" left="504" top="3204" width="170" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4">
      <input>
        <e type="operand">Q.p_day_MA</e>
        <e type="function" args="1">rows</e>
      </input>
      <result action="numeric">
        <e type="operand">738</e>
      </result>
    </math>
  </region>
  <region id="46" left="504" top="3258" width="151" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4">
      <input>
        <e type="operand">Q.daily</e>
        <e type="function" args="1">rows</e>
      </input>
      <result action="numeric">
        <e type="operand">744</e>
      </result>
    </math>
  </region>
  <region id="47" left="504" top="3312" width="231" height="32" color="#000000" bgColor="#ffffff" fontSize="10">
    <math decimalPlaces="4">
      <input>
        <e type="operand">Q.daily</e>
        <e type="function" args="1">rows</e>
        <e type="operand">p_day</e>
        <e type="operator" args="2">-</e>
        <e type="operand">1</e>
        <e type="operator" args="2">+</e>
      </input>
      <result action="numeric">
        <e type="operand">738</e>
      </result>
    </math>
  </region>
</regions>