[Note: this is an internal working document of a USGS-SFSU collaboration. Data, analysis and results herin should not be considered as final or accurate. Final results will be presented in print.]
Data Structures
Used in
ADCP Calibration of UVM Measurements
( references |ORE UVM errors |ADCP errors |Discharge main page )
(structures: run |run.par |run.cs20 |cal |gage )

Back to top.

run structure
This structure contains unpacked ADCP data, and derived quantities.
>> load /d4/Darmat/data/adcp/9806/tms4/rn001142
 run = 
	par: [  1x1  struct]
   goodtran: [142x1 double]
       cs20: [  1x1  struct]
	 vp: [ 26x186x142 double]
      WNmax: [186x142     double]
      vflag: [186x142     double]
       dist: [186x142     double]
     pstsec: [186x142     double]
   pstsecav: [142x1       double]
       xens: [ 3x186x142  double]
        BTV: [ 4x186x142  double]
      verav: [186x142     double]
     verrms: [186x142 double]
      depth: [ 26x142 double]
       dbot: [186x142 double]
   WNmaxmax: [142x1 double]
       nens: [142x1 double]
   madegood: [142x1 double]
      ntran: 142
   WNmxmxmx: 26
    nensmax: 186
        hcs: [142x1 double]
        vcs: [142x1 double]
   madegdmx: 171.1821
	ens: [  1x1 struct]
       tran: [ 1x1 struct]
       vpav: [186x142 double]
     vpavav: [142x1 double]
     vavcen: [138x1 double]
       nbin: [138x1 double]
    vavfull: [138x1 double]
    vaveast: [138x1 double]
    vavwest: [138x1 double]
    vavedge: [138x1 double]
     vavuvm: [138x1 double]
Back to start.
run.par structure
This structure contains parameters for an ADCP calibration run
run.par = 
     infile: '/d4/Darmat/data/adcp/9806/tms4/tms4001s.000'
  dtrans: 0.3200
     thetap: 342
     devmag: 17
     lambda: 0.0075
     jtran1: 1
     jtran2: 142
    nensmax: 200
      ndmax: 60
     L1adcp: 3.9624
     L2adcp: 6.4008
      L1uvm: 27.4320
      L2uvm: 18.2880
      d0uvm: 2
     thchan: -1
Back to start.
run.cs20 structure
This structure contains data from gages corresponding in time to this calibration run

NOTE: hcs and vcs are taken from 5-minute averages, but a running two-point average has been taken so that the values given correspond to the logger times given, without any delay. The time is day number in June, 1998, converted to seconds.

>> run.cs20
	pstseccs: [156x1 double]	Time in seconds
	hcs: [156x1 double]		Stage from float gauge (m above
					sea level)
	vcs: [156x1 double]		VUVM from gage (m/s)

Back to start.
cal structure
These arrays represent a theoretical rating curve, calculated from a program such as makecal1.m or fitcal.m.
>> load ca80716c 
>> cal
cal = 
	name: 'Calibration ca80715c:  Simple Gaussian Bulge'
	vuvm: [1x201 double]
	vadcp: [1x201 double]
	phase: [1x201 double]
	nq1: [1 51 101 151]
	nq2: [51 101 151 201]

Back to start.
gage structure

The gage data structure contains logged data from government gages (hence the name). The original USGS data file (comma delimited) is read into EXCEL. For discharge calculations, the data is massaged a bit: extra points are removed and bad points are "fixed" so as to have a uniform 15-minute spacing. Then the file is written in the .prn ASCII format (tab or space delimited).

Then readusgs.m reads the .prn file; calculates pst (year day); calculates the perpendicular cross-sectional area (in m2; converts vavus (ft/sec) to vav (m/s); and writes a .mat file. Subsequently vphase.m scans the data and divides it into cycles, adding vph, tcyc, and iptcyc.

>> load /d4/Darmat/data/naut/usgs/70124/3ml70124
>> gage
gage = 
	infile: '/d4/Darmat/data/naut/usgs/70124/3ml70124.prn'
	outfile: '/d4/Darmat/data/naut/usgs/70124/3ml70124.mat'
	conus: [8414x1   double]
        dayus: [8414x1   double]
        hourus: [8414x1   double]
        vius: [8414x1   double]
        codeus: [8414x1   double]
        fagus: [8414x1   double]
        tagus: [8414x1 double]
        cus: [8414x1 double]
        hius: [8414x1 double]
        havus: [8414x1 double]
        vavus: [8414x1 double]
        pst: [8414x1 double]
        area: [8414x1 double]
        vav: [8414x1 double]
        par: [ 1x1 struct]
	vph: [8414x1 double]
        tcyc: [ 5x170 double]
	iptcyc:	  [ 4x170 double]
        ncyc: 170 tcycav: 0.5143