Amundsen ship adcp processing and postprocessing - Leg 1 -------------------------------------------------------- The data recorded by a RDI os150 device are processing with the CODAS software. Raw ENR files processing. ========================= From windows, check the NR1, N2R, N3R files. ----------------------------------------------- 0- QO_checkN1R.py The program detected some problems: ArcticNet_16_LEG01011_000000.N1R ligne 1 : ne commence pas par une trame NMEA : šbjÀbb‚b‚‚‚ŠR‚"Ô¤ˆ) ligne 2 : ligne orpheline : $šbjÀbb‚b‚‚‚ŠR‚"Ô¤ˆ) ligne 2 : ne commence pas par une trame NMEA : Š É‘ b¢ ’Ô¤ˆ)ÊÊ Õ)rŠb¢ÀbjÀŠ’rŠbrÀ’’rªbZ¤º2À¤ø$INZDA,004150.0018,07,06,2016,,*7 ligne 3 : récupération de la ligne : $INZDA,004150.0018,07,06,2016,,*7 ligne invalide : $INZDA,004150.0018,07,06,2016,,*7B "$" ArcticNet_16_LEG01008_000000.N2R ligne 1 vide. ArcticNet_16_LEG01009_000000.N2R ligne 1 vide. ArcticNet_16_LEG01010_000000.N2R ligne 1 vide. ArcticNet_16_LEG01011_000000.N2R ligne 1 vide. ArcticNet_16_LEG01012_000000.N2R ligne 1 vide. ArcticNet_16_LEG01013_000000.N2R ligne 1 vide. ArcticNet_16_LEG01014_000000.N2R ligne 1 vide. ArcticNet_16_LEG01015_000000.N2R ligne 1 vide. ArcticNet_16_LEG01016_000000.N2R ligne 1 vide. For most of the N3R files, there is a bug to save the string "$GPVTG". For example: Line n : $ Line n+1 : GPVTG,6.0,T,,M,11.63,N,21.55,K,D*08 From the "an1601_enrproc" directory, get information from VmDAS data. 1- vmdas_info.py --logfile sta_info.txt os ../../vmdas_data/an1601/*STA 2- vmdas_info.py --logfile enr_info.txt os ../../vmdas_data/an1601/*ENR From the "config" directory 3- reform_vmdas.py ../../.. 4- python vmdas2uhdas.py 5- proc_starter.py reform_defs.py Position ==> 'N1R', 'gps' Heading ==> 'N2R','hdg' (gyro from the ship) Heading correction ==> 'N1R', 'pmv' (heading from posmv) see Proc_starter.PNG create the file an1601_proc.py line 63: acc_heading_cuttoff = 0.02 line 75: ducer_depth = dict( os150 = 7.4 ) From the main directory "an1601_enrproc" 6- adcptree.py os150nb --datatype uhdas --cruisename an1601 cd os150nb Create the file q_py.cnt and apply it. -------------------------------------- 7- vi q_py.cnt ### q_py.cnt contents ## python processing --yearbase 2016 --cruisename an1601 --dbname a1601 --datatype uhdas --sonar os150nb --ens_len 300 --update_gbin ## required for this kind of processing --configtype python ## file used in config/ dirctory is python --ping_headcorr --max_search_depth 1500 8- quick_adcp.py --cntfile q_py.cnt --auto several amazing and scary messages such as "rangeslice input must be monotonic" Post processing. ================ Create a directory "/adcp_pyproc/an1601_postproc/" and copy os150bb from "/adcp_pyproc/an1601_enrproc/" From "os150nb" directory, have a look at the cruise track. ---------------------------------------------------------- 1- plot_nav.py nav/a1601.gps The image "plot_nav.gps" was saved in the "1601_postproc" directory. Check heading device. --------------------- Main heading device: ship's gyro. Heading correction: POSMV 2-figview.py cal/rotate/*png There are several gaps (red cross) so a correction is mandatory as following. cd cal/rotate 3-patch_hcorr.py # It will bring up a picture. The red '+' that you saw will have already been interpolated. # Now click the 'Write/Exit' button # It will save a copy of the figure and write out a new set # of heading correction files. # Follow the instructions printed on your page: # inspect the newhcorr*.png files: 4- figview.py *.png # remove earlier time-dependent heading correction 5- rotate unrotate.tmp # apply new heading correction 6- rotate rotate_fixed.tmp # run navigation steps and inspect calibrations cd ../.. 7- quick_adcp.py --steps2rerun navsteps:calib --auto Check calibration. ------------------ Range for "good calibration": Number of edited points: > 10-15 Amplitude: .995 to 1.005 Phase: -0.05 to +0.05 Use watertrack for amplitude and both for phase. 8- tail -20 cal/watertrk/adcpcal.out ... clip_dt = 60, clip_var = 0.050 Number of edited points: 143 out of 163 amp = 1.0068 + -0.0001 (t - 177.6) phase = 0.35 + 0.0004 (t - 177.6) median mean std amplitude 1.0070 1.0068 0.0112 phase 0.3470 0.3523 0.6930 .... 9- tail -20 cal/botmtrk/btcaluv.out ... unedited: 810 points edited: 708 points, 2.0 min speed, 2.5 max dev median mean std amplitude 1.0079 1.0080 0.0022 phase 0.4285 0.4353 0.1064 ... quick_adcp.py --steps2rerun rotate:navsteps:calib --rotate_amplitude 1.0069 --auto quick_adcp.py --steps2rerun rotate:navsteps:calib --rotate_angle 0.39 --auto 10- Check the results running steps 8 and 9. ... clip_dt = 60, clip_var = 0.050 Number of edited points: 143 out of 164 amp = 0.9999 + -0.0001 (t - 177.6) phase = -0.04 + 0.0005 (t - 177.6) median mean std amplitude 1.0000 0.9999 0.0111 phase -0.0530 -0.0379 0.6938 ... ... unedited: 810 points edited: 707 points, 2.0 min speed, 2.5 max dev median mean std amplitude 1.0010 1.0011 0.0022 phase 0.0389 0.0441 0.1052 ... ADCP Transducer-GPS offset (beta testing). ------------------------------------------ (http://currents.soest.hawaii.edu/docs/adcp_doc/codas_doc/xducerxy.html) 11- tail -10 cal/watertrk/guess_xducerxy.out ... guessing ADCP (dx=startboard, dy=fwd) meters from GPS positions from a1601.agt calculation done at 2016/12/09 14:10:48 xducer_dx = 5.209016 xducer_dy = 26.602325 signal = 9056.945298 "signal" is an indication of how robust the calculation is "signal" < 1000 (weak confidence) "signal": 1000-4000 (probably worth using) "signal" > 4000 (pretty strong indication) 12- quick_adcp.py --steps2rerun navsteps:calib --xducer_dx 5 --xducer_dy 27 --auto Edit bad data. -------------- cd edit 13- gautoedit.py -n5 cd .. 14- quick_adcp.py --steps2rerun apply_edit:navsteps:calib:matfiles --auto Check the calibration. ---------------------- Watertrack. ... clip_dt = 60, clip_var = 0.050 Number of edited points: 142 out of 160 amp = 0.9998 + -0.0001 (t - 177.6) phase = -0.06 + -0.0009 (t - 177.6) median mean std amplitude 0.9995 0.9998 0.0108 phase -0.0525 -0.0580 0.6962 ... Bottomtrack ... unedited: 810 points edited: 707 points, 2.0 min speed, 2.5 max dev median mean std amplitude 1.0010 1.0011 0.0022 phase 0.0389 0.0441 0.1052 ... Get the matlab format data. --------------------------- In Matlab. an1601_os150nb = load_getmat('os150nb\contour\allbins_'); help load_getmat to have information about variables. Do not forget to apply the mask !!! u = an1601_os150nb.u .* an1601_os150nb.nanmask; v = an1601_os150nb.v .* an1601_os150nb.nanmask; Get the netcdf format data. --------------------------- From the virtual machine adcp_nc.py adcpdb contour/an1601_os150nb an1601 os150nb