Question: However, this data has a seasonal variation - it goes up and down depending on the time of year, on top of the long -

However, this data has a seasonal variation -it goes up and down depending on the time of year, on top of the long-term trend. Plus of course there's variation from day to day. What we'd like to do it get rid of the noise and the yearly cycle, and find the long-term trend. There are lots of possible ways to do this, and none of them are necessarially the best. This assignment is going to be more open-ended than most. Your goal is to find a good model for the long-term CO2trend, and make some prediction about what the concentraion of CO2will be in the future. The exercises below should be a guide through a mix of smoothing, fitlering and fitting, but how you want to get to the goals is mostly up to you.
a)From what we saw in class (on Oct. 30th)you should be able to load the daily data
and match it to a day since the data began (y_n and t_n in Dr.Morsony's notebook).You can also make an array of all the days covered by the data (t_all)and an array with the measurement for each data you have data (y_all),but there will be days without data. Deciding what to do with the missing data has a big impact on how we interperate our data, particularly if we want to use a Fourier transforms. In class, we tried filling in the missing data with zero, with the overall average, and with interpolated values. None of these worked particularly well, though interpolation did a bit better. One thing you could try is doing some smoothing of the data first, then interpolating to fill in the missing values. This might help get rid of some of the daily noise. Give the a try. Try smoothing somehow, maybe averaging over 7days or 30days?, then interpolate on the smoothed data to fill in the missing data. Then try a Fourier transfor and see what the poer spectrum looks like. Is it any cleaner?
b)Once you have a decent looking data series, try filtering out low frequencies (less than a couple of years?)and do an inverse Fourier transform, and see what it looks like. Is the behavior at the end any better?
c)Another approach is to try to smooth out the annual (and daily)variations, rather than filter them out. Since we're assuming our data varied on a year timescale, try smoothing on a timescale of a year or more. Maybe a 365-day moving average? (Remember not to include the missing data in your smoothing.)Find a good smoothing and plot your smoothed data. How does it compare to the filtered data from part b)? You can also reduce the number of data points, maybe take monthly or yearly averages rather than trying to fill in data at every point. d)Last, we want to use the long-term trend to make some predictions for the future. Fourier transformes of interpolation are probably going to be a bad way to do this, because they tend to vary a lot at the ends, or depend more heavily on the data near the end. That's bad if you're trying to go beyond the end. Instead, you'll probably need to do some sort of fitting. You might try fitting a polynomial or exponential plus polynomial, or some other function. Try fitting to the raw data, and some good smoothed or filtered data. If you're fitting data you've filtered, you might even want to cut off the ends. Pick what fit you think is "best". Then use your fit to make some predictions. What will the CO2concentration be in 2025?in 2030?2050?2100?How good do you think your predictions are? Can you quantify that (maybe not)?Do your predictions start behaving oddly at some point)(e.g.,do they start to decrease?
DATA:
Date CO2molfrac
(yr,mon, day, decimal)(ppm)
19745191974.3781333.46
19745201974.3808333.64
19745211974.3836333.50
19745221974.3863333.21
19745231974.3890333.05
19745261974.3973333.32
19745271974.4000332.79
Code below (error message)
However, this data has a seasonal variation - it

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!