[R-sig-Geo] ERA Interim Daily Data - Query historical data for a point (defined by lat and lon)

Sébastien Piguet sebastien.piguet.1 at gmail.com
Wed Apr 6 17:14:43 CEST 2016


Hi,

I am currently trying to query ECMWF data (
http://apps.ecmwf.int/datasets/data/interim-full-daily/levtype=sfc/) for a
point (lon,lat) ~ (-71.5333,-32.7723). I query an area around this point as
showed below:
[image: Inline image 1]
Then, I use R to open the grip file:

library(rgdal)
library(maptools)
library(raster)
library(RCurl)
library(stringr)

setwd("XXXXXX")
#Initialize raster stack
rs<-stack()

#Get filenames in the folder
filePath<-"YYY"
fileNms<-list.files(filePath)

#Define Point of interest lon / lat
point <- cbind(-71.5333,-32.7723)

# DB loading
grib <- readGDAL(paste(filePath,fileNms[1], sep=""))

# Selection of significant height of total swell = param 237 (
http://www.ecmwf.int/sites/default/files/elibrary/2011/8174-era-interim-archive-version-20.pdf
)
rLayer<-raster(grib, 237)
rLayer


I get the following results:

> summary(rLayer)          band62
Min.    10.25290
1st Qu. 10.33603
Median  10.41916
3rd Qu. 10.41916
Max.    10.41916
NA's    15.00000> summary(rasterToPoints(rLayer))       x
 y              band62
 Min.   :288.0   Min.   :-33.75   Min.   :10.25
 1st Qu.:288.0   1st Qu.:-33.00   1st Qu.:10.34
 Median :288.0   Median :-32.25   Median :10.42
 Mean   :288.2   Mean   :-32.75   Mean   :10.36
 3rd Qu.:288.4   3rd Qu.:-32.25   3rd Qu.:10.42
 Max.   :288.8   Max.   :-32.25   Max.   :10.42

My problems are the following:
1) Latitude is similar from what I expected  but not the longitude.

2) Data about date does not appear

Thank you so much for your help !

Sebastien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20160406/b3c0dfa0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 11233 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20160406/b3c0dfa0/attachment.png>


More information about the R-sig-Geo mailing list