COMPUTER LAB 1 EARTH SYSTEMS SCIENCE I PG250 Fall 2010 Hunter College Lab 1. EXCEL plus some basic concepts such as scientific notation, order of magnitude, logarithms, and unit conversions Low Impact Lab: Note that this lab is being graded as a low impact assignment, which means that you will get full credit if you hand it in on time, and if it s obvious that you made an effort. If you hand it in late, or it appears to me that you made only a perfunctory effort, you will get no credit. You will not lose credit for incorrect answers. Introduction: In this lab we will learn a few of the basics of using Microsoft s spreadsheet program, EXCEL. Along the way we will introduce scientific notation and logarithms, and some other important technical concepts. EXCEL will be used for a number of labs in this class, and it is a tool that is important in many jobs. It is not necessarily the only, or the best, software tool for making scientific figures, but it is widely available, commonly used, and is fairly easy to use. An understanding of scientific notation, order of magnitude, logarithms, and unit conversions are essential for understanding Earth System Science, and are important skills for academic as well professional life. In this lab your main goal should be to learn how to do simple calculations and make graphs using EXCEL. The other technical issues will be the subject of future labs. What to hand in: Your assignment should be handed in as an EXCEL spreadsheet file which you can send to me via email. I will check your plots and your calculations directly from your spreadsheet. Due date: This lab is due on the day we begin lab 3 (not on the day we begin lab 2). In other words, this lab and lab 2 are due on the same date. PART 1. EXCEL: typing in data and making a simple column chart Open up the EXCEL spreadsheet that you are given for this lab. It should contain two spreadsheets called Sheet1 and Sheet2. Sheet1 should have no information in it (we deal with Sheet2 in the next section). Your job for part 1 of this lab is to type in the information shown in table 1, below, and make a column chart that looks something like figure 1. NAME HGT (inches) John 70 Steve 72 Mary 64 Table 1. Type this information into Sheet1. ESS I, Fall 2010, lab 1, p. 1 of 6
inches Height 74 72 70 68 HGT (inches) 66 64 62 60 John Steve Mary Name Figure 1. Make a column chart that looks like this using the data in table 1. Part 1 assignment. Hand in a column chart using the data from table 1 that looks similar to figure 1. Note that, for this graph, I made no effort to make the text size large enough, or to make it otherwise more readable. If you like, you can experiment with line graphs, bar charts, and making the text larger or different font, and the background different colors. PART 2. SCIENTIFIC NOTATION OBJECT DISTANCE (m) radius of universe 1.50E+26 dist to nearest galaxy 1.90E+22 9.50E+20 dist to nearest star (alpha centauri) 3.97E+16 1 light year 9.46E+15 7.00E+12 1.50E+11 6.36E+06 1.73E+06 7.62E+03 1.68E+00 1.00E-02 5.00E-04 1.00E-06 4.00E-07 diam of hydrogen atom 1.00E-10 diam of proton or neutron 2.00E-15 Table 2. You are given an EXCEL spreadsheet that contains the information in this table ESS I, Fall 2010, lab 1, p. 2 of 6
Sheet 2 should have a table in columns C and D that contains the information on distances shown on table 2. The numbers have been entered in scientific notation. Each number in scientific notation has two parts, a and b, as shown in equation 1: aeb (1) Equation 1 can be read as a times 10 to the power of b. For example, the first row of table 2 shows that the distance from earth to the nearest star is 3.97 times 10 to the power of 16 meters, or 3.97 x 10 16. This number written out in regular notation is very difficult to read: 39,700,000,000,000,000 meters. Thus, scientific notation is useful for writing very large numbers. Scientific notation is also useful for comparing numbers of very different magnitudes. For example, the smallest distance listed on table 2 is the diameter of a proton or neutron, which is 2.00E-15 meters. Written out, this is 0.000000000000002 meters. This is a fraction of a meter, and a number that is much, much smaller than the distance to the nearest star. How much smaller? Well, it s difficult to say using regular numbers, but easy using scientific notation. We call b the order of magnitude." The distance to the nearest star is order of magnitude 16, and the diameter of a proton has an order of magnitude -15, so the difference between them is approximately 31 orders of magnitude. Part 2 assignment. Try making a column chart of this table, as you did for the part 1 assignment. You should see something that, for the inexperienced person, is troubling: only one column appears on your chart. This is absolutely correct, nothing is wrong with your computer. Why does it look this way? The largest number on the table is 4 orders of magnitude larger than the second largest number. 4 orders of magnitude is 1E4 = 10 4 = 10,000 times larger! If you try to plot several values on the same column chart, where the largest number is at least 10,000 times larger than the other numbers, the other numbers are so small compared to the large one that you can not see the columns! The size of the second column would have to be only 1/10,000 as big as the first one! Nothing is to be handed in for this part. PART 3. LOGARITHMS. Part 3a. The base-10 logarithm, or log, of a number, lets call the number X, answers the question: 10 raised to what power equals X. For example, the log of 10 is 1, because 10 1 = 10. The log of 100 is 2 because 10 2 = 100. The log of a number gives you an idea of its order of magnitude. Note that other bases can, and are, used in certain circumstances: that is the subject of a future lab. Here, log means base-10. Part 3a assignment. Make a plot of the distances using a logarithmic scale for the Y- axis. To do this, make the plot as you did for assignment 1. Then click on the y-axis, go to the scale tab, select the logarithmic scale box, and click OK. You will then need to fix some other problems on the graph that will become apparent. Your final plot should look like figure 2. ESS I, Fall 2010, lab 1, p. 3 of 6
radius of universe dist to nearest galaxy dist to nearest star (alpha centauri) 1 light year diam of hydrogen atom diam of proton or neutron meters A COMPARISON OF DISTANCES VERSION 1 1.00E+30 1.00E+25 1.00E+20 1.00E+15 1.00E+10 1.00E+05 1.00E+00 1.00E-05 1.00E-10 1.00E-15 object Figure 2. Plot of the distances using a logarithmic scale. Part 3b assignment. Now we will use EXCEL to calculate the logarithms of the distances in the spreadsheet. For example, to calculate the log of the value in cell D4, type the following into cell E4: =log(d4). Then, copy this cell and paste a copy into all the cells below it, and you should get all the log values. Make a plot of the log values as shown in figure 3. Note that the units of figure 2 are meters, while the units of figure 3 are log(meters). ESS I, Fall 2010, lab 1, p. 4 of 6
radius of universe dist to nearest galaxy dist to nearest star (alpha centauri) 1 light year diam of hydrogen atom diam of proton or neutron log (m) 30 A COMPARISON OF DISTANCES VERSION 2 25 20 15 10 5 0-5 -10-15 object Figure 3. Plot of the logs of the distances PART 4. UNIT CONVERSION In science we usually use the metric system, and we will be doing so throughout this class. Sometimes one has to convert between different units, from one metric unit to another, or sometimes between metric and imperial units. Here we will convert from meters to miles and make the comparison plot using a logarithmic scale in miles. Part 4 assignment. To convert from meters to miles one has to multiply by 0.00062137119 miles per meter. Type this value into cell F1 on Sheet2. Then, in column F calculate the distance in miles rather than meters. To do this, start by typing in the following in cell F4: =D4*$F$1. The dollar signs $ are anchors, specifying that the values which follow them will not change when you copy and paste to other cells. If you copy cell F4 to the cells below it, you should have a column of distances in miles rather than meters. Make a plot of these values using the logarithmic scale, similar to the plot shown in figure 4. Note that the units are miles, not log (miles). ESS I, Fall 2010, lab 1, p. 5 of 6
radius of universe dist to nearest galaxy dist to nearest star (alpha centauri) 1 light year diam of hydrogen atom diam of proton or neutron Miles A COMPARISON OF DISTANCES VERSION 3 1.00E+25 1.00E+20 1.00E+15 1.00E+10 1.00E+05 1.00E+00 1.00E-05 1.00E-10 1.00E-15 1.00E-20 OBJECT Figure 4. Plot of the distances in miles. PART 5. CRITIQUE OF PLOTS In this exercise I did not pay much attention to how nice the plots looked, or how readable they are. Can you make any suggestions as to how they could be improved with regards to making them more readable to your audience? For example, I think that increasing the font size would help. There is nothing to hand in for this part, it is just a thought exercise. However, feel free to make the plots that you hand in as readable as you like. By the way, the issue of how readable the plots are is not at all trivial. One of the most important tasks required in scientific research is to present data in a figure that makes the point as clearly as possible. This means having readable font sizes, having no clutter in the diagram, making good use of color (if it is a color figure), etc. For more information on this see http://www.edwardtufte.com/tufte/books_vdqi. ESS I, Fall 2010, lab 1, p. 6 of 6