Home > ctdcal > demos > register_cruise.m

register_cruise

PURPOSE ^

register_cruise: Input and manage cruise meta-data prior to calibration.

SYNOPSIS ^

function register_cruise

DESCRIPTION ^

 register_cruise: Input and manage cruise meta-data prior to calibration.

 AOML/PhOD CTDCalibration toolbox. 
 
 DESCRIPTION:
 This file is the main record of the cruise meta data and the electronic
 storage of the data files.  Currently it is necessary to edit this file for each
 new cruise calibration project.  The user should copy this template from the 
 ctdcal toolbox installation directory into the cruise directory.  See the User's
 Guide for more information.  Once the file is edited correctly and run, Matlab
 "remember" where all of the relevant data is located between sessions.  This
 enables the analysis routines to be more general and platform independent.  

 Ultimately, this will enable some of the cruise documentation to be automatically
 generated.  (cruise report tables and figures, FGDC meta data reports etc.)

 It may be helpful to rename this file to something cruise specific once
 you have copied it to the calibration_dir and edited it appropriately.  
 (register_stc02_cruise.m)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function register_cruise
0002 % register_cruise: Input and manage cruise meta-data prior to calibration.
0003 %
0004 % AOML/PhOD CTDCalibration toolbox.
0005 %
0006 % DESCRIPTION:
0007 % This file is the main record of the cruise meta data and the electronic
0008 % storage of the data files.  Currently it is necessary to edit this file for each
0009 % new cruise calibration project.  The user should copy this template from the
0010 % ctdcal toolbox installation directory into the cruise directory.  See the User's
0011 % Guide for more information.  Once the file is edited correctly and run, Matlab
0012 % "remember" where all of the relevant data is located between sessions.  This
0013 % enables the analysis routines to be more general and platform independent.
0014 %
0015 % Ultimately, this will enable some of the cruise documentation to be automatically
0016 % generated.  (cruise report tables and figures, FGDC meta data reports etc.)
0017 %
0018 % It may be helpful to rename this file to something cruise specific once
0019 % you have copied it to the calibration_dir and edited it appropriately.
0020 % (register_stc02_cruise.m)
0021 
0022 % EXAMPLES:  The entire file is meant to be an example of one cruise
0023 % which was calibrated in the lab not at sea.  Hopefully it works at sea
0024 % as well.
0025 %
0026 % AUTHOR: Derrick Snowden
0027 %         NOAA/AOML/PhOD
0028 %         Fri Apr 30 12:17:13 EDT 2004
0029 %
0030 
0031 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0032 
0033 % The cruiseid  is the case sensitive character mneumonic which
0034 % will be used to reference the current cruise calibration project.
0035 cruiseid = 'stc02';
0036 group = group_name(cruiseid);
0037 setpref(group,'cruiseid',cruiseid);
0038 
0039 % How are the Seabird ctd files named? This is also case sensitive on linux computers.
0040 % We recommend that you use lower case for everything to minimize the chance for conflicts.
0041 % e.g. stc2001.cnv, stc2001.hdr, stc2001.btl etc.  Notice that the filestub variable
0042 % below doesn't have to be the same as the cruiseid above.
0043 file_name_prefix = 'stc2';
0044 setpref(group,'file_name_prefix',file_name_prefix)
0045 
0046 % The number of digits used in creating the file names from the file_name_prefix and
0047 % a variable station number.
0048 % TODO: This does not allow for multiple casts at the same station as per WOCE specs.
0049 nDigits = 3;
0050 setpref(group,'n_digits_station_num',nDigits)
0051 
0052 % Are the extensions to the Seabird Data files written in upper case or lower case?
0053 % e.g. stc2001.CNV or stc2001.cnv.  This must be true for all or none of the relevant
0054 % file types. (cnv, bl, btl)
0055 sbe_is_upper_case_extensions = false;
0056 setpref(group,'sbe_is_upper_case_extensions',sbe_is_upper_case_extensions)
0057 
0058 % Where is the main cruise calibration working directory?
0059 % This directory is the top level root directory
0060 % which contains a copy of the cruise data, the calibration reports, figures, and all the
0061 % user editable m-files copied from the ctdcal/demos directory.  See the User's Guide
0062 % for more explanation.
0063 calibration_dir = fullfile(filesep,'doris','snowden','CTD','test','stc02'); 
0064     % NOTE: pseudo platform independent representation of directories. On Windows you must add
0065     % 'C:' or '\\computername' as the first argument to fullfile.  (fullfile('C:','doris',etc...))
0066 setpref(group,'calibration_dir',calibration_dir);
0067 
0068 % Where are the working calibration data directories?
0069 % These should be the same as the cruise_dir above but
0070 % you have the option of changing the data directory tree root if you don't want to copy
0071 % the data files to a local directory after every station.
0072 % The directory structure suggested below is the one created by create_cruise_dir.m  It is
0073 % recommended but not required that you stick with this structure.
0074 cal_data_dir = calibration_dir;
0075 cal_autosal_dir = fullfile(cal_data_dir,'salts');
0076 cal_oxy_dir = fullfile(cal_data_dir,'oxy');
0077 cal_btl_dir = fullfile(cal_data_dir,'bottle');
0078 cal_cnv_dir = fullfile(cal_data_dir,'proc_data');
0079 cal_hdr_dir = fullfile(cal_data_dir,'proc_data');
0080 cal_bl_dir = fullfile(cal_data_dir,'raw_data');
0081 setpref(group,'cal_data_dir',cal_data_dir)
0082 setpref(group,'cal_hdr_dir',cal_hdr_dir)
0083 setpref(group,'cal_cnv_dir',cal_cnv_dir)
0084 setpref(group,'cal_autosal_dir',cal_autosal_dir)
0085 setpref(group,'cal_oxy_dir',cal_oxy_dir)
0086 setpref(group,'cal_btl_dir',cal_btl_dir)
0087 setpref(group,'cal_bl_dir',cal_bl_dir)
0088 
0089 % Where are the source data directories?
0090 % These are the directories containing the original data stored immediately
0091 % after collection.  e.g. they might be on the ctd acquisition computer or on
0092 % a network mounted mapped disk.  The directories listed below are only referenced
0093 % if you choose to use the update_calibration_data.m function.  If you sync the data directories
0094 % by hand or using sneaker net then the preferences below are not referenced by
0095 % any other ctdcal toolbox function.
0096 % NOTE: The sync/update functionality has not been tested on mapped drives on a Windows computer
0097 source_data_dir = fullfile(filesep,'doris','snowden','CTD','Data','stc02'); 
0098 source_autosal_dir = fullfile(source_data_dir,'salts');
0099 source_oxy_dir = fullfile(source_data_dir,'oxy');
0100 source_btl_dir = fullfile(source_data_dir,'bottle');
0101 source_cnv_dir = fullfile(source_data_dir,'raw_data');
0102 source_hdr_dir = fullfile(source_data_dir,'raw_data');
0103 source_bl_dir = fullfile(source_data_dir,'raw_data');
0104 setpref(group,'source_data_dir',source_data_dir)
0105 setpref(group,'source_hdr_dir',source_hdr_dir)
0106 setpref(group,'source_cnv_dir',source_cnv_dir)
0107 setpref(group,'source_autosal_dir',source_autosal_dir)
0108 setpref(group,'source_oxy_dir',source_oxy_dir)
0109 setpref(group,'source_btl_dir',source_btl_dir)
0110 setpref(group,'source_bl_dir',source_bl_dir)
0111 
0112 % Geographic region of the cruise.  (For making maps)
0113 % Defaults to 10 percent extension of the max/min
0114 % of the station coordinates.
0115 region = [-60 -30 -13 8]; %[west east south north]
0116 setpref(group,'region',region);
0117                
0118 % Temporal extent of the cruise.
0119 begYr = 2002; begMnth = 2; begDay = 1;
0120 endYr = 2002; endMnth = 2; endDay = 28;
0121 cruise_dates = [datenum(begYr,begMnth,begDay)  datenum(endYr,endMnth,endDay)] ;
0122 setpref(group,'cruise_dates',cruise_dates);
0123 
0124 % Assign some general options which will dictate the behavior of the ctdcal
0125 % functions throughout the calibration procedure
0126 % NOTE: These have not been implemented consistently throughout the toolbox and are experimental.
0127 % Verbose operation to print messages to the screen.
0128 options.verbose = true;
0129 % Keep a running log of all operations performed.
0130 options.logfile = ''; %if isempty then no log is kept.
0131 setpref(group,'options',options)
0132 
0133 return
0134 
0135

Generated on Fri 08-Oct-2004 11:57:17 by m2html © 2003