[R] how do you interpolate a gaussian grid to a standard 2.5 degreegrid?

Jenny Barnes jmb at mssl.ucl.ac.uk
Tue Dec 12 14:43:02 CET 2006


Thanks Roger,

I shall have a further look at expand.grid() and the fields package and see what 
I can do!

Jenny

>
>Jenny:
>
>If you have two matrices, and know the grid values of the x and y sequences, 
you can use expand.grid() and some trial and error to make a data frame with 
longitude, latitude, and value. From there, I think Krig (or Tps) in the fields 
package will help, with the "Distance=" argument set to rdist.earth. The next 
release of the gstat package is also going to support Great Circle distances, 
but the fields package is written by scientists close to your interests, and is 
already available. You do need to know the latitude spacings, though.
>
>---
>Roger Bivand, NHH, Helleveien 30, N-5045 Bergen,
>Roger.Bivand at nhh.no
>
>
>
>-----Original Message-----
>From: r-help-bounces at stat.math.ethz.ch on behalf of Jenny Barnes
>Sent: Tue 12.12.2006 11:12
>To: r-help at stat.math.ethz.ch
>Subject: [R] how do you interpolate a gaussian grid to a standard 2.5 
degreegrid?
> 
>Dear R-help community,
>
>I have looked on the R search site and archives but cannot find mention of a 
way 
>of interpolating a gaussian distribution of data to a standard 2.5 degree grid. 
>
>I have two global dataset and I need to correlate - unfortunately one is a 2.5 
>degree grid dim[longitude=144,latitude=72] and one is gaussian 
>dim[longitude=192,latitude=94].
>
>I would rally appreciate hearing back from any of you who may have wanted to 
>interpolate your data is this way. If there is no ready-made function you know 
>of but you are willing to share your own methods I would also appreciate any 
>pointers.
>
>Many thanks for your time,
>
>Jenny Barnes
>
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Jennifer Barnes
>PhD student - long range drought prediction
>Climate Extremes
>Department of Space and Climate Physics
>University College London
>Holmbury St Mary, Dorking
>Surrey
>RH5 6NT
>Web: http://climate.mssl.ucl.ac.uk
>
>______________________________________________
>R-help at stat.math.ethz.ch 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.
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jennifer Barnes
PhD student - long range drought prediction
Climate Extremes
Department of Space and Climate Physics
University College London
Holmbury St Mary, Dorking
Surrey
RH5 6NT
01483 204149
07916 139187
Web: http://climate.mssl.ucl.ac.uk




More information about the R-help mailing list