# HG changeset patch # User A.M. Thurnherr # Date 1515796772 18000 # Node ID 82050b088a690964d1bc777ad0ed9bd9289c2187 # Parent 19bf03af3c6e489b15e91a778b0eb6b7acaeccea V1.1 diff --git a/HISTORY b/HISTORY new file mode 100644 --- /dev/null +++ b/HISTORY @@ -0,0 +1,16 @@ +====================================================================== + H I S T O R Y + doc: Fri Jan 12 17:34:45 2018 + dlm: Fri Jan 12 17:39:14 2018 + (c) 2018 A.M. Thurnherr + uE-Info: 15 0 NIL 0 0 72 3 2 4 NIL ofnI +====================================================================== + +Jan 12, 2018: + - started HISTORY + - removed startup.m, because it causes problems with current Matlab + versions when this dir is added to the path (startup is loaded) on + other people's machines, because of local path names + - other mods and additions + - updated to V1 in [.hg/hgrc] + diff --git a/LDEO_LADCP2ANTS.m b/LDEO_LADCP2ANTS.m --- a/LDEO_LADCP2ANTS.m +++ b/LDEO_LADCP2ANTS.m @@ -1,9 +1,9 @@ %====================================================================== % L D E O _ L A D C P 2 A N T S . M % doc: Sun Jan 22 15:19:00 2006 -% dlm: Thu Jul 23 10:15:26 2015 +% dlm: Sun Feb 12 18:48:25 2017 % (c) 2006 A.M. Thurnherr -% uE-Info: 102 0 NIL 0 0 72 2 2 4 NIL ofnI +% uE-Info: 31 43 NIL 0 0 72 2 2 4 NIL ofnI %====================================================================== % % export LDEO LADCP output to ANTS file @@ -28,6 +28,7 @@ % additional input % Nov 10, 2013: - added prof.dayNo % Jun 12, 2015: - made dr.shiplat & CTD fields optional +% Feb 12, 2017: - made backward compatible function [] = LDEO_LADCP2ANTS(dr,f,p,ps,obn) @@ -44,10 +45,12 @@ prof.magdecl = p.drot; prof.procdir = pwd; - prof.DL_bin_length = p.blen_d; - prof.DL_bins = p.nbin_d; - prof.DL_blanking = p.blnk_d; - prof.DL_bin1_dist = p.dist_d; + if isfield(p,'blen_d') + prof.DL_bin_length = p.blen_d; + prof.DL_bins = p.nbin_d; + prof.DL_blanking = p.blnk_d; + prof.DL_bin1_dist = p.dist_d; + end if isfield(p,'nbin_u') prof.UL_bin_length = p.blen_u; diff --git a/MMP2ANTS.m b/MMP2ANTS.m --- a/MMP2ANTS.m +++ b/MMP2ANTS.m @@ -1,9 +1,9 @@ %====================================================================== % M M P 2 A N T S . M % doc: Tue Apr 21 17:31:52 2009 -% dlm: Tue Oct 13 10:04:17 2009 +% dlm: Mon Nov 9 11:02:27 2015 % (c) 2009 A.M. Thurnherr -% uE-Info: 16 54 NIL 0 0 72 2 2 4 NIL ofnI +% uE-Info: 152 28 NIL 0 0 72 2 2 4 NIL ofnI %====================================================================== % HISTORY: @@ -114,6 +114,11 @@ disp(sprintf('exporting raw data %04d...',p)); % process + ACM.start_time = pstart; + ACM.start_date = psdate; + ACM.stop_time = pstop; + ACM.stop_date = pedate; + ACM.Vab = Vab; ACM.Vcd = Vcd; ACM.Vef = Vef; @@ -128,6 +133,30 @@ struct2ANTS(ACM,sprintf('raw%04d.mat',p),sprintf('%04d.ACM',p)); - end % if grd file loaded + CTD.start_time = pstart; + CTD.start_date = psdate; + CTD.stop_time = pstop; + CTD.stop_date = pedate; + + CTD.cond = ccond; + CTD.press = cpres; + CTD.temp = ctemp; + + struct2ANTS(CTD,sprintf('raw%04d.mat',p),sprintf('%04d.CTD',p)); + + ENG.start_time = pstart; + ENG.start_date = psdate; + ENG.stop_time = pstop; + ENG.stop_date = pedate; + + ENG.time = engtime; + ENG.press = epres; + ENG.current = ecurr; + ENG.voltage = evolt; + ENG.dpdt = edpdt; + + struct2ANTS(ENG,sprintf('raw%04d.mat',p),sprintf('%04d.ENG',p)); + + end % if raw file loaded end % for p diff --git a/NOCS_VMP2ANTS.m b/NOCS_VMP2ANTS.m new file mode 100644 --- /dev/null +++ b/NOCS_VMP2ANTS.m @@ -0,0 +1,44 @@ +%====================================================================== +% N O C S _ V M P 2 A N T S . M +% doc: Wed Aug 10 19:52:02 2016 +% dlm: Wed Aug 10 20:43:57 2016 +% (c) 2016 A.M. Thurnherr +% uE-Info: 38 33 NIL 0 0 72 2 2 4 NIL ofnI +%====================================================================== + +% HISTORY: +% Aug 10, 2016: - created for DIMES UK2.5 data from Reykjavik + +function [] = NOCS_VMP2ANTS(matf) + global STRUCT2ANTS; % suppress diagnostic messages + STRUCT2ANTS.verb = 0; + + load(matf); + for id=1:length(d.stnid) + if isfinite(d.ctdno(id)) + prof.id = d.ctdno(id); + obn = sprintf('%03d',prof.id); + else + prof.id = sprintf('VMP%03d',d.vmpno(id)); + obn = prof.id; + end + prof.VMP_id = d.vmpid(:,id)'; + prof.VMP_no = d.vmpno(id); + prof.stn_id = d.stnid(:,id)'; + prof.CTD_no = d.ctdno(id); + prof.lat = d.startlat(id); + prof.lon = d.startlon(id); + prof.dn = d.startjday(id); + prof.end_lat = d.endlat(id); + prof.end_lon = d.endlon(id); + prof.end_dn = d.endjday(id); + prof.ITS = 90; + prof.press = d.press(:,id); + prof.temp = d.temp(:,id); + prof.salin = d.salin(:,id); + prof.chi = d.chi(:,id); + prof.eps = d.eps(:,id); + struct2ANTS(prof,matf,sprintf('%s.VMP',obn)); + end +end + diff --git a/startup.m b/startup.m deleted file mode 100644 --- a/startup.m +++ /dev/null @@ -1,11 +0,0 @@ -%====================================================================== -% S T A R T U P . M -% doc: Tue Apr 17 14:48:48 2012 -% dlm: Tue Apr 17 14:49:28 2012 -% (c) 2012 A.M. Thurnherr -% uE-Info: 9 1 NIL 0 0 72 0 2 4 NIL ofnI -%====================================================================== - -%addpath /Data/src/Matlab/ant -addpath /Data/LADCP/Software/LDEO_IX/current -addpath /Data/LADCP/Software/Thurnherr/shear_inversion/2012_NBP0901