Write some code in python or R to take maxima and minima from wave data

  • Posted:
  • Proposals: 3
  • Remote
  • #921602
  • Awarded
Anthony M.
John H.Koti C. have already sent a proposal.
  • 0


Experience Level: Intermediate
General information for the business: wave analysis
Description of requirements/functionality: Inputs: startT (a time between 0.1 and 23 in seconds), wavePeriod (a time between 0.1 and 20 in seconds), surfaceElevation.dat (a data file, attached)

I shall refer to rows and columns as if the surfaceElevation.dat is opened in a spreadsheet.

Write title in output file (space delimited) as "GaugeLocation DepthAtGauge Tmax Hmax Tmin Hmin calcT startT %check"

For the first gauge (column B)
Write B2, B3
Find time startT (column A) and use this row to start the search for the next local maximum in column B
Once maximum is found (Hmax), write corresponding time Tmax (column A) and Hmax (from column B)
Find next local minimum (after the local maximum just found), in column B
Write corresponding time Tmin (from column A) and Hmin (from column B)
Write NaN or 0 under calcT
Write input time startT (under startT)
Write wavePeriod (under %check)
Calculate approx time wave crest passes next gauge (calcT), where
calcT = Tmax + (C2-B2)/speed, and speed = sqrt[9.81*(-1*B3)]
Onto next gauge

For second gauge (column C) and all subsequent gauges
write C2, C3
Calculate startT = calcT - 0.5*wavePeriod
Find next local max (Hmax) and write corresponding time Tmax (column A) and Hmax (column C)
Find next local min (Hmin) and write corresponding time Tmin (column A) and Hmin (column C)
Write calcT
Write startT
Calculate %check = 100*(calcT-Tmax)/wavePeriod
Write %check
calculate a new calcT, based on calcT = Tmax + (D2-C2)/speed, and speed = sqrt[9.81*(-1*C3)]
Repeat this section for all subsequent gauges

Test Data
Inputs: startT=10, wavePeriod=1, surfaceElevation.dat
GaugeLocation DepthAtGauge Tmax Hmax Tmin Hmin calcT startT %check
4 -0.35 10.8 0.019142 11.3 -0.01818 NaN 10 1
5 -0.34003 11.5 0.019976 11.9 -0.02096 11.33967 10.83967 -16.0326
6 -0.33069 12.2 0.016853 12.7 -0.01896 12.04753 11.54753 -15.2471
Specific technologies required: python or R or suggest one?
OS requirements: Linux
Extra notes:

New Proposal

Create an account now and send a proposal now to get this project.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.