7.7.12. km1001c_fullproc_os38nb.txtΒΆ

LAST CHANGED    : Sun Mar 10 00:23:31 UTC 2019
CRUISE NAME(S)  : km1001c
CRUISE DATES    : 2010/01/30 17:41:17 to 2010/02/01 15:49:15
SHIP NAME       : Kilo Moana
PORTS           : Coos Bay, OR to Coos Bay, OR
CHIEF SCIENTIST : Brian Taylor
DATABASE NAME   : a_km
DATA FILES      : km2010_029_63671.raw to km2010_031_50400.raw

STATUS          :  to do                           done
                  ------                       -----------
                  averaged                       [  x   ]
                  loaded                         [  x   ]

                  NOTE: heading correction instrument exists
                        NOTE: time-dependent heading corrections
                        applied IN the ensembles
                        (see   cal/rotate/ens_hcorr.ang)

                  check heading correction       [  x   ]
                  calibration                    [  x   ]
                  edited                         [  x   ]
                  re-check heading correction    [  x   ]
                  check editing                  [  x   ]
                  figures                        [  x   ]

INSTRUMENT      : os38

ACQUISITION     : 
     PROGRAM    : uhdas
     PROCESSING:    : python

LOGGING         : 

     PARAMETERS : BT : bottom track mode (on or off)
                  SI : sampling interval or averaging period for ensemble (sec)
                  NB : number of bins
                  BL : bin length (m)
                  TD : transducer depth (m)
                  BK : blanking length (m)
                  HO : heading offset applied by DAS (deg)
                  HB : heading bias (deg)
                  CRPH : compensation for roll-pitch-heading, 1:on, 0:off)
                  
                  yy/mm/dd  hh:mm:ss   BT   SI  NB  BL  TD BK     HO     HB CRPH
                  2010/01/30 17:46:11  off  300  70  24   7 16  44.55   0.00 0001

HEADING         : 
     PRIMARY    : heading from gyro
     CORRECTION : heading correction from posmv
                        NOTE: time-dependent heading corrections
                        applied IN the ensembles
                        (see   cal/rotate/ens_hcorr.ang)

POSITIONS       : gps positions from posmv


CALIBRATION     : original heading alignment: 44.55
                  additional rotation 0
                  final transducer angle is:
                       (original transducer angle) - (rotate_angle)
                  original scale factor 1.006
                  additional scale factor (none)

COMMENTS        : all clean
                  
PROCESSOR       : J.Hummon

--- processing parameters ----------


## (determined from "sonar"): model = os
## (determined from "sonar"): frequency = 38
## (determined from "sonar"): pingtype = nb
## (determined from "sonar"): instname = os38
             badbeam   None
           beamangle   30
          configtype   python
          cruisename   km1001c
            datatype   uhdas
              dbname   aship
             ens_len   300
             fixfile   aship.gps
          hcorr_inst   posmv
               pgmin   50
         proc_engine   python
          ref_method   refsm
     refuv_smoothwin   3
        refuv_source   nav
               sonar   os38nb
            txy_file   aship.gps
           xducer_dx   0
           xducer_dy   0
            yearbase   2010



Process UHDAS data using Python
=============================================

(1)  directory setup: create a working directory for this cruise

      mkdir  km1001c_fullproc
      cd km1001c_fullproc



(1a) get some information about this cruise:

     uhdas_info.py --logfile uhdas_info.txt ../../uhdas_data/km1001c
     cat uhdas_info.txt


     We see:
     - positions from ashtech and posmv
     - headings from gyro, posmv and ashtech
     - 138 files; all present


(1b) configuration file for processing:


In order to use CODAS Python processing, we need to generate a
suitable configuration file, containing instructions for processing
such as transducer depth, transducer angle and ancillary data sources
(heading and attitude). This new file contains modern settings and
modern syntax for the specified ship: create a new
file, with modern syntax and variable names, and then edit as needed.


# In  km1001c_fullproc make a directory called 'config'


         mkdir config
         cd config

# and run:

         uhdas_proc_gen.py -s km

    # This creates a file called "km_proc.py"

    # copy to a new version for our cruise  (use the cruisename "km1001c"):

    cp km_proc.py km1001c_proc.py

   #Edit the file and add these four (4)
   # lines to the top of km1001c_proc.py


# full path to uhdas data directory (do not use relative path)
uhdas_dir = '/home/currents/programs/qpy_demos/uhdas_data/km1001c'
yearbase = 2010                  # usually year of first data logged
shipname = 'Kilo Moana' # for documentation
cruiseid = 'km1001c'              # for titles



    # go back one level
    cd ..


(2) now we can use that file.
    Set up the processing directory by typing:


      adcptree.py  os38nb --datatype uhdas --cruisename km1001c


NOTE: Now there is no error message about missing configuration files

(3) (a) change directories to ADCP processing directory just created

         cd  os38nb

    NOTE: there is a "config" directory and it has a copy of the file
          km1001c_proc.py that we created in #2

    (b)  create a quick_adcp.py control file

    unix: this example  is written as a bash "heredoc" for
          cut-and-past ease, but you can create q_py.cnt with
          an editor to have the parts between (or including)
          the comments

    windows:
        - you can create q_py.cnt with an editor to have the
          parts between (or including) the comments
        - it may be easier to call it "q_py.txt" to avoid
          fighting with your editor, which may try to set the suffix


cat << EOF > q_py.cnt

    ####----- begin q_py.cnt------------
    ## all lines after the first "#" sign are ignored

    ## python processing

      --yearbase    2010
      --cruisename  km1001c   # used to identify configuration files
                              #  *must* match prefix of files in config dir

      --update_gbin   ## NOTE: You should generally remake gbins
                      ## - you are not sure
                      ## - if parameters for averaging changed
                      ## - various other reasons.

                      ## ==> MAKE SURE you move the original gbin directory
                      ##     to another name first!!

#      --py_gbindirbase gbin # (will put them adjacent to q_py.cnt)

      --configtype python  ## <=== USE THE NEW FILE WE CREATED

      --sonar       os38nb
      --dbname      aship
      --datatype    uhdas
      --ens_len     300

      --ping_headcorr        ## applies heading correction.
                             ##     settings found in config files

      --max_search_depth 3000   ## use  topography for editing?
                                ## 0 = "always use amplitude to guess the bottom;
                                ##          flag data below the bottom as bad
                                ## -1 = "never search for the bottom"
                                ## positive integer: use ADCP amp to autodetect
                                ##    the bottom.  Only do this in "deep water",
                                ##    i.e. topo says bottom is deeper than this

EOF


   (c)  run quick_adcp.py:

        quick_adcp.py --cntfile q_py.cnt

---------

(4) review the data

    (a) check calibration:heading correction device:

             figview.py cal/rotate/*png

              conclude: no action needed


    (b) check calibration:

      **watertrack**
   ------------
   Number of edited points:  34 out of  35
      amp   = 1.0074  + -0.0033 (t -  30.3)
      phase =   0.05  + 0.1635 (t -  30.3)
               median     mean      std
   amplitude   1.0080   1.0074   0.0064
   phase       0.0900   0.0511   0.4541

   -------------------


   (c) look at the data:

              dataviewer.py



(5)  edit "gautoedit"

    cd edit
    gautoedit.py


    # apply editing:


      cd ..
      quick_adcp.py --steps2rerun apply_edit:navsteps:calib  --auto

    # check editing -- looks OK

          dataviewer.py

(6)

    - check calibrations again


    **watertrack**
------------
Number of edited points:  34 out of  35
   amp   = 1.0071  + -0.0020 (t -  30.3)
   phase =   0.05  + 0.1809 (t -  30.3)
            median     mean      std
amplitude   1.0080   1.0071   0.0058
phase       0.0900   0.0494   0.4431
------------


   still need scale factor:


    quick_adcp.py --steps2rerun rotate:navsteps:calib --rotate_amplitude 1.007 --auto


    **watertrack**
------------
Number of edited points:  34 out of  35
   amp   = 1.0001  + -0.0018 (t -  30.3)
   phase =   0.05  + 0.1840 (t -  30.3)
            median     mean      std
amplitude   1.0010   1.0001   0.0058
phase       0.0935   0.0496   0.4439
------------




   phase correction is very small:


       quick_adcp.py --steps2rerun rotate:navsteps:calib --rotate_angle 0.06 --auto


    **watertrack**
------------
Number of edited points:  34 out of  35
   amp   = 1.0001  + -0.0018 (t -  30.3)
   phase =  -0.01  + 0.1828 (t -  30.3)
            median     mean      std
amplitude   1.0010   1.0001   0.0057
phase       0.0365  -0.0095   0.4437
------------

OK, done

(7)

make plots:



    quick_web.py --interactive

    - or, to use the same sections as were used in the postprocessing demo

      mkdir webpy
      cp ../../km1001c_postproc/os38nb/webpy/sectinfo.txt webpy
      quick_web.py --redo

    - view with a browser, look at webpy/index.html



(8) extract data


    adcp_nc.py adcpdb  contour/os38nb  km1001c_demo os38nb
    quick_adcp.py --steps2rerun matfiles --auto




----


done with processing.
Add  os38nb/cruise_info.txt to the top of this file.
Edit with correct info