MS554: Assignment #1

Assigned on August 28, 2003.
Due on Thursday, Sept. 4, 2003.
Please hand in plots of figures, and copies of m-files or fortran code written. Include thorough explanation for partial credit.  Also hand in any notes or comments that you wish to add.

Part I: Demonstrate ability to use MATLAB to plot and analyze data

In this assignment, you will analyze some tidal data, in a way similar to the example shown in the notes for Sandy Hook, NJ. The data set chosen is from Gloucester Point, for the Month of Sept. 1999.
  1. Retrieve the tidal data by going to the Co-Ops web page and downloading the data for Sept. 1, 1999 - Sept. 30, 1999.

  2. Hints: go to http://www.co-ops.nos.noaa.gov, then chose the big blue button labeled "Station Locator" at the bottom of the page; click your way to the Gloucester Point, VA page and choose "verified data". Download the hourly-measured time-series for the month of Sept, 1999; make sure to save it as a "text" file on your computer.
  3. Edit the file so that you can read it into MATLAB.

  4. You will need to either remove or comment-out (with a %) the header information. You will also need to replace any characters that aren't numbers with blank spaces (there are \'s and :'s). Finally- beware of missing values that are blanks; I like to fill them in with NaN (means "not a number" in matlab). Load the file into MATLAB.
  5. Make (and print) a plot of the time-series of hourly measured sea-level.

  6. To print the figure you can either use print -d filename.XXX; where is the format that you want for the figure, and XXX is the appropriate extension; for example "print -depsc sept99.eps" will save an encapsulated post-script version of the file. Type "help print" to see the different file formats that MATLAB supports. You can also just click on print, if your computer is set up to the printers properly.
  7. Find the extreme high and low water levels for this month.

  8. (Hint use max and min). On what days did they occur? (Hint: the find command will find values where a conditional statement is true; such as biggest=find(tide==max(tide)); date(biggest). In Matlab "==" is the conditional equals sign and returns a "1" if the statement is true, whereas "=" assigns a value.)
  9. Low-pass filter the water level record to remove the tidal frequencies, and plot the timeseries of the low-pass filtered sea level height.
  10. Is there anything interesting in the record?

  11. This was the month that Hurricane Floyd came ashore and caused massive flooding along the southern mid-Atlantic.

Part II: Demonstrate ability to compile and run FORTRAN

In this assignment, you will get a piece of FORTRAN code that estimates the settling velocity of sediment, based on the methods of Dietrich. The code was written by Pat Wiberg, and modified by me. It is not an example of pretty-code, but it works! You will compile the fortran code, use it to estimate settling velocity for a range of sediment sizes, and then plot the results in MATLAB.
  1. Get the source code from the FORTRAN_FILES part of the course website.
  2. Compile the FORTRAN code on your computer.

  3. You can probably use the command "f77 -o ws ws.f" (the details will depend on which compiler and operating system you are using. The code should compile. If it doesn't either fix it or bring the error log to the instructor.
  4. Run the ws routine for a range of sediment sizes.

  5. You will be prompted as to whether you want to enter grain diameter in phi-sizes or centimeters. You will then be prompted to enter grain diameter for as many sediment sizes as you wish to consider, enter "999" when you are done. Hint: this routine assumes quartz density, and natural shape factors, and is good for silts-coarse sands.
  6. Plot the output of grain size vs. settling velocity using MATLAB.

  7. Read the fort.4 file into matlab. The first column is grain diameter in centimeters, and the second column is settling velocity in cm/s.
  8. Does the plot make sense?

  9. For example, do bigger grains settle faster?

Last modified on August 30, 2001 by Courtney Harris; ckharris@vims.edu