Dear List,

I have a raster layer:
http://dl.dropbox.com/u/4030944/vulcan.10k.dp.build.387.RES.ann1.vulcproj.img
which
is 356 x 507, and I want the projection and extents of this netcdf file:
http://dl.dropbox.com/u/4030944/mask.regcm.2040-49.climatol.annsum.HDR.future.ncto
match that.

I tried doing the following:

futurehdr <- raster("mask.regcm.2040-49.climatol.annsum.HDR.future.nc")
fhdrcrs <- "+proj=lcc +datum=NAD83 +ellps=GRS80 +units=m, xmn=-2736000,
xmx=2334000, ymn=-1608000, ymx=1952000"
projection(futurehdr) <- fhdrcrs
writeRaster(futurehdr,"mask.regcm.2040-49.climatol.annsum.HDR.future.tif")

but it does not seem to have worked.

> vulcemitres <- raster("vulcan.10k.dp.build.387.RES.ann1.vulcproj.img")
> rcmtest <- raster("mask.regcm.2040-49.climatol.annsum.HDR.future.tif")
> vulcemitres
class       : RasterLayer
filename    :
C:/Work/13Mar.research.bkup/MS_Thesis/work.data.analysis/time.series.analysis/vulcan.10k.dp.build.387.RES.ann1.vulcproj.img
nrow        : 356
ncol        : 507
ncell       : 180492
min value   : 0
max value   : 1207978
projection  : +proj=lcc +lat_1=33 +lat_2=45 +lat_0=40 +lon_0=-97 +x_0=0
+y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs +towgs84=0,0,0
extent      : -2735999, 2334001, -1608001, 1951999  (xmin, xmax, ymin, ymax)
resolution  : 10000, 10000  (x, y)

> rcmtest
class       : RasterLayer
filename    :
C:/Work/13Mar.research.bkup/MS_Thesis/work.data.analysis/time.series.analysis/mask.regcm.2040-49.climatol.annsum.HDR.future.tif
nrow        : 356
ncol        : 507
ncell       : 180492
min value   : ?
max value   : ?
projection  : NA
extent      : -137.3312, -62.11259, 22.12693, 57.35954  (xmin, xmax, ymin,
ymax)
resolution  : 0.1483602, 0.09896801  (x, y)

How can this be accomplished?

Thanks,

-- 
advait godbole

	[[alternative HTML version deleted]]

