[R] How to re-project ease( Equal Area Scalable Earth) grid with a ~25 km cylindrical projection to WGS84 0.25 degree?

Jonsson amen.alyaari at Bordeaux.inra.fr
Fri Jan 18 18:11:11 CET 2013


I have nc files  for global soil moisture,here is one file 
https://echange-fichiers.inra.fr/get?k=f9DDllPKdUKs5ZNQwfq

from the metadata ,the projection is cylindrical and the resolution is 25
km(it is based on authalic sphere based on International 1924 ellipsoid).As
I want to compare with other data, I have to make them identical.
- my other data are in WGS84 with 0.25*0.25 degree resolution and extent
-180, 180, -90, 90.
So I want to re-project  the data I have here
 from 
EASE grid, cylindrical,25 km ,1383 pixel  586 lines
 to  
WGS84,0.25*0.25 degree,1440 pixel 720 lines:           
 
f=open.ncdf("C:\\Users\\aalyaari\\Desktop\\SM_RE01_MIR_CLF31D_20100812T000000_20100812T235959_246_001_7.DBL")                                         
                    A =
get.var.ncdf(nc=f,varid="Soil_Moisture",verbose=TRUE)
        I tried this:
                
d
<-raster("C:\\Users\\aalyaari\\Desktop\\SM_RE01_MIR_CLF31D_20100812T000000_20100812T235959_246_001_7.nc",
varname = "Soil_Moisture") 
        d:
        class       : RasterLayer 
        dimensions  : 586, 1383, 810438  (nrow, ncol, ncell)
        resolution  : 0.2603037, 0.2916659  (x, y)
        extent      : -180, 180, -85.4581, 85.4581  (xmin, xmax, ymin, ymax)
      coord. ref. : +proj=longlat +datum=WGS84 
        names       : Retrieved.soil.moisture.value 
           zvar        : Soil_Moisture 
       a <- spTransform(d, CRS ("+proj=longlat +ellps=WGS84 +datum=WGS84
+no_defs"))
but I got this error:
                  
     Error in function (classes, fdef, mtable)  : 
              unable to find an inherited method for function ‘spTransform’
for signature ‘"RasterLayer", "CRS"’        



--
View this message in context: http://r.789695.n4.nabble.com/How-to-re-project-ease-Equal-Area-Scalable-Earth-grid-with-a-25-km-cylindrical-projection-to-WGS84-0-tp4655977.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list