configDTOutputNetCDFL1

PURPOSE ^

CONFIGDTOUTPUTNETCDFL1 Configure NetCDF output for processed glider deployment data in delayed time.

SYNOPSIS ^

function ncl1_info = configDTOutputNetCDFL1()

DESCRIPTION ^

CONFIGDTOUTPUTNETCDFL1  Configure NetCDF output for processed glider deployment data in delayed time.

  Syntax:
    NCL1_INFO = CONFIGDTOUTPUTNETCDFL1()

  Description:
    NCL1_INFO = CONFIGDTOUTPUTNETCDFL1() should return a struct
    describing the structure of the NetCDF file for processed glider
    deployment data in delayed 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 metadata provided here and the data returned by PROCESSGLIDERDATA.

    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:
    ncl1_info = configDTOutputNetCDFL1()

  See also:
    GENERATEOUTPUTNETCDF
    SAVENC
    PROCESSGLIDERDATA

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

configDTOutputNetCDFL1.m

SOURCE CODE ^

0001 function ncl1_info = configDTOutputNetCDFL1()
0002 %CONFIGDTOUTPUTNETCDFL1  Configure NetCDF output for processed glider deployment data in delayed time.
0003 %
0004 %  Syntax:
0005 %    NCL1_INFO = CONFIGDTOUTPUTNETCDFL1()
0006 %
0007 %  Description:
0008 %    NCL1_INFO = CONFIGDTOUTPUTNETCDFL1() should return a struct
0009 %    describing the structure of the NetCDF file for processed glider
0010 %    deployment data in delayed 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 metadata provided here and the data returned by PROCESSGLIDERDATA.
0036 %
0037 %    Please note that global attributes described here may be overwritten by
0038 %    deployment field values whenever the names match. This allows adding file
0039 %    attributes whose values are known only at runtime.
0040 %
0041 %  Examples:
0042 %    ncl1_info = configDTOutputNetCDFL1()
0043 %
0044 %  See also:
0045 %    GENERATEOUTPUTNETCDF
0046 %    SAVENC
0047 %    PROCESSGLIDERDATA
0048 %
0049 %  Authors:
0050 %    Joan Pau Beltran  <joanpau.beltran@socib.cat>
0051 
0052 %  Copyright (C) 2013-2016
0053 %  ICTS SOCIB - Servei d'observacio i prediccio costaner de les Illes Balears
0054 %  <http://www.socib.es>
0055 %
0056 %  This program is free software: you can redistribute it and/or modify
0057 %  it under the terms of the GNU General Public License as published by
0058 %  the Free Software Foundation, either version 3 of the License, or
0059 %  (at your option) any later version.
0060 %
0061 %  This program is distributed in the hope that it will be useful,
0062 %  but WITHOUT ANY WARRANTY; without even the implied warranty of
0063 %  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0064 %  GNU General Public License for more details.
0065 %
0066 %  You should have received a copy of the GNU General Public License
0067 %  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0068 
0069   error(nargchk(0, 0, nargin, 'struct'));
0070 
0071   %% Define variable information.
0072   % To define the variable attributes easily and readably, add the corresponding
0073   % variable field to the struct defined below, with its attributes defined in
0074   % a cell array (attribute name in first column and attribute value in second).
0075   % This cell array will be converted at the end of the function to the proper
0076   % representation needed by SAVENC.
0077 
0078   default_fill_value = realmax('double');
0079 
0080   var_attr_list.time = {
0081     'long_name'     'navigation epoch time'
0082     'standard_name' 'time'
0083     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0084     'axis'          'T'
0085     'coordinates'   'time depth latitude longitude'
0086     '_FillValue'    default_fill_value
0087     'sources'                [] };
0088 
0089   var_attr_list.depth = {
0090     'long_name'     'glider depth'
0091     'standard_name' 'depth'
0092     'units'         'm'
0093     'positive'      'down'
0094     'axis'          'Z'
0095     'coordinates'   'time depth latitude longitude'
0096     '_FillValue'    default_fill_value
0097     'sources'                []
0098     'conversion'             []
0099     'filling'                [] };
0100 
0101   var_attr_list.latitude = {
0102     'long_name'     'latitude'
0103     'standard_name' 'latitude'
0104     'units'         'degree_north'
0105     'axis'          'Y'
0106     'coordinates'   'time depth latitude longitude'
0107     '_FillValue'    default_fill_value
0108     'sources'                []
0109     'position_good'          []
0110     'position_bad'           []
0111     'conversion'             []
0112     'filling'                [] };
0113 
0114   var_attr_list.longitude = {
0115     'long_name'     'longitude'
0116     'standard_name' 'longitude'
0117     'axis'          'X'
0118     'units'         'degree_east'
0119     'coordinates'   'time depth latitude longitude'
0120     '_FillValue'    default_fill_value
0121     'sources'                []
0122     'position_good'          []
0123     'position_bad'           []
0124     'conversion'             []
0125     'filling'                [] };
0126 
0127   var_attr_list.heading = {
0128     'long_name'     'glider heading angle'
0129     'standard_name' 'heading'
0130     'units'         'rad'
0131     'coordinates'   'time depth latitude longitude'
0132     '_FillValue'    default_fill_value
0133     'sources'                []
0134     'conversion'             []
0135     'filling'                [] };
0136 
0137   var_attr_list.roll = {
0138     'long_name'     'glider roll angle'
0139     'standard_name' 'roll'
0140     'units'         'rad'
0141     'coordinates'   'time depth latitude longitude'
0142     '_FillValue'    default_fill_value
0143     'sources'                []
0144     'conversion'             []
0145     'filling'                [] };
0146 
0147   var_attr_list.pitch = {
0148     'long_name'     'glider pitch angle'
0149     'standard_name' 'pitch'
0150     'units'         'rad'
0151     'coordinates'   'time depth latitude longitude'
0152     '_FillValue'    default_fill_value
0153     'sources'                []
0154     'conversion'             []
0155     'filling'                [] };
0156 
0157   var_attr_list.waypoint_latitude = {
0158     'long_name'     'waypoint latitude'
0159     'standard_name' 'latitude'
0160     'units'         'degree_north'
0161     'coordinates'   'time depth latitude longitude'
0162     '_FillValue'    default_fill_value
0163     'sources'                []
0164     'conversion'             []
0165     'filling'                [] };
0166 
0167   var_attr_list.waypoint_longitude = {
0168     'long_name'     'waypoint longitude'
0169     'standard_name' 'longitude'
0170     'units'         'degree_east'
0171     'coordinates'   'time depth latitude longitude'
0172     '_FillValue'    default_fill_value
0173     'sources'                []
0174     'conversion'             []
0175     'filling'                [] };
0176 
0177   var_attr_list.distance_over_ground = {
0178     'long_name'     'distance over ground flown since mission start'
0179     'standard_name' 'distance'
0180     'units'         'km'
0181     'coordinates'   'time depth latitude longitude'
0182     '_FillValue'    default_fill_value
0183     'sources'                []
0184     'method'                 [] };
0185 
0186   var_attr_list.transect_index = {
0187     'long_name'     'transect index'
0188     'standard_name' ''
0189     'units'         '1'
0190     'coordinates'   'time depth latitude longitude'
0191     '_FillValue'    default_fill_value
0192     'sources'                []
0193     'method'                 [] };
0194 
0195   var_attr_list.profile_index = {
0196     'long_name'     'profile index'
0197     'standard_name' ''
0198     'units'         '1'
0199     'comment'       'N = inside profile N, N + 0.5 = between profiles N and N + 1'
0200     'coordinates'   'time depth latitude longitude'
0201     '_FillValue'    default_fill_value
0202     'sources'                []
0203     'method'                 []
0204     'length'                 []
0205     'period'                 []
0206     'inversion'              []
0207     'interrupt'              []
0208     'stall'                  []
0209     'shake'                  [] };
0210 
0211   var_attr_list.profile_direction = {
0212     'long_name'     'glider vertical speed direction'
0213     'standard_name' ''
0214     'units'         '1'
0215     'comment'       '-1 = ascending, 0 = inflecting or stalled, 1 = descending'
0216     'coordinates'   'time depth latitude longitude'
0217     '_FillValue'    default_fill_value
0218     'sources'                []
0219     'method'                 [] };
0220 
0221   var_attr_list.conductivity = {
0222     'long_name'     'water conductivity'
0223     'standard_name' 'sea_water_conductivity'
0224     'units'         'S m-1'
0225     'coordinates'   'time depth latitude longitude'
0226     '_FillValue'    default_fill_value
0227     'sources'                []
0228     'conversion'             []
0229     'calibration'            []
0230     'calibration_parameters' [] };
0231 
0232   var_attr_list.temperature = {
0233     'long_name'     'water temperature'
0234     'standard_name' 'sea_water_temperature'
0235     'units'         'Celsius'
0236     'coordinates'   'time depth latitude longitude'
0237     '_FillValue'    default_fill_value
0238     'sources'                []
0239     'conversion'             []
0240     'calibration'            []
0241     'calibration_parameters' [] };
0242 
0243   var_attr_list.pressure = {
0244     'long_name'     'water pressure'
0245     'standard_name' 'pressure'
0246     'units'         'dbar'
0247     'coordinates'   'time depth latitude longitude'
0248     '_FillValue'    default_fill_value
0249     'sources'                []
0250     'conversion'             []
0251     'calibration'            []
0252     'calibration_parameters' []
0253     'filter_method'          []
0254     'filter_parameters'      [] };
0255 
0256   var_attr_list.time_ctd = {
0257     'long_name'     'CTD epoch time'
0258     'standard_name' 'time'
0259     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0260     'comment'       'CTD time stamp'
0261     'coordinates'   'time depth latitude longitude'
0262     '_FillValue'    default_fill_value
0263     'sources'                []
0264     'conversion'             [] };
0265 
0266   var_attr_list.depth_ctd = {
0267     'long_name'     'CTD depth'
0268     'standard_name' 'depth'
0269     'units'         'm'
0270     'comment'       'depth derived from CTD pressure sensor'
0271     'coordinates'   'time depth latitude longitude'
0272     '_FillValue'    default_fill_value
0273     'sources'                []
0274     'method'                 [] };
0275 
0276   var_attr_list.temperature_corrected_sensor = {
0277     'long_name'     'water temperature with sensor time response corrected'
0278     'standard_name' 'sea_water_temperature'
0279     'units'         'Celsius'
0280     'coordinates'   'time depth latitude longitude'
0281     '_FillValue'    default_fill_value
0282     'sources'                []
0283     'method'                 []
0284     'parameters'             []
0285     'parameter_method'       []
0286     'parameter_estimator'    []
0287     'profile_min_range'      []
0288     'profile_gap_ratio'      [] };
0289 
0290   var_attr_list.temperature_corrected_thermal = {
0291     'long_name'     'water temperature with thermal lag corrected'
0292     'standard_name' 'sea_water_temperature'
0293     'units'         'Celsius'
0294     'coordinates'   'time depth latitude longitude'
0295     '_FillValue'    default_fill_value
0296     'sources'                []
0297     'method'                 []
0298     'parameters'             []
0299     'parameter_method'       []
0300     'parameter_estimator'    []
0301     'profile_min_range'      []
0302     'profile_gap_ratio'      [] };
0303 
0304   var_attr_list.conductivity_corrected_sensor = {
0305     'long_name'     'water conductivity with sensor time response corrected'
0306     'standard_name' 'sea_water_conductivity'
0307     'units'         'S m-1'
0308     'coordinates'   'time depth latitude longitude'
0309     '_FillValue'    default_fill_value
0310     'sources'                []
0311     'method'                 []
0312     'parameters'             []
0313     'parameter_method'       []
0314     'parameter_estimator'    []
0315     'profile_min_range'      []
0316     'profile_gap_ratio'      [] };
0317 
0318   var_attr_list.conductivity_corrected_thermal = {
0319     'long_name'     'water conductivity with thermal lag corrected'
0320     'standard_name' 'sea_water_conductivity'
0321     'units'         'S m-1'
0322     'coordinates'   'time depth latitude longitude'
0323     '_FillValue'    default_fill_value
0324     'sources'                []
0325     'method'                 []
0326     'parameters'             []
0327     'parameter_method'       []
0328     'parameter_estimator'    []
0329     'profile_min_range'      []
0330     'profile_gap_ratio'      [] };
0331 
0332   var_attr_list.salinity = {
0333     'long_name'     'water salinity'
0334     'standard_name' 'sea_water_salinity'
0335     'units'         'PSU'
0336     'coordinates'   'time depth latitude longitude'
0337     '_FillValue'    default_fill_value
0338     'sources'                []
0339     'method'                 [] };
0340 
0341   var_attr_list.salinity_corrected_thermal = {
0342     'long_name'     'water salinity from raw conductivity and temperature with thermal lag corrected'
0343     'standard_name' 'sea_water_salinity'
0344     'units'         'PSU'
0345     'coordinates'   'time depth latitude longitude'
0346     '_FillValue'    default_fill_value
0347     'sources'                []
0348     'method'                 [] };
0349 
0350   var_attr_list.salinity_corrected_sensor = {
0351     'long_name'     'water salinity from conductivity and temperature with sensor lag corrected'
0352     'standard_name' 'sea_water_salinity'
0353     'units'         'PSU'
0354     'coordinates'   'time depth latitude longitude'
0355     '_FillValue'    default_fill_value
0356     'sources'                []
0357     'method'                 [] };
0358 
0359   var_attr_list.salinity_corrected_sensor_thermal = {
0360     'long_name'     'water salinity from conductivity and temperature with sensor lag corrected and thermal lag corrected'
0361     'standard_name' 'sea_water_salinity'
0362     'units'         'PSU'
0363     'coordinates'   'time depth latitude longitude'
0364     '_FillValue'    default_fill_value
0365     'sources'                []
0366     'method'                 [] };
0367 
0368   var_attr_list.density = {
0369     'long_name'     'water density using salinity from raw temperature and raw conductivity'
0370     'standard_name' 'sea_water_density'
0371     'units'         'kg m-3'
0372     'coordinates'   'time depth latitude longitude'
0373     '_FillValue'    default_fill_value
0374     'sources'                []
0375     'method'                 [] };
0376 
0377   var_attr_list.density_corrected_thermal = {
0378     'long_name'     'water density using salinity from raw conductivity and temperature with thermal lag corrected'
0379     'standard_name' 'sea_water_density'
0380     'units'         'kg m-3'
0381     'coordinates'   'time depth latitude longitude'
0382     '_FillValue'    default_fill_value
0383     'sources'                []
0384     'method'                 [] };
0385 
0386   var_attr_list.density_corrected_sensor = {
0387     'long_name'     'water density using salinity from conductivity and temperature with sensor lag corrected'
0388     'standard_name' 'sea_water_density'
0389     'units'         'kg m-3'
0390     'coordinates'   'time depth latitude longitude'
0391     '_FillValue'    default_fill_value
0392     'sources'                []
0393     'method'                 [] };
0394 
0395   var_attr_list.density_corrected_sensor_thermal = {
0396     'long_name'     'water density using salinity from conductivity and temperature with sensor lag corrected and thermal lag corrected'
0397     'standard_name' 'sea_water_density'
0398     'units'         'kg m-3'
0399     'coordinates'   'time depth latitude longitude'
0400     '_FillValue'    default_fill_value
0401     'sources'                []
0402     'method'                 [] };
0403 
0404   var_attr_list.potential_temperature = {
0405     'long_name'     'water potential temperature'
0406     'standard_name' 'sea_water_potential_temperature'
0407     'units'         'Celsius'
0408     'coordinates'   'time depth latitude longitude'
0409     '_FillValue'    default_fill_value
0410     'sources'                [] };
0411 
0412   var_attr_list.potential_density = {
0413     'long_name'     'water potential density'
0414     'standard_name' 'sea_water_potential_density'
0415     'units'         'kg m-3'
0416     'coordinates'   'time depth latitude longitude'
0417     '_FillValue'    default_fill_value
0418     'sources'                [] };
0419 
0420   var_attr_list.sound_velocity = {
0421     'long_name'     'sound velocity'
0422     'standard_name' 'sea_water_sound_velocity'
0423     'units'         'm s-1'
0424     'coordinates'   'time depth latitude longitude'
0425     '_FillValue'    default_fill_value
0426     'sources'                [] };
0427 
0428   var_attr_list.backscatter_470 = {
0429     'long_name'     'blue backscattering'
0430     'standard_name' 'blue_backscattering'
0431     'units'         '1'
0432     'coordinates'   'time depth latitude longitude'
0433     '_FillValue'    default_fill_value
0434     'sources'                [] };
0435 
0436   var_attr_list.backscatter_532 = {
0437     'long_name'     'green backscattering'
0438     'standard_name' 'green_backscattering'
0439     'units'         '1'
0440     'coordinates'   'time depth latitude longitude'
0441     '_FillValue'    default_fill_value
0442     'sources'                [] };
0443 
0444   var_attr_list.backscatter_660 = {
0445     'long_name'     'red backscattering'
0446     'standard_name' 'red_backscattering'
0447     'units'         '1'
0448     'coordinates'   'time depth latitude longitude'
0449     '_FillValue'    default_fill_value
0450     'sources'                [] };
0451 
0452   var_attr_list.backscatter_700 = {
0453     'long_name'     '700 nm wavelength backscatter'
0454     'standard_name' '700nm_backscatter'
0455     'units'         '1'
0456     'coordinates'   'time depth latitude longitude'
0457     '_FillValue'    default_fill_value
0458     'sources'                [] };
0459 
0460   var_attr_list.backscatter = {
0461     'long_name'     'backscattering'
0462     'standard_name' 'backscattering'
0463     'units'         '1'
0464     'coordinates'   'time depth latitude longitude'
0465     '_FillValue'    default_fill_value
0466     'sources'                [] };
0467 
0468   var_attr_list.chlorophyll = {
0469     'long_name'     'chlorophyll'
0470     'standard_name' 'concentration_of_chlorophyll_in_sea_water'
0471     'units'         'mg m-3'
0472     'coordinates'   'time depth latitude longitude'
0473     '_FillValue'    default_fill_value
0474     'sources'                []
0475     'conversion'             []
0476     'calibration'            []
0477     'calibration_parameters' [] };
0478 
0479   var_attr_list.turbidity = {
0480     'long_name'     'turbidity'
0481     'standard_name' 'turbidity'
0482     'units'         'NTU'
0483     'coordinates'   'time depth latitude longitude'
0484     '_FillValue'    default_fill_value
0485     'sources'                []
0486     'conversion'             []
0487     'calibration'            []
0488     'calibration_parameters' [] };
0489 
0490   var_attr_list.cdom = {
0491     'long_name'     'CDOM'
0492     'standard_name' 'concentration_of_coloured_dissolved_organic_matter'
0493     'units'         'ppb'
0494     'coordinates'   'time depth latitude longitude'
0495     '_FillValue'    default_fill_value
0496     'sources'                []
0497     'conversion'             []
0498     'calibration'            []
0499     'calibration_parameters' [] };
0500 
0501   var_attr_list.scatter_650 = {
0502     'long_name'     '650 nm wavelength scattering'
0503     'units'         '1'
0504     'coordinates'   'time depth latitude longitude'
0505     '_FillValue'    default_fill_value
0506     'sources'                []
0507     'conversion'             []
0508     'calibration'            []
0509     'calibration_parameters' [] };
0510 
0511   var_attr_list.temperature_optics = {
0512     'long_name'     'optic sensor temperature'
0513     'standard_name' 'temperature_of_optic_sensor_in_sea_water'
0514     'units'         'Celsius'
0515     'coordinates'   'time depth latitude longitude'
0516     '_FillValue'    default_fill_value
0517     'sources'                []
0518     'conversion'             []
0519     'calibration'            []
0520     'calibration_parameters' [] };
0521 
0522   var_attr_list.time_optics = {
0523     'long_name'     'optic sensor epoch time'
0524     'standard_name' 'time'
0525     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0526     'comment'       'optic sensor time stamp'
0527     'coordinates'   'time depth latitude longitude'
0528     '_FillValue'    default_fill_value
0529     'sources'                []
0530     'conversion'             [] };
0531 
0532   var_attr_list.oxygen_concentration = {
0533     'long_name'     'oxygen concentration'
0534     'standard_name' 'mole_concentration_of_dissolved_molecular_oxygen_in_sea_water'
0535     'units'         'umol l-1'
0536     'coordinates'   'time depth latitude longitude'
0537     '_FillValue'    default_fill_value
0538     'sources'                []
0539     'conversion'             []
0540     'calibration'            []
0541     'calibration_parameters' [] };
0542 
0543   var_attr_list.oxygen_saturation = {
0544     'long_name'     'oxygen saturation'
0545     'standard_name' 'fractional_saturation_of_oxygen_in_sea_water'
0546     'units'         '1'
0547     'coordinates'   'time depth latitude longitude'
0548     '_FillValue'    default_fill_value
0549     'sources'                []
0550     'conversion'             []
0551     'calibration'            []
0552     'calibration_parameters' [] };
0553 
0554   var_attr_list.oxygen_frequency = {
0555     'long_name'     'oxygen frequency'
0556     'standard_name' 'frequency_output_of_sensor_for_oxygen_in_sea_water'
0557     'units'         'Hz'
0558     'coordinates'   'time depth latitude longitude'
0559     '_FillValue'    default_fill_value
0560     'sources'                []
0561     'conversion'             []
0562     'calibration'            []
0563     'calibration_parameters' [] };
0564 
0565   var_attr_list.time_oxygen = {
0566     'long_name'     'oxygen sensor epoch time'
0567     'standard_name' 'time'
0568     'units'         'seconds since 1970-01-01 00:00:00 +00:00'
0569     'comment'       'oxygen sensor time stamp'
0570     'coordinates'   'time depth latitude longitude'
0571     '_FillValue'    default_fill_value
0572     'sources'                []
0573     'conversion'             [] };
0574 
0575   var_attr_list.temperature_oxygen = {
0576     'long_name'     'oxygen sensor temperature'
0577     'standard_name' 'temperature_of_sensor_for_oxygen_in_sea_water'
0578     'units'         'Celsius'
0579     'coordinates'   'time depth latitude longitude'
0580     '_FillValue'    default_fill_value
0581     'sources'                []
0582     'conversion'             []
0583     'calibration'            []
0584     'calibration_parameters' [] };
0585 
0586   var_attr_list.irradiance_412 = {
0587     'long_name'     'irradiance at 412nm wavelength'
0588     'standard_name' 'downwelling_spectral_spherical_irradiance_in_sea_water'
0589     'units'         'uW cm-2 nm-1'
0590     'coordinates'   'time depth latitude longitude'
0591     '_FillValue'    default_fill_value
0592     'sources'                [] };
0593 
0594   var_attr_list.irradiance_442 = {
0595     'long_name'     'irradiance at 442nm wavelength'
0596     'standard_name' 'downwelling_spectral_spherical_irradiance_in_sea_water'
0597     'units'         'uW cm-2 nm-1'
0598     'coordinates'   'time depth latitude longitude'
0599     '_FillValue'    default_fill_value
0600     'sources'                [] };
0601 
0602   var_attr_list.irradiance_491 = {
0603     'long_name'     'irradiance at 491nm wavelength'
0604     'standard_name' 'downwelling_spectral_spherical_irradiance_in_sea_water'
0605     'units'         'uW cm-2 nm-1'
0606     'coordinates'   'time depth latitude longitude'
0607     '_FillValue'    default_fill_value
0608     'sources'                [] };
0609 
0610   var_attr_list.irradiance_664 = {
0611     'long_name'     'irradiance at 664nm wavelength'
0612     'standard_name' 'downwelling_spectral_spherical_irradiance_in_sea_water'
0613     'units'         'uW cm-2 nm-1'
0614     'coordinates'   'time depth latitude longitude'
0615     '_FillValue'    default_fill_value
0616     'sources'                [] };
0617 
0618   var_attr_list.water_velocity_eastward = {
0619     'long_name'     'mean eastward water velocity in segment'
0620     'standard_name' 'eastward_water_velocity'
0621     'units'         'm s-1'
0622     'coordinates'   'time depth latitude longitude'
0623     '_FillValue'    default_fill_value
0624     'sources'                []
0625     'conversion'             [] };
0626 
0627   var_attr_list.water_velocity_northward = {
0628     'long_name'     'mean northward water velocity in segment'
0629     'standard_name' 'northward_water_velocity'
0630     'units'         'm s-1'
0631     'coordinates'   'time depth latitude longitude'
0632     '_FillValue'    default_fill_value
0633     'sources'                []
0634     'conversion'             [] };
0635 
0636   var_attr_list.fluorescence_270_340 = {
0637     'long_name'     'Minifluo-UV1 fluorescence Ex./Em. = 270/340nm'
0638     'standard_name' 'fluorescence_excitation_270nm_emission_340nm'
0639     'units'         'counts'
0640     'coordinates'   'time depth latitude longitude'
0641     'comment1'      'Tryptophan-like or Naphtalene-like measurements'
0642     'comment2'      '270nm is the nominal wavelength of the LED'
0643     '_FillValue'    default_fill_value
0644     'sources'                [] };
0645 
0646   var_attr_list.fluorescence_255_360 = {
0647     'long_name'     'Minifluo-UV1 fluorescence Ex./Em. = 255/360nm'
0648     'standard_name' 'fluorescence_excitation_255nm_emission_360nm'
0649     'units'         'counts'
0650     'coordinates'   'time depth latitude longitude'
0651     'comment1'      'Phenanthren-like measurements or water-soluble fraction of petroleum'
0652     'comment2'      '255nm is the nominal wavelength of the LED'
0653     '_FillValue'    default_fill_value
0654     'sources'                [] };
0655 
0656   var_attr_list.fluorescence_monitoring_270_340 = {
0657     'long_name'     'Minifluo-UV1 monitoring channel of the 270nm LED'
0658     'standard_name' 'fluorescence_monitoring_270_340nm'
0659     'units'         'counts'
0660     'coordinates'   'time depth latitude longitude'
0661     'comment1'      'Measures variations in LED excitation wavelength'
0662     'comment2'      '270nm is the nominal wavelength of the LED'
0663     '_FillValue'    default_fill_value
0664     'sources'                [] };
0665 
0666   var_attr_list.fluorescence_monitoring_255_360 = {
0667     'long_name'     'Minifluo-UV1 monitoring channel of the 255nm LED'
0668     'standard_name' 'fluorescence_monitoring_255_360nm'
0669     'units'         'counts'
0670     'coordinates'   'time depth latitude longitude'
0671     'comment1'      'Measures variations in LED excitation wavelength'
0672     'comment2'      '255nm is the nominal wavelength of the LED'
0673     '_FillValue'    default_fill_value
0674     'sources'                [] };
0675 
0676   var_attr_list.fluorescence_260_315 = {
0677     'long_name'     'Minifluo-UV2 fluorescence Ex./Em. = 260/315nm'
0678     'standard_name' 'fluorescence_excitation_260nm_emission_315nm'
0679     'units'         'counts'
0680     'coordinates'   'time depth latitude longitude'
0681     'comment1'      'Fluorene-like measurements'
0682     'comment2'      '260nm is the nominal wavelength of the LED'
0683     '_FillValue'    default_fill_value
0684     'sources'                [] };
0685 
0686   var_attr_list.fluorescence_270_376 = {
0687     'long_name'     'Minifluo-UV2 fluorescence Ex./Em. = 270/376nm'
0688     'standard_name' 'fluorescence_excitation_270nm_emission_376nm'
0689     'units'         'counts'
0690     'coordinates'   'time depth latitude longitude'
0691     'comment1'      'Pyrene-like measurements'
0692     'comment2'      '270nm is the nominal wavelength of the LED'
0693     '_FillValue'    default_fill_value
0694     'sources'                [] };
0695 
0696   var_attr_list.fluorescence_monitoring_260_315 = {
0697     'long_name'     'Minifluo-UV2 monitoring channel of the 260nm LED'
0698     'standard_name' 'fluorescence_monitoring_260_315nm'
0699     'units'         'counts'
0700     'coordinates'   'time depth latitude longitude'
0701     'comment1'      'Measures variations in LED excitation wavelength'
0702     'comment2'      '260nm is the nominal wavelength of the LED'
0703     '_FillValue'    default_fill_value
0704     'sources'                [] };
0705 
0706   var_attr_list.fluorescence_monitoring_270_376 = {
0707     'long_name'     'Minifluo-UV2 monitoring channel of the 270nm LED'
0708     'standard_name' 'fluorescence_monitoring_270_376nm'
0709     'units'         'counts'
0710     'coordinates'   'time depth latitude longitude'
0711     'comment1'      'Measures variations in LED excitation wavelength'
0712     'comment2'      '270nm is the nominal wavelength of the LED'
0713     '_FillValue'    default_fill_value
0714     'sources'                [] };
0715 
0716   var_attr_list.methane_concentration = {
0717     'long_name'     'Methane concentration (scaled)'
0718     'standard_name' 'methane_concentration'
0719     'units'         'mg m-3'
0720     'coordinates'   'time depth latitude longitude'
0721     '_FillValue'    default_fill_value
0722     'sources'                [] };
0723 
0724 
0725   %% Define global attributes (they may be overwritten with deployment values).
0726   % To define the global attributes easily and readably, add them to this
0727   % cell array (attribute name in first column and attribute value in second).
0728   % This cell array will be converted at the end of the function to the proper
0729   % representation needed by SAVENC.
0730   global_atts = ...
0731   {
0732     'abstract'                     '' % deployment_description
0733     'acknowledgement'              '' % deployment_acknowledgement
0734     'author'                       '' % deployment_author
0735     'author_email'                 '' % deployment_author_email
0736     'cdm_data_type'                'Trajectory'
0737     'citation'                     '' % deployment_citation
0738     'comment'                      'Data regularized, corrected and/or derived from raw glider data.'
0739     'Conventions'                  'CF-1.6'
0740     'creator'                      '' % deployment_author
0741     'creator_email'                '' % deployment_author_email
0742     'creator_url'                  '' % deployment_author_url
0743     'data_center'                  '' % deployment_data_center
0744     'data_center_email'            '' % deployment_data_center_email
0745     'data_mode'                    'delayed time'
0746     'date_modified'                'undefined'
0747     'featureType'                  'trajectory'
0748     'geospatial_lat_max'           'undefined'
0749     'geospatial_lat_min'           'undefined'
0750     'geospatial_lat_units'         'undefined'
0751     'geospatial_lon_max'           'undefined'
0752     'geospatial_lon_min'           'undefined'
0753     'geospatial_lon_units'         'undefined'
0754     'history'                      sprintf('Product generated by the glider toolbox version %s (https://github.com/socib/glider_toolbox).', configGliderToolboxVersion())
0755     'institution'                  '' % institution_name
0756     'institution_references'       '' % institution_references
0757     'instrument'                   '' % instrument_name
0758     'instrument_manufacturer'      '' % instrument_manufacturer
0759     'instrument_model'             '' % instrument_model
0760     'license'                      'Approved for public release. Distribution Unlimited.' % deployment_distribution_statement
0761     'netcdf_version'               '4.0.1'
0762     'positioning_system'           'GPS and dead reckoning'
0763     'principal_investigator'       '' % deployment_principal_investigator
0764     'principal_investigator_email' '' % deployment_principal_investigator_email
0765     'processing_level'             'L1 processed data with corrections and derivations'
0766     'project'                      '' % deployment_project
0767     'publisher'                    '' % deployment_publisher
0768     'publisher_email'              '' % deployment_publisher_email
0769     'publisher_url'                '' % deployment_publisher_url
0770     'source'                       'glider'
0771     'source_files'                 'undefined' % source_files field set by processing script after loading data.
0772     'standard_name_vocabulary'     'http://cf-pcmdi.llnl.gov/documents/cf-standard-names/standard-name-table/16/cf-standard-name-table.html'
0773     'summary'                      '' % deployment_description
0774     'time_coverage_end'            'undefined'
0775     'time_coverage_start'          'undefined'
0776     'title'                        'Glider deployment delayed time processed data'
0777     'transmission_system'          'IRIDIUM'
0778   };
0779 
0780 
0781   %% Define preset dimensions.
0782   time_dimension = struct('name', {'time'}, 'length', {0});
0783 
0784 
0785   %% Return global and variable metadata in the correct format.
0786   ncl1_info = struct();
0787   % Set the dimensions.
0788   ncl1_info.dimensions = time_dimension;
0789   % Set the global attributes.
0790   ncl1_info.attributes = cell2struct(global_atts, {'name' 'value'}, 2);
0791   % Set the variable metadata.
0792   ncl1_info.variables = struct();
0793   var_name_list = fieldnames(var_attr_list);
0794   for var_name_idx = 1:numel(var_name_list)
0795     var_name = var_name_list{var_name_idx};
0796     var_atts = var_attr_list.(var_name);
0797     ncl1_info.variables.(var_name).dimensions = {time_dimension.name};
0798     ncl1_info.variables.(var_name).attributes = ...
0799       cell2struct(var_atts, {'name' 'value'}, 2);
0800   end
0801 
0802 end

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