Read ALL the background, and ALL parts of the assignment ?rst (I wasn't kidding in the hints). Also, REWRITE code as you go through the assignment to make it as compact as you can.
2. If an item begins with the word PLOT it means I want a ?gure, printed on paper. If it says TEXT it means I want a written answer. If it says OUTPUT I want the printed output of a program.
3. Begin with seawater. Load the seawater composition seawater.txt, and compute its salinities and density. The data ci are in units of mmol per kilogram of solution. You must convert them to mi in units of mmol per kilogram of pure water, mi = ci(1 + S). Check values are Sa = 35.129789621939999 g/kg, S = 36.408823947601483 g/kg, and ρ = 1.02355862129182 g/cm3 (the last two digits may differ depending on how you write your program).
(a) TEXT: What is the numerical value of the density of seawater when absolute salinity equals 10 g/kg? You will need to report 7 signi?cant digits of accuracy. Does density increase by less than, greater than, or exactly twice as much if you add twice as much dissolved material to pure water (i.e. molal salinity doubles)? Give your reasons.
(b) PLOT: seawater density (on y axis) for salinities of 0 to 35 g/kg (on x axis). Take enough steps so that the curve looks smooth when plotted. To do this you will have to have to vary the composition of seawater by scaling the ionic concentrations by a constant factor. For example, if the salinity S of the given composition in the seawater ?le is 40.2 g/kg (it is not), then the ionic composition of seawater with a salinity S = 10 can be found by multiplying all the ionic concentrations in the input ?le by 10/40.2.
(c) PLOT: How does the density change when adding a small mass of salt? Plot the ratio of the density anomaly/molal salinity (on y axis) for absolute salinities (x-axis) of 0 to 35 g/kg (on x axis). Take enough steps so the curve looks smooth when plotted. The density anomaly δρ is the difference between the actual density and the density of pure water, i.e. δρ = ρ - ρW.