CONFIGRTOUTPUTNETCDFL0 Configure NetCDF output for raw SeaExplorer glider deployment data in real time. Syntax: NCL0_INFO = CONFIGRTOUTPUTNETCDFL0SEAEXPLORER() Description: NCL0_INFO = CONFIGRTOUTPUTNETCDFL0SEAEXPLORER() should return a struct describing the structure of the NetCDF file for raw SeaExplorer 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 LOADSEAEXPLORERDATA. 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 = configRTOutputNetCDFL0SeaExplorer() See also: GENERATEOUTPUTNETCDF SAVENC LOADSEAEXPLORERDATA Authors: Frederic Cyr <Frederic.Cyr@mio.osupytheas.fr> Joan Pau Beltran <joanpau.beltran@socib.cat>
configRTOutputNetCDFL0SeaExplorer.m
0001 function ncl0_info = configRTOutputNetCDFL0SeaExplorer() 0002 %CONFIGRTOUTPUTNETCDFL0 Configure NetCDF output for raw SeaExplorer glider deployment data in real time. 0003 % 0004 % Syntax: 0005 % NCL0_INFO = CONFIGRTOUTPUTNETCDFL0SEAEXPLORER() 0006 % 0007 % Description: 0008 % NCL0_INFO = CONFIGRTOUTPUTNETCDFL0SEAEXPLORER() should return a struct 0009 % describing the structure of the NetCDF file for raw SeaExplorer 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 % LOADSEAEXPLORERDATA. 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 = configRTOutputNetCDFL0SeaExplorer() 0044 % 0045 % See also: 0046 % GENERATEOUTPUTNETCDF 0047 % SAVENC 0048 % LOADSEAEXPLORERDATA 0049 % 0050 % Authors: 0051 % Frederic Cyr <Frederic.Cyr@mio.osupytheas.fr> 0052 % Joan Pau Beltran <joanpau.beltran@socib.cat> 0053 0054 % Copyright (C) 2016 0055 % ICTS SOCIB - Servei d'observacio i prediccio costaner de les Illes Balears 0056 % <http://www.socib.es> 0057 % 0058 % This program is free software: you can redistribute it and/or modify 0059 % it under the terms of the GNU General Public License as published by 0060 % the Free Software Foundation, either version 3 of the License, or 0061 % (at your option) any later version. 0062 % 0063 % This program is distributed in the hope that it will be useful, 0064 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0065 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0066 % GNU General Public License for more details. 0067 % 0068 % You should have received a copy of the GNU General Public License 0069 % along with this program. If not, see <http://www.gnu.org/licenses/>. 0070 0071 error(nargchk(0, 0, nargin, 'struct')); 0072 0073 %% Define variable information. 0074 % To define the variable attributes easily and readably, add the corresponding 0075 % variable field to the struct defined below, with its attributes defined in 0076 % a cell array (attribute name in first column and attribute value in second). 0077 % This cell array will be converted at the end of the function to the proper 0078 % representation needed by SAVENC. 0079 0080 default_fill_value = realmax('double'); 0081 0082 %% From glider files. 0083 0084 % Navigation time. 0085 var_attr_list.Timestamp = { 0086 'long_name' 'epoch time (navigation board)' 0087 'standard_name' 'time' 0088 'units' 'seconds since 1970-01-01 00:00:00 +00:00' 0089 '_FillValue' default_fill_value }; 0090 0091 var_attr_list.Lat = { 0092 'long_name' 'GPS latitude (low freq.)' 0093 'standard_name' 'latitude' 0094 'units' 'nmea_degree' 0095 '_FillValue' default_fill_value }; 0096 0097 var_attr_list.Lon = { 0098 'long_name' 'GPS longitude (low freq.)' 0099 'standard_name' 'longitude' 0100 'units' 'nmea_degree' 0101 '_FillValue' default_fill_value }; 0102 0103 var_attr_list.Depth = { 0104 'long_name' 'glider measured depth' 0105 'standard_name' 'depth' 0106 'units' 'm' 0107 'positive' 'down' 0108 '_FillValue' default_fill_value }; 0109 0110 var_attr_list.Roll = { 0111 'long_name' 'glider roll' 0112 'units' 'Degrees' 0113 'comment' 'greater than 0 is port wing up' 0114 '_FillValue' default_fill_value }; 0115 0116 var_attr_list.Pitch = { 0117 'long_name' 'glider pitch' 0118 'units' 'Degrees' 0119 '_FillValue' default_fill_value }; 0120 0121 var_attr_list.Heading = { 0122 'long_name' 'Measured heading' 0123 'units' 'Degrees' 0124 '_FillValue' default_fill_value }; 0125 0126 var_attr_list.DesireH = { 0127 'long_name' 'Target heading commanded by user' 0128 'units' 'Degrees' 0129 '_FillValue' default_fill_value }; 0130 0131 var_attr_list.Voltage = { 0132 'long_name' 'battery voltage' 0133 'units' 'V' 0134 '_FillValue' default_fill_value }; 0135 0136 var_attr_list.NavState = { 0137 'long_name' 'Number describing navigation state (see manual)' 0138 'units' 'N/A' 0139 '_FillValue' default_fill_value }; 0140 0141 var_attr_list.SecurityLevel = { 0142 'long_name' 'Sum of security code (see Appendix).' 0143 'units' 'N/A' 0144 '_FillValue' default_fill_value }; 0145 0146 var_attr_list.Pa = { 0147 'long_name' 'Internal body pressure' 0148 'units' 'Pa' 0149 '_FillValue' default_fill_value }; 0150 0151 var_attr_list.BallastCmd = { 0152 'long_name' 'Ballast volume commanded by user' 0153 'units' 'ml' 0154 '_FillValue' default_fill_value }; 0155 0156 var_attr_list.BallastPos = { 0157 'long_name' 'Ballast volume measured by potentiometer' 0158 'units' 'ml' 0159 '_FillValue' default_fill_value }; 0160 0161 var_attr_list.LinCmd = { 0162 'long_name' 'Linear position commanded for batteries' 0163 'units' 'mm' 0164 '_FillValue' default_fill_value }; 0165 0166 var_attr_list.LinPos = { 0167 'long_name' 'Linear position returned by potentiometer' 0168 'units' 'mm' 0169 '_FillValue' default_fill_value }; 0170 0171 var_attr_list.AngCmd = { 0172 'long_name' 'Rotational position commanded for batteries' 0173 'units' 'rad' 0174 '_FillValue' default_fill_value }; 0175 0176 var_attr_list.AngPos = { 0177 'long_name' 'Rotational position returned by potentiometer' 0178 'units' 'rad' 0179 '_FillValue' default_fill_value }; 0180 0181 var_attr_list.Altitude = { 0182 'long_name' 'Measured distance to seabed' 0183 'units' 'm' 0184 '_FillValue' default_fill_value }; 0185 0186 0187 %% From payload files. 0188 0189 % Payload time. 0190 var_attr_list.PLD_REALTIMECLOCK = { 0191 'long_name' 'epoch time (science bay)' 0192 'standard_name' 'time' 0193 'units' 'seconds since 1970-01-01 00:00:00 +00:00' 0194 '_FillValue' default_fill_value }; 0195 0196 % Other navigation info 0197 var_attr_list.NAV_LATITUDE = { 0198 'long_name' 'GPS latitude (High freq.)' 0199 'standard_name' 'latitude' 0200 'units' 'nmea_degree' 0201 '_FillValue' default_fill_value }; 0202 0203 var_attr_list.NAV_LONGITUDE = { 0204 'long_name' 'GPS longitude (High freq.)' 0205 'standard_name' 'longitude' 0206 'units' 'nmea_degree' 0207 '_FillValue' default_fill_value }; 0208 0209 var_attr_list.NAV_NUMBEROFYO = { 0210 'long_name' 'Yo number (from glider)' 0211 'units' '1' 0212 '_FillValue' default_fill_value }; 0213 0214 var_attr_list.NAV_MISSIONID = { 0215 'long_name' 'Mission reference ID (from glider)' 0216 'units' '1' 0217 '_FillValue' default_fill_value }; 0218 0219 var_attr_list.NAV_RESSOURCE = { 0220 'long_name' 'Number describing navigation state (same as NavState from glider)' 0221 'units' 'N/A' 0222 '_FillValue' default_fill_value }; 0223 0224 % Science CTD (legacy) 0225 var_attr_list.SBD_TEMPERATURE = { 0226 'long_name' 'water temperature' 0227 'standard_name' 'sea_water_temperature' 0228 'units' 'Celsius' 0229 '_FillValue' default_fill_value }; 0230 0231 var_attr_list.SBD_CONDUCTIVITY = { 0232 'long_name' 'water conductivity' 0233 'standard_name' 'sea_water_conductivity' 0234 'units' 'S m-1' 0235 '_FillValue' default_fill_value }; 0236 0237 var_attr_list.SBD_PRESSURE = { 0238 'long_name' 'water pressure' 0239 'standard_name' 'pressure' 0240 'units' 'dbar' 0241 '_FillValue' default_fill_value }; 0242 0243 var_attr_list.SBD_DOF = { 0244 'long_name' 'dissolved oxygen frequency' 0245 'standard_name' 'dissolved_oxygen_frequency' 0246 'units' 'Hz' 0247 '_FillValue' default_fill_value }; 0248 0249 % Science CTD (new) 0250 var_attr_list.GPCTD_TEMPERATURE = { 0251 'long_name' 'water temperature' 0252 'standard_name' 'sea_water_temperature' 0253 'units' 'Celsius' 0254 '_FillValue' default_fill_value }; 0255 0256 var_attr_list.GPCTD_CONDUCTIVITY = { 0257 'long_name' 'water conductivity' 0258 'standard_name' 'sea_water_conductivity' 0259 'units' 'S m-1' 0260 '_FillValue' default_fill_value }; 0261 0262 var_attr_list.GPCTD_PRESSURE = { 0263 'long_name' 'water pressure' 0264 'standard_name' 'pressure' 0265 'units' 'dbar' 0266 '_FillValue' default_fill_value }; 0267 0268 var_attr_list.GPCTD_DOF = { 0269 'long_name' 'dissolved oxygen frequency' 0270 'standard_name' 'dissolved_oxygen_frequency' 0271 'units' 'Hz' 0272 '_FillValue' default_fill_value }; 0273 0274 % FLBBCD sensor 0275 var_attr_list.TRI_CHL_COUNT = { 0276 'long_name' 'Chlorophyll raw' 0277 'standard_name' 'Chlorophyll_raw_counts' 0278 'units' 'counts' 0279 'comment' 'WETLabs ECO puck FLBBCD' 0280 '_FillValue' default_fill_value }; 0281 0282 var_attr_list.TRI_CHL_SCALED = { 0283 'long_name' 'Chlorophyll concentration' 0284 'standard_name' 'Chlorophyll_concentration' 0285 'units' 'ug L-1' 0286 'comment' 'WETLabs ECO puck FLBBCD' 0287 '_FillValue' default_fill_value }; 0288 0289 var_attr_list.TRI_CDOM_COUNT = { 0290 'long_name' 'Coloured dissolved organic matter raw' 0291 'standard_name' 'CDOM_raw_counts' 0292 'units' 'counts' 0293 'comment' 'WETLabs ECO puck FLBBCD' 0294 '_FillValue' default_fill_value }; 0295 0296 var_attr_list.TRI_CDOM_SCALED = { 0297 'long_name' 'Coloured dissolved organic matter concentration' 0298 'standard_name' 'CDOM_concentration' 0299 'units' 'ug L-1' 0300 'comment' 'WETLabs ECO puck FLBBCD' 0301 '_FillValue' default_fill_value }; 0302 0303 var_attr_list.TRI_BB_700_COUNT = { 0304 'long_name' 'Backscattering raw' 0305 'standard_name' 'Backscattering_raw_counts' 0306 'units' 'counts' 0307 'comment' 'WETLabs ECO puck FLBBCD' 0308 '_FillValue' default_fill_value }; 0309 0310 var_attr_list.TRI_BB_700_SCALED = { 0311 'long_name' 'Backscattering scaled' 0312 'standard_name' 'Backscattering_scaled' 0313 'units' 'm-1 (sr-1)-1' 0314 'comment' 'WETLabs ECO puck FLBBCD' 0315 '_FillValue' default_fill_value }; 0316 0317 % FLBBCD sensor (same, different var names) 0318 var_attr_list.FLBBCD_CHL_COUNT = { 0319 'long_name' 'Chlorophyll raw' 0320 'standard_name' 'Chlorophyll_raw_counts' 0321 'units' 'counts' 0322 'comment' 'WETLabs ECO puck FLBBCD' 0323 '_FillValue' default_fill_value }; 0324 0325 var_attr_list.FLBBCD_CHL_SCALED = { 0326 'long_name' 'Chlorophyll concentration' 0327 'standard_name' 'Chlorophyll_concentration' 0328 'units' 'ug L-1' 0329 'comment' 'WETLabs ECO puck FLBBCD' 0330 '_FillValue' default_fill_value }; 0331 0332 var_attr_list.FLBBCD_CDOM_COUNT = { 0333 'long_name' 'Coloured dissolved organic matter raw' 0334 'standard_name' 'CDOM_raw_counts' 0335 'units' 'counts' 0336 'comment' 'WETLabs ECO puck FLBBCD' 0337 '_FillValue' default_fill_value }; 0338 0339 var_attr_list.FLBBCD_CDOM_SCALED = { 0340 'long_name' 'Coloured dissolved organic matter concentration' 0341 'standard_name' 'CDOM_scaled' 0342 'units' 'ug L-1' 0343 'comment' 'WETLabs ECO puck FLBBCD' 0344 '_FillValue' default_fill_value }; 0345 0346 var_attr_list.FLBBCD_BB_700_COUNT = { 0347 'long_name' 'Backscattering raw' 0348 'standard_name' 'Backscattering_raw_counts' 0349 'units' 'counts' 0350 'comment' 'WETLabs ECO puck FLBBCD' 0351 '_FillValue' default_fill_value }; 0352 0353 var_attr_list.FLBBCD_BB_700_SCALED = { 0354 'long_name' 'Backscattering scaled' 0355 'standard_name' 'Backscattering_scaled' 0356 'units' 'm-1 (sr-1)-1' 0357 'comment' 'WETLabs ECO puck FLBBCD' 0358 '_FillValue' default_fill_value }; 0359 0360 % FLNTU sensor 0361 var_attr_list.FLNTU_CHL_COUNT = { 0362 'long_name' 'Chlorophyll raw' 0363 'standard_name' 'Chlorophyll_raw_counts' 0364 'units' 'counts' 0365 'comment' 'WETLabs ECO puck FLNTU' 0366 '_FillValue' default_fill_value }; 0367 0368 var_attr_list.FLNTU_CHL_SCALED = { 0369 'long_name' 'Chlorophyll concentration' 0370 'standard_name' 'Chlorophyll_concentration' 0371 'units' 'ug L-1' 0372 'comment' 'WETLabs ECO puck FLNTU' 0373 '_FillValue' default_fill_value }; 0374 0375 var_attr_list.FLNTU_CDOM_COUNT = { 0376 'long_name' 'Turbidity raw' 0377 'standard_name' 'Turbidity_raw_counts' 0378 'units' 'counts' 0379 'comment' 'WETLabs ECO puck FLNTU' 0380 '_FillValue' default_fill_value }; 0381 0382 var_attr_list.FLNTU_CDOM_SCALED = { 0383 'long_name' 'Turbidity scaled' 0384 'standard_name' 'Turbidity_scaled' 0385 'units' 'NTU' 0386 'comment' 'WETLabs ECO puck FLNTU' 0387 '_FillValue' default_fill_value }; 0388 0389 % METS sensor 0390 var_attr_list.METS_METHANE_VOLT = { 0391 'long_name' 'Methane concentration raw' 0392 'standard_name' 'methane_concentration_raw' 0393 'units' 'Volts' 0394 'comment' 'Alseamar methane sensor' 0395 '_FillValue' default_fill_value }; 0396 0397 var_attr_list.METS_METHANE_SCALED = { 0398 'long_name' 'Methane concentration scaled' 0399 'standard_name' 'methane_concentration' 0400 'units' 'ug L-1' 0401 'comment' 'Alseamar methane sensor' 0402 '_FillValue' default_fill_value }; 0403 0404 var_attr_list.TEMP_METHANE_VOLT = { 0405 'long_name' 'Methane sensor temperature raw' 0406 'standard_name' 'Methane_sensor_temperature_raw' 0407 'units' 'Volts' 0408 'comment' 'Alseamar methane sensor' 0409 '_FillValue' default_fill_value }; 0410 0411 var_attr_list.TEMP_METHANE_SCALED = { 0412 'long_name' 'Methane sensor temperature' 0413 'standard_name' 'Methane_sensor_temperature' 0414 'units' 'Celsius' 0415 'comment' 'Alseamar methane sensor' 0416 '_FillValue' default_fill_value }; 0417 0418 % MFL sensor (variable names new software April 2016). 0419 var_attr_list.M1FL_TMPD = { 0420 'long_name' 'Minifluo-UV1 detection circuit temperature' 0421 'standard_name' 'temperature_of_MiniFluo_detection_circuit' 0422 'units' 'Celsius' 0423 '_FillValue' default_fill_value }; 0424 0425 var_attr_list.M1FL_TMPE = { 0426 'long_name' 'Minifluo-UV1 emission circuit temperature' 0427 'standard_name' 'temperature_of_MiniFluo_emission_circuit' 0428 'units' 'Celsius' 0429 '_FillValue' default_fill_value }; 0430 0431 var_attr_list.M1FL_PHD1 = { 0432 'long_name' 'Minifluo-UV1 fluorescence Ex./Em. = 270/340nm' 0433 'standard_name' 'fluorescence_excitation_270nm_emission_340nm' 0434 'units' 'counts' 0435 'comment1' 'Tryptophan-like or Naphtalene-like measurements' 0436 'comment2' '270nm is the nominal wavelength of the LED' 0437 '_FillValue' default_fill_value }; 0438 0439 var_attr_list.M1FL_PHD2 = { 0440 'long_name' 'Minifluo-UV1 fluorescence Ex./Em. = 255/360nm' 0441 'standard_name' 'fluorescence_excitation_255nm_emission_360nm' 0442 'units' 'counts' 0443 'comment1' 'Phenanthren-like measurements or water-soluble fraction of petroleum' 0444 'comment2' '255nm is the nominal wavelength of the LED' 0445 '_FillValue' default_fill_value }; 0446 0447 var_attr_list.M1FL_MON1 = { 0448 'long_name' 'Minifluo-UV1 monitoring channel of the 270nm LED' 0449 'standard_name' 'fluorescence_monitoring_270_340nm' 0450 'units' 'counts' 0451 'comment1' '270nm is the nominal wavelength of the LED' 0452 '_FillValue' default_fill_value }; 0453 0454 var_attr_list.M1FL_MON2 = { 0455 'long_name' 'Minifluo-UV1 monitoring channel of the 255nm LED' 0456 'standard_name' 'fluorescence_monitoring_255_360nm' 0457 'units' 'counts' 0458 'comment1' '255nm is the nominal wavelength of the LED' 0459 '_FillValue' default_fill_value }; 0460 0461 var_attr_list.M2FL_TMPD = { 0462 'long_name' 'Minifluo-UV2 detection circuit temperature' 0463 'standard_name' 'temperature_of_MiniFluo_detection_circuit' 0464 'units' 'Celsius' 0465 '_FillValue' default_fill_value }; 0466 0467 var_attr_list.M2FL_TMPE = { 0468 'long_name' 'Minifluo-UV2 emission circuit temperature' 0469 'standard_name' 'temperature_of_MiniFluo_emission_circuit' 0470 'units' 'Celsius' 0471 '_FillValue' default_fill_value }; 0472 0473 var_attr_list.M2FL_PHD1 = { 0474 'long_name' 'Minifluo-UV2 fluorescence Ex./Em. = 260/315nm' 0475 'standard_name' 'fluorescence_excitation_260nm_emission_315nm' 0476 'units' 'counts' 0477 'comment1' 'Fluorene-like measurements' 0478 'comment2' '260nm is the nominal wavelength of the LED' 0479 '_FillValue' default_fill_value }; 0480 0481 var_attr_list.M2FL_PHD2 = { 0482 'long_name' 'Minifluo-UV2 fluorescence Ex./Em. = 270/376nm' 0483 'standard_name' 'fluorescence_excitation_270nm_emission_376nm' 0484 'units' 'counts' 0485 'comment1' 'Pyrene-like measurements' 0486 'comment2' '270nm is the nominal wavelength of the LED' 0487 '_FillValue' default_fill_value }; 0488 0489 var_attr_list.M2FL_MON1 = { 0490 'long_name' 'Minifluo-UV2 monitoring channel of the 260nm LED' 0491 'standard_name' 'fluorescence_monitoring_260_315nm' 0492 'units' 'counts' 0493 'comment1' '260nm is the nominal wavelength of the LED' 0494 '_FillValue' default_fill_value }; 0495 0496 var_attr_list.M2FL_MON2 = { 0497 'long_name' 'Minifluo-UV2 monitoring channel of the 270nm LED' 0498 'standard_name' 'fluorescence_monitoring_270_376nm' 0499 'units' 'counts' 0500 'comment1' '270nm is the nominal wavelength of the LED' 0501 '_FillValue' default_fill_value }; 0502 0503 % MFL sensor (variable names prior April 2016). 0504 var_attr_list.MFL_TMPD = { 0505 'long_name' 'Minifluo-UV1 detection circuit temperature' 0506 'standard_name' 'temperature_of_MiniFluo_detection_circuit' 0507 'units' 'Celsius' 0508 '_FillValue' default_fill_value }; 0509 0510 var_attr_list.MFL_TMPE = { 0511 'long_name' 'Minifluo-UV1 emission circuit temperature' 0512 'standard_name' 'temperature_of_MiniFluo_emission_circuit' 0513 'units' 'Celsius' 0514 '_FillValue' default_fill_value }; 0515 0516 var_attr_list.MFL_V1 = { 0517 'long_name' 'Minifluo-UV1 fluorescence Ex./Em. = 270/340nm' 0518 'standard_name' 'fluorescence_excitation_270nm_emission_340nm' 0519 'units' 'counts' 0520 'comment1' 'Tryptophan-like or Naphtalene-like measurements' 0521 'comment2' '270nm is the nominal wavelength of the LED' 0522 '_FillValue' default_fill_value }; 0523 0524 var_attr_list.MFL_V2 = { 0525 'long_name' 'Minifluo-UV1 fluorescence Ex./Em. = 255/360nm' 0526 'standard_name' 'fluorescence_excitation_255nm_emission_360nm' 0527 'units' 'counts' 0528 'comment1' 'Phenanthren-like measurements' 0529 'comment2' '255nm is the nominal wavelength of the LED' 0530 '_FillValue' default_fill_value }; 0531 0532 var_attr_list.MFL_V3 = { 0533 'long_name' 'Minifluo-UV1 monitoring channel of the 270nm LED' 0534 'standard_name' 'fluorescence_monitoring_270_340nm' 0535 'units' 'counts' 0536 'comment1' '270nm is the nominal wavelength of the LED' 0537 '_FillValue' default_fill_value }; 0538 0539 var_attr_list.MFL_V4 = { 0540 'long_name' 'Minifluo-UV1 monitoring channel of the 255nm LED' 0541 'standard_name' 'fluorescence_excitation_monitoring_255nm' 0542 'units' 'counts' 0543 'comment1' '255nm is the nominal wavelength of the LED' 0544 '_FillValue' default_fill_value }; 0545 0546 % MFL sensor (earlier variable names). 0547 var_attr_list.UV1_TMPD = { 0548 'long_name' 'Minifluo-UV1 detection circuit temperature' 0549 'standard_name' 'temperature_of_MiniFluo_detection_circuit' 0550 'units' 'Celsius' 0551 '_FillValue' default_fill_value }; 0552 0553 var_attr_list.UV1_TMPE = { 0554 'long_name' 'Minifluo-UV1 emission circuit temperature' 0555 'standard_name' 'temperature_of_MiniFluo_emission_circuit' 0556 'units' 'Celsius' 0557 '_FillValue' default_fill_value }; 0558 0559 var_attr_list.UV1_V1 = { 0560 'long_name' 'Minifluo-UV1 fluorescence Ex./Em. = 270/340nm' 0561 'standard_name' 'fluorescence_excitation_270nm_emission_340nm' 0562 'units' 'counts' 0563 'comment1' 'Tryptophan-like or Naphtalene-like measurements' 0564 'comment2' '270nm is the nominal wavelength of the LED' 0565 '_FillValue' default_fill_value }; 0566 0567 var_attr_list.UV1_V2 = { 0568 'long_name' 'Minifluo-UV1 fluorescence Ex./Em. = 255/360nm' 0569 'standard_name' 'fluorescence_excitation_255nm_emission_360nm' 0570 'units' 'counts' 0571 'comment1' 'Phenanthren-like measurements' 0572 'comment2' '255nm is the nominal wavelength of the LED' 0573 '_FillValue' default_fill_value }; 0574 0575 var_attr_list.UV1_V3 = { 0576 'long_name' 'Minifluo-UV1 monitoring channel of the 270nm LED' 0577 'standard_name' 'fluorescence_excitation_monitoring_270nm' 0578 'units' 'counts' 0579 'comment1' '270nm is the nominal wavelength of the LED' 0580 '_FillValue' default_fill_value }; 0581 0582 var_attr_list.UV1_V4 = { 0583 'long_name' 'Minifluo-UV1 monitoring channel of the 255nm LED' 0584 'standard_name' 'fluorescence_excitation_monitoring_255nm' 0585 'units' 'counts' 0586 'comment1' '255nm is the nominal wavelength of the LED' 0587 '_FillValue' default_fill_value }; 0588 0589 var_attr_list.UV1_TRY = { 0590 'long_name' 'Minifluo-UV1 fluorescence Ex./Em. = 270/340nm' 0591 'standard_name' 'fluorescence_excitation_270nm_emission_340nm' 0592 'units' 'counts' 0593 'comment1' 'Tryptophan-like or Naphtalene-like measurements' 0594 'comment2' '270nm is the nominal wavelength of the LED' 0595 '_FillValue' default_fill_value }; 0596 0597 var_attr_list.UV1_PHE = { 0598 'long_name' 'Minifluo-UV1 fluorescence Ex./Em. = 255/360nm' 0599 'standard_name' 'fluorescence_excitation_255nm_emission_360nm' 0600 'units' 'counts' 0601 'comment1' 'Phenanthren-like measurements' 0602 'comment2' '255nm is the nominal wavelength of the LED' 0603 '_FillValue' default_fill_value }; 0604 0605 var_attr_list.UV1_LD1 = { 0606 'long_name' 'Minifluo-UV1 monitoring channel of the 270nm LED' 0607 'standard_name' 'fluorescence_excitation_monitoring_270nm' 0608 'units' 'counts' 0609 'comment1' '270nm is the nominal wavelength of the LED' 0610 '_FillValue' default_fill_value }; 0611 0612 var_attr_list.UV1_LD2 = { 0613 'long_name' 'Minifluo-UV1 monitoring channel of the 255nm LED' 0614 'standard_name' 'fluorescence_excitation_monitoring_255nm' 0615 'units' 'counts' 0616 'comment1' '255nm is the nominal wavelength of the LED' 0617 '_FillValue' default_fill_value }; 0618 0619 0620 %% Define global attributes (they may be overwritten with deployment values). 0621 % To define the global attributes easily and readably, add them to this 0622 % cell array (attribute name in first column and attribute value in second). 0623 % This cell array will be converted at the end of the function to the proper 0624 % representation needed by SAVENC. 0625 global_atts = ... 0626 { 0627 'abstract' '' % deployment_description 0628 'acknowledgement' '' % deployment_acknowledgement 0629 'author' '' % deployment_author 0630 'author_email' '' % deployment_author_email 0631 'cdm_data_type' 'Trajectory' 0632 'citation' '' % deployment_citation 0633 'comment' 'Data provided as it comes from the glider.' 0634 'Conventions' 'CF-1.6' 0635 'creator' '' % deployment_author 0636 'creator_email' '' % deployment_author_email 0637 'creator_url' '' % deployment_author_url 0638 'data_center' '' % deployment_data_center 0639 'data_center_email' '' % deployment_data_center_email 0640 'data_mode' 'real time' 0641 'date_modified' 'undefined' 0642 'featureType' 'trajectory' 0643 'geospatial_lat_max' 'undefined' 0644 'geospatial_lat_min' 'undefined' 0645 'geospatial_lat_units' 'undefined' 0646 'geospatial_lon_max' 'undefined' 0647 'geospatial_lon_min' 'undefined' 0648 'geospatial_lon_units' 'undefined' 0649 'history' sprintf('Product generated by the glider toolbox version %s (https://github.com/socib/glider_toolbox).', configGliderToolboxVersion()) 0650 'institution' '' % institution_name 0651 'institution_references' '' % institution_references 0652 'instrument' '' % instrument_name 0653 'instrument_manufacturer' '' % instrument_manufacturer 0654 'instrument_model' '' % instrument_model 0655 'license' 'Approved for public release. Distribution Unlimited.' % deployment_distribution_statement 0656 'netcdf_version' '4.0.1' 0657 'positioning_system' 'GPS and dead reckoning' 0658 'principal_investigator' '' % deployment_principal_investigator 0659 'principal_investigator_email' '' % deployment_principal_investigator_email 0660 'processing_level' 'L0 raw data not calibrated' 0661 'project' '' % deployment_project 0662 'publisher' '' % deployment_publisher_name 0663 'publisher_email' '' % deployment_publisher_email 0664 'publisher_url' '' % deployment_publisher_url 0665 'source' 'glider' 0666 'source_files' 'undefined' % source_files field set by processing script after loading data. 0667 'standard_name_vocabulary' 'http://cf-pcmdi.llnl.gov/documents/cf-standard-names/standard-name-table/16/cf-standard-name-table.html' 0668 'summary' '' % deployment_description 0669 'time_coverage_end' 'undefined' 0670 'time_coverage_start' 'undefined' 0671 'title' 'Glider deployment real time raw data' 0672 'transmission_system' 'IRIDIUM' 0673 }; 0674 0675 0676 %% Define preset dimensions. 0677 time_dimension = struct('name', {'time'}, 'length', {0}); 0678 0679 0680 %% Return global and variable metadata in the correct format. 0681 ncl0_info = struct(); 0682 % Set the dimensions. 0683 ncl0_info.dimensions = time_dimension; 0684 % Set the global attributes. 0685 ncl0_info.attributes = cell2struct(global_atts, {'name' 'value'}, 2); 0686 % Set the variable metadata. 0687 ncl0_info.variables = struct(); 0688 var_name_list = fieldnames(var_attr_list); 0689 for var_name_idx = 1:numel(var_name_list) 0690 var_name = var_name_list{var_name_idx}; 0691 var_atts = var_attr_list.(var_name); 0692 ncl0_info.variables.(var_name).dimensions = {time_dimension.name}; 0693 ncl0_info.variables.(var_name).attributes = ... 0694 cell2struct(var_atts, {'name' 'value'}, 2); 0695 end 0696 0697 end