
Write some code in python or R to take maxima and minima from wave data
- or -
Post a project like this3473
£20(approx. $27)
- Posted:
- Proposals: 3
- Remote
- #921602
- Awarded
Description
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
Output:
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:
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
Output:
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:

Tracy S.
0% (0)Projects Completed
3
Freelancers worked with
3
Projects awarded
13%
Last project
23 Feb 2017
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies