function rad_data_extract (deployment, configfile, filename, date, wavelength) % extracts data from radiometer netcdf files (possibly just water leaving % radiance... not sure how universal this will be yet. Deployment is in % YYYYMM format, configfile can be the latest, just gives netcdf base bath, % filename is the specific netcdf file you want to read, date is in the % dd-mmm-yyyy string format, wavelength is a number in nm. % % Created by Seth M. Bushinsky (sethb@mbari.org) April 2007 % Add netcdf to path if necessary if(isempty (strfind(path, 'netcdf'))), path(path,[pwd '/../mexnc/']); path(path,[pwd '/../netcdf_toolbox/netcdf/']); path(path,[pwd '/../netcdf_toolbox/netcdf/ncsource']); path(path,[pwd '/../netcdf_toolbox/netcdf/nctype']); path(path,[pwd '/../netcdf_toolbox/netcdf/ncutility']); end % set up some useful constants %rad_name = 'ocr3000'; %basePath = pwd; prop = readProperties(configfile); mooring.name = getProperty(prop, 'mooring'); %radiometer_names = getProperty(prop, [mooring.name '.radiometers']); %suffixes = {'_mean', '_median'}; %suffixTitles = {'Mean', 'Median'}; netCDF_path = MBARI_path(getProperty(prop, 'netCDF_path')); netCDF_path = [netCDF_path '/' deployment]; nc_filename = ([netCDF_path '/' filename]); fid = fopen(nc_filename); if fid==-1; disp(['File: ' filename ' does not exist']) return end fclose(fid); nc_file = netcdf(nc_filename);