CMPSC-132 – Programming and Computation II: Data Structures1/22/19PROJECT-1: Global Temperature AnalysisName: Introduction:The change in temperature over the past 150 years is used by climate scientists as evidence to show that humans might have an increasingly devastating effect on the Earths environment. Advances in computer modeling are allowing for climatologists to tease out both the causes and impacts of increasing Earth temperatures. In this recent Star Tribune article, researchers ran computer simulations that compared natural weather fluctuations for todays CO2 and greenhouse gas levels to pre-Industrial Revolution levels.Although thinking about climate change can sometimes be daunting, it is an issue that is increasingly important to understand culturally and scientifically. You have probably seen many graphs showing the temperature over x number of years, but have you ever had the chance to examine the data yourself? In this activity, you are provided with a data set of monthly average global temperatures worldwide from January 1881 to December 2017. The goals of this project are to allow you to work with meaningful climate change data so as to draw your own conclusions and become better acquainted with Python data structures and some useful functions. Learning these skills to analyze the change in temperature over the past 137 years are extremely useful, and temperature is just the tip of the iceberg when it comes to computer modeling of weather-related data.Note: For each exercise, paste codes or a screenshot of codes and resultsStartup python codes:import requestsimport matplotlib.pyplot as pltlink = https://data.giss.nasa.gov/gistemp/tabledata_v3/GLB.Ts+dSST.txtf = requests.get(link)data =f.textlines=data.split(\n)for more about plots, visit https://matplotlib.org/users/pyplot_tutorial.html**Exercise 1**Convert the data from scaled change in Celsius to absolute temperature in Fahrenheit. What is the mean temperature in Fahrenheit over the entire data set? Confirm that your result is reasonable.# Your codes and results screenshots**Exercise 2**Find the mean average temperature of each month, as well as the lowest and highest average temperatures for each month. This is easiest if you create new list or dictionary that have all January temperatures, all February temperatures, and so on. When did the lowest and highest occur for each month? Are the highest temperatures generally more recent than the lowest temperatures?# Your codes and results screenshots, and analysis**Exercise 3**For the rest of the project, it will be helpful to define two functions. Define one function that takes the month and year as input and outputs the index for that given month and year. Define another function that takes the index as the input and outputs the month and year.# Your codes**Exercise 4**Create plots of the monthly average temperature over time for each month: one plot for all January average temperatures, one plot for all February average temperatures, etc. The plots should have Years on the horizontal (x) axis, and Temperature on the vertical (y) axis. The previously defined functions will be helpful here. Your code should plot all months (separately).# Your codes and results screenshots**Exercise 5**Create a plot that shows the average annual temperature over all years. (That is, create one plot where each data point corresponds to the average temperature for a year.) (HINT: This is easiest if you create a new list with elements representing average temperature).# Your codes and results screenshots**Exercise 6**Create a plot showing the monthly average temperature starting at January 2000 (one plot showing all data points from January 2000 through December 2017). The previously defined functions will be helpful here.# Your codes and results screenshots**Exercise 7**Plot the annual average temperature from 2000-2017CMPSC-132作业代写、代做Data Structures作业、代写Python程序语言作业、Python实验作业代.# Your codes and results screenshots**Exercise 8**Create a plot of the monthly average temperatures starting at January 1990 and ending on December 1999.Do you see any pattern to the data? Are temperatures rising? Which months had the highest and lowest temperatures?# Your codes and results screenshots, and analysis**Exercise 9**Plot the annual average temperature of every year from 1990 to 1999.Is it easier to see a warming trend? What is the average temperature of the 1990s?# Your codes and results screenshots, and analysis**Exercise 10**Plot the monthly average temperature of every month in the 1890s.What is the mean temperature of this decade? How does this decade compare to the 1990s?# Your codes and results screenshots, and analysis**Exercise 11**Create plots of the monthly averages of the first 45 years, the second 45 years, and the last 47 years. Remember to use the previously defined functions!Do you see any warming trends in any of these plots? What is the average temperature of each of these time periods? # Your codes and results screenshots, and analysisEach student should submit their code and a word file which shows the outputs with appropriate screenshots. /* All students are expected to use appropriate amount of comments to explain their program. */Technical information on GISTEMP data (about the data given to you)GLOBAL Land-Ocean Temperature Index in 0.01 degrees Celsius base period: 1951-1980 sources: GHCN-v3 1880-01/2014 + SST: ERSST 1880-01/2014 using elimination of outliers and homogeneity adjustment Notes: 1950 DJF = Dec 1949 - Feb 1950 ; ***** = missingDivide by 100 to get changes in degrees Celsius (deg-C).Multiply that result by 1.8(=9/5) to get changes in degrees Fahrenheit (deg-F).Best estimate for absolute global mean for 1951-1980 is 14.0 deg-C or 57.2 deg-F,so add that to the temperature change if you want to use an absolute scale(this note applies to global annual means only, J-D and D-N !)Example -- Lets take a Table Value : 40 i.e. from the data you have loaded change : 0.40 deg-C or 0.72 deg-F (Divide by 100 to get changes in degrees Celsius (deg-C))abs. scale if global annual mean: 14.40 deg-C or 57.92 deg-F (i.e. change+absolute global mean)Try to incorporate this data (i.e. absolute Fahrenheit data) as asked in exercise-1 to get a real feel about the global temperature.Project-1 data have been gathered fromhttp://data.giss.nasa.gov/gistemp/tabledata_v3/GLB.Ts+dSST.txtGo through this document to have a better understanding of the data:http://data.giss.nasa.gov/gistemp/faq/If interested to know more about Global Temperatures, read further:Dr. young’s excel spread sheet of New England and Global temperatures.The excel spread sheet uses two data sets:1)New England Data: U.S. Historical Climatological Network (USHCN) data set. This data set was downloaded from NOAAs National Climatic Data Center (NCDC) website.http://cdiac.esd.ornl.gov/epubs/ndp/ushcn/ushcn.htmlThe United States Historical Climatology Network (USHCN) is a high quality data set of daily and monthly records of basic meteorological variables from 1218 observing stations across the 48 contiguous United States.2)Global Data: The Goddard Institute for Space Studies (GISS) Surface Temperature Analysis (GISTEMP) data set from the NASA Goddard Institute. GISS data (Hansen)http://data.giss.nasa.gov/gistemp/Combined Land-Surface Air and Sea-Surface Water Temperature Anomalies (Land-Ocean Temperature Index, LOTI)Global-mean monthly, seasonal, and annual means, 1880-present, updated through most recent monthNorthern Hemisphere-mean monthly, seasonal, and annual means, 1880-present, updated through most recent monthhttp://www.ast.uct.ac.za/~sarblyth/pythonGuide/PythonPlottingBeginnersGuide.pdf转自:http://ass.3daixie.com/2019021233917275.html