%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Processing notes for the 2013-14 processing notes 2020/05/11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ====================================================== earlier, preliminary notes ====================================================== The directory bs3_201314\cmp_proc_ini included the file "cmp_bs3_201213_prelim_procnotes.txt" from the previous year's prelim. processing. In this very budget-tight and motivationally chalanged year of 2014, I presumably simply followed those notes, since the respective files are present for 2013-14. --------------------------start cmp_bs3_201213_prelim_procnotes.txt ------------------ % BS3 2012->13 CMP initial processing for Bob, 2014/03/13 unpacked data with unpacker version 3; earlier one (2.02.26) did not work. in projects/aon13/cmp_proc_ini, used r_cmpdata2.m and r_upackcmp2.m to convert unpacked .txt into matlab profiles. Added special parts: - in r_cmpdata2.m: towards the end, select every other profile, as specified in vector "files", to wipe out the NaN profiles caused by the firmware bug of this CMP, which allowed us to only unpack every other profile. - in r_upackcmp2: added code to subtract atmospheric pressure from RBR CTD: its the only CTD I know of that does not automatically do that. In order to get an initial look to Bob, do not go through the complete processing, but instead do a quick cal check of C versus the deep microcat. ------------------------------- interlude: get mc record. quite far, in c:\projects\healy10_ta\mc_process\bs3_201213_mcd copy there file bs3_lr75_2134_2012to13.asc; edit, then run r_mc.m normally: edit, then run corr_mc.m here, however, I only take snippets from corr_mc.m to get a structure mc with fields C, S, T, P, dates, dday MC pressure: 127.75; 127.5 to 128 dbar. last p-bin at bin 90, 124.5; P(90,:) time series = 124.7 with seasonal cycle +_ 0.15 dbar first p-in at bin 5; 39.5; P(5,:) time series 39.85 +- 0.125 dbar save as bs3_lr75_2134_2012to13_tmp.mat copy to c:\projects\aon13\cmp_proc_ini -------------------------------- plot mc cond time series, and cmp cond time series for bins 80:95. Bin 80 is a solid one, while bin 95 is never reached. Visually: early, with little stratification at dday 358, mc is 2.659 - 2.657 S/m = 0.002 more (for dT=0, mc sal > by 0.026 psu) late, with little cond stratification at dday 643: mc is 2.622 - 2.617 S/m = 0.005 S/m more (for dT=0, mc sal > by 0.066 psu) Temperature was not recognizeably different; much better than 0.01, perhaps to within 0.001 If the MC did not drift, it would follow that the CMP got about 0.04 fresher. I compared several recent years, and the MCs usually drifted towards saltier (meaning: correction reduced salinity at the record end). However, the magnitude was less: 2011->12 0.01 PSU as one of the highest. => middle: increase CMP salinity from by 0 (start) to 0.03 (end). Do so via adjusting conductivity. Should make a multiplicative correction, rather than addition. conclusion: With C around 2.7 S/m, multiply CMP_C by 1 (start) to 1.008 (end) revision: we DO have the MC cal. 2134 did drift, but only for C>3.5S/m. In our range, two cal points showed that the mc did NOT drift. => adjust CMP conductivity by from 0 (start) to 0.003 S/m (end): multiply by 1.0011. Rcalculated salinity. make those adjustments in adj_cmpcal_tmp.m make structure MP with MP = time: [733x1 double] pave: [95x733 double] s_ave: [95x733 double] tave: [95x733 double] cond: [95x733 double] dday: [733x1 double] dates: [733x19 char] plot, and save to bs3_cmp_201213_tmpadjcal --------------------------end cmp_bs3_201213_prelim_procnotes.txt ------------------ On the re-start in May 2020, I will use the structure of previous CMP processing, but not necessarily Paula Fratantoni's code (based on John Toole / Rick Krishfield's code for MMP processing). While I like that package, its best tools were developed for SeaBird CTDs, not the "open cell" RBRs. Over the years, I had already started to address that by adding more and more specifics to Paula's routines. The general processing route had been: - remove start/end bits before CMP profiling starts/after it ends; - determine sensor lags that minimize S spiking - bin average to 2 dbar - visual editing of 2 dbar data I had long ago added raw data editing; but compare them to the average profiles in the process. So it becomes a bit iterative: - remove start/end bits before CMP profiling starts/after it ends ("cutstop") - determine sensor lags that minimize S spiking - bin average to 2 dbar - visual editing of raw data - re-run bin averaging - visual check of 2 dbar data. - conductivity calibration adjustment based on MC To outline the whole thing, take a look at parts first: - cutstop - should be able to work outside Paula's code - find lags: looks do-able as well. ------------------------------------------------------------------- 1) cutstops ------------------ work with already parsed raw data saved in bs3_201314\cmp_proc_ini\matfiles\C#######_tmp.mat dday_prf = interp1( [1, nn], [dt0, dt1], [1:nn]'); % time within the profile dt = mean(dday_prf); % one time as time stamp of the profile from: rupackcmp2.m: % for RBR CTD's, barometric pressure is not removed ip = 3; % pressure index fprintf(2, '\n removing atm. pressure (10 dbar) from pressure variable'); x(:,ip) = x(:,ip) - 10; eval(['save ', outfile, ' x dt dday_prf ']) with x : P = x(:,3); C = x(:,1); T = x(:,2); S = sal; O2 = x(:,4); PH = x(:,5); V1 = x(:,6); V2 = x(:,7); dd = mean_nan(dt); remove start/stops: mfiles/e_cutstops3.m pay close attention to the many stop-only profiles, trying to get a fairly constant measurement (if it moved a bit without enough to generate multiple depth bins, but enough to introduce variability, cut that out). 2020/05/12 for C0000894_tmp.mat : T and S fluctuations are outrageous for this stopped "profile". It seems very likely unreal. Its easier to wipe this one than to push further (not a >50 subset was realistic!) I miss that number in the series of every-other prfiles 0:2:1456 So its: [0:2:892, 896:2:1456] 2020/05/13 moving on to lags finished lags; t_lags3p.m mostly 0 and 1; couple 2's. run fill_lags; remove ifile 894 manually (told you: this will be a pitb!) make new procfb_cmp.m ideally, meant as an overall program, but we are starting a bit late for that. First job: make structure; add ifile; add lags profles 90 and 1078 (cmp index 46 and 539) fail the limit tests. Check them out: In both cases, the CTD appeared to have failed. look at raw data for 90, 864, and 1078 2020/05/18 Found problem: profile 1078 was actually on deck. It was the last profile (well empty 1079 was) of the record, from July 17, 2014. The mooring was recovered that day. Wipe rawcutstop files after that. Wipe matfiles after that. Files with larger numbers were leftovers from the 2012-13 CMP processing! Also move 90 and 1078 to rawcutstop/deleted 2020/05/20 got edit_rawcb going. Struggled for a while to keep vars etc. general so that similar programs can work for ARGO, AW, and others. But details were too different. Use flag matrices as for ARGO rather than ascii lists of editing "bins" as I do for S-ADCP. Before applying first edits (to raw S before averaging), copy: !copy bs3_cmp201314.mat bs3_cmp201314_noedit.mat 1 file(s) copied. 2020/05/22 finished profile editing. But now wonder about the single-bin "profiles" when the CMP was stuck at the top stop. Their raw data seemed to have a lot of spread (e.g. density range) that makes me wonder how meaningful the mean is. check with p_zerolength.m 2020/05/30 Bob replied that S shall be dropped for now, but kept for later if wanted; like the shallowest MC for 2016-18. When making final format, note that earlier on-line versions have time for each bin, not just the profile. Silly. But could cause "issues" with the submission to the data archive if I change the format. Add binned time back in: conv2final.m look at input files: >> load ../rawcutstops/raw0630.mat >> whos Name Size Bytes Class Attributes ans 1x1 8 double ccond 278x1 2224 double cpres 278x1 2224 double csnum 1x278 2224 double ctemp 278x1 2224 double >> load ../matfiles/C0000430_tmp.mat >> whos Name Size Bytes Class Attributes ans 1x1 8 double ccond 278x1 2224 double cpres 278x1 2224 double csnum 1x278 2224 double ctemp 278x1 2224 double dday_prf 443x1 3544 double dt 1x1 8 double x 443x7 24808 double but note that the pre-cutstop raw files had a time error, using 2012-13 code to set refyear: 2012. subtract 366 Format to shoot for: MP = time: [729x54 double] pave: [729x54 double] cave: [729x54 double] s_ave: [729x54 double] tave: [729x54 double] pden: [729x54 double] ptmp: [729x54 double] dday: [729x1 double] profno: [729x1 double] pgrid: [1x54 double]