Pentti
2013-Sep-10 07:50 UTC
[R] Daily average temperature from monthly average temperature
Dear all I'm a new R user and don't know how to find help for my problem: I have monthly mean temperature values for different 30-years periods in the past and future. I want calculate average temperature values for every day in year for each period using the 12 values I have as input data. I have about 4000 points and 5 periods and I think the monthly values represent the daily value in the middle of the month (day numbers 15, 46, 76 ...,350). What library and which functions shall I use (and how) ? Thank you in advance Pentti -- View this message in context: http://r.789695.n4.nabble.com/Daily-average-temperature-from-monthly-average-temperature-tp4675752.html Sent from the R help mailing list archive at Nabble.com.
Jeff Newmiller
2013-Sep-10 14:29 UTC
[R] Daily average temperature from monthly average temperature
Temperature data from the future? This sounds like homework, and the Posting Guide points out that this list is not for homework. I will point out that a linear interpolation approach would be appropriate for an introductory class but would not be very realistic, and there exist papers describing stochastic interpolation methods more appropriate to this type of data, but this is not a statistics or weather modeling mailing list either. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. Pentti <pentti.pirinen at fmi.fi> wrote:>Dear all > >I'm a new R user and don't know how to find help for my problem: >I have monthly mean temperature values for different 30-years periods >in the >past and future. I want calculate average temperature values for every >day >in year for each period using the 12 values I have as input data. >I have about 4000 points and 5 periods and I think the monthly values >represent the daily value in the middle of the month (day numbers 15, >46, 76 >...,350). > >What library and which functions shall I use (and how) ? > >Thank you in advance > >Pentti > > > > >-- >View this message in context: >http://r.789695.n4.nabble.com/Daily-average-temperature-from-monthly-average-temperature-tp4675752.html >Sent from the R help mailing list archive at Nabble.com. > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.
Kevin Wright
2013-Sep-10 15:20 UTC
[R] Daily average temperature from monthly average temperature
A crude way to do this could be to use loess() to model the data and then use predict() to get daily values. Watch out for the tails...loess() is not too bad for cyclical data, but doesn't fit the first and last part of the time series very well. I'm sure there are more sophisticated ways...you didn't say anything about how hard you wanted to work on this. kw On Tue, Sep 10, 2013 at 2:50 AM, Pentti <pentti.pirinen@fmi.fi> wrote:> Dear all > > I'm a new R user and don't know how to find help for my problem: > I have monthly mean temperature values for different 30-years periods in > the > past and future. I want calculate average temperature values for every day > in year for each period using the 12 values I have as input data. > I have about 4000 points and 5 periods and I think the monthly values > represent the daily value in the middle of the month (day numbers 15, 46, > 76 > ...,350). > > What library and which functions shall I use (and how) ? > > Thank you in advance > > Pentti > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Daily-average-temperature-from-monthly-average-temperature-tp4675752.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Kevin Wright [[alternative HTML version deleted]]
Berend Hasselman
2013-Sep-10 15:33 UTC
[R] Daily average temperature from monthly average temperature
On 10-09-2013, at 09:50, Pentti <pentti.pirinen at fmi.fi> wrote:> Dear all > > I'm a new R user and don't know how to find help for my problem: > I have monthly mean temperature values for different 30-years periods in the > past and future. I want calculate average temperature values for every day > in year for each period using the 12 values I have as input data. > I have about 4000 points and 5 periods and I think the monthly values > represent the daily value in the middle of the month (day numbers 15, 46, 76 > ...,350). > > What library and which functions shall I use (and how) ?A package that can do temporal disaggregation is: tempdisagg See CRAN Task Views TimeSeries (http://cran.r-project.org/web/views/TimeSeries.html). But to generate daily temperatures from monthly temperatures? H'm. Berend
Pentti
2013-Sep-11 04:54 UTC
[R] Daily average temperature from monthly average temperature
Thank you very much for your help. Here in Scandinavia the annual average temperature profile looks very much like sin-function. So it's possible estimate the average daily values using monthly average values. The future data is climate change scenario data. Regards Pentti -- View this message in context: http://r.789695.n4.nabble.com/Daily-average-temperature-from-monthly-average-temperature-tp4675752p4675836.html Sent from the R help mailing list archive at Nabble.com.