MATLAB Assignment - Calculating

the offshore wave climate

For many coastal engineering studies and projects, a time-series of wind measurements isused to calculate a time-series of wave heights.

For tutorial question 9 (a), nonograms (graphs from which wave height and wave periodare estimated) were used. Obviously though, the method used in 9(a) is impractical forlarge series of measurements.

Your task is to write a program to hindcast a time-series of wind

measurements, using MATLAB.

Instructions:

You have been given a time-series of hourly wind measurements (velocity and direction)from FalsterboPeninsula in the south of Sweden. Assuming the wind field over theÖstersund is homogenous and described by the measured winds at Falsterbo, andignoring accumulation of wave energy, calculate the wave climate at Skanö harbour. Alsoassume that you are hindcasting for deep water.

To do this, write a generalised program in Matlab to calculate hourly values of Hs and Tsgenerated by a measured time-series of winds at a location for various fetches, F. Bygeneralised, it is meant that the program may be used for any input wind measurementtime-series.

Preparation:

Read pages 3-24 to 3-32 of the Shore Protection Manual. These pages discuss adjustingthe measured wind speed to a standard 10 m windspeed and how to calculate the windstress factor, UA, in which the wave hindcasting equations are presented.

Read pages 3-44 to 3-66 (it’s not that much! Most is diagrams). These pages discuss theformulae for hindcasting of waves from the wind stress factor, UA.

Do tutorial question 9 (a). You could also start looking at steps 1 to 4 for ‘starting out

hints’ if you want to get a head-start.

Input Data is for Falsterbo pensinsula, Sweden. You should calculate the wave heights for deepwater outside of Skanör, which is a coastline oriented facing approximately WNW.Fetches were calculated to be:

Calculating the offshore wave climate: Writing a

Matlab routine.

This sheet should provide you with a starting point for the project:

  1. Write down what you want your program to output. In what format do you wantthe output? (scalar, vector, matrix? Will you graph the output?)
  1. What is the input data required ? In what format is the input data (scalar, vector,or matrix?)
  1. Write down in detail the steps you will have to go through to hindcast the waves(e.g. formatting input data, adjusting the wind speed, determining the fetch whichis dependent on direction, calculating H and T, determining if it is fetch orduration limited etc. ). You should also write down the equations you will use foreach step. Show this to Chantal, and she will let you know if you missed anythingprior to starting programming.
  1. You are now ready to start programming!

Some helpful hints for programming:

  1. Set up your program by following the steps outlined above, especially what youwrote down for (3).
  1. Use commenting throughout the program. To insert a comment (a line not to beread by the program), use % and then follow with your comment. This not onlymakes it easier for me to mark your work, it makes it easier for you to findmistakes in the program.
  1. Using ‘;’ at the end of a line prevents the output of that line being displayed as theprogram runs.
  1. Use the debug function within Matlab (use run in debug mode). If the programwill not run, step through the program and make sure it is calculating each line asyou expect it to.
  1. Besides doing normal calculations with scalars and vectors (don’t forget Matlabdifferentiates between dot and cross products when working with vectors!), youwill probably need to use “for…end”, and “if….elseif…..end” structures.

Calculating the offshore wave climate: Data

You are given a time-series of wind measurements at Falsterbo peninsula for 1996. The wind measurements are taken at a height of 12 m above sea level, over sea, and the temperature differences are not known. Each wind measurement is taken for a duration of 3 hours and the wind is assumed to blow steadily at the measured velocity and direction for those 3 hours.

Download the wind data file from the course web site.

To check that your program is giving the correct answers you can double-check the values for the dates in the table below:

Row / Date / Time / H / T / UA
1 / 1/01/1996 / 1:00:00 / 0 / 0 / 16.4
481 / 1/03/1996 / 1:00:00 / 0.24 / 2.36 / 4.25
969 / 1/05/1996 / 1:00:00 / 0 / 0 / 2.99
1457 / 1/07/1996 / 1:00:00 / 0.85 / 3.88 / 11.53
1953 / 1/09/1996 / 1:00:00 / 0.71 / 3.61 / 9.98
2441 / 1/11/1996 / 1:00:00 / 0 / 0 / 11.53
2446 / 1/11/1996 / 16:00:00 / 1.33 / 4.63 / 16.43
2549 / 14/11/1996 / 13:00:00 / 0 / 0 / 0
2608 / 21/11/1996 / 22:00:00 / 2.04 / 5.34 / 25.22

Report:

  • Hand in a copy of your program as a text file.
  • Make a similar table as the one above showingyour own results for H, T, andUAat the dates/times listed above.
  • Also, what was the maximum wave height and period for 1996. Write down which date and time at which the maximum wave height occurred.
  • Finally, write a paragraph describing what the results are, and what assumptions might affect the results.