How to re-grid datasets onto the same grid and extrapolate a plot?

3 visualizaciones (últimos 30 días)
Natasha
Natasha el 8 de Mzo. de 2015
Comentada: John D'Errico el 8 de Mzo. de 2015
• Find the relation between CO2 and global mean temperature using recent climate data (ie plotting a graph of CO2 –v- T) and use to predict the required CO2 abundance for a 2K global mean temperature increase. • You will need to regrid the data onto the same time axis and apply some smoothing to make the comparison.
I have 2 dataset, one contains, column 1 years and colum 2 co2 levels, the second dataset contains months of each year with monthly temperatures.
The monthly data has confused me as to how I would regrid both co2 and temp data to be on the same time grid. Do I interpolate and extrapolate separately??
Any assistance on this matter would be greatly appreciated.
The datasets have been attached

Respuestas (2)

Star Strider
Star Strider el 8 de Mzo. de 2015
You haven’t told us how frequently the CO₂ data are reported, only that the temperatures are monthly.
I would interpolate the less-frequently-sampled data to the time base of the more frequently-sampled data.
Plot them both first, to be sure that the interpolation method you use (linear, pchip, etc.) is appropriate to the data. Then re-plot the interpolated data to be sure the interpolation is appropriate.

John D'Errico
John D'Errico el 8 de Mzo. de 2015
Editada: John D'Errico el 8 de Mzo. de 2015
So, apparently you have been given CO2 AND temperature as a function of time, but they have been reported at different times.
So use an interpolation tool to predict the values of EACH of these numbers at the SAME set of times. Yes, you do each of those predictions independently.
You ask how. Just use interp1. Pick a time span that spans both measurements, although beware of too much extrapolation.
So if T1 and T2 are the two sets of times, then you might use something like this for the common times...
Tcommon = linspace(min(min(T1),min(T2)),max(max(T1),max(T2)),100);
Now, interpolate both parameters to the common time vector using interp1. Again, if this involves serious extrapolation in either case, you might reconsider how far out you will extrapolate, as extrapolation is dangerous.
Once the two parameters are comparable, then plot them against each other. Until they are available at the same times, you cannot do so, as that would be meaningless. But, taken at the same set of times, it would now be meaningful to think of the relation between those two parameters. (Think about whether the mere presence of an apparent relation proves causality though.)
  2 comentarios
Natasha
Natasha el 8 de Mzo. de 2015
Thank you for taking the time to reply to my query, your answer is very helpful. When you say to pick a common time span would that therefore mean a range from the year 1880 to 2014?
I understand how to follow your steps for co2 vs time
but for the temp vs time I am a bit confused as the temps are not simply yearly like the co2 values and are instead monthly.
I have numerous data points per year for temperature due to the 12 months each having a temp value for this reason would I have to find the mean temperature for each year and interpolate this against time (in years)
Thank you very much for your assistance,
Natasha
John D'Errico
John D'Errico el 8 de Mzo. de 2015
No. I did NOT say to compute a mean temperature over a year, did I? I said to interpolate! You COULD average temp over each year if you wanted to do so, but this was not indicated as part of your assignment. It would arguably give you smoother temperature data. (Does the temperature have a seasonal trend in it? If it does, then a better modeling effort would have you remove that seasonal pattern, but I don't think this extent of time series modeling is part of your assignment.) All that matters is you get the two data sets to a comparable place.
Anyway, why if you understand how to interpolate CO2 as a function of time, what is the problem with temperature? Monthly data merely means it is sampled roughly in steps of 1/12 of a year. I'd argue that you don't even need to use an exact date there, worrying about how long each month is. Do you know or care what day the measurement was taken? Not really. Do you know exactly what day the CO2 measurement was taken? The data will not be that good or that smooth to worry about this. I don't know if you have explicit dates for the measurements or not, since you don't give us that data. Regardless, you might find the datenum function to be of value here, IF you want or need to use it.
If you want to interpolate both parameters on a monthly basis, do so. Or make it a yearly relation. This was not spelled out in the assignment that you have told us, so pick some way to do so. They do need to be sampled at the SAME TIMES. Need I repeat that? THE SAME TIMES. Otherwise you cannot compare the two measurements. If you get both sets of measurements down to a monthly basis, then you will need to do more smoothing.
So what is the problem here? It looks like you are making this too hard of a problem, over-thinking it, worrying about how you will do something. Perfection is not a goal in this. This is not a PhD thesis you are writing. Just do something that makes sense. As I said before, the data is not that good that it will matter in the long term, and there will indeed be a clear signal, no matter how you process the data.
Pick a logical way of making the two sets of measurements comparable, then do the assignment. Were I grading an assignment like this, I would like to see several things, since an explicit statement of what to do was not provided, at least that you have told us.
- Explain the thought process of making the two data sets comparable. What decision did you make about how to do it. (This should take about two sentences at most.)
- How well did you implement the resampling. Did you do it consistently with the scheme described above?
- Did you accomplish the goals indicated? Did you plot the data as required? Smoothing? Extrapolation? Any modeling?
The last part above actually is multiple steps. You will need to use the plotting tool, but also find ways to do smoothing, extrapolation, etc.
Many years ago, I recall my thesis advisor being proud of his particular expertise - that he could reduce a model to its simplest form, dropping out terms that were of no consequence in the modeling, while retaining the important parts of the model. I think this idea is an important one here, that while you can do things in a complicated way, trying for a complete description of a process, too often that merely gets the person in too deep, losing the forest for the trees. Instead, what matters is to recognize the essentials of the problem, and summarize that essential behavior in a clear way. This is the essence of good modeling.

Iniciar sesión para comentar.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by