<?xml version="1.0"?>
<cd:ProductDefinition id="SCI_NLC_1P_v0" format="binary" last-modified="2008-07-01" xmlns:cd="http://www.stcorp.nl/coda/definition/2008/07">
  <cd:Record format="binary">
    <cd:Field name="mph">
      <cd:NamedType id="MPH"/>
    </cd:Field>
    <cd:Field name="sph">
      <cd:NamedType id="SCI_NL_NLC_1P_SPH_v0"/>
    </cd:Field>
    <cd:Field name="dsd">
      <cd:Array format="ascii">
        <cd:Dimension><![CDATA[$num_dsd]]></cd:Dimension>
        <cd:NamedType id="DSD"/>
      </cd:Array>
    </cd:Field>
    <cd:Field name="summary_quality">
      <cd:Array>
        <cd:Description>Summary Quality ADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[0]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_ADSR_summary_quality"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[0] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[0]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="geolocation">
      <cd:Array>
        <cd:Description>Geolocation of the States ADSR</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[1]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_ADSR_loc"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[1] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[1]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="instrument_params">
      <cd:Array>
        <cd:Description>Static Instrument Parameters</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[2]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_stat_inst"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[2] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[2]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="leakage_constant">
      <cd:Array>
        <cd:Description>Leakage Current Parameter (constant fraction) GADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[3]]]></cd:Dimension>
        <cd:NamedType id="SCI_LK1_AX_GADS_const"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[3] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[3]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="leakage_variable">
      <cd:Array>
        <cd:Description>Leakage Current Parameter (variable fraction) GADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[4]]]></cd:Dimension>
        <cd:NamedType id="SCI_LK1_AX_GADS_var"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[4] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[4]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="ppg_etalon">
      <cd:Array>
        <cd:Description>PPG/Etalon Parameters GADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[5]]]></cd:Dimension>
        <cd:NamedType id="SCI_PE1_AX_GADS_ppg"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[5] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[5]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="spectral_base">
      <cd:Array>
        <cd:Description>Precise Basis of the Spectral Calibration Parameters</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[6]]]></cd:Dimension>
        <cd:NamedType id="SCI_SP1_AX_GADS_pre_basis_spec"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[6] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[6]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="spectral_calibration">
      <cd:Array>
        <cd:Description>Spectral Calibration Parameters GADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[7]]]></cd:Dimension>
        <cd:NamedType id="SCI_SP1_AX_GADS_spec"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[7] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[7]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="sun_reference">
      <cd:Array>
        <cd:Description>Sun Reference Spectrum GADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[8]]]></cd:Dimension>
        <cd:NamedType id="SCI_SU1_AX_GADS_sun"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[8] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[8]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="pol_sens_nadir">
      <cd:Array>
        <cd:Description>Polarization Sensitivity Parameters Nadir GADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[9]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_polar_nadir"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[9] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[9]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="pol_sens_limb">
      <cd:Array>
        <cd:Description>Polarization Sensitivity Parameters Limb without Neutral Density Filter</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[10]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_polar_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[10] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[10]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="pol_sens_occ">
      <cd:Array>
        <cd:Description>Polarization Sensitivity Parameters Occultation without Neutral Density Filter</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[11]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_polar_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[11] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[11]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="rad_sens_nadir">
      <cd:Array>
        <cd:Description>Radiance Sensitivity Parameters Nadir</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[12]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_rad_nadir"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[12] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[12]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="rad_sens_limb">
      <cd:Array>
        <cd:Description>Radiance Sensitivity Parameters Limb without Neutral Density Filter</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[13]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_rad_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[13] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[13]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="rad_sens_occ">
      <cd:Array>
        <cd:Description>Radiance Sensitivity Parameters Occultation without Neutral Density Filter</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[14]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_rad_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[14] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[14]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="errors_on_key_data">
      <cd:Array>
        <cd:Description>Errors on Key Data GADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[15]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_err"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[15] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[15]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="slit_function">
      <cd:Array>
        <cd:Description>Slit Function Parameters</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[16]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_slit_f"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[16] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[16]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="small_ap_slit_function">
      <cd:Array>
        <cd:Description>Small Aperture Slit Function Parameters</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[17]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_GADS_small_ap_slit_f"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[17] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[17]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="states">
      <cd:Array>
        <cd:Description>States of the Product ADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[18]]]></cd:Dimension>
        <cd:NamedType id="SCI_NL__1P_ADSR_states"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[18] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[18]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="cal_options">
      <cd:Array>
        <cd:Description>Calibration Options GADS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[19]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_GADS_calopts"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[19] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[19]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="nadir_pmd">
      <cd:Array>
        <cd:Description>PMD MDS for Nadir measurements</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[20]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_pmd_nadir"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[20] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[20]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="limb_pmd">
      <cd:Array>
        <cd:Description>PMD MDS for Limb measurements</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[21]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_pmd_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[21] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[21]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="occultation_pmd">
      <cd:Array>
        <cd:Description>PMD MDS for Occultation measurements</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[22]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_pmd_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[22] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[22]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="nadir_frac_pol">
      <cd:Array>
        <cd:Description>Fractional Polarisation MDS for Nadir measurements</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[23]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_fpol_nadir"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[23] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[23]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="limb_frac_pol">
      <cd:Array>
        <cd:Description>Fractional Polarisation MDS for Limb measurements</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[24]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_fpol_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[24] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[24]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="occultation_frac_pol">
      <cd:Array>
        <cd:Description>Fractional Polarisation MDS for Occultation measurements</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[25]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_fpol_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[25] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[25]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="nadir">
      <cd:Array>
        <cd:Description>Nadir MDS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[26]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_nadir"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[26] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[26]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="limb">
      <cd:Array>
        <cd:Description>Limb MDS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[27]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[27] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[27]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="occultation">
      <cd:Array>
        <cd:Description>Occultation MDS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[28]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_limb_occultation"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[28] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[28]]]></cd:BitOffset>
    </cd:Field>
    <cd:Field name="monitoring">
      <cd:Array>
        <cd:Description>Monitoring MDS</cd:Description>
        <cd:Dimension><![CDATA[$num_dsr[29]]]></cd:Dimension>
        <cd:NamedType id="SCI_NLC_1P_MDSR_mon"/>
      </cd:Array>
      <cd:Available><![CDATA[$ds_available[29] != 0]]></cd:Available>
      <cd:BitOffset><![CDATA[$ds_offset[29]]]></cd:BitOffset>
    </cd:Field>
  </cd:Record>
  <cd:ProductVariable name="num_dsd">
    <cd:Init><![CDATA[$num_dsd = int(/mph/num_dsd)]]></cd:Init>
  </cd:ProductVariable>
  <cd:ProductVariable name="num_ds">
    <cd:Init><![CDATA[$num_ds = 30]]></cd:Init>
  </cd:ProductVariable>
  <cd:ProductVariable name="ds_to_dsd_index">
    <cd:Dimension><![CDATA[$num_ds]]></cd:Dimension>
    <cd:Init><![CDATA[$ds_to_dsd_index[0] = index(/dsd, str(./ds_name) == "SUMMARY_QUALITY             "); $ds_to_dsd_index[1] = index(/dsd, str(./ds_name) == "GEOLOCATION                 "); $ds_to_dsd_index[2] = index(/dsd, str(./ds_name) == "INSTRUMENT_PARAMS           "); $ds_to_dsd_index[3] = index(/dsd, str(./ds_name) == "LEAKAGE_CONSTANT            "); $ds_to_dsd_index[4] = index(/dsd, str(./ds_name) == "LEAKAGE_VARIABLE            "); $ds_to_dsd_index[5] = index(/dsd, str(./ds_name) == "PPG_ETALON                  "); $ds_to_dsd_index[6] = index(/dsd, str(./ds_name) == "SPECTRAL_BASE               "); $ds_to_dsd_index[7] = index(/dsd, str(./ds_name) == "SPECTRAL_CALIBRATION        "); $ds_to_dsd_index[8] = index(/dsd, str(./ds_name) == "SUN_REFERENCE               "); $ds_to_dsd_index[9] = index(/dsd, str(./ds_name) == "POL_SENS_NADIR              "); $ds_to_dsd_index[10] = index(/dsd, str(./ds_name) == "POL_SENS_LIMB               "); $ds_to_dsd_index[11] = index(/dsd, str(./ds_name) == "POL_SENS_OCC                "); $ds_to_dsd_index[12] = index(/dsd, str(./ds_name) == "RAD_SENS_NADIR              "); $ds_to_dsd_index[13] = index(/dsd, str(./ds_name) == "RAD_SENS_LIMB               "); $ds_to_dsd_index[14] = index(/dsd, str(./ds_name) == "RAD_SENS_OCC                "); $ds_to_dsd_index[15] = index(/dsd, str(./ds_name) == "ERRORS_ON_KEY_DATA          "); $ds_to_dsd_index[16] = index(/dsd, str(./ds_name) == "SLIT_FUNCTION               "); $ds_to_dsd_index[17] = index(/dsd, str(./ds_name) == "SMALL_AP_SLIT_FUNCTION      "); $ds_to_dsd_index[18] = index(/dsd, str(./ds_name) == "STATES                      "); $ds_to_dsd_index[19] = index(/dsd, str(./ds_name) == "CAL_OPTIONS                 "); $ds_to_dsd_index[20] = index(/dsd, str(./ds_name) == "NADIR_PMD                   "); $ds_to_dsd_index[21] = index(/dsd, str(./ds_name) == "LIMB_PMD                    "); $ds_to_dsd_index[22] = index(/dsd, str(./ds_name) == "OCCULTATION_PMD             "); $ds_to_dsd_index[23] = index(/dsd, str(./ds_name) == "NADIR_FRAC_POL              "); $ds_to_dsd_index[24] = index(/dsd, str(./ds_name) == "LIMB_FRAC_POL               "); $ds_to_dsd_index[25] = index(/dsd, str(./ds_name) == "OCCULTATION_FRAC_POL        "); $ds_to_dsd_index[26] = index(/dsd, str(./ds_name) == "NADIR                       "); $ds_to_dsd_index[27] = index(/dsd, str(./ds_name) == "LIMB                        "); $ds_to_dsd_index[28] = index(/dsd, str(./ds_name) == "OCCULTATION                 "); $ds_to_dsd_index[29] = index(/dsd, str(./ds_name) == "MONITORING                  ")]]></cd:Init>
  </cd:ProductVariable>
  <cd:ProductVariable name="ds_available">
    <cd:Dimension><![CDATA[$num_ds]]></cd:Dimension>
    <cd:Init><![CDATA[for i = 0 to $num_ds - 1 do $ds_available[i] = if($ds_to_dsd_index[i] != -1 && int(/dsd[$ds_to_dsd_index[i]]/ds_size) != 0, 1, 0)]]></cd:Init>
  </cd:ProductVariable>
  <cd:ProductVariable name="ds_offset">
    <cd:Dimension><![CDATA[$num_ds]]></cd:Dimension>
    <cd:Init><![CDATA[for i = 0 to $num_ds - 1 do $ds_offset[i] = 8 * int(/dsd[$ds_to_dsd_index[i]]/ds_offset)]]></cd:Init>
  </cd:ProductVariable>
  <cd:ProductVariable name="num_dsr">
    <cd:Dimension><![CDATA[$num_ds]]></cd:Dimension>
    <cd:Init><![CDATA[for i = 0 to $num_ds - 1 do $num_dsr[i] = int(/dsd[$ds_to_dsd_index[i]]/num_dsr)]]></cd:Init>
  </cd:ProductVariable>
</cd:ProductDefinition>
