On this project you will make calculations and conclusions based on real data collected by the NOAA (The National Oceanic and Atmospheric Administration, an agency of the United States government) on the "Daily Lake Average Surface Water Temperature" of six lakes (Ontario, Erie, Huron, Michigan, Superior, and St. Clair) during the 2017 calendar year.

You can find the actual data file here that contain the average temperatures for each day of the year for each of the six lakes. Data were collected between January and December 2017 and are in degrees Celsius.

https://coastwatch.glerl.noaa.gov/ftp/glsea/avgtemps/2017/glsea-temps2017_1024.dat

Days are numbered 1 to 365, 1 being January 1st and December 31st being 365.

You must use the C program to read the file and put the data into arrays. Download the file and clean it up to make it compatible - simply remove all lines above 2017 001 3.88 4.36 4.00 3.06 5.03 2.06 . Do not enter data by hand!

Required elements:

Each required element should have its own program (.c) file although one program with separate helper functions is also an excellent implementation.

All computations to be done in C using the imported data file.

1. Calculate the yearly average temperature for each of the lakes, and the yearly average for all six lakes put together.

2. Indicate which lake is the coldest and which one is the warmest, based on the average yearly temperatures calculated in step #1. Also indicate which lakes have average temperatures above the average of all the lakes and which ones are below that same average.

3. Indicate the day and the temperature for the warmest water temperatures for each of the lakes. Do the same for the coldest temperatures. You must convert the day of the year value into a date/month format.

4. Indicate the day, lake and temperature of the warmest water temperature overall (all lakes combined). You must convert the day of the year value into a date/month format and indicate which lake. Do the same for the coldest temperature.

5. Calculate the summer average (day 172 to day 265) for all 6 lakes (one average per lake). Display the names of the lakes in order from warmest to coldest. Is the order from warmest to coldest the same as with the yearly average calculated in step #2?

6. Calculate the winter average (days 1 to 79 and days 355 to 365) for all 6 lakes (one average per lake). Display the names of the lakes in order from warmest to coldest. Is the order from warmest to coldest the same as with the yearly average calculated in step #2?

7. Assuming that you can swim comfortably in the lake if the temperature is above 20 degrees. Calculate the number of days in the year you can swim for each of the 6 lakes.

8. Assuming that lakes freeze when the water falls below 0 degrees. Calculate the number of days in the year that the lake is frozen.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.