LDEO_LADCP2ANTS.m
changeset 10 e7f16c6e18db
parent 1 53bedd427ca6
child 11 21c72df92e2c
equal deleted inserted replaced
7:9139db7173d5 10:e7f16c6e18db
     1 %======================================================================
     1 %======================================================================
     2 %                    L D E O _ L A D C P 2 A N T S . M 
     2 %                    L D E O _ L A D C P 2 A N T S . M 
     3 %                    doc: Sun Jan 22 15:19:00 2006
     3 %                    doc: Sun Jan 22 15:19:00 2006
     4 %                    dlm: Mon Oct 12 22:47:23 2009
     4 %                    dlm: Sun Nov 10 04:39:34 2013
     5 %                    (c) 2006 A.M. Thurnherr
     5 %                    (c) 2006 A.M. Thurnherr
     6 %                    uE-Info: 155 47 NIL 0 0 72 2 2 4 NIL ofnI
     6 %                    uE-Info: 41 76 NIL 0 0 72 2 2 4 NIL ofnI
     7 %======================================================================
     7 %======================================================================
     8 %
     8 %
     9 % export LDEO LADCP output to ANTS file
     9 % export LDEO LADCP output to ANTS file
    10 %
    10 %
    11 % USAGE: LDEO_LADCP2ANTS(dr,f,p,outBaseName)
    11 % USAGE: LDEO_LADCP2ANTS(dr,f,p,outBaseName)
    12 %
    12 %
    13 
    13 
    14 % HISTORY:
    14 % HISTORY:
    15 %  Jan 22, 2006: - created
    15 %  Jan 22, 2006: - created
    16 %  Feb  4, 2006: - added BT & SADCP profiles
    16 %  Feb  4, 2006: - added BT & SADCP profiles
    17 %  Feb  8, 2006: - made compatible with V7
    17 %  Feb  8, 2006: - made compatible with ANTS V7
    18 %  Feb 26, 2006: - made ensemble_vel_err optional (not set on ps.shear = 2)
    18 %  Feb 26, 2006: - made ensemble_vel_err optional (not set on ps.shear = 2)
    19 %  Apr 25, 2006: - suppress output of empty SADCP,BT files
    19 %  Apr 25, 2006: - suppress output of empty SADCP,BT files
    20 %  Aug 21, 2006: - added additional lat/lon output
    20 %  Aug 21, 2006: - added additional lat/lon output
    21 %  Nov  9, 2006: - added additional time output (requiring p input)
    21 %  Nov  9, 2006: - added additional time output (requiring p input)
    22 %  Jul 17, 2008: - added cruise, software, magdecl, procdir info
    22 %  Jul 17, 2008: - added cruise, software, magdecl, procdir info
    23 %  Apr 23, 2009: - added globarl var EXPORT_CTD_DATA
    23 %  Apr 23, 2009: - added global var EXPORT_CTD_DATA
    24 %  Oct 12, 2009: - adapted to new struct2ANTS
    24 %  Oct 12, 2009: - adapted to new struct2ANTS
       
    25 %  Nov 10, 2013: - added prof.dayNo
    25 
    26 
    26 function [] = LDEO_LADCP2ANTS(dr,f,p,obn)
    27 function [] = LDEO_LADCP2ANTS(dr,f,p,obn)
    27 
    28 
    28 	%----------------------------------------------------------------------
    29 	%----------------------------------------------------------------------
    29 	% INVERSE SOLUTION
    30 	% INVERSE SOLUTION
    35 	prof.magdecl = p.drot;
    36 	prof.magdecl = p.drot;
    36 	prof.procdir = pwd;
    37 	prof.procdir = pwd;
    37 	
    38 	
    38 	prof.start_date  = sprintf('%d/%02d/%02d',p.time_start(1),p.time_start(2),p.time_start(3));
    39 	prof.start_date  = sprintf('%d/%02d/%02d',p.time_start(1),p.time_start(2),p.time_start(3));
    39 	prof.start_time	 = sprintf('%02d:%02d:%02d',p.time_start(4),p.time_start(5),p.time_start(6));
    40 	prof.start_time	 = sprintf('%02d:%02d:%02d',p.time_start(4),p.time_start(5),p.time_start(6));
       
    41 	prof.dayNo       = datenum(p.time_start) - datenum(p.time_start(1),1,1) + 1;
    40 
    42 
    41 	prof.end_date    = sprintf('%d/%02d/%02d',p.time_end(1),p.time_end(2),p.time_end(3));
    43 	prof.end_date    = sprintf('%d/%02d/%02d',p.time_end(1),p.time_end(2),p.time_end(3));
    42 	prof.end_time	 = sprintf('%02d:%02d:%02d',p.time_end(4),p.time_end(5),p.time_end(6));
    44 	prof.end_time	 = sprintf('%02d:%02d:%02d',p.time_end(4),p.time_end(5),p.time_end(6));
    43 
    45 
    44 	prof.median_time = sprintf('%02d:%02d:%02d',dr.date(4),dr.date(5),dr.date(6));
    46 	prof.median_time = sprintf('%02d:%02d:%02d',dr.date(4),dr.date(5),dr.date(6));