[R] doubt in climate variability analysis in R! - code included!

Nordlund, Dan (DSHS/RDA) NordlDJ at dshs.wa.gov
Sat Oct 30 23:16:53 CEST 2010


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of govindas at msu.edu
> Sent: Friday, October 29, 2010 11:56 AM
> To: r-help at r-project.org
> Subject: Re: [R] doubt in climate variability analysis in R! - code
> included!
> 
> 
> 
> the following code was used ....
> 
> library(akima)
> library(clim.pact)
> nc.1 <- "RF_80-05.nc"
> nc.rf.in <- open.ncdf(nc.1)
> 
> x1 <- retrieve.nc(nc.1, v.nam="Rainfall",l.scale=FALSE,  x.rng=c(70,
> 80), y.rng=c(10, 13.5))
> 
> #dimension is checked for the subset. (lon, lat, time) is changed as
> (time, lat, lon)
> >dim(x1$dat)
> #[1] 2192    8   20
> 
> My question is - how can i convert this array into a dataframe so that
> i have "lat", "lon", "precipitation values" in 3 different columns
> (note, I will have it for just a single day). So, my expected dataframe
> will have rainfall values for each given pair of "lon" and "lat".
> 
> Or is there any other better way to do my spatial variogram analysis
> for a single day given the above dataset?
> 
> here is the link for the dataset.
> HTTP://WWW.4SHARED.COM/FILE/4ZV0G3JR/RF_80-85.HTML
> 

The link to the data did not work, so we still don't have a self-contained, reproducible example.

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204




More information about the R-help mailing list