frank-engel-usgs / VMT

The Velocity Mapping Toolbox
Other
19 stars 12 forks source link

Units are incorrect for V.Qp and V.Qs #15

Closed frank-engel-usgs closed 6 years ago

frank-engel-usgs commented 6 years ago

WMA forum user ddileona mentioned a units issue in the computation of secondary flow discharge (zsd) as reported in the variable V.Qp in this forum post.

The proposed solution is to correct the units conversion in lines 23 & 24 so that the resultant computation is in m^2/s.

The main comment is reproduced here:

Hi Frank,

The mean flow direction of the MCS (V.mfd) for an example transect in our data set is 173.2 deg. The angle of the MCS (V.theta) is 89.3 deg. Are those the proper angles to consider?

If I calculate the discharge through each bin in m^3/s:

       Qbins = V.u/100*V.binWidth*V.binHeight,         where V.u is streamwise velocities for the MCS, originally in cm/s

And then sum those values:

       Q = nansum(nansum(Qbins))

I get something the correct order of magnitude, and very close to the WinRiver II measured discharge (so not including the top, bottom, and edge estimates).

If I do the same calculation, but don't convert the velocity into m/s

      Qbins = V.u*V.binWidth*V.binHeight
      Q = nansum(nansum(Qbins))

I get something the same order of magnitude and very close to V.Qp.

This made me think that there is an un-converted cm unit in the computation of V.Qp. And if you go into the code of VMT_CompMeanXS_PreSec.m you find

V.Qp=nansum(nansum(qpi));%cm*m^2/s on line 47.

frank-engel-usgs commented 6 years ago

The revised version now addresses the units inconsistency, and reports a couple of new useful quantities in the log window: image

Closing this issue.