I have a huge problem and I can not find a reason for it. I have two PCa, one in my house and the other in my workplace. The first one is an old notebook with Windows x86 and the other is Windows x64. I work in R in geospacial topics, and I have huge difference between the two system. The idea of my work is get the pixels of a raster (NetCDF) inside of a boundary of my whateshed (vector), so the code that I used is something like this:
ncin <- nc_open(ncfname) #open the ncdf file #extract the variable 'precipitation' and latitud and longitud pp<-ncvar_get(ncin, varid = 'pr', start = c(1,1,1), count = c(-1,-1,1)) lat <- ncin$dim$lat$vals # latitude position lon <- ncin$dim$lon$vals # longitude position # create a raster from ncin and transpose and flip the raster and extent r <- raster(pp, crs ="+init=epsg:4326" ) rt <- t(r) rt <- flip(rt,direction=2) extent(rt)<-extent(c(range(lon), range(lat))) #open the shapefile or boundary (watershed), the shapefile is in CRS:4326 myShape<-readOGR(dsn = myShapefileDir, layer = myShapefile) #crop the raster with the boundary crop = crop(x=rt,y = myShape, snap='in')
Then I have like the raster map is slipped in Windows x86 in comparison with Windows x64, you can look the difference in the next image (The left plot is created in Wx86 and the right in Wx64:
I know that right image is from GRASS GIS, but happens the same in R or GRASS GIS.
The correct image is the right, but I cant get the same results in Windows x86.
The netcdf file can download here at the end (it is call 'CR2MET_v1.4.2_pr_day_1979_2016') :
The boundary or shapefile can download from here (google drive, it is call 'polygon'):