It is a python programming assignment.
5 Modelling Emperor Penguin Huddles 5.1 Emperor penguins and breeding Penguins are flightless birds, with flippers instead of wings, adapted to living in a marine environment. Emperor penguins (Aptenodytes forsteri) live on the Antarctic continent and are the largest known species of penguin, with adults weighing around 40 kg [2]. The emperor penguin is the only bird that breeds during the Antarctic winter. They breed on sea ice which is well away from the ocean where these penguins feed. Emperor penguins mate in late April and May. Once a female penguin lays an egg, she returns to the sea, usually around late May / early June [2]. Male emperor penguins protect and incubate the egg by placing it carefully between their feet and a fold of their skin; it takes between 65− 75 days for the egg to hatch [2]. This means that by the time the male penguins finally return to the ocean for food, they have been fasting for about four months [3]. Once a chick hatches, emperor penguins share parental duties [2]. The museum exhibition is interested in explaining the conditions experienced by a male emperor penguin, protecting an egg, in a harsh Antarctic winter (approximately June-August). 5.2 Modelling winter temperatures in the Antarctic continent In 2008, the authors of [9] studied “a medium-sized emperor penguin colony (∼ 2000 animals)” close to Neumayer Antarctic Research Station (70◦S 8◦W). To model the temperatures faced by emperor penguins, we will use meteorological data from Neumayer Antarctic Research Station. The table below is adapted from [4], and is restricted to some of the coldest months of the year. Month May June July August Sept Mean temp (◦C) −21 −22 −24 −23 −23 Max temp (◦C) −2 −5 −4 −4 −3 Min temp (◦C) −45 −45 −46 −44 −46 Table 2: Mean, maximum and minimum air temperature values, Neumayer station from 1993-2004 To model the average (mean) daily temperatures in the winter months, we will use a simple model for the average temperature Tavg (in ◦C) over time (in days since 1 June). Our model assumptions are: • On 1 June Tavg = −21◦C; • Tavg declines linearly from 1 June until 16 July, at which point Tavg = −24◦C; • Tavg increases linearly from 16 July until 31 August, at which point Tavg = −23◦C. Temperature varies throughout the day as well. In Table 2, we are given the minimum and maximum temperatures seen in a given month, over about a decade of measurements. A typical day usually does not vary as drastically as those highest and lowest recorded temperatures; most measurements were within 8 − 10◦C of the average daily recordings [4]. To model the temperature at a given time of the day, you may use a sine function, with parameters that you must choose based on the information provided here. 3 5.3 Wind Chill When very cold temperatures are combined with winds, the apparent temperature (or wind-chill temperature) will feel colder than the air temperature. A model for the apparent temperature AT in ◦C, which is used by the National Weather Service in the USA and by Environment Canada (see for example, [8]) is: AT = 13.112 + 0.6215T − 11.37v0.16 + 0.3965Tv0.16, where T is the air temperature in ◦C and v is the wind speed in km/h (assumed to be at least 5 km/h). Environment Canada recommends the model is only used for air temperatures strictly less than 0◦C [8]. Average wind speeds experienced by emperor penguin colonies are around 15 km/h [3] with typical maximum wind speeds of about 30 km/h [9]. However, emperor penguins have been known to endure wind speeds of up to 180 km/h [9]. 5.4 Huddling Emperor penguins form large huddles in order to protect the group from the cold [1, 3, 9, 7]. Huddling decreases the required energy expenditure of individual penguins [1]. Temperatures inside a huddle have been found to reach temperatures as high as about 37◦C [3]. Huddles can be “loose” or “tight” [3, 6], where a tight huddle has a high density, nearly hexagonal packing arrangement [9]. The images in Figure 1 are taken from [6] and show examples of emperor penguin huddles. Huddles are not motionless; even in tight huddles, where individual movement is not possible, the penguins slowly shuffle as a group. The shape of a tight huddle, when viewed from above, may be circular or more elongated. As wind speed increases, penguins on the outside of the huddle receiving the most wind and exposure to the cold will shift along the huddle so that they move to the back of the huddle, where they are then protected from the wind, creating a more elongated shape. Figure 1: Examples of loose (left) and tight (right) emperor penguin huddles. In a 2008 study of emperor penguins, Gilbert et al.[3] found that wind speed had a positive impact on the number of loose huddles formed per day and temperature had a significant effect on the number of tight huddles formed per day. 4 5.5 Details on effects of wind on huddle shape (Advanced Section only) An enthusiast user is likely to be interested in the modelling done by Waters et al. [7] on the effect of wind on penguin huddle shapes. The key assumption of their model is that each individual penguin seeks to reduce its own heat loss. Thus, in their model, a penguin on the boundary of the huddle exposed to the wind will move downwind, to the leeward side of the huddle in order to be protected from the wind. In [7], the authors say, “Our model recovers important features of actual huddles such as their overall shape, downwind motion, and an equal distribution of access to the benefits of the huddle among penguins.” Figure 2: Time progression of penguin huddle simulation with 100 penguins [7]. Waters et al. [7] claim For small [wind speeds], when diffusive effects act to render the temperature distribution nearly uniform, the aspect ratio is close to one, depicting a more circular huddle. In contrast, for large [wind speeds], where only a small leeward region is sheltered from the wind, the aspect ratio is much larger than one, depicting a more elongated huddle....The wind pushes the heat distribution more narrowly around the huddle, causing the locations on the upper and lower edges of the huddle to exhibit more heat loss and thus be less at- tractive to relocating penguins. As a result, the huddle formation loses a layer of thickness and becomes more elongated. The shape of a tight huddle, when viewed from above, may be circular or more elongated and can be roughly modelled by an ellipse (see Figure 3). 5 Major axis Minor axis Figure 3: General shape of an ellipse. The shortest and longest axes are called the minor and major axis, respectively. Waters et al. [7] describe the Péclet number, Pe, as a non-dimensional number that is proportional to the wind speed and therefore captures the effects of varying the strength of the wind. They used model simulations to study how huddle thickness w relates to Pe, where the huddle thickness is given by the number of penguins across the minor axis. The following data is adapted from simulations in [7] with 400 penguins. You may assume that the number of penguins across the major axis of the ellipse shape is approximately 400/w. Péclet number (Pe) 1 2 10 30 100 300 1000 1100 1200 huddle thickness (w) 20 18 13 9 8 4 4 3 3 Table 3: Huddle thickness against Péclet number for penguin huddle simulations 6 A detailed overview of the task Your assignment submission must follow the specifications listed in Section 7. Below, we first give a high-level overview of how to approach the main section and the advanced section. To complete the main section, you will need to: • Find an appropriate mathematical function to model the average winter temperature, for a given day, using the information provided in Section 5.2. You will write a function average_winter_temp in your code which implements this model (see Section 7 for specifications). • Find an appropriate mathematical function to model the winter temperature, which takes ac- count of daily fluctuations, using the information provided in Section 5.2. You will write a function winter_temp in your code which implements this model (see Section 7 for specifica- tions). • You will write a function wind_chill in your code which implements the wind chill model in Section 5.3 (see Section 7 for specifications). • According to the main section of the flow chart: – Print information and ask for user input related to the contexts of Antarctic temperatures, wind chill and penguin huddles, in a manner accessible for the patron type. 6 – Provide a graph for the enthusiast user for temperatures over the month chosen by the user. • Include a description of how you approached this section of your code in your screencapture video (D2), including (briefly) how you developed your models and the overall code structure. To complete the advanced section, you will need to: • Find an appropriate mathematical function to model the simulation data in Table 3. It will be helpful to consider the log-linear plot and log-log plot of the data, and use one of these in the development of a model. • According to the “Advanced section” of the flowchart: – Provide a graph of the data from Table 3 which also shows the model you have fit to it. – Provide a brief explanation of your model to the enthusiast user. – Ask the user to input a Péclet number and display the rough huddle shape that is pre- dicted. • Include a description of how you approached this section of your code in your screencapture video (D2), including how you developed your model for huddle thickness as a function of the Péclet number. 7 Specifications for your submitted file Specifications about the Python: • Museum staff have supplied a flowchart describing how the program should run (Figure 4 on Page 10). Your code must be an implementation of the flowchart provided. • Your code must be well-structured and follow the guidelines for programming practice, as introduced in SCIE1000. • Whenever you prompt the user for information, you may assume they enter an appropriate number, and you can store their answer as a float. You do not need to check for incorrect inputs. • You may only use Python commands introduced in SCIE1000. Recall that museum staff must be able to maintain and modify the code, so you may only use commands that they understand. Museum staff have a beginner’s level of experience using Python, which you may regard as the equivalent of a student who has taken SCIE1000. The Python commands you have covered in this course should be more than sufficient to complete the assignment. • Museum staff have identified several functions that they think will be useful in possible modi-