configDTOutputNetCDFL2

PURPOSE ^

CONFIGDTOUTPUTNETCDFL2 Configure NetCDF output for gridded glider deployment data in delayed time.

SYNOPSIS ^

function ncl2_info = configDTOutputNetCDFL2()

DESCRIPTION ^

CONFIGDTOUTPUTNETCDFL2  Configure NetCDF output for gridded glider deployment data in delayed time.

  Syntax:
    NCL2_INFO = CONFIGDTOUTPUTNETCDFL2()

  Description:
    NCL2_INFO = CONFIGDTOUTPUTNETCDFL2() should return a struct
    describing the structure of the NetCDF file for gridded 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 GRIDGLIDERDATA.

    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:
    ncl2_info = configDTOutputNetCDFL2()

  See also:
    GENERATEOUTPUTNETCDF
    SAVENC
    GRIDGLIDERDATA

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

configDTOutputNetCDFL2.m

SOURCE CODE ^

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

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