configRTOutputNetCDFL0Slocum

PURPOSE ^

CONFIGRTOUTPUTNETCDFL0 Configure NetCDF output for raw Slocum glider deployment data in real time.

SYNOPSIS ^

function ncl0_info = configRTOutputNetCDFL0Slocum()

DESCRIPTION ^

CONFIGRTOUTPUTNETCDFL0  Configure NetCDF output for raw Slocum glider deployment data in real time.

  Syntax:
    NCL0_INFO = CONFIGRTOUTPUTNETCDFL0SLOCUM()

  Description:
    NCL0_INFO = CONFIGRTOUTPUTNETCDFL0SLOCUM() should return a struct
    describing the structure of the NetCDF file for raw Slocum glider
    deployment data in real time (see the note about the file generation).
    The returned struct should have the following fields:
      DIMENSIONS: struct array with fields 'NAME' and 'LENGTH' defining the
        dimensions for variables in the file.
        A variable may have dimensions not listed here or with their length
        left undefined (empty field value), and they are inferred from the
        data during the generation of the file. However, it is useful to preset
        the length of a dimension for record or string size dimensions.
      ATTRIBUTES: struct array with fields 'NAME' and 'VALUE' defining global
        attributes of the file.
        Global attributes might be overwritten by deployment fields
        with the same name.
      VARIABLES: struct defining variable metadata. Field names are variable
        names and field values are structs as needed by function SAVENC.
        It should have the following fields:
          DIMENSIONS: string cell array with the names of the dimensions
            of the variable.
          ATTRIBUTES: struct array with fields 'NAME' and 'VALUE' defining
            the attributes of the variable.
        More variables than the ones present in one specific deployment may be
        described here. Only metadata corresponding variables in the deployment
        data will be used.

  Notes:
    The NetCDF file will be created by the function GENERATEOUTPUTNETCDF with
    the structure provided here and the metadata and data returned by
    LOADSLOCUMDATA.

    Please note that global attributes described here may be overwritten by
    deployment field values whenever the names match. This allows adding file
    attributes whose values are known only at runtime.

  Examples:
    ncl0_info = configRTOutputNetCDFL0Slocum()

  See also:
    GENERATEOUTPUTNETCDF
    SAVENC
    LOADSLOCUMDATA

  Authors:
    Joan Pau Beltran  <joanpau.beltran@socib.cat>

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

configRTOutputNetCDFL0Slocum.m

SOURCE CODE ^

0001 function ncl0_info = configRTOutputNetCDFL0Slocum()
0002 %CONFIGRTOUTPUTNETCDFL0  Configure NetCDF output for raw Slocum glider deployment data in real time.
0003 %
0004 %  Syntax:
0005 %    NCL0_INFO = CONFIGRTOUTPUTNETCDFL0SLOCUM()
0006 %
0007 %  Description:
0008 %    NCL0_INFO = CONFIGRTOUTPUTNETCDFL0SLOCUM() should return a struct
0009 %    describing the structure of the NetCDF file for raw Slocum glider
0010 %    deployment data in real time (see the note about the file generation).
0011 %    The returned struct should have the following fields:
0012 %      DIMENSIONS: struct array with fields 'NAME' and 'LENGTH' defining the
0013 %        dimensions for variables in the file.
0014 %        A variable may have dimensions not listed here or with their length
0015 %        left undefined (empty field value), and they are inferred from the
0016 %        data during the generation of the file. However, it is useful to preset
0017 %        the length of a dimension for record or string size dimensions.
0018 %      ATTRIBUTES: struct array with fields 'NAME' and 'VALUE' defining global
0019 %        attributes of the file.
0020 %        Global attributes might be overwritten by deployment fields
0021 %        with the same name.
0022 %      VARIABLES: struct defining variable metadata. Field names are variable
0023 %        names and field values are structs as needed by function SAVENC.
0024 %        It should have the following fields:
0025 %          DIMENSIONS: string cell array with the names of the dimensions
0026 %            of the variable.
0027 %          ATTRIBUTES: struct array with fields 'NAME' and 'VALUE' defining
0028 %            the attributes of the variable.
0029 %        More variables than the ones present in one specific deployment may be
0030 %        described here. Only metadata corresponding variables in the deployment
0031 %        data will be used.
0032 %
0033 %  Notes:
0034 %    The NetCDF file will be created by the function GENERATEOUTPUTNETCDF with
0035 %    the structure provided here and the metadata and data returned by
0036 %    LOADSLOCUMDATA.
0037 %
0038 %    Please note that global attributes described here may be overwritten by
0039 %    deployment field values whenever the names match. This allows adding file
0040 %    attributes whose values are known only at runtime.
0041 %
0042 %  Examples:
0043 %    ncl0_info = configRTOutputNetCDFL0Slocum()
0044 %
0045 %  See also:
0046 %    GENERATEOUTPUTNETCDF
0047 %    SAVENC
0048 %    LOADSLOCUMDATA
0049 %
0050 %  Authors:
0051 %    Joan Pau Beltran  <joanpau.beltran@socib.cat>
0052 
0053 %  Copyright (C) 2013-2016
0054 %  ICTS SOCIB - Servei d'observacio i prediccio costaner de les Illes Balears
0055 %  <http://www.socib.es>
0056 %
0057 %  This program is free software: you can redistribute it and/or modify
0058 %  it under the terms of the GNU General Public License as published by
0059 %  the Free Software Foundation, either version 3 of the License, or
0060 %  (at your option) any later version.
0061 %
0062 %  This program is distributed in the hope that it will be useful,
0063 %  but WITHOUT ANY WARRANTY; without even the implied warranty of
0064 %  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0065 %  GNU General Public License for more details.
0066 %
0067 %  You should have received a copy of the GNU General Public License
0068 %  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0069 
0070   error(nargchk(0, 0, nargin, 'struct'));
0071 
0072   %% Define variable information.
0073   % To define the variable attributes easily and readably, add the corresponding
0074   % variable field to the struct defined below, with its attributes defined in
0075   % a cell array (attribute name in first column and attribute value in second).
0076   % This cell array will be converted at the end of the function to the proper
0077   % representation needed by SAVENC.
0078 
0079   default_fill_value = realmax('double');
0080 
0081   % Navigation time.
0082   var_attr_list.m_present_time = {
0083     'long_name'     'epoch time (navigation board)'
0084     'standard_name' 'time'
0085     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0086     '_FillValue'    default_fill_value };
0087 
0088   % Navigation data.
0089   var_attr_list.m_lat = {
0090     'long_name'     'latitude (dead reckoned)'
0091     'standard_name' 'latitude'
0092     'units'         'nmea_degree'
0093     '_FillValue'    default_fill_value };
0094 
0095   var_attr_list.m_lon = {
0096     'long_name'     'longitude (dead reckoned)'
0097     'standard_name' 'longitude'
0098     'units'         'nmea_degree'
0099     '_FillValue'    default_fill_value };
0100 
0101   var_attr_list.m_gps_lat = {
0102     'long_name'     'GPS latitude'
0103     'standard_name' 'latitude'
0104     'units'         'nmea_degree'
0105     '_FillValue'    default_fill_value };
0106 
0107   var_attr_list.m_gps_lon = {
0108     'long_name'     'GPS longitude'
0109     'standard_name' 'longitude'
0110     'units'         'nmea_degree'
0111     '_FillValue'    default_fill_value };
0112 
0113   var_attr_list.m_gps_status = {
0114     'long_name'     'GPS status'
0115     'units'         '1'
0116     'comment'       '0 = good fix, >0 = no fix'
0117     '_FillValue'    default_fill_value };
0118 
0119   var_attr_list.c_wpt_lat = {
0120     'long_name'     'next waypoint latitude'
0121     'standard_name' 'latitude'
0122     'units'         'nmea_degree'
0123     '_FillValue'    default_fill_value };
0124 
0125   var_attr_list.c_wpt_lon = {
0126     'long_name'     'next waypoint longitude'
0127     'standard_name' 'longitude'
0128     'units'         'nmea_degree'
0129     '_FillValue'    default_fill_value };
0130 
0131   var_attr_list.m_depth = {
0132     'long_name'     'glider measured depth'
0133     'standard_name' 'depth'
0134     'units'         'm'
0135     'positive'      'down'
0136     '_FillValue'    default_fill_value };
0137 
0138   var_attr_list.m_pressure = {
0139     'long_name'     'glider measured pressure'
0140     'standard_name' 'pressure'
0141     'units'         'bar'
0142     '_FillValue'    default_fill_value };
0143 
0144   var_attr_list.m_roll = {
0145     'long_name'     'glider roll'
0146     'units'         'rad'
0147     'comment'       'greater than 0 is port wing up'
0148     '_FillValue'    default_fill_value };
0149 
0150   var_attr_list.m_pitch = {
0151     'long_name'     'glider pitch'
0152     'units'         'rad'
0153     '_FillValue'    default_fill_value };
0154 
0155   var_attr_list.m_heading = {
0156     'long_name'     'glider heading'
0157     'units'         'rad'
0158     '_FillValue'    default_fill_value };
0159 
0160   var_attr_list.c_heading = {
0161     'long_name'     'glider commanded heading'
0162     'units'         'rad'
0163     '_FillValue'    default_fill_value };
0164 
0165   var_attr_list.m_speed = {
0166     'long_name'     'glider speed through water'
0167     'units'         'm s-1'
0168     '_FillValue'    default_fill_value };
0169 
0170   var_attr_list.m_fin = {
0171     'long_name'     'glider rudder'
0172     'units'         'rad'
0173     '_FillValue'    default_fill_value };
0174 
0175   var_attr_list.x_inflecting = {
0176     'long_name'     'glider inflecting marker'
0177     'units'         '1'
0178     '_FillValue'    default_fill_value };
0179 
0180   var_attr_list.m_num_half_yos_in_segment = {
0181     'long_name'     'glider half yos number in segment'
0182     'units'         '1'
0183     '_FillValue'    default_fill_value };
0184 
0185   var_attr_list.m_tot_num_inflections = {
0186     'long_name'     'total number of inflections'
0187     'units'         '1'
0188     '_FillValue'    default_fill_value };
0189 
0190   var_attr_list.m_battery = {
0191     'long_name'     'battery voltage'
0192     'units'         'V'
0193     '_FillValue'    default_fill_value };
0194 
0195   var_attr_list.m_vacuum = {
0196     'long_name'     'vacuum'
0197     'units'         'inHg'
0198     '_FillValue'    default_fill_value };
0199 
0200   var_attr_list.m_leakdetect_voltage = {
0201     'long_name'     'leak detector'
0202     'units'         'V'
0203     'comment'       '2.5V means no leak; voltage drops if leak detected'
0204     '_FillValue'    default_fill_value };
0205 
0206   var_attr_list.m_iridium_call_num = {
0207     'long_name'     'number of iridium calls'
0208     'units'         '1'
0209     '_FillValue'    default_fill_value };
0210 
0211   var_attr_list.m_iridium_connected = {
0212     'long_name'     'iridium connected'
0213     'units'         '1'
0214     '_FillValue'    default_fill_value };
0215 
0216   var_attr_list.m_iridium_dialed_num = {
0217     'long_name'     'number of iridium dials'
0218     'units'         '1'
0219     '_FillValue'    default_fill_value };
0220 
0221   var_attr_list.x_dr_state = {
0222     'long_name'     'dead reckoning state'
0223     'units'         '1'
0224     'comment'       '0 = mission_start, 1 = underwater, 2 = awaiting_fix, 3 = awaiting_postfix, 4 = awaiting_dive'
0225     '_FillValue'    default_fill_value };
0226 
0227   var_attr_list.m_dr_fix_time = {
0228     'long_name'     'surface-to-fix elapsed time'
0229     'units'         's'
0230     '_FillValue'    default_fill_value };
0231 
0232   var_attr_list.m_dr_postfix_time = {
0233     'long_name'     'fix-to-postfix elapsed time'
0234     'units'         's'
0235     '_FillValue'    default_fill_value };
0236 
0237   var_attr_list.m_dr_surf_x_lmc = {
0238     'long_name'     'dead reckoned x surface location in local mission coordinates'
0239     'units'         'm'
0240     '_FillValue'    default_fill_value };
0241 
0242   var_attr_list.m_dr_surf_y_lmc = {
0243     'long_name'     'dead reckoned y surface location in local mission coordinates'
0244     'units'         'm'
0245     '_FillValue'    default_fill_value };
0246 
0247   var_attr_list.m_dr_time = {
0248     'long_name'     'dead reckoning time'
0249     'units'         's'
0250     'comment'       'time elapsed underwater subject to currents'
0251     '_FillValue'    default_fill_value };
0252 
0253   var_attr_list.m_dr_x_actual_err = {
0254     'long_name'     'estimated actual dead reckoning x error in local mission coordinates'
0255     'units'         's'
0256     'comment'       'initial dead reckoning error minus estimated surface drift'
0257     '_FillValue'    default_fill_value };
0258 
0259   var_attr_list.m_dr_x_ini_err = {
0260     'long_name'     'initial dead reckoning x error in local mission coordinates'
0261     'units'         'm'
0262     'comment'       'distance between dead reckoned surface location and initial GPS fix'
0263     '_FillValue'    default_fill_value };
0264 
0265   var_attr_list.m_dr_x_postfix_drift = {
0266     'long_name'     'fix-to-postfix x drift in local mission coordinates'
0267     'units'         'm'
0268     '_FillValue'    default_fill_value };
0269 
0270   var_attr_list.m_dr_x_ta_postfix_drift = {
0271     'long_name'     'time-adjsuted fix-to-postfix x drift in local mission coordinates'
0272     'units'         's'
0273     'comment'       'used to account for surface drift in averaged sea water velocity computation'
0274     '_FillValue'    default_fill_value };
0275 
0276   var_attr_list.m_dr_y_actual_err = {
0277     'long_name'     'estimated actual dead reckoning y error in local mission coordinates'
0278     'units'         's'
0279     'comment'       'initial dead reckoning error minus estimated surface drift'
0280     '_FillValue'    default_fill_value };
0281 
0282   var_attr_list.m_dr_y_ini_err = {
0283     'long_name'     'initial dead reckoning y error in local mission coordinates'
0284     'units'         'm'
0285     'comment'       'distance between dead reckoned surface location and initial GPS fix'
0286     '_FillValue'    default_fill_value };
0287 
0288   var_attr_list.m_dr_y_postfix_drift = {
0289     'long_name'     'fix-to-postfix y drift in local mission coordinates'
0290     'units'         'm'
0291     '_FillValue'    default_fill_value };
0292 
0293   var_attr_list.m_dr_y_ta_postfix_drift = {
0294     'long_name'     'time-adjsuted fix-to-postfix y drift in local mission coordinates'
0295     'units'         's'
0296     'comment'       'used to account for surface drift in averaged sea water velocity computation'
0297     '_FillValue'    default_fill_value };
0298 
0299   var_attr_list.m_gps_fix_x_lmc = {
0300     'long_name'     'x GPS fix in local mission coordinates'
0301     'units'         'm'
0302     '_FillValue'    default_fill_value };
0303 
0304   var_attr_list.m_gps_fix_y_lmc = {
0305     'long_name'     'y GPS fix in local mission coordinates'
0306     'units'         'm'
0307     '_FillValue'    default_fill_value };
0308 
0309   var_attr_list.m_gps_postfix_x_lmc = {
0310     'long_name'     'x GPS postfix in local mission coordinates'
0311     'units'         'm'
0312     '_FillValue'    default_fill_value };
0313 
0314   var_attr_list.m_gps_postfix_y_lmc = {
0315     'long_name'     'y GPS postfix in local mission coordinates'
0316     'units'         'm'
0317     '_FillValue'    default_fill_value };
0318 
0319   var_attr_list.m_gps_utc_day = {
0320     'long_name'     'day component of GPS timestamp'
0321     'units'         '1'
0322     '_FillValue'    default_fill_value };
0323 
0324   var_attr_list.m_gps_utc_hour = {
0325     'long_name'     'hour component of GPS timestamp'
0326     'units'         '1'
0327     '_FillValue'    default_fill_value };
0328 
0329   var_attr_list.m_gps_utc_minute = {
0330     'long_name'     'minute component of GPS timestamp'
0331     'units'         '1'
0332     '_FillValue'    default_fill_value };
0333 
0334   var_attr_list.m_gps_utc_month = {
0335     'long_name'     'month component of GPS timestamp'
0336     'units'         '1'
0337     '_FillValue'    default_fill_value };
0338 
0339   var_attr_list.m_gps_utc_second = {
0340     'long_name'     'second component of GPS timestamp'
0341     'units'         '1'
0342     '_FillValue'    default_fill_value };
0343 
0344   var_attr_list.m_gps_utc_year = {
0345     'long_name'     'year component of GPS timestamp'
0346     'units'         '1'
0347     '_FillValue'    default_fill_value };
0348 
0349   var_attr_list.m_water_vx = {
0350     'long_name'     'eastward water current'
0351     'standard_name' 'eastward_sea_water_velocity'
0352     'units'         'm s-1'
0353     '_FillValue'    default_fill_value };
0354 
0355   var_attr_list.m_water_vy = {
0356     'long_name'     'northward water current'
0357     'standard_name' 'northward_sea_water_velocity'
0358     'units'         'm s-1'
0359     '_FillValue'    default_fill_value };
0360 
0361   var_attr_list.m_initial_water_vx = {
0362     'long_name'     'initial eastward water current'
0363     'standard_name' 'eastward_sea_water_velocity'
0364     'units'         'm s-1'
0365     '_FillValue'    default_fill_value };
0366 
0367   var_attr_list.m_initial_water_vy = {
0368     'long_name'     'initial northward water current'
0369     'standard_name' 'northward_sea_water_velocity'
0370     'units'         'm s-1'
0371     '_FillValue'    default_fill_value };
0372 
0373   var_attr_list.m_final_water_vx = {
0374     'long_name'     'final eastward water current'
0375     'standard_name' 'eastward_sea_water_velocity'
0376     'units'         'm s-1'
0377     '_FillValue'    default_fill_value };
0378 
0379   var_attr_list.m_final_water_vy = {
0380     'long_name'     'final northward water current'
0381     'standard_name' 'northward_sea_water_velocity'
0382     'units'         'm s-1'
0383     '_FillValue'    default_fill_value };
0384 
0385   var_attr_list.m_water_delta_vx = {
0386     'long_name'     'delta eastward water current'
0387     'units'         'm s-1'
0388     '_FillValue'    default_fill_value };
0389 
0390   var_attr_list.m_water_delta_vy = {
0391     'long_name'     'delta northward water current'
0392     'units'         'm s-1'
0393     '_FillValue'    default_fill_value };
0394 
0395   var_attr_list.x_prior_seg_water_vx = {
0396     'long_name'     'prior segment eastward water current'
0397     'standard_name' 'eastward_sea_water_velocity'
0398     'units'         'm s-1'
0399     '_FillValue'    default_fill_value };
0400 
0401   var_attr_list.x_prior_seg_water_vy = {
0402     'long_name'     'prior segment northward water current'
0403     'standard_name' 'northward_sea_water_velocity'
0404     'units'         'm s-1'
0405     '_FillValue'    default_fill_value };
0406 
0407   var_attr_list.m_water_depth = {
0408     'long_name'     'bathymetry'
0409     'standard_name' 'depth'
0410     'units'         'm'
0411     'positive'      'down'
0412     '_FillValue'    default_fill_value };
0413 
0414   % Navigation CTD.
0415   var_attr_list.m_water_temp = {
0416     'long_name'     'water temperature'
0417     'standard_name' 'sea_water_temperature'
0418     'units'         'Celsius'
0419     '_FillValue'    default_fill_value };
0420 
0421   var_attr_list.m_water_cond = {
0422     'long_name'     'water conductivity'
0423     'standard_name' 'sea_water_conductivity'
0424     'units'         'S m-1'
0425     '_FillValue'    default_fill_value };
0426 
0427   var_attr_list.m_water_pressure = {
0428     'long_name'     'water pressure'
0429     'standard_name' 'pressure'
0430     'units'         'bar'
0431     '_FillValue'    default_fill_value };
0432 
0433   % Science time.
0434   var_attr_list.sci_m_present_time = {
0435     'long_name'     'epoch time (science bay)'
0436     'standard_name' 'time'
0437     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0438     '_FillValue'    default_fill_value };
0439 
0440   % Science CTD.
0441   var_attr_list.sci_water_temp = {
0442     'long_name'     'water temperature'
0443     'standard_name' 'sea_water_temperature'
0444     'units'         'Celsius'
0445     '_FillValue'    default_fill_value };
0446 
0447   var_attr_list.sci_water_cond = {
0448     'long_name'     'water conductivity'
0449     'standard_name' 'sea_water_conductivity'
0450     'units'         'S m-1'
0451     '_FillValue'    default_fill_value };
0452 
0453   var_attr_list.sci_water_pressure = {
0454     'long_name'     'water pressure'
0455     'standard_name' 'pressure'
0456     'units'         'bar'
0457     '_FillValue'    default_fill_value };
0458 
0459   var_attr_list.sci_ctd41cp_timestamp = {
0460     'long_name'     'epoch time (CTD sensor)'
0461     'standard_name' 'time'
0462     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0463     '_FillValue'    default_fill_value };
0464 
0465   % BB3SLO sensor.
0466   var_attr_list.sci_bb3slo_b470_ref = {
0467     'long_name'     'blue backscattering refersence'
0468     'units'         '1'
0469     '_FillValue'    default_fill_value };
0470 
0471   var_attr_list.sci_bb3slo_b470_sig = {
0472     'long_name'     'blue backscattering signal'
0473     'units'         '1'
0474     '_FillValue'    default_fill_value };
0475 
0476   var_attr_list.sci_bb3slo_b470_scaled = {
0477     'long_name'     'blue backscattering'
0478     'units'         '1'
0479     '_FillValue'    default_fill_value };
0480 
0481   var_attr_list.sci_bb3slo_b532_ref = {
0482     'long_name'     'green backscattering reference'
0483     'units'         '1'
0484     '_FillValue'    default_fill_value };
0485 
0486   var_attr_list.sci_bb3slo_b532_sig = {
0487     'long_name'     'green backscattering signal'
0488     'units'         '1'
0489     '_FillValue'    default_fill_value };
0490 
0491   var_attr_list.sci_bb3slo_b532_scaled = {
0492     'long_name'     'green backscattering'
0493     'units'         '1'
0494     '_FillValue'    default_fill_value };
0495 
0496   var_attr_list.sci_bb3slo_b660_ref = {
0497     'long_name'     'red backscattering reference'
0498     'units'         '1'
0499     '_FillValue'    default_fill_value };
0500 
0501   var_attr_list.sci_bb3slo_b660_sig = {
0502     'long_name'     'red backscattering signal'
0503     'units'         '1'
0504     '_FillValue'    default_fill_value };
0505 
0506   var_attr_list.sci_bb3slo_b660_scaled = {
0507     'long_name'     'red backscattering'
0508     'units'         '1'
0509     '_FillValue'    default_fill_value };
0510 
0511   var_attr_list.sci_bb3slo_temp = {
0512     'long_name'     'temperature (BB3SLO sensor)'
0513     'units'         'Celsius'
0514     '_FillValue'    default_fill_value };
0515 
0516   var_attr_list.sci_bb3slo_timestamp = {
0517     'long_name'     'epoch time (BB3SLO sensor)'
0518     'standard_name' 'time'
0519     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0520     '_FillValue'    default_fill_value };
0521 
0522   var_attr_list.u_bb3slo_b470_do = {
0523     'long_name'     'blue backscattering dark water offset'
0524     'units'         '1'
0525     '_FillValue'    default_fill_value };
0526 
0527   var_attr_list.u_bb3slo_b532_do = {
0528     'long_name'     'green backscattering dark water offset'
0529     'units'         '1'
0530     '_FillValue'    default_fill_value };
0531 
0532   var_attr_list.u_bb3slo_b660_do = {
0533     'long_name'     'red backscattering dark water offset'
0534     'units'         '1'
0535     '_FillValue'    default_fill_value };
0536 
0537   var_attr_list.u_bb3slo_b470_sf = {
0538     'long_name'     'blue backscattering scale factor'
0539     'units'         '1'
0540     '_FillValue'    default_fill_value };
0541 
0542   var_attr_list.u_bb3slo_b532_sf = {
0543     'long_name'     'green backscattering scale factor'
0544     'units'         '1'
0545     '_FillValue'    default_fill_value };
0546 
0547   var_attr_list.u_bb3slo_b660_sf = {
0548     'long_name'     'red backscattering scale factor'
0549     'units'         '1'
0550     '_FillValue'    default_fill_value };
0551 
0552   % BBFL2S sensor.
0553   var_attr_list.sci_bbfl2s_bb_ref = {
0554     'long_name'     'backscattering reference'
0555     'units'         '1'
0556     '_FillValue'    default_fill_value };
0557 
0558   var_attr_list.sci_bbfl2s_bb_sig = {
0559     'long_name'     'backscattering signal'
0560     'units'         '1'
0561     '_FillValue'    default_fill_value };
0562 
0563   var_attr_list.sci_bbfl2s_bb_scaled = {
0564     'long_name'     'backscattering'
0565     'units'         '1'
0566     '_FillValue'    default_fill_value };
0567 
0568   var_attr_list.sci_bbfl2s_cdom_ref = {
0569     'long_name'     'CDOM reference'
0570     'units'         '1'
0571     '_FillValue'    default_fill_value };
0572 
0573   var_attr_list.sci_bbfl2s_cdom_sig = {
0574     'long_name'     'CDOM signal'
0575     'units'         '1'
0576     '_FillValue'    default_fill_value };
0577 
0578   var_attr_list.sci_bbfl2s_cdom_scaled = {
0579     'long_name'     'CDOM'
0580     'units'         'ppb'
0581     '_FillValue'    default_fill_value };
0582 
0583   var_attr_list.sci_bbfl2s_chlor_ref = {
0584     'long_name'     'chlorophyll reference'
0585     'units'         '1'
0586     '_FillValue'    default_fill_value };
0587 
0588   var_attr_list.sci_bbfl2s_chlor_sig = {
0589     'long_name'     'chlorophyll signal'
0590     'units'         '1'
0591     '_FillValue'    default_fill_value };
0592 
0593   var_attr_list.sci_bbfl2s_chlor_scaled = {
0594     'long_name'     'chlorophyll'
0595     'standard_name' 'concentration_of_chlorophyll_in_sea_water'
0596     'units'         'mg m-3'
0597     '_FillValue'    default_fill_value };
0598 
0599   var_attr_list.sci_bbfl2s_temp = {
0600     'long_name'     'temperature (BBFL2S sensor)'
0601     'units'         'Celsius'
0602     '_FillValue'    default_fill_value };
0603 
0604   var_attr_list.sci_bbfl2s_timestamp = {
0605     'long_name'     'epoch time (BBFL2S sensor)'
0606     'standard_name' 'time'
0607     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0608     '_FillValue'    default_fill_value };
0609 
0610   var_attr_list.u_bbfl2s_bb_cwo = {
0611     'long_name'     'backscattering clean water offset'
0612     'units'         '1'
0613     '_FillValue'    default_fill_value };
0614 
0615   var_attr_list.u_bbfl2s_cdom_cwo = {
0616     'long_name'     'CDOM clean water offset'
0617     'units'         '1'
0618     '_FillValue'    default_fill_value };
0619 
0620   var_attr_list.u_bbfl2s_chlor_cwo = {
0621     'long_name'     'chlorophyll clean water offset'
0622     'units'         '1'
0623     '_FillValue'    default_fill_value };
0624 
0625   var_attr_list.u_bbfl2s_bb_sf = {
0626     'long_name'     'backscattering scale factor'
0627     'units'         '1'
0628     '_FillValue'    default_fill_value };
0629 
0630   var_attr_list.u_bbfl2s_cdom_sf = {
0631     'long_name'     'cdom scale factor'
0632     'units'         'ppb'
0633     '_FillValue'    default_fill_value };
0634 
0635   var_attr_list.u_bbfl2s_chlor_sf = {
0636     'long_name'     'chlorophyll scale factor'
0637     'units'         '1'
0638     '_FillValue'    default_fill_value };
0639 
0640   % OCR504I sensor.
0641   var_attr_list.sci_ocr504I_irrad1 = {
0642     'long_name'     'irradiance at 412nm wavelength'
0643     'standard_name' 'downwelling_spectral_spherical_irradiance_in_sea_water'
0644     'units'         'uW cm-2 nm-1'
0645     '_FillValue'    default_fill_value };
0646 
0647   var_attr_list.sci_ocr504I_irrad2 = {
0648     'long_name'     'irradiance at 442nm wavelength'
0649     'standard_name' 'downwelling_spectral_spherical_irradiance_in_sea_water'
0650     'units'         'uW cm-2 nm-1'
0651     '_FillValue'    default_fill_value };
0652 
0653   var_attr_list.sci_ocr504I_irrad3 = {
0654     'long_name'     'irradiance at 491nm wavelength'
0655     'standard_name' 'downwelling_spectral_spherical_irradiance_in_sea_water'
0656     'units'         'uW cm-2 nm-1'
0657     '_FillValue'    default_fill_value };
0658 
0659   var_attr_list.sci_ocr504I_irrad4 = {
0660     'long_name'     'irradiance at 664nm wavelength'
0661     'standard_name' 'downwelling_spectral_spherical_irradiance_in_sea_water'
0662     'units'         'uW cm-2 nm-1'
0663     '_FillValue'    default_fill_value };
0664 
0665   % FLNTU sensor.
0666   var_attr_list.sci_flntu_chlor_ref = {
0667     'long_name'     'chlorophyll reference'
0668     'units'         '1'
0669     '_FillValue'    default_fill_value };
0670 
0671   var_attr_list.sci_flntu_chlor_sig = {
0672     'long_name'     'chlorophyll signal'
0673     'units'         '1'
0674     '_FillValue'    default_fill_value };
0675 
0676   var_attr_list.sci_flntu_chlor_units = {
0677     'long_name'     'chlorophyll'
0678     'standard_name' 'concentration_of_chlorophyll_in_sea_water'
0679     'units'         'mg m-3'
0680     '_FillValue'    default_fill_value };
0681 
0682   var_attr_list.sci_flntu_turb_ref = {
0683     'long_name'     'turbidity reference'
0684     'units'         '1'
0685     '_FillValue'    default_fill_value };
0686 
0687   var_attr_list.sci_flntu_turb_sig = {
0688     'long_name'     'turbidity signal'
0689     'units'         '1'
0690     '_FillValue'    default_fill_value };
0691 
0692   var_attr_list.sci_flntu_turb_units = {
0693     'long_name'     'turbidity'
0694     'standard_name' 'turbidity'
0695     'units'         'NTU'
0696     '_FillValue'    default_fill_value };
0697 
0698   var_attr_list.sci_flntu_temp = {
0699     'long_name'     'temperature (FLNTU sensor)'
0700     'units'         'Celsius'
0701     '_FillValue'    default_fill_value };
0702 
0703   var_attr_list.sci_flntu_timestamp = {
0704     'long_name'     'epoch time (FLNTU sensor)'
0705     'standard_name' 'time'
0706     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0707     '_FillValue'    default_fill_value };
0708 
0709   var_attr_list.u_flntu_chlor_do = {
0710     'long_name'     'chlorophyll dark water offset'
0711     'units'         '1'
0712     '_FillValue'    default_fill_value };
0713 
0714   var_attr_list.u_flntu_turb_do = {
0715     'long_name'     'turbidity dark water offset'
0716     'units'         '1'
0717     '_FillValue'    default_fill_value };
0718 
0719   var_attr_list.u_flntu_chlor_sf = {
0720     'long_name'     'chlorophyll scale factor'
0721     'units'         'mg m-3'
0722     '_FillValue'    default_fill_value };
0723 
0724   var_attr_list.u_flntu_turb_sf = {
0725     'long_name'     'turbidity scale factor'
0726     'units'         'NTU'
0727     '_FillValue'    default_fill_value };
0728 
0729   % OXY3835 sensor (Aanderaa Oxygen Optode 3835).
0730   var_attr_list.sci_oxy3835_oxygen = {
0731     'long_name'     'oxygen concentration'
0732     'standard_name' 'mole_concentration_of_dissolved_molecular_oxygen_in_sea_water'
0733     'units'         'umol l-1'
0734     '_FillValue'    default_fill_value };
0735 
0736   var_attr_list.sci_oxy3835_saturation = {
0737     'long_name'     'oxygen saturation'
0738     'standard_name' 'fractional_saturation_of_oxygen_in_sea_water'
0739     'units'         '1'
0740     '_FillValue'    default_fill_value };
0741 
0742   var_attr_list.sci_oxy3835_temp = {
0743     'long_name'     'temperature (OXY3835 sensor)'
0744     'standard_name' 'temperature_of_sensor_for_oxygen_in_sea_water'
0745     'units'         'Celsius'
0746     '_FillValue'    default_fill_value };
0747 
0748   var_attr_list.sci_oxy3835_timestamp = {
0749     'long_name'     'epoch time (OXY3835 sensor)'
0750     'standard_name' 'time'
0751     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0752     '_FillValue'    default_fill_value };
0753 
0754   % OXY4 sensor (Aanderaa Oxygen Optode 4330F or 4831).
0755   var_attr_list.sci_oxy4_oxygen = {
0756     'long_name'     'oxygen concentration'
0757     'standard_name' 'mole_concentration_of_dissolved_molecular_oxygen_in_sea_water'
0758     'units'         'umol l-1'
0759     '_FillValue'    default_fill_value };
0760 
0761   var_attr_list.sci_oxy4_saturation = {
0762     'long_name'     'oxygen saturation'
0763     'standard_name' 'fractional_saturation_of_oxygen_in_sea_water'
0764     'units'         '1'
0765     '_FillValue'    default_fill_value };
0766 
0767   var_attr_list.sci_oxy4_temp = {
0768     'long_name'     'temperature (OXY4 sensor)'
0769     'standard_name' 'temperature_of_sensor_for_oxygen_in_sea_water'
0770     'units'         'Celsius'
0771     '_FillValue'    default_fill_value };
0772 
0773   var_attr_list.sci_oxy4_timestamp = {
0774     'long_name'     'epoch time (OXY4 sensor)'
0775     'standard_name' 'time'
0776     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0777     '_FillValue'    default_fill_value };
0778 
0779   % Other sensors of technical interest:
0780   var_attr_list.c_air_pump = {
0781     'long_name'     'air pump bladder'
0782     'units'         '1'
0783     'comment'       '<0 turns it off regardless, 0 turns it off unless thermal or deep electric engine needs it, >0 turns it on'
0784     '_FillValue'    default_fill_value };
0785 
0786   var_attr_list.c_alt_time = {
0787     'long_name'     'altimeter intersample time'
0788     'units'         's'
0789     'comment'       '<0 is off, =0 as fast as possible, >0 that many seconds betweens measurements'
0790     '_FillValue'    default_fill_value };
0791 
0792   var_attr_list.c_battpos = {
0793     'long_name'     'battery position'
0794     'units'         'in'
0795     'comment'       '>0 vehicle dives (nose down)'
0796     '_FillValue'    default_fill_value };
0797 
0798   var_attr_list.c_climb_target_depth = {
0799     'long_name'     'climb target depth'
0800     'units'         'm'
0801     'comment'       'value of b_arg for climb target depth'
0802     '_FillValue'    default_fill_value };
0803 
0804   var_attr_list.c_de_oil_vol = {
0805     'long_name'     'commanded oil'
0806     'units'         'cc'
0807     'comment'       '>0, goes up'
0808     '_FillValue'    default_fill_value };
0809 
0810   var_attr_list.c_dive_target_depth = {
0811     'long_name'     'dive target depth'
0812     'units'         'm'
0813     'comment'       'value of b_arg for dive target depth'
0814     '_FillValue'    default_fill_value };
0815 
0816   var_attr_list.c_fin = {
0817     'long_name'     'commanded fin position'
0818     'units'         'rad'
0819     'comment'       '>0 vehicle turns right'
0820     '_FillValue'    default_fill_value };
0821 
0822   var_attr_list.c_flntu_on = {
0823     'long_name'     'optical Sensor flntu toggle'
0824     'units'         's'
0825     'comment'       'commanded seconds between measurements: <0 stopped, 0 as fast as possible, >0 that many secons'
0826     '_FillValue'    default_fill_value };
0827 
0828   var_attr_list.c_iridium_current_num = {
0829     'long_name'     'current Iridium phone number'
0830     'units'         '1'
0831     'comment'       '0 = primary 1 = secondary'
0832     '_FillValue'    default_fill_value };
0833 
0834   var_attr_list.c_iridium_on = {
0835     'long_name'     'Iridium phone toggle'
0836     'units'         '1'
0837     'comment'       '<=0 turns it off, 1 turns it on, becomes 2nd console when connected, 2 turns it on, no 2nd console, 3 turns it on in "send data" mode, 4 turns it on in "echo data" mode'
0838     '_FillValue'    default_fill_value };
0839 
0840   var_attr_list.c_iridium_phone_num = {
0841     'long_name'     'primary Iridium phone number'
0842     'units'         '1'
0843     '_FillValue'    default_fill_value };
0844 
0845   var_attr_list.c_iridium_phone_num_alt = {
0846     'long_name'     'alternative Iridium phone number'
0847     'units'         '1'
0848     '_FillValue'    default_fill_value };
0849 
0850   var_attr_list.c_oxy3835_on = {
0851     'long_name'     'optical OXY3835 sensor toggle'
0852     'units'         's'
0853     'comment'       'commanded seconds between measurements: <0 stopped, 0 as fast as possible, >0 that many seconds'
0854     '_FillValue'    default_fill_value };
0855 
0856   var_attr_list.c_oxy4_on = {
0857     'long_name'     'optical OXY4 sensor toggle'
0858     'units'         's'
0859     'comment'       'commanded seconds between measurements: <0 stopped, 0 as fast as possible, >0 that many seconds'
0860     '_FillValue'    default_fill_value };
0861 
0862   var_attr_list.c_pitch = {
0863     'long_name'     'commanded pitch'
0864     'units'         'rad'
0865     'comment'       '<0 to dive'
0866     '_FillValue'    default_fill_value };
0867 
0868   var_attr_list.c_profile_on = {
0869     'long_name'     'intersample time cycles'
0870     'units'         's'
0871     'comment'       '<0 is off, =0 as fast as possible, >0 that many seconds between measurements'
0872     '_FillValue'    default_fill_value };
0873 
0874   var_attr_list.c_science_on = {
0875     'long_name'     'science board toggle'
0876     'units'         '1'
0877     'comment'       'nonzero turns on science uart'
0878     '_FillValue'    default_fill_value };
0879 
0880   var_attr_list.c_thermal_valve = {
0881     'long_name'     'commanded oil pump valve'
0882     'units'         '1'
0883     'comment'       '1=valve up, 2=valve charge, 3=valve down'
0884     '_FillValue'    default_fill_value };
0885 
0886   var_attr_list.c_weight_drop = {
0887     'long_name'     'weight drop toggle (Jettison)'
0888     'units'         '1'
0889     'comment'       '!=0 drop the weight'
0890     '_FillValue'    default_fill_value };
0891 
0892   var_attr_list.f_fin_safety_max = {
0893     'long_name'     'digifin range'
0894     'units'         'rad'
0895     'comment'       '>0.47 damage to glider'
0896     '_FillValue'    default_fill_value };
0897 
0898   var_attr_list.m_air_fill = {
0899     'long_name'     'measured air fill status'
0900     'units'         '1'
0901     'comment'       '1=air pump solenoid in fill position'
0902     '_FillValue'    default_fill_value };
0903 
0904   var_attr_list.m_altimeter_status = {
0905     'long_name'     'measured altimeter status'
0906     'units'         '1'
0907     'comment'       '0 good reading, otherwise rejected'
0908     '_FillValue'    default_fill_value };
0909 
0910   var_attr_list.m_altimeter_voltage = {
0911     'long_name'     'measured altimeter voltage'
0912     'units'         'V'
0913     'comment'       'voltage read from the A/D'
0914     '_FillValue'    default_fill_value };
0915 
0916   var_attr_list.m_altitude = {
0917     'long_name'     'measured altitude'
0918     'units'         'm'
0919     'comment'       'height above the bottom'
0920     '_FillValue'    default_fill_value };
0921 
0922   var_attr_list.m_appear_to_be_at_surface = {
0923     'long_name'     'glider at surface guess'
0924     'units'         '1'
0925     '_FillValue'    default_fill_value };
0926 
0927   var_attr_list.m_argos_is_xmitting = {
0928     'long_name'     'measured Argos transmission status'
0929     'units'         '1'
0930     'comment'       '>0 = PTT is radiating'
0931     '_FillValue'    default_fill_value };
0932 
0933   var_attr_list.m_argos_on = {
0934     'long_name'     'measured Argos toggle status'
0935     'units'         '1'
0936     'comment'       '>0 means Argos is actually turned on'
0937     '_FillValue'    default_fill_value };
0938 
0939   var_attr_list.m_argos_sent_data = {
0940     'long_name'     'measured Argos sent data status'
0941     'units'         '1'
0942     'comment'       '> 0 means data was sent to PTT'
0943     '_FillValue'    default_fill_value };
0944 
0945   var_attr_list.m_avg_downward_inflection_time = {
0946     'long_name'     'downward inflection time'
0947     'units'         's'
0948     'comment'       'exponential average of inflections (start with reasonable guess)'
0949     '_FillValue'    default_fill_value };
0950 
0951   var_attr_list.m_avg_speed = {
0952     'long_name'     'measured horizontal average speed'
0953     'units'         'm s-1'
0954     'comment'       'average vehicle horizontal speed through water, used only when computing commanded heading to waypoint'
0955     '_FillValue'    default_fill_value };
0956 
0957   var_attr_list.m_avg_upward_inflection_time = {
0958     'long_name'     'upward inflection time'
0959     'units'         's'
0960     'comment'       'exponential average of inflections (start with reasonable guess)'
0961     '_FillValue'    default_fill_value };
0962 
0963   var_attr_list.m_battery_inst = {
0964     'long_name'     'measured battery instantaneous voltage'
0965     'units'         'V'
0966     '_FillValue'    default_fill_value };
0967 
0968   var_attr_list.m_battpos = {
0969     'long_name'     'measured battery position'
0970     'units'         'in'
0971     'comment'       '>0 vehicle dives (nose down)'
0972     '_FillValue'    default_fill_value };
0973 
0974   var_attr_list.m_certainly_at_surface = {
0975     'long_name'     'glider at surface certain guess'
0976     'units'         '1'
0977     '_FillValue'    default_fill_value };
0978 
0979   var_attr_list.m_cop_tickle = {
0980     'long_name'     'COP tickle watchdog'
0981     'units'         '1'
0982     'comment'       '1=COP tickled'
0983     '_FillValue'    default_fill_value };
0984 
0985   var_attr_list.m_coulomb_amphr = {
0986     'long_name'     'measured integrated current'
0987     'units'         'A h-1'
0988     '_FillValue'    default_fill_value };
0989 
0990   var_attr_list.m_coulomb_amphr_total = {
0991     'long_name'     'persistant measured integrated current'
0992     'units'         'A h-1'
0993     '_FillValue'    default_fill_value };
0994 
0995   var_attr_list.m_coulomb_current = {
0996     'long_name'     'measured instantaneous current'
0997     'units'         'A'
0998     '_FillValue'    default_fill_value };
0999 
1000   var_attr_list.m_cycle_number = {
1001     'long_name'     'cycle number'
1002     'units'         '1'
1003     'comment'       'cycle number since mission started'
1004     '_FillValue'    default_fill_value };
1005 
1006   var_attr_list.m_de_oil_vol = {
1007     'long_name'     'measured oil pump volume'
1008     'units'         'cm3'
1009     'comment'       'calibrated from m_de_oil_vol_pot_voltage'
1010     '_FillValue'    default_fill_value };
1011 
1012   var_attr_list.m_device_error = {
1013     'long_name'     'glider error number'
1014     'units'         '1'
1015     'comment'       'device number of offending device whenever it generates error'
1016     '_FillValue'    default_fill_value };
1017 
1018   var_attr_list.m_device_oddity = {
1019     'long_name'     'glider oddity number'
1020     'units'         '1'
1021     'comment'       'number of offending device whenever it generates oddity'
1022     '_FillValue'    default_fill_value };
1023 
1024   var_attr_list.m_device_warning = {
1025     'long_name'     'glider warning number'
1026     'units'         '1'
1027     'comment'       'device number of offending device whenever it generates warning'
1028     '_FillValue'    default_fill_value };
1029 
1030   var_attr_list.m_disk_free = {
1031     'long_name'     'navigation disk free space'
1032     'units'         'MiB'
1033     'comment'       'disk space currently free on navigation disk'
1034     '_FillValue'    default_fill_value };
1035 
1036   var_attr_list.m_disk_usage = {
1037     'long_name'     'navigation disk used space'
1038     'units'         'MiB'
1039     'comment'       'disk space currently used on navigation disk'
1040     '_FillValue'    default_fill_value };
1041 
1042   var_attr_list.m_dist_to_wpt = {
1043     'long_name'     'distance to next waypoint'
1044     'units'         'm'
1045     'comment'       'distance to (c_wpt_x_lmc, c_wpt_y_lmc)'
1046     '_FillValue'    default_fill_value };
1047 
1048   var_attr_list.m_free_heap = {
1049     'long_name'     'free heap space'
1050     'units'         'B'
1051     'comment'       'amount of heap space currently free'
1052     '_FillValue'    default_fill_value };
1053 
1054   var_attr_list.m_gps_dist_from_dr = {
1055     'long_name'     'distance from calculated position (dead reckoning distance)'
1056     'units'         'm'
1057     'comment'       'distance to fix from dead reckoned position'
1058     '_FillValue'    default_fill_value };
1059 
1060   var_attr_list.m_gps_on = {
1061     'long_name'     'measured GPS toggle status'
1062     'units'         '1'
1063     'comment'       '>0 GPS actually enabled'
1064     '_FillValue'    default_fill_value };
1065 
1066   var_attr_list.m_iridium_attempt_num = {
1067     'long_name'     'Iridium phone call number'
1068     'units'         '1'
1069     'comment'       'number of retries for the current Iridium phone number (should be initialized to 1)'
1070     '_FillValue'    default_fill_value };
1071 
1072   var_attr_list.m_iridium_on = {
1073     'long_name'     'Iridium toggle status'
1074     'units'         '1'
1075     'comment'       '0=off, 1=on'
1076     '_FillValue'    default_fill_value };
1077 
1078   var_attr_list.m_iridium_signal_strength = {
1079     'long_name'     'Iridium quality signal'
1080     'units'         '1'
1081     'comment'       'Iridium received signal strength indication (RSSI)'
1082     '_FillValue'    default_fill_value };
1083 
1084   var_attr_list.m_iridium_status = {
1085     'long_name'     'Iridium status'
1086     'units'         '1'
1087     'comment'       '0 = MODEM_NO_CARRIER, 1 = MODEM_OK, 2 = MODEM_CONNECT, 3 = MODEM_ERROR , 4 = MODEM_NO_ANSWER , 5 = MODEM_BUSY , 6 = MODEM_NO_DIALTONE , 7 = LOGGING_IN , 8 = LOGGED_ON , 10 = MODEM_AWAITING_OK , 11 = MODEM_AWAITING_CONNECTION , 12 = MODEM_TIMEOUT , 99 = MODEM_UNKNOWN , 100 = NO_CHARS_TIMEOUT'
1088     '_FillValue'    default_fill_value };
1089 
1090   var_attr_list.m_is_battpos_moving = {
1091     'long_name'     'measured battery in motion status'
1092     'units'         '1'
1093     'comment'       '1 = motor is moving'
1094     '_FillValue'    default_fill_value };
1095 
1096   var_attr_list.m_is_de_pump_moving = {
1097     'long_name'     'measured oil pump in motion status'
1098     'units'         '1'
1099     'comment'       '1 = motor is moving'
1100     '_FillValue'    default_fill_value };
1101 
1102   var_attr_list.m_leak = {
1103     'long_name'     'leak detection'
1104     'units'         '1'
1105     'comment'       'whether m_leakdetect_voltage_aft < f_leakdetect_threshold'
1106     '_FillValue'    default_fill_value };
1107 
1108   var_attr_list.m_mission_avg_speed_climbing = {
1109     'long_name'     'average climbing speed'
1110     'units'         'm s-1'
1111     'comment'       'running average of computed m_speed since start of mission'
1112     '_FillValue'    default_fill_value };
1113 
1114   var_attr_list.m_mission_avg_speed_diving = {
1115     'long_name'     'average diving speed'
1116     'units'         'm s-1'
1117     'comment'       'running average of computed m_speed since start of mission'
1118     '_FillValue'    default_fill_value };
1119 
1120   var_attr_list.m_mission_start_time = {
1121     'long_name'     'mission start epoch time'
1122     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
1123     '_FillValue'    default_fill_value };
1124 
1125   var_attr_list.m_present_secs_into_mission = {
1126     'long_name'     'seconds in mission'
1127     'units'         's'
1128     'comment'       'time elapsed since mission started'
1129     '_FillValue'    default_fill_value };
1130 
1131   var_attr_list.m_science_clothesline_lag = {
1132     'long_name'     'science time lag'
1133     'units'         's'
1134     'comment'       'How far behind science is M_PRESENT_TIME - SCI_M_PRESENT_TIME'
1135     '_FillValue'    default_fill_value };
1136 
1137   var_attr_list.m_science_on = {
1138     'long_name'     'science board toggle status'
1139     'units'         '1'
1140     'comment'       'actual power state of science uart'
1141     '_FillValue'    default_fill_value };
1142 
1143   var_attr_list.m_science_sent_some_data = {
1144     'long_name'     'science board sent data status'
1145     'units'         '1'
1146     'comment'       'incremented when the glider pulls a character out of the clothesline buffer where chars received from science processor are stored.'
1147     '_FillValue'    default_fill_value };
1148 
1149   var_attr_list.m_spare_heap = {
1150     'long_name'     'measured spare heap space'
1151     'units'         'B'
1152     'comment'       'projected amount of heap space if every big consumer is activated'
1153     '_FillValue'    default_fill_value };
1154 
1155   var_attr_list.m_stable_comms = {
1156     'long_name'     'stable communications status'
1157     'units'         '1'
1158     'comment'       '1 = communications are stable (had m_console_cd for reqd number of secs in a row)'
1159     '_FillValue'    default_fill_value };
1160 
1161   var_attr_list.m_thermal_valve = {
1162     'long_name'     'measured oil pump valve status'
1163     'units'         '1'
1164     'comment'       '-3=moving to down, -2=moving to charge, -1=moving to up, 0=unknown, 1=valve up, 2=valve charge, 3=valve down'
1165     '_FillValue'    default_fill_value };
1166 
1167   var_attr_list.m_tot_horz_dist = {
1168     'long_name'     'total horizontal distance'
1169     'units'         'km'
1170     'comment'       'distance coverted underwater'
1171     '_FillValue'    default_fill_value };
1172 
1173   var_attr_list.m_vacuum_air_pump_on = {
1174     'long_name'     'air pump toggle initial pressure'
1175     'units'         'inHg'
1176     'comment'       'initial value of m_vacuum when air pump is turned on AND depth < u_max_depth_for_air_pump_est'
1177     '_FillValue'    default_fill_value };
1178 
1179   var_attr_list.m_why_started = {
1180     'long_name'     'glider start event'
1181     'units'         '1'
1182     'comment'       '128 = External (the reset button), 64 = Power-On, 32 = Software Watchdog, 16 = Dbl Bus Fault, 4 = Loss of Clock, 2 = RESET instruction, 1 = Test Submodule, 255 = Uninitialized'
1183     '_FillValue'    default_fill_value };
1184 
1185   var_attr_list.sci_m_disk_free = {
1186     'long_name'     'science disk free space'
1187     'units'         'MiB'
1188     'comment'       'disk space currently free on science disk'
1189     '_FillValue'    default_fill_value };
1190 
1191   var_attr_list.sci_m_disk_usage = {
1192     'long_name'     'science disk used space'
1193     'units'         'MiB'
1194     'comment'       'disk space currently used on science disk'
1195     '_FillValue'    default_fill_value };
1196 
1197   var_attr_list.sci_m_free_heap = {
1198     'long_name'     'science free heap space'
1199     'units'         'bytes'
1200     'comment'       'amount of heap space currently free'
1201     '_FillValue'    default_fill_value };
1202 
1203   var_attr_list.sci_m_spare_heap = {
1204     'long_name'     'science measured spare heap space'
1205     'units'         'B'
1206     'comment'       'projected amount of heap space if every big consumer is activated'
1207     '_FillValue'    default_fill_value };
1208 
1209   var_attr_list.u_alt_min_depth = {
1210     'long_name'     'altimeter depth trigger'
1211     'units'         'm'
1212     'comment'       'minimum depth glider must be to use altitude'
1213     '_FillValue'    default_fill_value };
1214 
1215   var_attr_list.u_max_altimeter = {
1216     'long_name'     'altimeter maximum range'
1217     'units'         'm'
1218     'comment'       'altimeter reading must be between u_min_altimeter and u_max_altimeter'
1219     '_FillValue'    default_fill_value };
1220 
1221   var_attr_list.u_min_altimeter = {
1222     'long_name'     'altimeter minimum range'
1223     'units'         'm'
1224     'comment'       'altimeter reading must be between u_min_altimeter and u_max_altimeter'
1225     '_FillValue'    default_fill_value };
1226 
1227   var_attr_list.u_pressure_autocal_min_time_between = {
1228     'long_name'     'minimum time between automatic pressure calibrations'
1229     'units'         's'
1230     '_FillValue'    default_fill_value };
1231 
1232   var_attr_list.u_pressure_autocal_enabled = {
1233     'long_name'     'automatic pressure calibration switch'
1234     'units'         '1'
1235     '_FillValue'    default_fill_value };
1236 
1237   var_attr_list.u_pressure_autocal_deadband = {
1238     'long_name'     'automatic pressure calibration threshold'
1239     'units'         'bar'
1240     '_FillValue'    default_fill_value };
1241 
1242   var_attr_list.u_pressure_autocal_max_allowed = {
1243     'long_name'     'automatic pressure calibration oddity threshold'
1244     'units'         'bar'
1245     '_FillValue'    default_fill_value };
1246 
1247   var_attr_list.u_pressure_autocal_performed = {
1248     'long_name'     'automatic pressure calibration flag'
1249     'units'         '1'
1250     'comment'       '1 = auto calibration done, 2 = manual calibration done, -1 = excessive pressure drift (calibration not done)'
1251     '_FillValue'    default_fill_value };
1252 
1253   var_attr_list.u_stable_comms_reqd_secs = {
1254     'long_name'     'stable communications required threshold'
1255     'units'         's'
1256     'comment'       'continuous seconds of carrier detect required to have stable communications'
1257     '_FillValue'    default_fill_value };
1258 
1259   var_attr_list.u_use_current_correction = {
1260     'long_name'     'use current correction toggle'
1261     'units'         '1'
1262     'comment'       '0 = calculate but do not use m_water_vx/y, 1 = use m_water_vx/y to navigate and aim'
1263     '_FillValue'    default_fill_value };
1264 
1265   var_attr_list.x_alt_time = {
1266     'long_name'     'altimeter intersample time'
1267     'units'         's'
1268     'comment'       'calculated c_alt_time value <0 altimeter off, =0 as fast as possible, >0 that many seconds between measurements'
1269     '_FillValue'    default_fill_value };
1270 
1271   var_attr_list.x_cycle_time = {
1272     'long_name'     'calculated cycle time'
1273     'units'         's'
1274     'comment'       'either u_cycle_time or u_low_power_cycle_time'
1275     '_FillValue'    default_fill_value };
1276 
1277   var_attr_list.x_hardware_cop_timeout = {
1278     'long_name'     'hardware cop timeout'
1279     'units'         'h'
1280     'comment'       'state of jumper: -1 = can not tell, >=RevE will be 2 or 16'
1281     '_FillValue'    default_fill_value };
1282 
1283   var_attr_list.x_hit_a_waypoint = {
1284     'long_name'     'waypoint hit event'
1285     'units'         '1'
1286     'comment'       'set by behavior when reach a waypoint'
1287     '_FillValue'    default_fill_value };
1288 
1289   var_attr_list.x_last_wpt_lat = {
1290     'long_name'     'latitude coordinate of last achieved waypoint'
1291     'units'         'nmea_degree'
1292     '_FillValue'    default_fill_value };
1293 
1294   var_attr_list.x_last_wpt_lon = {
1295     'long_name'     'longitude coordinate of last achieved waypoint'
1296     'units'         'nmea_degree'
1297     '_FillValue'    default_fill_value };
1298 
1299   var_attr_list.x_low_power_status = {
1300     'long_name'     'low power status'
1301     'units'         '1'
1302     'comment'       ''
1303     '_FillValue'    default_fill_value };
1304 
1305   var_attr_list.x_mission_num = {
1306     'long_name'     'last mission number'
1307     'units'         '1'
1308     'comment'       'YYDDxx the current or last mission number, old style before switch to DBD scheme kept for Argos'
1309     '_FillValue'    default_fill_value };
1310 
1311   var_attr_list.x_pressure_manual_cal_now = {
1312     'long_name'     'manual pressure calibration trigger'
1313     'units'         '1'
1314     '_FillValue'    default_fill_value };
1315 
1316   var_attr_list.x_surface_active = {
1317     'long_name'     'active surface behavior status'
1318     'units'         '1'
1319     'comment'       'id of active surface behavior (>0 = active)'
1320     '_FillValue'    default_fill_value };
1321 
1322 
1323   %% Define global attributes (they may be overwritten with deployment values).
1324   % To define the global attributes easily and readably, add them to this
1325   % cell array (attribute name in first column and attribute value in second).
1326   % This cell array will be converted at the end of the function to the proper
1327   % representation needed by SAVENC.
1328   global_atts = ...
1329   {
1330     'abstract'                     '' % deployment_description
1331     'acknowledgement'              '' % deployment_acknowledgement
1332     'author'                       '' % deployment_author
1333     'author_email'                 '' % deployment_author_email
1334     'cdm_data_type'                'Trajectory'
1335     'citation'                     '' % deployment_citation
1336     'comment'                      'Data provided as it comes from the glider.'
1337     'Conventions'                  'CF-1.6'
1338     'creator'                      '' % deployment_author
1339     'creator_email'                '' % deployment_author_email
1340     'creator_url'                  '' % deployment_author_url
1341     'data_center'                  '' % deployment_data_center
1342     'data_center_email'            '' % deployment_data_center_email
1343     'data_mode'                    'real time'
1344     'date_modified'                'undefined'
1345     'featureType'                  'trajectory'
1346     'geospatial_lat_max'           'undefined'
1347     'geospatial_lat_min'           'undefined'
1348     'geospatial_lat_units'         'undefined'
1349     'geospatial_lon_max'           'undefined'
1350     'geospatial_lon_min'           'undefined'
1351     'geospatial_lon_units'         'undefined'
1352     'history'                      sprintf('Product generated by the glider toolbox version %s (https://github.com/socib/glider_toolbox).', configGliderToolboxVersion())
1353     'institution'                  '' % institution_name
1354     'institution_references'       '' % institution_references
1355     'instrument'                   '' % instrument_name
1356     'instrument_manufacturer'      '' % instrument_manufacturer
1357     'instrument_model'             '' % instrument_model
1358     'license'                      'Approved for public release. Distribution Unlimited.' % deployment_distribution_statement
1359     'netcdf_version'               '4.0.1'
1360     'positioning_system'           'GPS and dead reckoning'
1361     'principal_investigator'       '' % deployment_principal_investigator
1362     'principal_investigator_email' '' % deployment_principal_investigator_email
1363     'processing_level'             'L0 raw data not calibrated'
1364     'project'                      '' % deployment_project
1365     'publisher'                    '' % deployment_publisher_name
1366     'publisher_email'              '' % deployment_publisher_email
1367     'publisher_url'                '' % deployment_publisher_url
1368     'source'                       'glider'
1369     'source_files'                 'undefined' % source_files field set by processing script after loading data.
1370     'standard_name_vocabulary'     'http://cf-pcmdi.llnl.gov/documents/cf-standard-names/standard-name-table/16/cf-standard-name-table.html'
1371     'summary'                      '' % deployment_description
1372     'time_coverage_end'            'undefined'
1373     'time_coverage_start'          'undefined'
1374     'title'                        'Glider deployment real time raw data'
1375     'transmission_system'          'IRIDIUM'
1376   };
1377 
1378 
1379   %% Define preset dimensions.
1380   time_dimension = struct('name', {'time'}, 'length', {0});
1381 
1382 
1383   %% Return global and variable metadata in the correct format.
1384   ncl0_info = struct();
1385   % Set the dimensions.
1386   ncl0_info.dimensions = time_dimension;
1387   % Set the global attributes.
1388   ncl0_info.attributes = cell2struct(global_atts, {'name' 'value'}, 2);
1389   % Set the variable metadata.
1390   ncl0_info.variables = struct();
1391   var_name_list = fieldnames(var_attr_list);
1392   for var_name_idx = 1:numel(var_name_list)
1393     var_name = var_name_list{var_name_idx};
1394     var_atts = var_attr_list.(var_name);
1395     ncl0_info.variables.(var_name).dimensions = {time_dimension.name};
1396     ncl0_info.variables.(var_name).attributes = ...
1397       cell2struct(var_atts, {'name' 'value'}, 2);
1398   end
1399 
1400 end

Generated on Fri 06-Oct-2017 10:47:42 by m2html © 2005