From d4b2d0340d0f0f27ca07c1d135934ad0ec5fe505 Mon Sep 17 00:00:00 2001 From: Jim Thomson Date: Fri, 11 Oct 2024 13:48:50 -0700 Subject: [PATCH] testing on Mac --- .DS_Store | Bin 16388 -> 18436 bytes Aquadopp/reprocess_AQH.m | 2 +- GeneralTools/.DS_Store | Bin 8196 -> 8196 bytes GeneralTools/KZ_PostProcessing/L0_createSBD.m | 5 +- .../KZ_PostProcessing/L1_compileSWIFT.m | 6 +- .../KZ_PostProcessing/L2_pruneSWIFT.asv | 112 ------------------ .../KZ_PostProcessing/L2_pruneSWIFT.m | 6 +- .../KZ_PostProcessing/L3_postprocessSWIFT.m | 8 +- GeneralTools/plotSWIFTV3.m | 3 +- Signature/.DS_Store | Bin 6148 -> 6148 bytes Signature/absorption.m | 45 +++++++ Winds/inertialdissipation.m | 2 +- 12 files changed, 62 insertions(+), 127 deletions(-) delete mode 100644 GeneralTools/KZ_PostProcessing/L2_pruneSWIFT.asv create mode 100644 Signature/absorption.m diff --git a/.DS_Store b/.DS_Store index ed4cc254047661111133b96ed7022ac2c7d52d80..33d99bb20a80c808d1ffb1b4d62fd834fd5bc7b8 100644 GIT binary patch delta 3024 zcmchZdvFui6~^zklFdrHvQ`+`mS4!o7(XN|*|KCC6KsSZ6aoeWwh1lRmJCX4$+m0= zIL4-Nl0ImI=T3N})24-%c9Ln+jG=A%2&B!lNm|l|xDBCc8EBblrcH(>O`D<9Y0s`? zutN#`tD2GS-h211?tbSxzjG(XF>wfmj4`Yn4tW@>r%RE(YOBcf^9W;hYTfc=VVSj= z2J|$+SSQ=b!mO1Ive@K+gS+eWDS|r5|FE zoOZ9@H|n&Hc-(HU)9$OPz&h(mpQ?ZeMlGR6!FNRK>L#H!g^7Gyp2 zHV4>2_5?e{e#D+*XV@$3b#{gQiM`9NvwuT?4tki71_c&m!+}B+VF|ogj=Qh|YY@a{ zw4ogzM-O%)f_o9e{n(2UJb+K)vp9&)<53*Jm+=)G_u(m=!fAXL-^0)FE4+&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rj?#Knkk^i2ZdT6bu_m^Z-NiPrhuL;^kiEiQWv{U#>?Hew zon`0Q&+IDujs4F4Kn&ub!iwQYg%jDxK`shWM)LKehTLneF5V^*ZU`;7jfA@#D{vQ9 zl4LjNl6?S=VkdT?VK-jDTX+YD@GjAQ2A>e^Uy+HOCC&bbUvLFi$;5_}i6xSWxuqhh zT&k7k|4#uliiOTJp}M&4Vmcq1k5&7I@&QHIZA%Q6kz7p9bE$lcOn9m>x^Y>YT&&DX zZQveDfkIrU20cu+=Tl@A(VG%JS(Bk^jNXpqW!H_*QemmoWTaKpjo|+u@Q<-i*yrpV zyGY>w4I{M;J2H@k@hHO0QY-(U1D56SJv9dpot{3kDHiksqVAr9M$skw86O a@7da)0sRoSnKz2@1&)D&!q0Hywf+IlC+gJz diff --git a/Aquadopp/reprocess_AQH.m b/Aquadopp/reprocess_AQH.m index be0652e..c29caa8 100644 --- a/Aquadopp/reprocess_AQH.m +++ b/Aquadopp/reprocess_AQH.m @@ -96,7 +96,7 @@ [time,vel,amp,cor,press,pitch,roll,heading] = ... readSWIFTv3_AQH([bfiles(iburst).folder '\' bfiles(iburst).name]); else - load([bfiles(iburst).folder '\' bfiles(iburst).name],... + load([bfiles(iburst).folder slash bfiles(iburst).name],... 'Vel','Cor','Amp','Pressure','pitch','roll','heading','time') if exist('Vel','var') vel = Vel; diff --git a/GeneralTools/.DS_Store b/GeneralTools/.DS_Store index 97336dc5a31f3f479d7593a69dfc1c3c68fb2176..94c8f56a6bf2c86dd9cb81398a4dd08564926a14 100644 GIT binary patch delta 85 zcmZp1XmOa}&nUhzU^hRb_+}mfcP1S{25*KahIobmhJ1!%h7urM1Y{*Mqyl-x44Djh l4CyJw$vH{+`8kY}1BCuDGHmu2?qu1_F7b_J^EnZAW&oWe7SjL# delta 46 zcmZp1XmOa}&nUJrU^hRb*k&F9cc#frLcbXqH`fVwvP^8y-^?!Yjb*cr=xwHn4LSg0 CTMvi; diff --git a/GeneralTools/KZ_PostProcessing/L0_createSBD.m b/GeneralTools/KZ_PostProcessing/L0_createSBD.m index 5aa1b18..6129b80 100644 --- a/GeneralTools/KZ_PostProcessing/L0_createSBD.m +++ b/GeneralTools/KZ_PostProcessing/L0_createSBD.m @@ -11,10 +11,11 @@ % 9/2017 add oxygen optode and sea owl fluorometer % 9/2019 changed time convention to use start of the burst,rather than end % +% K. Zeiden, 10/2024 overhaul to make PC compatible and catch all sensor payloads %% Experiment directory -expdir = 'S:\SEAFAC\June2024'; +expdir = '/Volumes/Data/SEAFAC/June2024'; SBDfold = 'ProcessedSBD'; %% Sampling Parameters @@ -108,7 +109,7 @@ end syscommand = [syscommand ' ' sbdfile]; else - syscommand = ['!cat ' payloadfile]; + syscommand = ['cat ' payloadfile]; for iprc = 1:length(PRCburstfiles) syscommand = [syscommand ' ' PRCburstfiles(iprc).folder slash PRCburstfiles(iprc).name]; end diff --git a/GeneralTools/KZ_PostProcessing/L1_compileSWIFT.m b/GeneralTools/KZ_PostProcessing/L1_compileSWIFT.m index 8b575a4..dca34e1 100644 --- a/GeneralTools/KZ_PostProcessing/L1_compileSWIFT.m +++ b/GeneralTools/KZ_PostProcessing/L1_compileSWIFT.m @@ -13,10 +13,10 @@ % microSWIFT - Use the time embedded within the payload 50 or 51 or 52 of the % SBD file, which is the time at the end of the burst of raw data. -% K. Zeiden 10/01/2024 +% K. Zeiden 10/01/2024, based on orginal compileSWIFT_SBDservertelemetry.m %% Experiment directory -expdir = 'S:\SEAFAC\June2024'; +expdir = '/Volumes/Data/SEAFAC/June2024'; % SBD folder SBDfold = 'ProcessedSBD'; @@ -30,7 +30,7 @@ end % Processing parameters -plotflag = true; % binary flag for plotting (compiled plots, not individual plots... that flag is in the readSWIFT_SBD call) +plotflag = false; % binary flag for plotting (compiled plots, not individual plots... that flag is in the readSWIFT_SBD call) % List missions missions = dir([expdir slash 'SWIFT*']); diff --git a/GeneralTools/KZ_PostProcessing/L2_pruneSWIFT.asv b/GeneralTools/KZ_PostProcessing/L2_pruneSWIFT.asv deleted file mode 100644 index 1f1b1a4..0000000 --- a/GeneralTools/KZ_PostProcessing/L2_pruneSWIFT.asv +++ /dev/null @@ -1,112 +0,0 @@ -% Find out-of-water bursts and prune them from the SWIFT structure - -% K. Zeiden 10/10/2024 - -%% Experiment Directory -expdir = 'S:\SEAFAC\June2024'; - -%% Parameters for QC/out-of-water identification - -if ispc - slash = '\'; -else - slash = '/'; -end - -% Processing parameters -plotflag = true; % binary flag for plotting (compiled plots, not individual plots... that flag is in the readSWIFT_SBD call) - -% QC Parameters -minwaveheight = 0;% minimum wave height in data screening -minsalinity = 1;% PSU, for use in screen points when buoy is out of the water (unless testing on Lake WA) -maxdriftspd = 3;% m/s, this is applied to telemetry drift speed, but reported drift is calculated after that - -disp('-------------------------------------') -disp('Out-of-water parameters:') -disp(['Minimum wave height: ' num2str(minwaveheight) ' m']) -disp(['Minimum salinity: ' num2str(minsalinity) ' PSU']) -disp(['Maximum drift speed: ' num2str(maxdriftspd) ' ms^{-1}']) -disp('-------------------------------------') - -%% List missions -missions = dir([expdir slash 'SWIFT*']); -missions = missions([missions.isdir]); - -%% Loop through missions and remove burst identified as out-of-water -for im = 1%:length(missions) - - missiondir = [missions(im).folder slash missions(im).name]; - cd(missiondir) - sname = missions(im).name; - - % Load L1 file - l1file = dir([missiondir slash '*SWIFT*L1.mat']); - if ~isempty(l1file) - load([l1file.folder slash l1file.name],'SWIFT','sinfo'); - else % Exit reprocessing if no L1 product exists - warning(['No L1 product found for ' missiondir(end-16:end) '. Skipping...']) - return - end - - % Create diary file - diaryfile = ['L2_' missions(im).name '_pruneSWIFT.txt']; - if exist(diaryfile,'file') - delete(diaryfile); - end - diary(diaryfile) - disp(['Pruning ' sname]) - - % Loop through and identify out-of-water bursts - nburst = length(SWIFT); - outofwater = false(1,nburst); - - for iburst = 1:nburst - oneSWIFT = SWIFT(iburst); - - % Waves too small (probably out of water) - if isfield(oneSWIFT,'sigwaveheight') - if oneSWIFT.sigwaveheight < minwaveheight || oneSWIFT.sigwaveheight >= 999 - outofwater(iburst) = true; - disp('Waves too small, removing burst.') - end - end - - % Salinity too small (probably out of water) - if isfield(oneSWIFT,'salinity') - if all(oneSWIFT.salinity < minsalinity) - outofwater(iburst) = true; - disp('Salinity too low, removing burst.') - end - end - - % Drift speed limit (if too fast, probably out of water) - if isfield(oneSWIFT,'driftspd') - if oneSWIFT.driftspd > maxdriftspd - outofwater(iburst) = true; - disp('Speed too fast, removing burst.') - end - end - - end - - % Remove out-of-water bursts - SWIFT(outofwater) = []; - - % Plot - if plotflag - if strcmp(sinfo.type,'V3') - fh = plotSWIFTV3(SWIFT); - else - fh = plotSWIFTV4(SWIFT); - end - set(fh,'Name',l2file.name(1:end-4)) - print(fh,[l3file.folder slash l3file.name(1:end-4)],'-dpng') - end - - % Save L2 file - save([missiondir slash sname '_L2.mat'],'SWIFT','sinfo') - - % Turn off diary - diary off - -end % End mission loop \ No newline at end of file diff --git a/GeneralTools/KZ_PostProcessing/L2_pruneSWIFT.m b/GeneralTools/KZ_PostProcessing/L2_pruneSWIFT.m index 2cc9314..8dc770c 100644 --- a/GeneralTools/KZ_PostProcessing/L2_pruneSWIFT.m +++ b/GeneralTools/KZ_PostProcessing/L2_pruneSWIFT.m @@ -1,9 +1,9 @@ % Find out-of-water bursts and prune them from the SWIFT structure -% K. Zeiden 10/10/2024 +% K. Zeiden 10/10/2024... similar to SWIFT_QC.m %% Experiment Directory -expdir = 'S:\SEAFAC\June2024'; +expdir = '/Volumes/Data/SEAFAC/June2024'; %% Parameters for QC/out-of-water identification @@ -14,7 +14,7 @@ end % Processing parameters -plotflag = true; % binary flag for plotting (compiled plots, not individual plots... that flag is in the readSWIFT_SBD call) +plotflag = false; % binary flag for plotting (compiled plots, not individual plots... that flag is in the readSWIFT_SBD call) % QC Parameters minwaveheight = 0;% minimum wave height in data screening diff --git a/GeneralTools/KZ_PostProcessing/L3_postprocessSWIFT.m b/GeneralTools/KZ_PostProcessing/L3_postprocessSWIFT.m index 72e069c..6851b52 100644 --- a/GeneralTools/KZ_PostProcessing/L3_postprocessSWIFT.m +++ b/GeneralTools/KZ_PostProcessing/L3_postprocessSWIFT.m @@ -3,16 +3,16 @@ % Master post-processing function, that calls sub-functions to reprocess % each different type of raw SWIFT data and create an L3 product. % L1 product must have been created prior to running this script, -% by running 'compileSWIFT.m', and L2 created by running 'qcSWIFT.m'; +% by running 'compileSWIFT.m', and L2 created by running 'pruneSWIFT.m'; -% K. Zeiden 07/2024 +% K. Zeiden 07/2024, based on existing sensor-specific processing codes w % Need to consider additional QC steps after processing... % Airmar temp, NaN out if below/above -20/50 deg C % Wind speed, NaN out above 30 m/s %% Experiment Directory -expdir = ['S:' slash 'SEAFAC' slash 'June2024']; +expdir = ['/Volumes/Data/SEAFAC/June2024']; %% Processing toggles @@ -33,7 +33,7 @@ rpAQD = true; % TKE % Plotting toggle -plotflag = true; +plotflag = false; % List of missions missions = dir([expdir slash 'SWIFT*']); diff --git a/GeneralTools/plotSWIFTV3.m b/GeneralTools/plotSWIFTV3.m index 2169a37..3a72e95 100644 --- a/GeneralTools/plotSWIFTV3.m +++ b/GeneralTools/plotSWIFTV3.m @@ -8,7 +8,8 @@ nt = length(swift.time); fh = figure('color','w'); -fullscreen(2) +%fullscreen(2) +h = tight_subplot(8,3,[0.035 0.05],[0.1 0.075],0.075); h = tight_subplot(8,3,[0.035 0.05],[0.1 0.075],0.075); % tight_subplot(Nh, Nw, [gap_h gap_w], [lower upper], [left right] ) diff --git a/Signature/.DS_Store b/Signature/.DS_Store index 0030a9b020c495b88566c005d5926597f423b116..305d62b84e54279ebe15c97fb4129045b1d7c043 100644 GIT binary patch delta 46 zcmZoMXfc@J&&a