Question: Write a program that reads weather data and calculates the average annual low temperature and the historical trend. GEEN163 Greensboro Warming There has been significant

Write a program that reads weather data and calculates the average annual low temperature and the historical trend.
 Write a program that reads weather data and calculates the average
annual low temperature and the historical trend. GEEN163 Greensboro Warming There has

GEEN163 Greensboro Warming There has been significant debate about global warming. Instead of answering the big question, your program is to determine if (and by how much) Greensboro has been warming for the past few decades. For this assignment you are to write a program that reads a file created with data from the National Climatic Data Center to determine the average annual minimum temperature. This value for all years is then statistically averaged to determine by how much the value is increasing. The file weather Daily.dat contains several years of Greensboro daily weather data sorted by increasing date. Each line in the file represents one day's weather and contains the values: date of this weather record year date of this weather record from 1 to 12 month date of this weather record from 1 to 31 day precipitation amount of precipitation on this day in tenths ofa centimeter amount of snow that fell on this day in tenths of a centimeter daily high est temperature recorded on this day in tenths of a degree Celsius high daily low lowest temperature recorded on this day in tenths of a degree Celsius All values are integers. The program only requires the year, month, day and daily low, although your program must read all data values in each line. Each year in the file starts with January 1 and ends with December 3 The temperature in tenths of a degree Celsius can be converted to degrees Fahrenheit by f- 32.0 To calculate the average annual low temperature for a year, the program must sum the low temperature for each day and count the number of days. On December 31, the program should divide the sum ofthe daily lows by the number of days to get the average low temperature. While the average changes each year, a long term trend can be found by calculating a least squares fit to the annual average low data. The slope of an average line though the data can be calculated by numYears 20year avg) year. Eavg slope numYears year2 year year where numYears is the number of years of data 2 year is the sum of the years (ie. 1974 1975 1976 2015) is the sum of the square of the years (i.e. 1974 19752 1976 2015 year yavg is the sum of the annual average low temperature N(year avg) is the sum of each annual average low temperature multiplied by the year number page of 2 GEEN163 Greensboro Warming There has been significant debate about global warming. Instead of answering the big question, your program is to determine if (and by how much) Greensboro has been warming for the past few decades. For this assignment you are to write a program that reads a file created with data from the National Climatic Data Center to determine the average annual minimum temperature. This value for all years is then statistically averaged to determine by how much the value is increasing. The file weather Daily.dat contains several years of Greensboro daily weather data sorted by increasing date. Each line in the file represents one day's weather and contains the values: date of this weather record year date of this weather record from 1 to 12 month date of this weather record from 1 to 31 day precipitation amount of precipitation on this day in tenths ofa centimeter amount of snow that fell on this day in tenths of a centimeter daily high est temperature recorded on this day in tenths of a degree Celsius high daily low lowest temperature recorded on this day in tenths of a degree Celsius All values are integers. The program only requires the year, month, day and daily low, although your program must read all data values in each line. Each year in the file starts with January 1 and ends with December 3 The temperature in tenths of a degree Celsius can be converted to degrees Fahrenheit by f- 32.0 To calculate the average annual low temperature for a year, the program must sum the low temperature for each day and count the number of days. On December 31, the program should divide the sum ofthe daily lows by the number of days to get the average low temperature. While the average changes each year, a long term trend can be found by calculating a least squares fit to the annual average low data. The slope of an average line though the data can be calculated by numYears 20year avg) year. Eavg slope numYears year2 year year where numYears is the number of years of data 2 year is the sum of the years (ie. 1974 1975 1976 2015) is the sum of the square of the years (i.e. 1974 19752 1976 2015 year yavg is the sum of the annual average low temperature N(year avg) is the sum of each annual average low temperature multiplied by the year number page of 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!