Amundsen ship adcp processing and postprocessing - Leg 2 -------------------------------------------------------- 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 : 47.746,19.07,T,-0.13,0.77,-0.12,0.020,0.020,0.020,2,1*2 ArcticNet_16_LEG02001_000000.N2R ligne 1 vide. ArcticNet_16_LEG02002_000000.N2R ligne 1 vide. ArcticNet_16_LEG02002_000061.N2R with a lot of problems Line 329694 "$HEHDT,212.8,ÔëTHø$HNROT,002.4,A*2" Line 368689 "$HNROT,-002.3,A*0C²jRþ$HNROT,-001.6,A*0" ... ArcticNet_16_LEG02002_000071.N2R with a lot of problems Line 120001 "$HEHDT,180.)b¢©ÉÝ5)ÿ$HNROT,000.1,A*2" Line 273354 "©Á 5)ÿ$HEHDT,218.1,T*2 ... 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 "an1602_enrproc" directory, get information from VmDAS data. 1- vmdas_info.py --logfile sta_info.txt os ../../vmdas_data/an1602/*STA 2- vmdas_info.py --logfile enr_info.txt os ../../vmdas_data/an1602/*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 an1602_proc.py line 63: acc_heading_cuttoff = 0.02 line 75: ducer_depth = dict( os150 = 7.4 ) From the main directory "an1602_enrproc" 6- adcptree.py os150nb --datatype uhdas --cruisename an1602 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/an1602_postproc/" and copy os150bb from "/adcp_pyproc/an1602_enrproc/" From "os150nb" directory, have a look at the cruise track. ---------------------------------------------------------- 1- plot_nav.py nav/a1602.gps The image "plot_nav.gps" was saved in the "1602_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: 233 out of 269 amp = 1.0075 + -0.0001 (t - 215.9) phase = 0.26 + -0.0039 (t - 215.9) median mean std amplitude 1.0070 1.0075 0.0129 phase 0.2490 0.2635 0.7898 .... 9- tail -20 cal/botmtrk/btcaluv.out There is no bottom track information. quick_adcp.py --steps2rerun rotate:navsteps:calib --rotate_amplitude 1.0074 --auto quick_adcp.py --steps2rerun rotate:navsteps:calib --rotate_angle 0.257 --auto 10- Check the results running steps 8. ... clip_dt = 60, clip_var = 0.050 Number of edited points: 233 out of 269 amp = 1.0000 + -0.0001 (t - 215.9) phase = 0.01 + -0.0040 (t - 215.9) median mean std amplitude 1.0000 1.0000 0.0129 phase -0.0050 0.0058 0.7897 ... 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 a1602.agt calculation done at 2017/02/28 15:02:39 xducer_dx = 0.915612 xducer_dy = 32.963286 signal = 14031.471237 "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 1 --xducer_dy 33 --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: 224 out of 268 amp = 1.0005 + -0.0001 (t - 215.8) phase = 0.02 + -0.0020 (t - 215.8) median mean std amplitude 1.0000 1.0005 0.0130 phase -0.0055 0.0203 0.7644 ... phase value a little bit too high. quick_adcp.py --steps2rerun rotate:navsteps:calib --rotate_angle 0.01 --auto clip_dt = 60, clip_var = 0.050 Number of edited points: 224 out of 268 amp = 1.0005 + -0.0001 (t - 215.8) phase = 0.01 + -0.0020 (t - 215.8) median mean std amplitude 1.0000 1.0005 0.0130 phase -0.0155 0.0095 0.7652 Get the matlab format data. --------------------------- In Matlab. From the main working directory "adcp_pyproc\an1603_postproc\" an1603_os150nb = load_getmat('os150nb\contour\allbins_'); help load_getmat to have information about variables. Do not forget to apply the mask !!! u = sadcp1602.u .* sadcp1601.nanmask; v = sadcp1602.v .* sadcp1601.nanmask; Get the netcdf format data. --------------------------- From the virtual machine adcp_nc.py adcpdb contour/an1602_os150nb an1602 os150nb