Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Question 3: Lake George Topography Lake George is notable for being very shallow. We want to identify points where the area increases quickly with little volume added, and vice-versa. We have written...

1 answer below »
Question 3: Lake George Topography
Lake George is notable for being very shallow. We want to identify points where the area increases quickly
with little volume added, and vice-versa. We have written a function area_vs_volume which should plot the
area of Lake George against its volume. Our function doesn’t work though, and even if it did, the plot is
so poor it doesn’t really help us answer our question. Fix the function so that it works on your data, and
improve the plot so it makes it easy for someone looking at it to identify the points we are interested in.
The function to fix is in the template:
def area_vs_volume(data):
areas = []
volumes = []
plt.plot(areas)
plt.plot(volumes)
plt.show()
You will be marked on how good the plot looks (and how appropriate it is for the task) as well as whethe
the code works. You are free to pick a completely different plot type if you think it is more appropriate.
You should include a copy of your plot in your report.
Question 4: Modelling Lake George
Lake George is an interesting lake because it is endorheic, meaning that it has no outflows: water only
leaves the lake through evaporation. While the physical process of evaporation can be very complicated, in
this question we will assume a much simpler situation. We will also assume that Lake George has only a
single inflow, i.e. rainfall (thus the secret underground passage to Mount Gambier is outside the scope of the
assignment).
We want to develop a model for how Lake George fills and e
s over time. A model is a programmatic
description or simulation of a physical process, like how much water is in the lake after it receives some
amount of rain. In this question, you will build two different models of Lake George: a simple one which
assumes that evaporation is constant, and a more complex one which assumes evaporation is dependent on
some other variables.
Evaporation and rainfall are both measured in millimetres (mm)! 1 mm of rainfall co
esponds to 1 litre
of rain falling per square metre of area. Similarly, 1 mm of evaporation co
esponds to 1 litre of wate
evaporating per square metre of area.
4
Part (a)
Use the monthly rainfall data to estimate the volume of Lake George for each month in the data, assuming a
constant evaporation rate each month. Write a function lake_george_simple_model which takes the Lake
George data in your format, as well as the assumed rate of evaporation (in mm/month), and returns a list of
modelled lake volumes (in litres). We have outlined this function in the template:
    
def lake_george_simple_model(data, evaporation_rate):
pass
Hint - in order to convert both water gained from rainfall (in mm/month) and water lost to evaporation
(also in mm/month) into volume, you will need to make assumptions about both the catchment area and
surface area of Lake George. You can always start by assuming they are both equal to the maximum surface
area of the lake (which you calculated in Question 2) and then refining them from there if you want.
Another hint - you will need a starting point for your calculations. You can use the first record in the data
set as the starting point for your models.
We have also given you a function plot_volumes to help visualise the results. You can use it like this:
plot_volumes(lake_george_simple_model(data, evaporation_rate))
Part (b)
While our simple model will give some very rough answers, it might be too simple to be of much use for real
analysis tasks. For this question, instead of assuming evaporation is constant, use the following equation to
calculate the evaporation rate E (in mm/month):
E = −3Tmin + 1.6Tmax − 2.5W + 4.5S − 0.4H
where T is the temperature (in Celsius), S is the solar exposure (in MJ/month/m2), W is the wind speed
(in m/s), and H is the humidity (as a percentage, i.e. as a number between 0 and 100). Write a function
lake_george_complex_model that uses this evaporation rate instead of assuming the rate is constant. We
have outlined this function in the template:
def lake_george_complex_model(data):
pass
Question 5: Evaluating a Model
We can make as many models as we like, but if there’s no way to quantify how good those models are, then
we have no way to choose which model we should use.
Write a function evaluate_model that takes in your Lake George data and a list of volumes (in litres) and
eturns a float that indicates how bad your model is at estimating the real values. This float is called the
model e
or and it should be equal to zero if and only if the model volumes are all exactly the same as the
eal volumes.
We have provided an outline in the assignment template:
def evaluate_model(data, volumes):
pass
There are lots of different ways to calculate the e
or of a model like this - you might need to do a little bit of
esearch to find something that is appropriate. Make sure you reference any ideas or material you use that is
sourced from somewhere else.
Written Report
Answer the following questions in your written report, answers.pdf. Justify your answers by making reference
to the code you’ve written.
1. Choose part of the code you have written for this assignment and explain it. Make sure to explain it at
the right level: we don’t want a line-by-line description.
2. Which model (simple or complex) is the best? Why?
3. What assumptions did you have to make in order to solve Question 4? Are they realistic? How would
you improve your Lake George model?

COMP1730/6730 S1 2020 — Project Assignment
COMP1730/6730 S1 2020 — Project Assignment
Matthew Alge
XXXXXXXXXX
Important
• The assignment is due 11:55 PM Sunday in week 11, May 31.
• This assignment needs to be completed by yourself (i.e, not in a group). You can share ideas (with
proper attribution) but your code and report must be your own.
• Include your university ID in every file you submit.
• This assignment is worth 15% of your grade for COMP1730/COMP6730.
Overview
In this assignment you will be doing a short data analysis and modelling task using some real-world
geographical data. It is different to the homework assignments you have done up until this point in that fo
almost all of the questions, there is no single “right” answer. You are also not given any tests against which
to check your answers (although you are encouraged to write your own to help you test the co
ectness of
your functions). Because there is no single “right” answer, it will be important to justify the decisions and
choices that you make while completing the assignment. This is important since it allows anyone relying
on your results and conclusions to understand how they were obtained and whether they are suitable for a
particular purpose.
Lake George, or Weereewa (in Ngunnawal), is an intermittent lake to the north-east of Canbe
a. It is
well-known for having dramatic changes in water level. When full, it’s around 145 km2—20 times bigger than
Lake Burley Griffin! But most of the time in contemporary history, it’s been fairly empty. This unusual
ehaviour has given Lake George quite the reputation and even some persistent myths and legends, including
everything from a secret underground link between Lake George and Mount Gambier, to bunyip and alien
sightings. Of course, these legends are (probably) not true, and the fluctuating water levels of Lake George are
explained by its unusually shallow geology, evaporation, and rainfall. In this assignment you will investigate
the water level of Lake George and develop two models of how it fills and e
s over time.
The Data
We have provided you with a CSV file assignment_lake_george_data.csv containing meteorological data
for the Lake George region from 1990–2018, as well as the area and volume of the lake over time. This is
made from data from the Bureau of Meteorology, Digital Earth Australia, and the CSIRO.
You may recall CSV files from Labs 6 and 8. They are text files made up of rows of data, with each column
separated by commas. There are 9 columns in this dataset:
• Date, in YYYYMM format;
• Volume of Lake George, in litres (as at the end of the month);
• Area of Lake George, in square metres (as at the end of the month);
• Total monthly solar exposure, in megajoules per square metre;
• Total monthly rainfall, in mm;
1
Figure 1: Geology of Lake George (Jacobson & Schuett, 1979).
2
• Average daily maximum temperature, in degrees Celsius;
• Average daily minimum temperature, in degrees Celsius;
• Average daily relative humidity, as a percentage; and
• Average monthly wind speed, in metres/second.
The file looks like this (but with more rows):
date,volume,area,solar_exposure,rainfall,max_temperature,min_temperature,humidity,wind_speed
199001, XXXXXXXXXX, XXXXXXXXXX,22.10,22.80,22.82,8.44,37,1.64
199002, XXXXXXXXXX, XXXXXXXXXX,19.40,83.30,22.32,8.41,40,1.26
199003, XXXXXXXXXX, XXXXXXXXXX,16.30,17.60,21.86,8.38,42,1.39
This would co
espond to the following table:
Date Volume Area Solar exp. Rainfall Max temp. Min temp. Humidity Wind
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX37 1.64
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX40 1.26
XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX42 1.39
The Task
You are provided with assignment_template.py, which contains the basic functions of the assignment. The
functions are incomplete. In this assignment, you will fill in the blanks and complete the missing functions.
You will also write a short report about your functions and decisions.
Question 1: Reading the Data
Write a function that takes the file path of the dataset as input, reads the data, and returns the dataset in a
suitable format. The assignment template contains a function for you to fill in:
def read_dataset(filepath):
pass
pass means “do nothing”, and you should remove it when you fill in this function. To load the data, you can
then run
data = read_dataset('assignment_lake_george_data.csv')
as long as the CSV file is in the same directory as your assignment file.
You should read the data from filepath, and return it in an easy-to-use format. This can be any data
type or data structure that you like, as long as it makes sense for the tasks you will be doing later in this
assignment. You will be using this returned value in all other questions of the assignment, so make sure you
choices here support your later solutions!
Hint - have a look at the remaining questions before deciding on what format to load your data in!
Question 2: Statistics about Lake George
Write four functions that output (return) the answers to the following questions:
a. What is the largest area covered by the lake?
. What is the average volume
Answered Same Day May 30, 2021 COMP6730

Solution

Kshitij answered on May 31 2021
148 Votes
1. Choose part of the code you have written for this assignment and explain it. Make sure to explain it at the right level: we don’t want a line-by-line description.
1. Reading the Data :
Function for this operation is read_dataset(filepath) which is taking the file path of the dataset as input, reads the data, and returns the dataset in a Dataframe format.
2. Statistics about Lake George :
In this function we need to do some statistics and need to create different functions for multiple operations .
A. largest_area(data) which is getting used to return the largest area covered by the lake and take data as an argument.
We got the maximum value from the max_temperature column of the dataset
    
B. average_volume(data) which is getting used to return the average volume of the lake and take data as an argument.
We took the sum of all the values of the volume column and got the average volume by...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here