% This is an example metadata file for a Nortek AWAC., modified by D. % Hoover for use on Barnard Pillar Pt data collected May 2011. % Reqired NetCDF attributes are noted and must not be removed. % % K.Rosenberger, 1/27/09, version 1.0, modified from Charlene Sullivan's metadataRDI %actual times of deployment and recovery to trim the data by - this should %be in the Mooring Log, but if not, look at the SEN file pressure data. %AWACwvs2nc will use this to crop the data. You need the metadata_tools toolbox %get the global attributes - need the metadata=read_globalattsKJR('//Projects/Misc/OtherUSGSOceanData/PillarPointDataMay2011/HarborMouth/gatt_PLP11HMT.txt'); %the base file name of the data files baseFile = 'HrbrMthAWAC5473'; %the position of the instrument on the mooring metadata.instnum = '01'; %what datum were the lat/long collected in? metadata.LatLonDatum = 'NAD83'; %if there was a significant clock error enter it here metadata.DATA_CMNT = 'Surf Zone AWAC w/waves and SLOBS'; metadata.ClockError = 2.7; metadata.transducer_offset_from_bottom = 0.61; % height of transducer heads off the bottom metadata.instrument_type = 'Nortek AWAC'; % type of instrument and instrument manufacturer metadata.instrument_depth = metadata.WATER_DEPTH - metadata.transducer_offset_from_bottom; % wasmetadata.initial_instrument_height; metadata.initial_instrument_height_note = 'measured on deck'; metadata.nominal_sensor_depth_note = 'WATER_DEPTH-initial_instrument_height'; metadata.nominal_sensor_depth = metadata.WATER_DEPTH-metadata.transducer_offset_from_bottom; % was metadata.initial_instrument_height; metadata.instrument_serial_number = 5473; %metadata.transducer_offset_from_bottom = metadata.initial_instrument_height; metadata.inst_type = 'Nortek AWAC'; % type of instrument and instrument manufacturer metadata.inst_height = metadata.transducer_offset_from_bottom; metadata.pred_accuracy = 28; % horizontal predicted accuracy metadata.magnetic_variation_applied = metadata.magnetic_variation; % degrees between magnetic and true %if you dont have a global attributes text file to read them in, fill in %these below... % metadata.MOORING = gatt.MOORING; % mooring identifier number % metadata.longitude = gatt.longitude; % (required) instrument longitude, negative is West % metadata.latitude = gatt.latitude; % (required) instrument latitude, positive is North % metadata.WATER_DEPTH = gatt.WATER_DEPTH; % water depth in meters % metadata.WATER_DEPTH_NOTE = gatt.WATER_DEPTH_NOTE; % source of water depth information % metadata.PROGRAM = gatt.PROGRAM; % program name % metadata.PROJECT = gatt.PROJECT; % project name % metadata.EXPERIMENT = gatt.EXPERIMENT; % experiment name % metadata.Region = gatt.Region; % project name % metadata.DESCRIPTION = gatt.DESCRIPTION; % location and/or site of data collection % metadata.magnetic_variation = gatt.MagneticVariation; % degrees between magnetic and true north at data location % metadata.SciPi = gatt.SciPi; % N.B. - Negative is westerly variation % metadata.Site = gatt.Site; % metadata.MooringType = gatt.MooringType; % metadata.CruiseID = gatt.CruiseID; % metadata.DeployDateTime = gatt.Deployment_date; % This needs to be actual deployment date and time on the Bottom % metadata.RecoverDateTime = gatt.Recovery_date; % This needs to be actual recovery date and time on the Bottom metadata.metadatafile_name = mfilename; % name of metadatafile metadata.metadatafile_author = 'DJH'; % author of the metadatafile metadata.metadatafile_version = '1.0'; % version of the metadatafile %these attributes are part of the EPIC standard and don't change from %deployment to deployment, so keep them for the next deployment metadata.DATA_SUBTYPE = 'MOORED'; metadata.DATA_ORIGIN = 'USGS WRCMG Sed Trans Group'; metadata.COORD_SYSTEM = 'GEOGRAPHIC'; metadata.Conventions = 'PMEL/EPIC'; metadata.WATER_MASS = '?'; % water mass flag used for EPIC contouring programs metadata.POS_CONST = 0; % consistent position flag (=1 not consistent) metadata.DEPTH_CONST = 0; % consistent depth flag (=1 not consistent) metadata.DRIFTER = 0; % drifter flag (=1 if drifter) metadata.COMPOSITE = 0; % number of pieces in composite series %use these attributes if you have external sensors, otherwise comment them %out. For the OBS3+, Campbell lists the coefficients in the wrong order - %the 'Low' range coefficients are to be applied to the second channel, and %the 'High' range are to be applied to teh first channel. % metadata.AnalogInput1.sensor_type = 'OBS3+'; % metadata.AnalogInput1.manufacturer = 'D+A Instruments'; % metadata.AnalogInput1.serial_number = 'T8334'; % metadata.AnalogInput1.sensor_height = 0.28; %in meters % metadata.AnalogInput1.range = 500; %in NTU's - get from calibration certificate % metadata.AnalogInput1.cals.NTUcoef = [0.95886 366.02362 38.7]; %[x^0 x^1 x^2] - get from calibration certificate % % metadata.AnalogInput1.cals.NTUcoef = []; %[x^0 x^1 x^2] - get from calibration certificate % metadata.AnalogInput2.sensor_type = 'OBS3+'; % metadata.AnalogInput2.manufacturer = 'D+A Instruments'; % metadata.AnalogInput2.serial_number = 'T8334'; % metadata.AnalogInput2.sensor_height = 0.28; %in meters % metadata.AnalogInput2.range = 2000; %in NTU's - get from calibration certificate % % metadata.AnalogInput2.cals.NTUcoef = []; %[x^0 x^1 x^2] - get from calibration certificate % metadata.AnalogInput2.cals.NTUcoef = [-0.04308 91.88464 2.41613]; %[x^0 x^1 x^2] - get from calibration certificate % if you have done a tank calibration - comment out if not %from calibration certificate % metadata.AnalogInput1.cals.SEDcoef = [0.2 30 3.5]; %[x^0 x^1 x^2] % metadata.AnalogInput1.cals.SEDcoefUnits = 'g/L'; % or whatever your units are % metadata.AnalogInput2.cals.SEDCoef = [0.2 30 3.5]; %[x^0 x^1 x^2] % metadata.AnalogInput2.cals.SEDcoefUnits = 'g/L'; % or whatever your units are % %------------------Some Options for Correcting Data------------------------ %use this if you need to correct the time, for instance if the instrument %was not set in GMT - a positive value adds time, thus moving it forward %(e.g., for Hawaii, use 10 hours to correct to GMT). %comment out if not necessary - use hours metadata.TimeCorrection = [7]; %if you want to crop bad data near the surface; currently only water level, %but want to work in backscatter at some point. metadata.trim_method = 'Water Level'; %if you want to set your own amplitude cutoff for cutting out bad data %comment out if unnecessary % metadata.cutoff_ampl = []; %use this to fill in any potential gaps in the record, e.g. if the wave %bursts were longer than the current interval. Comment out if not. metadata.fixgaps = 0; % %now run the scripts cdfFile = [metadata.MOORING metadata.instnum 'aw']; metadata.filename = cdfFile; if 0 AWAC2cdf(baseFile,cdfFile,metadata); end %convert raw data to netcdf CDFFile = [cdfFile '-raw'];outFile = cdfFile; if 0 VEL = AWAC2nc(CDFFile,outFile,metadata); end %now run waves % now run the waves if 1 WVS = AWACwvs2nc(baseFile,metadata) end