<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema version="5.0"
            xmlns:nwis="http://water.usgs.gov/XML/NWIS/5.0"  
            xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            elementFormDefault="qualified">

  <xsd:include schemaLocation="MidSectionDischargeMeasurement.xsd"/>
  <xsd:include schemaLocation="VolumetricDischargeMeasurement.xsd"/>
  <xsd:include schemaLocation="FlumeDischargeMeasurement.xsd"/>
  <xsd:include schemaLocation="AdcpDischargeMeasurement.xsd"/>
  <xsd:include schemaLocation="../shared/ReferenceListCodeType.xsd"/>
  <xsd:include schemaLocation="../shared/IEEE754UncertaintyFloatValue.xsd"/>
  <xsd:include schemaLocation="../shared/IEEE754FloatValue.xsd"/>
  <xsd:element name="Channel">
    <xsd:annotation>
      <xsd:documentation>
        <Definition>A stream channel where a discharge measurement is performed.</Definition>
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="ChannelNumber" type="xsd:integer">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The sequence number of a discharge measurement channel.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ChannelName" type="xsd:string"  minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The name describing the channel.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DischargeMeasure" type="IEEE754UncertaintyFloatValueType">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The stream discharge of the discharge measurement in this channel. The default units are in cubic feet per second.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DeploymentMethodCode" type="ReferenceListCodeType">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The code identifying the method of deploying the velocity sensor during a discharge measurement.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="MeasurementMethodCode" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The code identifying the type of method of discharge measurement performed in this channel.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="VelocityMethodCode" type="ReferenceListCodeType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The code identifying the method of determining stream velocity (Current Meter, ADV, etc.)</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ChannelMaterialCode" type="ReferenceListCodeType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>A code indicating the description of the stream channel material (sand, gravel, silt, etc.).</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ChannelStabilityCode" type="ReferenceListCodeType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>A code indicating the description of the stream channel stability(firm, soft, etc.).</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ChannelEvennessCode" type="ReferenceListCodeType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>A code indicating the description of the stream channel evenness (even, uneven, etc.).</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="HorizontalFlowCode" type="ReferenceListCodeType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The code indicating the distribution of the horizontal flow of the stream during the measurement.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="VerticalVelocityDistributionCode" type="ReferenceListCodeType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The code identifying the vertically flow distribution within the cross-section. I.e. whether the vertical distribution of flow within the cross-section is mostly turbulent or smooth.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="VelocityDistributionCode" type="ReferenceListCodeType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>A code describing the velocity fluctuations in time (pulsations) in the stream channel</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="SectionLocationCode" type="ReferenceListCodeType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The code indicating the relative location of the discharge measurement channel to the standard section.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="SectionDistanceMeasure" type="IEEE754FloatValueType" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The distance from the location of the discharge measurement channel cross-section measured relative to the standard section. The default units are feet.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:choice>
          <xsd:element ref="MidSectionDischargeMeasurement" minOccurs="0"/>
          <xsd:element ref="VolumetricDischargeMeasurement" minOccurs="0"/>
          <xsd:element ref="FlumeDischargeMeasurement" minOccurs="0"/>
          <xsd:element ref="AdcpDischargeMeasurement" minOccurs="0"/>
        </xsd:choice>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
