Save your scripts to a directory named Homework-4 in your home account on the server computer in SCA 219 (126.96.36.199); do not email your answers. A short report should be typed and submitted in PDF format; drawings and/or flowcharts may be hand-drawn, just be legible! Multiple pages should be stapled together. Some additional explanation is helpful and often necessary for the person reading your assignment to understand exactly what you are doing and why. Assume that the person grading your assignment does not have a copy of the assignment. What is important here is that (1) you understand what you are doing, and (2) that you can communicate what you are doing to others.
According to the Gutenberg-Richter Law, earthquakes should be distributed by frequency in a logarithmic manner. Often this distribution is expressed as the sum of magnitude 2 (M2) earthquakes being ten times more frequent than the sum of magnitude 3 (M3) earthquakes, the sum of M3 earthquakes being ten times more frequent than the sum of M4 earthquakes, etc. This is incorrect! In reality the Gutenberg-Richter Law deals with bins. For example, the M3 bin includes all earthquakes greater than or equal to magnitude 3; the M4 bin includes all earthquakes greater than or equal to magnitude 4. Note that according to the Gutenberg-Richter relationship, the cumulative number of earthquakes in the bin M3 should be approximately ten times more than the cumulative number of earthquakes in the bin M4. Given an earthquake catalog, it is possible to determine the frequency-magnitude relationship for earthquakes within some defined region during some specific period of time. The question is, does this frequency-magnitude relationship follow the Gutenberg-Richter Law?
Determine the frequency-magnitude relationship for earthquakes that occurred within the western US between 1980 and 2001 based on the earthquake catalog contained in the file, earthquake catalog example.dat. This file can be downloaded from the following link: ftp://gly6739:c[email protected]/Assignment4/earthquake_catalog_example.dat. The data in this catalog include earthquakes equal to or greater than M2. Does this frequency-magnitude relationship follow the Gutenberg-Richter Law?
Develop a flowchart by using the flowchart tools described in Homework 2. Make sure your flowchart diagrams a method for counting the number of earthquakes greater than or equal to each magnitude category or bin (as described above): M2, M3, M4, M5, M6, M7, M8, M9. One way to accumulate these counts is by using an array of 8 elements. Each element in the array will accumulate and hold the number of earthquakes that fit one magnitude category.
Write a Perl or Python script to implement this flowchart. Be sure to add comments to your script so the lines in your code can be related to your flow chart.
Execute the script to determine the frequency-magnitude relationship for the earthquakes found in the supplied data file: earthquake catalog example.dat
Answer this question, do the earthquakes in the catalog follow a Gutenberg-Richter relationship?
Turn in the problem statement, your flowchart for solving this problem, your final counts of earthquakes in each magnitude bin (this should be the output of your script), and a paragraph discussing your results. Be sure to upload your script to your home account as described above.
The US Geological Survey (USGS) maintains an online earthquake catalog, Determine the frequency-magnitude relationship for a
subset of this USGS earthquake catalog and determine if the frequency-magnitude relationship follows the Gutenberg-Richter Law.
Navigate to this website and follow the directions below. Download and selection instructions are also listed on the USGS web site.
Navigate to the Search Earthquake Catalog: website:
Select Magnitude = 2.5+, and a Date & Time range and Geographic Region that is of interest to you from the Basic Options section. Use the Draw Rectangle on Map button to fine-tune your area of interest. Click the Search button once your selections are made. Click on the number of Search Results and a Download Earthquakes button will appear.
Download the earthquake data for your selected area as a CSV file (a file of comma separated values). Notice that you can click on an individual earthquake location and get a pop-up box of information about that earthquake.
Modify and execute your script using the new data file that you just downloaded and determine the earthquake magnitude-frequency relationship for this dataset. You will need to modifying your script to read the CSV file format.
Answer these questions: (1) What area did you choose and why? (2) Does this new area from the USGS catalog follow a
Turn in your problem statement, the name of your data file, your final count of earthquakes in each magnitude bin and a paragraph discussing your results. Be sure to include a copy of your modified script and your data file in your homework-4 directory of your home account as described above.