[Solved] Error in compareRaster(c(x, rasters)) : different extent

I suppose that the extent of two raster are differet though the raster masked by crop function.You should check the both of awc and bio.au extent base on same reolution, rows and columns. Because I couldn’t download data from hyperlink, I give an example of my own data.

r <- raster('/big_raster')
r1 <- raster('/small_raster')
r2 <- crop(r,extent(r1))

r1
class       : RasterLayer 
dimensions  : 74, 157, 11618  (nrow, ncol, ncell)
resolution  : 0.0833333, 0.0833333  (x, y)
extent      : 89.2185, 102.3018, 30.96238, 37.12905  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
data source : D:\D\temp\Rtest\modis8km.tif 
names       : modis8km 
values      : -32768, 32767  (min, max)

r2
class       : RasterLayer 
dimensions  : 74, 157, 11618  (nrow, ncol, ncell)
resolution  : 0.08333333, 0.08333333  (x, y)
extent      : 89.25, 102.3333, 31, 37.16667  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
data source : in memory
names       : g201401a 
values      : -32768, 7789  (min, max)

Though r1 and r1 with same resolution and dimension, the extent have tiny offset. It cause stack error.

tack(r1,r2)
 Error in compareRaster(x) : different extent

So, you should rebuid the r2 to match r1:

r22 <- raster(vals=values(r2),ext=extent(r1),crs=crs(r1),
                  nrows=dim(r1)[1],ncols=dim(r1)[2])

Now stack(r22,r1) will be successful.

Option-2

Open your resample data in ArcGIS or QGIS and resample all data in same exenstion.Thanks